samna.xyloCore2#

Submodules#

Module content#

class samna.xyloCore2.NeuronStateSinkNode#

Bases: NodeInterface

Captures the evolving state of the Xylo network over timesteps.

This class provides functionality to record and retrieve the state of both reservoir (hidden) neurons and output neurons during the execution of a Xylo. Users must first configure the node using a specific Xylo configuration before recording or retrieving states.

get_output_spike(self: samna.xyloCore2.NeuronStateSinkNode) List[List[int]]#

Retrieves the spike count of output neurons.

Returns:

A 2D list where:
  • Outer list size equals the number of reservoir neurons.

  • Inner list size equals the number of recorded timesteps.

  • Each element represents the spike count of an output neuron at a specific timestep.

Return type:

list[list[int]]

get_output_v_mem(self: samna.xyloCore2.NeuronStateSinkNode) List[List[int]]#

Retrieves the membrane potentials of output neurons.

Returns:

A 2D list where:
  • Outer list size equals the number of reservoir neurons.

  • Inner list size equals the number of recorded timesteps.

  • Each element represents the membrane potential of an output neuron at a specific timestep.

Return type:

list[list[int]]

get_reservoir_i_syn(self: samna.xyloCore2.NeuronStateSinkNode) List[List[int]]#

Retrieves the synaptic current of reservoir neurons.

Returns:

A 2D list where:
  • Outer list size equals the number of reservoir neurons.

  • Inner list size equals the number of recorded timesteps.

  • Each element represents the synaptic current of a reservoir neuron at a specific timestep.

Return type:

list[list[int]]

get_reservoir_i_syn2(self: samna.xyloCore2.NeuronStateSinkNode) List[List[int]]#

Retrieves the second synaptic current of reservoir neurons.

Returns:

A 2D list where:
  • Outer list size equals the number of reservoir neurons.

  • Inner list size equals the number of recorded timesteps.

  • Each element represents the second synaptic current of a reservoir neuron at a specific timestep.

Return type:

list[list[int]]

get_reservoir_spike(self: samna.xyloCore2.NeuronStateSinkNode) List[List[int]]#

Retrieves the spike count of reservoir neurons.

Returns:

A 2D list where:
  • Outer list size equals the number of reservoir neurons.

  • Inner list size equals the number of recorded timesteps.

  • Each element represents the spike count of a reservoir neuron at a specific timestep.

Return type:

list[list[int]]

get_reservoir_v_mem(self: samna.xyloCore2.NeuronStateSinkNode) List[List[int]]#

Retrieves the membrane potentials of reservoir neurons.

Returns:

A 2D list where:
  • Outer list size equals the number of reservoir neurons.

  • Inner list size equals the number of recorded timesteps.

  • Each element represents the membrane potential of a reservoir neuron at a specific timestep.

Return type:

list[list[int]]

reset(self: samna.xyloCore2.NeuronStateSinkNode) None#

Resets the internal buffers of the node.

Clears any recorded neuron states and timestamps but retains the currently set configuration. Use this method to restart the state recording without reconfiguring.

set_configuration(self: samna.xyloCore2.NeuronStateSinkNode, arg0: samna.xyloCore2.configuration.XyloConfiguration) None#

Configures the node to record states according to a specified Xylo configuration.

class samna.xyloCore2.OperationMode#

Bases: pybind11_object

Members:

Manual

AcceleratedTime

RealTime

property name#
class samna.xyloCore2.XyloModel#

Bases: pybind11_object

XYLO is a programmable, ultra-low power neuromorphic chip for low-dimensional signal processing. XYLO combines the analog front end(AFE) that can efficiently provide pre-processing functionality to input analog signals. XYLO has is highly re-configurable and scalable, which supports feed-forward, recurrent and reservoir and other complex neural network structure. XYLO can be easily combined with various common sensors such as: MEMS microphone , thermal sensor, pressure sensor, vibration sensor, IMU, Gyro, PPG sensor etc.

apply_configuration(self: samna.xyloCore2.XyloModel, arg0: samna.xyloCore2.configuration.XyloConfiguration) None#

Apply a specific samna.xyloCore2.configuration.XyloConfiguration to the board. Note: This method will open memory access automatically.)

close_ram_access(self: samna.xyloCore2.XyloModel) None#

Disable memory reading and writing. You are encouraged to call this method to close memory access in order to save power after memory manipulation.

get_configuration(self: samna.xyloCore2.XyloModel) samna.xyloCore2.configuration.XyloConfiguration#

Get the cached configuration applied last.

get_sink_node(self: samna.xyloCore2.XyloModel) samna.DeviceSinkNode_xylo_core2_event_input_event#

Get the very sink node of xylo core2’s input events.

get_source_node(self: samna.xyloCore2.XyloModel) samna.DeviceSourceNode_xylo_core2_event_output_event#

Get the very source node of xylo core2’s output events.

open_ram_access(self: samna.xyloCore2.XyloModel) None#

Enable memory reading and writing. xylo core2 can’t manipulate memory by default, you should call this method to open it before manipulation.

reset(self: samna.xyloCore2.XyloModel) None#

Reset all state memory.

write(self: samna.xyloCore2.XyloModel, arg0: List[samna.xyloCore2.event.Spike | samna.xyloCore2.event.WriteRegisterValue | samna.xyloCore2.event.ReadRegisterValue | samna.xyloCore2.event.WriteMemoryValue | samna.xyloCore2.event.ReadMemoryValue | samna.xyloCore2.event.ReadMembranePotential | samna.xyloCore2.event.ReadSynapticCurrent | samna.xyloCore2.event.ReadReservoirSynapticCurrent2 | samna.xyloCore2.event.ReadReservoirSpike | samna.xyloCore2.event.ReadVersion | samna.xyloCore2.event.TriggerProcessing | samna.xyloCore2.event.TriggerReadout]) None#
samna.xyloCore2.validate_configuration(arg0: samna.xyloCore2.configuration.XyloConfiguration) Tuple[bool, str]#

Validate the given configuration.

Parameters:

config (xyloCore2.configuration.XyloConfiguration) – The configuration to validate.

Returns:

A pair of the validation result and the analysis string.

samna.xyloCore2.xylo_configuration_to_event(arg0: samna.xyloCore2.configuration.XyloConfiguration) List[samna.xyloCore2.event.Spike | samna.xyloCore2.event.WriteRegisterValue | samna.xyloCore2.event.ReadRegisterValue | samna.xyloCore2.event.WriteMemoryValue | samna.xyloCore2.event.ReadMemoryValue | samna.xyloCore2.event.ReadMembranePotential | samna.xyloCore2.event.ReadSynapticCurrent | samna.xyloCore2.event.ReadReservoirSynapticCurrent2 | samna.xyloCore2.event.ReadReservoirSpike | samna.xyloCore2.event.ReadVersion | samna.xyloCore2.event.TriggerProcessing | samna.xyloCore2.event.TriggerReadout]#

Get the events for the given Xylo configuration.

Parameters:

config (xyloCore2.configuration.XyloConfiguration) – The configuration to turn into events.

Returns:

A list of events.

samna.xyloCore2.xylo_configuration_to_spi_bytes(arg0: samna.xyloCore2.configuration.XyloConfiguration) bytes#

Get the SPI byte stream for the given Xylo configuration.

Parameters:

config (xyloCore2.configuration.XyloConfiguration) – The configuration to turn into SPI byte stream.

Returns:

Byte stream to emit on SPI.