samna.speck2dMini#

Submodules#

Module content#

class samna.speck2dMini.Speck2dMiniModel#

Bases: pybind11_object

Speck 2d-mini is a comprehensive, multicore spiking neural network processing chip capable of supporting large-scale spiking convolutional neural network (SCNN) with a fully asynchronous chip architecture. It is fully configurable with the spiking neuron capacity of 0.16 million. Furthermore, it integrates the state-of-art dynamic vision sensor (DVS) that enables fully event-driven based, real-time, highly integrated solution for varies dynamic visual scene. Speck 2d-mini can provide intelligence upon the scene at only mW with a response latency in few million seconds for classical applications, such as:

  • Event streaming classification

  • Pattern recognition

  • Smart device control, e.g. home appliance gesture control

  • Behavior detection

  • Security/safety monitoring to identify intruders or dangerous conditions.

  • Ultra-low power edge computing

apply_configuration(self: samna.speck2dMini.Speck2dMiniModel, arg0: samna.speck2dMini.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.speck2dMini.Speck2dMiniModel) samna.speck2dMini.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.speck2dMini.Speck2dMiniModel) samna.DeviceSinkNode_speck2d_mini_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 Speck v2d mini model.

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.speck2dMini.Speck2dMiniModel) samna.DeviceSourceNode_speck2d_mini_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 Speck 2d-mini model

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.speck2dMini.Speck2dMiniModel) None#

Reset all state memory.

samna.speck2dMini.configuration_to_flash_binary(arg0: samna.speck2dMini.configuration.SpeckConfiguration) List[int]#

Convert Speck 2d-mini configuration to binary format to be used in an external flash memory.

Parameters:

event (speck2dMini.configuration.SpeckConfiguration) – The configuration object.

Returns:

A list of data that can be used in an external flash memory.

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

Validate the given configuration.

Parameters:

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

Returns:

A pair of the validation result and the analysis string.