samna.dynapcnnB.event

Contents

samna.dynapcnnB.event#

Submodules#

Module content#

class samna.dynapcnnB.event.AverageSel#

Bases: pybind11_object

Set the average select of readout layer through async serial interface.

This should be set through SPI usually.

property average_sel#

The average select.

from_json(self: samna.dynapcnnB.event.AverageSel, arg0: str) None#
to_json(self: samna.dynapcnnB.event.AverageSel) str#
class samna.dynapcnnB.event.BiasValue#

Bases: pybind11_object

A response to a bias value read request.

property address#

The address of the bias.

property bias#

The value of the bias.

from_json(self: samna.dynapcnnB.event.BiasValue, arg0: str) None#
property layer#

The layer of the bias.

to_json(self: samna.dynapcnnB.event.BiasValue) str#
class samna.dynapcnnB.event.DvsEvent#

Bases: pybind11_object

The DVS event for Dynapcnn-B.

On Dynapcnn-B these events can only be sent to the DVS preprocessing layer.

from_json(self: samna.dynapcnnB.event.DvsEvent, arg0: str) None#
property p#

Polarity

property timestamp#
to_json(self: samna.dynapcnnB.event.DvsEvent) str#
property x#

X location

property y#

Y location

class samna.dynapcnnB.event.FilterDvsEvent#

Bases: pybind11_object

The X/Y/Polarity information for the internally generated Counter update in memory

This event is used for low level operations and should not be needed under normal conditions.

from_json(self: samna.dynapcnnB.event.FilterDvsEvent, arg0: str) None#
property p#

The polarity.

to_json(self: samna.dynapcnnB.event.FilterDvsEvent) str#
property x#

The x coordinate.

property y#

The y coordinate.

class samna.dynapcnnB.event.FilterValue#

Bases: pybind11_object

A response to a filter sram value read request.

This event is used for low level operations and should not be needed under normal conditions.

property counter_data#

The filter sram value.

from_json(self: samna.dynapcnnB.event.FilterValue, arg0: str) None#
to_json(self: samna.dynapcnnB.event.FilterValue) str#
property x#

The x coordinate.

property y#

The y coordinate.

class samna.dynapcnnB.event.FilterValueCurrent#

Bases: pybind11_object

The current Counter value of the original event received from the Event Pre-Processing Layer.

This event is used for low level operations and should not be needed under normal conditions.

property counter_data#

The current counter value.

from_json(self: samna.dynapcnnB.event.FilterValueCurrent, arg0: str) None#
to_json(self: samna.dynapcnnB.event.FilterValueCurrent) str#
class samna.dynapcnnB.event.FilterValuePrevious#

Bases: pybind11_object

The previous Counter value at the location X/Y, i.e., the counter value stored in the SRAM.

This event is used for low level operations and should not be needed under normal conditions.

property counter_data#

The current counter value.

from_json(self: samna.dynapcnnB.event.FilterValuePrevious, arg0: str) None#
to_json(self: samna.dynapcnnB.event.FilterValuePrevious) str#
class samna.dynapcnnB.event.InputInterfaceEvent#

Bases: pybind11_object

InputInterface events are returned from the Dynapcnn-B when monitor_input_enable = True.

The Dynapcnn-B has an asynchronous bus interface which may be configured to echo events received by the asynchronous bus.

This is a low-level event type which is used for debugging.

from_json(self: samna.dynapcnnB.event.InputInterfaceEvent, arg0: str) None#
property msp#

True if this event is a most significant word part, false otherwise.

to_json(self: samna.dynapcnnB.event.InputInterfaceEvent) str#
property value#

Encoded event value.

class samna.dynapcnnB.event.KillSensorPixel#

Bases: pybind11_object

KillSensorPixel are used to disable a particular pixel in the DVS array.

from_json(self: samna.dynapcnnB.event.KillSensorPixel, arg0: str) None#
to_json(self: samna.dynapcnnB.event.KillSensorPixel) str#
property x#

The x coorinate of the pixel to be killed.

property y#

The y coorinate of the pixel to be killed.

class samna.dynapcnnB.event.NeuronValue#

Bases: pybind11_object

A response to a neuron value read request.

property address#

The address of the neuron.

from_json(self: samna.dynapcnnB.event.NeuronValue, arg0: str) None#
property layer#

The layer of the neuron.

property neuron_state#

The value of the neuron.

to_json(self: samna.dynapcnnB.event.NeuronValue) str#
class samna.dynapcnnB.event.OutputModeSel#

Bases: pybind11_object

Set the output mode of readout layer through async serial interface.

This should be set through SPI usually.

from_json(self: samna.dynapcnnB.event.OutputModeSel, arg0: str) None#
property mode_sel#

The output mode.

to_json(self: samna.dynapcnnB.event.OutputModeSel) str#
class samna.dynapcnnB.event.ReadBiasValue#

Bases: pybind11_object

An event that will create a read request for a bias value.

property address#

The address of the bias to read from in its layer.

from_json(self: samna.dynapcnnB.event.ReadBiasValue, arg0: str) None#
property layer#

The layer containing the bias to be read from

to_json(self: samna.dynapcnnB.event.ReadBiasValue) str#
class samna.dynapcnnB.event.ReadFilterValue#

Bases: pybind11_object

Read filter sram value at a coordinate.

from_json(self: samna.dynapcnnB.event.ReadFilterValue, arg0: str) None#
to_json(self: samna.dynapcnnB.event.ReadFilterValue) str#
property x#

The x coordinate

property y#

The y coordinate

class samna.dynapcnnB.event.ReadNeuronValue#

Bases: pybind11_object

An event that will create a read request for a neuron state value.

property address#

The address of the neuron to read from in its layer.

from_json(self: samna.dynapcnnB.event.ReadNeuronValue, arg0: str) None#
property layer#

The layer containing the neuron to be read from

to_json(self: samna.dynapcnnB.event.ReadNeuronValue) str#
class samna.dynapcnnB.event.ReadRegisterValue#

Bases: pybind11_object

An event that will create a register read request.

This event is used for low level operations and should not be needed under normal conditions.

property address#

The address of the register to be read.

from_json(self: samna.dynapcnnB.event.ReadRegisterValue, arg0: str) None#
to_json(self: samna.dynapcnnB.event.ReadRegisterValue) str#
class samna.dynapcnnB.event.ReadSramValue#

Bases: pybind11_object

Read a byte from one sram address.

This event is used for low level operations and should not be needed under normal conditions.

property address#

The sram address.

from_json(self: samna.dynapcnnB.event.ReadSramValue, arg0: str) None#
to_json(self: samna.dynapcnnB.event.ReadSramValue) str#
class samna.dynapcnnB.event.ReadWeightValue#

Bases: pybind11_object

An event that will create a read request for a weight value.

property address#

The address of the weight to read from in its layer.

from_json(self: samna.dynapcnnB.event.ReadWeightValue, arg0: str) None#
property layer#

The layer containing the weight to be read from

to_json(self: samna.dynapcnnB.event.ReadWeightValue) str#
class samna.dynapcnnB.event.ReadoutPinValue#

Bases: pybind11_object

The readout pins events of the chip.

from_json(self: samna.dynapcnnB.event.ReadoutPinValue, arg0: str) None#
property index#

The value of the readout pins, represent the neuron index of max average

property timestamp#

Timestamp of the event

to_json(self: samna.dynapcnnB.event.ReadoutPinValue) str#
class samna.dynapcnnB.event.ReadoutValue#

Bases: pybind11_object

The readout events of Dynapcnn-B.

from_json(self: samna.dynapcnnB.event.ReadoutValue, arg0: str) None#
to_json(self: samna.dynapcnnB.event.ReadoutValue) str#
property value#

The value of the readout, needs to be decoded according to how you set the output_mod_sel of ReadoutConfig.

class samna.dynapcnnB.event.RegisterValue#

Bases: pybind11_object

A response to a register value read request.

This event is used for low level operations and should not be needed under normal conditions.

property address#

The address of the register.

property data#

The value of the register.

from_json(self: samna.dynapcnnB.event.RegisterValue, arg0: str) None#
to_json(self: samna.dynapcnnB.event.RegisterValue) str#
class samna.dynapcnnB.event.ResetSensorPixel#

Bases: pybind11_object

Enable all pixels in the DVS array.

class samna.dynapcnnB.event.Spike#

Bases: pybind11_object

Spikes are events that can be consumed and produced by Dynapcnn-B.

When sending spike events to Dynapcnn-B, the properties will be interpreted as the destination layer, feature, x, y that should receive the event. The timestamp property will be used to inject the event into Dynapcnn-B when the external event sequencer timestamp is equal to or greater than the event timestamp.

When receing spike events from Dynapcnn-B the properties should be interpreted as the layer, feature, x, y neuron that generated the spike. The timestamp parameter is the timestamp at which dynapcnnB sent out the event.

property feature#

Target/producing feature.

from_json(self: samna.dynapcnnB.event.Spike, arg0: str) None#
property layer#

Target layer if it is an input, producing layer of CNN if it is an output. As a target layer, it can be [0, 4] which stands for the 5 CNN layers if you want to inject spikes into one of the CNN layers. And the target layer can also be 5 if you want to send spikes directly to the readout layer from outside.

property timestamp#

When receiving a Spike event from a chip the timestamp will be populated with the time at which the event leave the chip.

When sending a Spike event to a chip the timestamp will be used to control when the event will be applied to the chip.

to_json(self: samna.dynapcnnB.event.Spike) str#
property x#

Target/producing x coordinate.

property y#

Target/producing y coordinate.

class samna.dynapcnnB.event.SramValue#

Bases: pybind11_object

A response to a sram value read request.

This event is used for low level operations and should not be needed under normal conditions.

property address#

The sram address.

property data#

The sram value.

from_json(self: samna.dynapcnnB.event.SramValue, arg0: str) None#
to_json(self: samna.dynapcnnB.event.SramValue) str#
class samna.dynapcnnB.event.WeightValue#

Bases: pybind11_object

A response to a kernel weight value read request.

property address#

The address of the kernel weight.

from_json(self: samna.dynapcnnB.event.WeightValue, arg0: str) None#
property layer#

The layer of the kernel weight.

to_json(self: samna.dynapcnnB.event.WeightValue) str#
property weight#

The value of the kernel weight.

class samna.dynapcnnB.event.WriteBiasValue#

Bases: pybind11_object

An event that will write a bias value.

This event is used for low level operations. Biases will be written automatically when a configuration is applied. Prefer using the configuration whenever possible.

property address#

The address of the bias that will be written to.

property bias#

The bias value to write

from_json(self: samna.dynapcnnB.event.WriteBiasValue, arg0: str) None#
property layer#

The layer containing the bias that will be written to.

to_json(self: samna.dynapcnnB.event.WriteBiasValue) str#
class samna.dynapcnnB.event.WriteFilterValue#

Bases: pybind11_object

Set filter counter value at a location.

property data#

The filter counter value

from_json(self: samna.dynapcnnB.event.WriteFilterValue, arg0: str) None#
to_json(self: samna.dynapcnnB.event.WriteFilterValue) str#
property x#

X coordinate

property y#

Y coordinate

class samna.dynapcnnB.event.WriteNeuronValue#

Bases: pybind11_object

An event that will write the neuron state value of a single neuron.

This event is used for low level operations. Initial neuron state values will be written automatically when a configuration is applied. Prefer using the configuration whenever possible.

property address#

The address of the neuron to be written to

from_json(self: samna.dynapcnnB.event.WriteNeuronValue, arg0: str) None#
property layer#

The layer containing the neuron to be written to

property neuron_state#

The value which will be written to the neuron state address

to_json(self: samna.dynapcnnB.event.WriteNeuronValue) str#
class samna.dynapcnnB.event.WriteRegisterValue#

Bases: pybind11_object

An event that will write a register value.

This event is used for low level operations. Registers will be written automatically when a configuration is applied. Prefer using the configuration whenever possible.

property address#

The address of the register to be written.

property data#

The value to be written

from_json(self: samna.dynapcnnB.event.WriteRegisterValue, arg0: str) None#
to_json(self: samna.dynapcnnB.event.WriteRegisterValue) str#
class samna.dynapcnnB.event.WriteSramValue#

Bases: pybind11_object

Write a byte to one sram address.

This event is used for low level operations and should not be needed under normal conditions.

property address#

The sram address.

property data#

The sram value.

from_json(self: samna.dynapcnnB.event.WriteSramValue, arg0: str) None#
to_json(self: samna.dynapcnnB.event.WriteSramValue) str#
class samna.dynapcnnB.event.WriteWeightValue#

Bases: pybind11_object

An event that will write a kernel weight.

This event is used for low level operations. Kernel weights will be written automatically when a configuration is applied. Prefer using the configuration whenever possible.

property address#

The address of the kernel that will be written to.

from_json(self: samna.dynapcnnB.event.WriteWeightValue, arg0: str) None#
property layer#

The layer containing the kernel weight that will be written to.

to_json(self: samna.dynapcnnB.event.WriteWeightValue) str#
property weight#

The weight value to write

samna.dynapcnnB.event.compute_sram_address(arg0: samna.dynapcnnB.event.Spike | samna.dynapcnnB.event.DvsEvent | samna.dynapcnnB.event.KillSensorPixel | samna.dynapcnnB.event.ResetSensorPixel | samna.dynapcnnB.event.OutputModeSel | samna.dynapcnnB.event.AverageSel | samna.dynapcnnB.event.AsiRequest | samna.dynapcnnB.event.ReadoutRequest | samna.dynapcnnB.event.ScanChainValue | samna.dynapcnnB.event.WriteNeuronValue | samna.dynapcnnB.event.ReadNeuronValue | samna.dynapcnnB.event.WriteWeightValue | samna.dynapcnnB.event.ReadWeightValue | samna.dynapcnnB.event.WriteBiasValue | samna.dynapcnnB.event.ReadBiasValue | samna.dynapcnnB.event.WriteRegisterValue | samna.dynapcnnB.event.ReadRegisterValue | samna.dynapcnnB.event.WriteFilterValue | samna.dynapcnnB.event.ReadFilterValue | samna.dynapcnnB.event.WriteSramValue | samna.dynapcnnB.event.ReadSramValue | samna.dynapcnnB.event.IdCodeRequest) int | None#

Compute the address of the a given event in the SRAM.

Parameters:

event (dynapcnnB.event.InputEvent) – The event to compute the address for.

Returns:

The address of the event in the SRAM if it’s possible to compute the address, otherwise return None.

samna.dynapcnnB.event.determine_sram_eventrom_address(arg0: int) samna.dynapcnnB.event.Spike | samna.dynapcnnB.event.DvsEvent | samna.dynapcnnB.event.InputInterfaceEvent | samna.dynapcnnB.event.NeuronValue | samna.dynapcnnB.event.BiasValue | samna.dynapcnnB.event.WeightValue | samna.dynapcnnB.event.RegisterValue | samna.dynapcnnB.event.ReadoutValue | samna.dynapcnnB.event.FilterValue | samna.dynapcnnB.event.SramValue | samna.dynapcnnB.event.FilterDvsEvent | samna.dynapcnnB.event.FilterValueCurrent | samna.dynapcnnB.event.FilterValuePrevious | samna.dynapcnnB.event.ScanChainValue | samna.dynapcnnB.event.IdCode | samna.dynapcnnB.event.ReadoutPinValue#

Determine the SRAM event for the given address.

Parameters:

address (int) – The address to determine the event for.

Returns:

The event for the given address.