samna.speck3.event#
Submodules#
Module content#
- class samna.speck3.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.speck3.event.AverageSel, arg0: str) None #
- to_json(self: samna.speck3.event.AverageSel) str #
- class samna.speck3.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.speck3.event.BiasValue, arg0: str) None #
- property layer#
The layer of the bias.
- to_json(self: samna.speck3.event.BiasValue) str #
- class samna.speck3.event.DvsEvent#
Bases:
pybind11_object
The DVS event for Speck 3.
On Speck 3 these events can only be sent to the DVS preprocessing layer.
- from_json(self: samna.speck3.event.DvsEvent, arg0: str) None #
- property p#
Polarity
- property timestamp#
- to_json(self: samna.speck3.event.DvsEvent) str #
- property x#
X location
- property y#
Y location
- class samna.speck3.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.speck3.event.FilterDvsEvent, arg0: str) None #
- property p#
The polarity.
- to_json(self: samna.speck3.event.FilterDvsEvent) str #
- property x#
The x coordinate.
- property y#
The y coordinate.
- class samna.speck3.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.speck3.event.FilterValue, arg0: str) None #
- to_json(self: samna.speck3.event.FilterValue) str #
- property x#
The x coordinate.
- property y#
The y coordinate.
- class samna.speck3.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.speck3.event.FilterValueCurrent, arg0: str) None #
- to_json(self: samna.speck3.event.FilterValueCurrent) str #
- class samna.speck3.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.speck3.event.FilterValuePrevious, arg0: str) None #
- to_json(self: samna.speck3.event.FilterValuePrevious) str #
- class samna.speck3.event.FlashErase#
Bases:
pybind11_object
Indicate to erase flash.
Only available under spi-bridge mode.
- property address#
The address(24-bit) to erase.
- from_json(self: samna.speck3.event.FlashErase, arg0: str) None #
- to_json(self: samna.speck3.event.FlashErase) str #
- property type#
Erase type shall be a value of speck3.FlashEraseType: 1: erase a 4KB sector from address; 2: erase a 32KB block from address; 3: erase a 64KB block from address; 4: erase chip, address not use.
- class samna.speck3.event.FlashQueryStatus#
Bases:
pybind11_object
Query flash status.
Only available under spi-bridge mode.
- class samna.speck3.event.FlashRead#
Bases:
pybind11_object
Indicate to read data directly from flash.
Only available under spi-bridge mode.
- property address#
The address(24-bit) to read.
- from_json(self: samna.speck3.event.FlashRead, arg0: str) None #
- to_json(self: samna.speck3.event.FlashRead) str #
- class samna.speck3.event.FlashSpiRaw#
Bases:
pybind11_object
Raw byte stream to send to DI pin.
Only available under spi-bridge mode.
- from_json(self: samna.speck3.event.FlashSpiRaw, arg0: str) None #
- property raw_data#
Raw byte stream.
- to_json(self: samna.speck3.event.FlashSpiRaw) str #
- class samna.speck3.event.FlashStatus#
Bases:
pybind11_object
Status of flash, value is one of speck3.FlashStatusType.
Only available under spi-bridge mode.
- from_json(self: samna.speck3.event.FlashStatus, arg0: str) None #
- to_json(self: samna.speck3.event.FlashStatus) str #
- class samna.speck3.event.FlashValue#
Bases:
pybind11_object
Data read directly from flash.
- property address#
The address(24-bit) read from.
- property data#
The data read from the address.
- from_json(self: samna.speck3.event.FlashValue, arg0: str) None #
- to_json(self: samna.speck3.event.FlashValue) str #
- class samna.speck3.event.FlashWrite#
Bases:
pybind11_object
Indicate to write data to state register.
Only available under spi-bridge mode.
- property address#
The address(24-bit) to write.
- property data#
The data(24-bit) to write.
- from_json(self: samna.speck3.event.FlashWrite, arg0: str) None #
- to_json(self: samna.speck3.event.FlashWrite) str #
- class samna.speck3.event.FlashWriteEnable#
Bases:
pybind11_object
Enable writing.
Only available under spi-bridge mode.
- class samna.speck3.event.InputInterfaceEvent#
Bases:
pybind11_object
InputInterface events are returned from the Speck 3 when monitor_input_enable = True.
The Speck 3 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.speck3.event.InputInterfaceEvent, arg0: str) None #
- property msp#
True if this event is a most significant word part, false otherwise.
- to_json(self: samna.speck3.event.InputInterfaceEvent) str #
- property value#
Encoded event value.
- class samna.speck3.event.NeuronValue#
Bases:
pybind11_object
A response to a neuron value read request.
- property address#
The address of the neuron.
- from_json(self: samna.speck3.event.NeuronValue, arg0: str) None #
- property layer#
The layer of the neuron.
- property neuron_state#
The value of the neuron.
- to_json(self: samna.speck3.event.NeuronValue) str #
- class samna.speck3.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.speck3.event.OutputModeSel, arg0: str) None #
- property mode_sel#
The output mode.
- to_json(self: samna.speck3.event.OutputModeSel) str #
- class samna.speck3.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.speck3.event.ReadBiasValue, arg0: str) None #
- property layer#
The layer containing the bias to be read from
- to_json(self: samna.speck3.event.ReadBiasValue) str #
- class samna.speck3.event.ReadFilterValue#
Bases:
pybind11_object
Read filter sram value at a coordinate.
- from_json(self: samna.speck3.event.ReadFilterValue, arg0: str) None #
- to_json(self: samna.speck3.event.ReadFilterValue) str #
- property x#
The x coordinate
- property y#
The y coordinate
- class samna.speck3.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.speck3.event.ReadNeuronValue, arg0: str) None #
- property layer#
The layer containing the neuron to be read from
- to_json(self: samna.speck3.event.ReadNeuronValue) str #
- class samna.speck3.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.speck3.event.ReadRegisterValue, arg0: str) None #
- to_json(self: samna.speck3.event.ReadRegisterValue) str #
- class samna.speck3.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.speck3.event.ReadSramValue, arg0: str) None #
- to_json(self: samna.speck3.event.ReadSramValue) str #
- class samna.speck3.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.speck3.event.ReadWeightValue, arg0: str) None #
- property layer#
The layer containing the weight to be read from
- to_json(self: samna.speck3.event.ReadWeightValue) str #
- class samna.speck3.event.ReadoutPinValue#
Bases:
pybind11_object
The readout pins events of Speck 3.
- from_json(self: samna.speck3.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.speck3.event.ReadoutPinValue) str #
- class samna.speck3.event.ReadoutValue#
Bases:
pybind11_object
The readout events of Speck 3.
- from_json(self: samna.speck3.event.ReadoutValue, arg0: str) None #
- to_json(self: samna.speck3.event.ReadoutValue) str #
- property value#
The value of the readout, needs to be decoded according to how you set the
output_mod_sel
ofReadoutConfig
.
- class samna.speck3.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.speck3.event.RegisterValue, arg0: str) None #
- to_json(self: samna.speck3.event.RegisterValue) str #
- class samna.speck3.event.SpecialReset#
Bases:
pybind11_object
The Special reset command of Speck 3, this is for debug only.
- property command#
The special reset command.
- from_json(self: samna.speck3.event.SpecialReset, arg0: str) None #
- to_json(self: samna.speck3.event.SpecialReset) str #
- class samna.speck3.event.Spike#
Bases:
pybind11_object
Spikes are events that can be consumed and produced by Speck 2e.
When sending spike events to Speck 2e, 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 Speck 2e when the external event sequencer timestamp is equal to or greater than the event timestamp.
When receing spike events from Speck 2e the properties should be interpreted as the layer, feature, x, y neuron that generated the spike. The timestamp parameter is the timestamp at which speck3 sent out the event.
- property feature#
Target/producing feature.
- from_json(self: samna.speck3.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.speck3.event.Spike) str #
- property x#
Target/producing x coordinate.
- property y#
Target/producing y coordinate.
- class samna.speck3.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.speck3.event.SramValue, arg0: str) None #
- to_json(self: samna.speck3.event.SramValue) str #
- class samna.speck3.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.speck3.event.WeightValue, arg0: str) None #
- property layer#
The layer of the kernel weight.
- to_json(self: samna.speck3.event.WeightValue) str #
- property weight#
The value of the kernel weight.
- class samna.speck3.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.speck3.event.WriteBiasValue, arg0: str) None #
- property layer#
The layer containing the bias that will be written to.
- to_json(self: samna.speck3.event.WriteBiasValue) str #
- class samna.speck3.event.WriteFilterValue#
Bases:
pybind11_object
Set filter counter value at a location.
- property data#
The filter counter value
- from_json(self: samna.speck3.event.WriteFilterValue, arg0: str) None #
- to_json(self: samna.speck3.event.WriteFilterValue) str #
- property x#
X coordinate
- property y#
Y coordinate
- class samna.speck3.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.speck3.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.speck3.event.WriteNeuronValue) str #
- class samna.speck3.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.speck3.event.WriteRegisterValue, arg0: str) None #
- to_json(self: samna.speck3.event.WriteRegisterValue) str #
- class samna.speck3.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.speck3.event.WriteSramValue, arg0: str) None #
- to_json(self: samna.speck3.event.WriteSramValue) str #
- class samna.speck3.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.speck3.event.WriteWeightValue, arg0: str) None #
- property layer#
The layer containing the kernel weight that will be written to.
- to_json(self: samna.speck3.event.WriteWeightValue) str #
- property weight#
The weight value to write
- samna.speck3.event.compute_sram_address(arg0: samna.speck3.event.Spike | samna.speck3.event.DvsEvent | samna.speck3.event.OutputModeSel | samna.speck3.event.AverageSel | samna.speck3.event.AsiRequest | samna.speck3.event.ReadoutRequest | samna.speck3.event.ScanChainValue | samna.speck3.event.WriteNeuronValue | samna.speck3.event.ReadNeuronValue | samna.speck3.event.WriteWeightValue | samna.speck3.event.ReadWeightValue | samna.speck3.event.WriteBiasValue | samna.speck3.event.ReadBiasValue | samna.speck3.event.WriteRegisterValue | samna.speck3.event.ReadRegisterValue | samna.speck3.event.WriteFilterValue | samna.speck3.event.ReadFilterValue | samna.speck3.event.WriteSramValue | samna.speck3.event.ReadSramValue | samna.speck3.event.IdCodeRequest | samna.speck3.event.FlashRead | samna.speck3.event.FlashWrite | samna.speck3.event.FlashErase | samna.speck3.event.FlashSpiRaw | samna.speck3.event.FlashWriteEnable | samna.speck3.event.FlashQueryStatus | samna.speck3.event.SpecialReset) int | None #
Compute the address of the a given event in the SRAM.
- Parameters:
event (
speck3.event.Speck3InputEvent
) – 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.speck3.event.determine_sram_eventrom_address(arg0: int) samna.speck3.event.Spike | samna.speck3.event.DvsEvent | samna.speck3.event.InputInterfaceEvent | samna.speck3.event.NeuronValue | samna.speck3.event.BiasValue | samna.speck3.event.WeightValue | samna.speck3.event.RegisterValue | samna.speck3.event.ReadoutValue | samna.speck3.event.FilterValue | samna.speck3.event.SramValue | samna.speck3.event.FilterDvsEvent | samna.speck3.event.FilterValueCurrent | samna.speck3.event.FilterValuePrevious | samna.speck3.event.ScanChainValue | samna.speck3.event.IdCode | samna.speck3.event.FlashValue | samna.speck3.event.FlashSpiRaw | samna.speck3.event.FlashStatus | samna.speck3.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.