samna.speck2b#

Submodules#

Module content#

class samna.speck2b.Speck2bModel#

Bases: pybind11_object

Speck v2b is a multi-core, neuromorphic processor chip featuring an integrated DVS sensor for real-time, fully integrated vision applications.

apply_configuration(self: samna.speck2b.Speck2bModel, arg0: samna.speck2b.configuration.SpeckConfiguration) None#

Apply a configuration to the device.

The configuration will first be validated. If the configuration is not valid this function will throw an exception with an error message describing the validation failure.

Parameters:

config (SpeckConfiguration) – Configuration to validate and apply.

get_configuration(self: samna.speck2b.Speck2bModel) samna.speck2b.configuration.SpeckConfiguration#

Returns a copy of the current configuration of the device.

Note that this is simply a copy of configuration provided by the last successful call to apply_configuration(). This function does not read physical device state.

get_sink_node(self: samna.speck2b.Speck2bModel) samna.DeviceSinkNode_speck2b_event_input_event#

Get the handle to the model sink node

The model sink node ties into the filter system. It will transmit all events sent to sink node to the device represented by the Speck2bModel.

To write events to this sink node, a BasicSourceNode must be instantiated and connected to the sink as follows:

source = samna.graph.source_to(dk.get_model().get_sink_node())
source.write([evt1, evt2, evt3, ...])
Returns:

A handle to the model sink node

get_source_node(self: samna.speck2b.Speck2bModel) samna.DeviceSourceNode_speck2b_event_output_event#

Get the handle to the model source node

The model source node ties into the filter system. It will emit all events produced by the device represented by the Speck2bModel

To read events from this source node, a BasicSinkNode must be instantiated and connected to the source as follows:

buf = samna.graph.sink_from(dk.get_model().get_source_node())
events = buf.get_events() # an array of events will be returned
Returns:

A handle to the model sink node

reset(self: samna.speck2b.Speck2bModel) None#

Reset all state memory.

write(self: samna.speck2b.Speck2bModel, arg0: List[samna.speck2b.event.Spike | samna.speck2b.event.RouterEvent | samna.speck2b.event.DvsEvent | samna.speck2b.event.KillSensorPixel | samna.speck2b.event.ResetSensorPixel | samna.speck2b.event.WriteNeuronValue | samna.speck2b.event.ReadNeuronValue | samna.speck2b.event.WriteWeightValue | samna.speck2b.event.ReadWeightValue | samna.speck2b.event.WriteBiasValue | samna.speck2b.event.ReadBiasValue | samna.speck2b.event.WriteRegisterValue | samna.speck2b.event.ReadRegisterValue | samna.speck2b.event.WriteMemoryValue | samna.speck2b.event.ReadMemoryValue | samna.speck2b.event.WriteFilterValue | samna.speck2b.event.ReadFilterValue | samna.speck2b.event.OutputNeuronSel | samna.speck2b.event.OutputModeSel | samna.speck2b.event.ScanChainValue]) None#

This function is DEPRECATED, please prefer sending events by streaming to the sink node using get_sink_node.

Submits a sequence (list) of events to be transmitted to the device represented by the device model. This function returns immediately. Events will be transmitted in the background.

Parameters:

events (List[speck2b input event]) – Events which will be sent to the device. All events must be in the InputEvent variant. Event ordering will be preserved.

samna.speck2b.validate_configuration(arg0: samna.speck2b.configuration.SpeckConfiguration) Tuple[bool, str]#

Validates the given configuration.

Parameters:

config (speck2b.configuration.SpeckConfiguration) – The configuration to validate.

Returns:

A pair of the validation result and the analysis string.