spynnaker8.external_devices package¶
Module contents¶
The spynnaker.pyNN
package contains the front end specifications
and implementation for the PyNN High-level API
(http://neuralensemble.org/trac/PyNN)
-
class
spynnaker8.external_devices.
EIEIOType
(value, key_bytes, payload_bytes, doc='')[source]¶ Bases:
enum.Enum
Possible types of EIEIO packets
-
KEY_16_BIT
= 0¶
-
KEY_32_BIT
= 2¶
-
KEY_PAYLOAD_16_BIT
= 1¶
-
KEY_PAYLOAD_32_BIT
= 3¶
-
-
class
spynnaker8.external_devices.
ExternalCochleaDevice
(n_neurons, spinnaker_link, label=None, board_address=None)[source]¶ Bases:
pacman.model.graphs.application.application_spinnaker_link_vertex.ApplicationSpiNNakerLinkVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
Parameters:
-
class
spynnaker8.external_devices.
ExternalFPGARetinaDevice
(mode, retina_key, spinnaker_link_id, polarity, label=None, board_address=None)[source]¶ Bases:
pacman.model.graphs.application.application_spinnaker_link_vertex.ApplicationSpiNNakerLinkVertex
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.abstract_provides_outgoing_partition_constraints.AbstractProvidesOutgoingPartitionConstraints
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
Parameters: -
DOWN_POLARITY
= 'DOWN'¶
-
MERGED_POLARITY
= 'MERGED'¶
-
MODE_128
= '128'¶
-
MODE_16
= '16'¶
-
MODE_32
= '32'¶
-
MODE_64
= '64'¶
-
UP_POLARITY
= 'UP'¶
-
get_outgoing_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge partition that comes out of this vertex.
Parameters: partition (OutgoingEdgePartition) – An edge that comes out of this vertex Returns: A list of constraints Return type: list(AbstractConstraint)
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
-
-
class
spynnaker8.external_devices.
MunichRetinaDevice
(retina_key, spinnaker_link_id, position, label='MunichRetinaDevice', polarity=None, board_address=None)[source]¶ Bases:
pacman.model.graphs.application.application_spinnaker_link_vertex.ApplicationSpiNNakerLinkVertex
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.abstract_provides_outgoing_partition_constraints.AbstractProvidesOutgoingPartitionConstraints
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
An Omnibot silicon retina device.
Parameters: -
DOWN_POLARITY
= 'DOWN'¶
-
LEFT_RETINA
= 'LEFT'¶
-
LEFT_RETINA_DISABLE
= 69¶
-
LEFT_RETINA_ENABLE
= 69¶
-
LEFT_RETINA_KEY_SET
= 67¶
-
MANAGEMENT_BIT
= 1024¶
-
MANAGEMENT_MASK
= 4294965248¶
-
MERGED_POLARITY
= 'MERGED'¶
-
RIGHT_RETINA
= 'RIGHT'¶
-
RIGHT_RETINA_DISABLE
= 70¶
-
RIGHT_RETINA_ENABLE
= 70¶
-
RIGHT_RETINA_KEY_SET
= 68¶
-
UP_POLARITY
= 'UP'¶
-
default_parameters
= {'board_address': None, 'label': 'MunichRetinaDevice', 'polarity': None}¶
-
get_outgoing_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge partition that comes out of this vertex.
Parameters: partition (OutgoingEdgePartition) – An edge that comes out of this vertex Returns: A list of constraints Return type: list(AbstractConstraint)
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
-
-
class
spynnaker8.external_devices.
MunichMotorDevice
(spinnaker_link_id, board_address=None, speed=30, sample_time=4096, update_time=512, delay_time=5, delta_threshold=23, continue_if_not_different=True, label=None)[source]¶ Bases:
pacman.model.graphs.application.application_vertex.ApplicationVertex
,spinn_front_end_common.abstract_models.abstract_vertex_with_dependent_vertices.AbstractVertexWithEdgeToDependentVertices
,spinn_front_end_common.abstract_models.abstract_generates_data_specification.AbstractGeneratesDataSpecification
,spinn_front_end_common.abstract_models.abstract_provides_outgoing_partition_constraints.AbstractProvidesOutgoingPartitionConstraints
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
An Omnibot motor control device. This has a real vertex and an external device vertex.
Parameters: -
PARAMS_REGION
= 1¶
-
PARAMS_SIZE
= 28¶
-
SYSTEM_REGION
= 0¶
-
create_machine_vertex
(vertex_slice, resources_required, label=None, constraints=None)[source]¶ Create a machine vertex from this application vertex
Parameters: - vertex_slice (Slice or None) – The slice of atoms that the machine vertex will cover, or None to use the default slice
- resources_required (ResourceContainer) – The resources used by the machine vertex.
- label (str or None) – human readable label for the machine vertex
- constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex.
-
default_initial_values
= {}¶
-
default_parameters
= {'board_address': None, 'continue_if_not_different': True, 'delay_time': 5, 'delta_threshold': 23, 'label': None, 'sample_time': 4096, 'speed': 30, 'update_time': 512}¶
-
dependent_vertices
()[source]¶ Return the vertices which this vertex depends upon
Return type: iterable(ApplicationVertex) Return the vertices which this vertex depends upon
-
edge_partition_identifiers_for_dependent_vertex
(vertex)[source]¶ Return the dependent edge identifiers for a particular dependent vertex.
Parameters: vertex (ApplicationVertex) – Return type: iterable(str) Return the dependent edge identifier
-
generate_data_specification
(spec, placement, routing_info, machine_time_step, time_scale_factor)[source]¶ Generate a data specification.
Parameters: - spec (DataSpecificationGenerator) – The data specification to write to
- placement (Placement) – The placement the vertex is located at
Return type:
-
get_outgoing_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge partition that comes out of this vertex.
Parameters: partition (OutgoingEdgePartition) – An edge that comes out of this vertex Returns: A list of constraints Return type: list(AbstractConstraint)
-
get_resources_used_by_atoms
(vertex_slice)[source]¶ Get the separate resource requirements for a range of atoms
Parameters: vertex_slice (Slice) – the low value of atoms to calculate resources from Returns: a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource Return type: ResourceContainer
-
reserve_memory_regions
(spec)[source]¶ Reserve SDRAM space for memory areas:
- Area for information on what data to record
- area for start commands
- area for end commands
Parameters: spec (DataSpecificationGenerator) – The data specification to write to
-
-
class
spynnaker8.external_devices.
ArbitraryFPGADevice
(n_neurons, fpga_link_id, fpga_id, board_address=None, label=None)[source]¶ Bases:
pacman.model.graphs.application.application_fpga_vertex.ApplicationFPGAVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
Parameters: - n_neurons – Number of neurons
- fpga_link_id –
- fpga_id –
- board_address –
- label –
-
class
spynnaker8.external_devices.
PushBotRetinaViewer
(resolution, port=0, display_max=33.0, frame_time_ms=10, decay_time_constant_ms=100)[source]¶ Bases:
threading.Thread
A viewer for the pushbot’s retina. This is a thread that can be launched in parallel with the control code.
Based on matplotlib
-
local_host
¶
-
local_port
¶
-
-
class
spynnaker8.external_devices.
ExternalDeviceLifControl
(**kwargs)[source]¶ Bases:
spynnaker.pyNN.models.neuron.abstract_pynn_neuron_model_standard.AbstractPyNNNeuronModelStandard
Abstract control module for the PushBot, based on the LIF neuron, but without spikes, and using the voltage as the output to the various devices
-
create_vertex
(n_neurons, label, constraints, spikes_per_second, ring_buffer_sigma, incoming_spike_buffer_size, n_steps_per_timestep)[source]¶ Create a vertex for a population of the model
Parameters: - n_neurons (int) – The number of neurons in the population
- label (str) – The label to give to the vertex
- constraints (list(AbstractConstraint) or None) – A list of constraints to give to the vertex, or None
Returns: An application vertex for the population
Return type:
-
-
class
spynnaker8.external_devices.
MunichIoSpiNNakerLinkProtocol
(mode, instance_key=None, uart_id=0)[source]¶ Bases:
object
Provides Multicast commands for the Munich SpiNNaker-Link protocol
Parameters: -
class
MODES
[source]¶ Bases:
enum.Enum
types of modes supported by this protocol
-
BALL_BALANCER
= 3¶
-
FREE
= 5¶
-
MY_ORO_BOTICS
= 4¶
-
PUSH_BOT
= 1¶
-
RESET_TO_DEFAULT
= 0¶
-
SPOMNIBOT
= 2¶
-
-
add_payload_logic_to_current_output_key
¶
-
bias_values_key
¶
-
configure_master_key_key
¶
-
disable_retina_key
¶
-
enable_disable_motor_key
¶
-
generic_motor0_raw_output_leak_to_0_key
¶
-
generic_motor0_raw_output_permanent_key
¶
-
generic_motor1_raw_output_leak_to_0_key
¶
-
generic_motor1_raw_output_permanent_key
¶
-
generic_motor_total_period_key
¶
-
master_slave_key
¶
-
poll_individual_sensor_continuously_key
¶
-
poll_sensors_once_key
¶
-
protocol_instance
= 0¶
-
push_bot_laser_config_active_time_key
¶
-
push_bot_laser_config_total_period_key
¶
-
push_bot_laser_set_frequency_key
¶
-
push_bot_led_back_active_time_key
¶
-
push_bot_led_front_active_time_key
¶
-
push_bot_led_set_frequency_key
¶
-
push_bot_led_total_period_key
¶
-
push_bot_motor_0_leaking_towards_zero_key
¶
-
push_bot_motor_0_permanent_key
¶
-
push_bot_motor_1_leaking_towards_zero_key
¶
-
push_bot_motor_1_permanent_key
¶
-
push_bot_speaker_config_active_time_key
¶
-
push_bot_speaker_config_total_period_key
¶
-
push_bot_speaker_set_melody_key
¶
-
push_bot_speaker_set_tone_key
¶
-
pwm_pin_output_timer_a_channel_0_ratio_key
¶
-
pwm_pin_output_timer_a_channel_1_ratio_key
¶
-
pwm_pin_output_timer_a_duration_key
¶
-
pwm_pin_output_timer_b_channel_0_ratio_key
¶
-
pwm_pin_output_timer_b_channel_1_ratio_key
¶
-
pwm_pin_output_timer_b_duration_key
¶
-
pwm_pin_output_timer_c_channel_0_ratio_key
¶
-
pwm_pin_output_timer_c_channel_1_ratio_key
¶
-
pwm_pin_output_timer_c_duration_key
¶
-
query_state_of_io_lines_key
¶
-
remove_payload_logic_to_current_output_key
¶
-
reset_retina_key
¶
-
static
sent_mode_command
()[source]¶ True if the mode command has ever been requested by any instance
-
set_mode_key
¶
-
set_output_pattern_for_payload_key
¶
-
set_payload_pins_to_high_impedance_key
¶
-
set_retina_key_key
¶
-
set_retina_transmission
(retina_key=<RetinaKey.NATIVE_128_X_128: 67108864>, retina_payload=None, time=None)[source]¶ Set the retina transmission key
Parameters: Returns: the command to send
Return type:
-
set_retina_transmission_key
¶
-
turn_off_sensor_reporting_key
¶
-
class
-
class
spynnaker8.external_devices.
PushBotLaser
[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.abstract_push_bot_output_device.AbstractPushBotOutputDevice
The properties of the laser device that may be set.
-
LASER_ACTIVE_TIME
= 1¶ The active period for the laser (no larger than the total period)
-
LASER_FREQUENCY
= 2¶ The frequency of the laser
-
LASER_TOTAL_PERIOD
= 0¶ The total period for the laser
-
-
class
spynnaker8.external_devices.
PushBotLED
[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.abstract_push_bot_output_device.AbstractPushBotOutputDevice
The properties of the LED device that may be set.
-
LED_BACK_ACTIVE_TIME
= 2¶
-
LED_FREQUENCY
= 3¶
-
LED_FRONT_ACTIVE_TIME
= 1¶
-
LED_TOTAL_PERIOD
= 0¶
-
-
class
spynnaker8.external_devices.
PushBotMotor
[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.abstract_push_bot_output_device.AbstractPushBotOutputDevice
The properties of the motor devices that may be set. The pushbot has two motors, 0 (left) and 1 (right).
-
MOTOR_0_LEAKY
= 1¶ For motor 0, set a variable speed depending on time since event receive
-
MOTOR_0_PERMANENT
= 0¶ For motor 0, set a particular speed
-
MOTOR_1_LEAKY
= 3¶ For motor 1, set a variable speed depending on time since event receive
-
MOTOR_1_PERMANENT
= 2¶ For motor 0, set a particular speed
-
-
class
spynnaker8.external_devices.
PushBotSpeaker
[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.abstract_push_bot_output_device.AbstractPushBotOutputDevice
The properties of the speaker device that may be set.
-
SPEAKER_ACTIVE_TIME
= 1¶
-
SPEAKER_MELODY
= 3¶
-
SPEAKER_TONE
= 2¶
-
SPEAKER_TOTAL_PERIOD
= 0¶
-
-
class
spynnaker8.external_devices.
PushBotRetinaResolution
[source]¶ Bases:
enum.Enum
Resolutions supported by the pushbot retina device
-
DOWNSAMPLE_16_X_16
= <RetinaKey.DOWNSAMPLE_16_X_16: 268435456>¶
-
DOWNSAMPLE_32_X_32
= <RetinaKey.DOWNSAMPLE_32_X_32: 201326592>¶
-
DOWNSAMPLE_64_X_64
= <RetinaKey.DOWNSAMPLE_64_X_64: 134217728>¶
-
NATIVE_128_X_128
= <RetinaKey.NATIVE_128_X_128: 67108864>¶
-
-
class
spynnaker8.external_devices.
PushBotLifEthernet
(**kwargs)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.external_device_lif_control.ExternalDeviceLifControl
Leaky integrate and fire neuron with an exponentially decaying current input
Parameters: - protocol (MunichIoEthernetProtocol) – How to talk to the bot.
- devices (iterable(AbstractMulticastControllableDevice)) – The devices on the bot that we are interested in.
- pushbot_ip_address (str) – Where is the pushbot?
- pushbot_port (int) – (defaulted)
- tau_m (float) – LIF neuron parameter (defaulted)
- cm (float) – LIF neuron parameter (defaulted)
- v_rest (float) – LIF neuron parameter (defaulted)
- v_reset (float) – LIF neuron parameter (defaulted)
- tau_syn_E (float) – LIF neuron parameter (defaulted)
- tau_syn_I (float) – LIF neuron parameter (defaulted)
- tau_refrac (float) – LIF neuron parameter (defaulted)
- i_offset (float) – LIF neuron parameter (defaulted)
- v (float) – LIF neuron parameter (defaulted)
- isyn_exc (float) – LIF neuron parameter (defaulted)
- isyn_inh (float) – LIF neuron parameter (defaulted)
-
class
spynnaker8.external_devices.
PushBotEthernetLaserDevice
(laser, protocol, start_active_time=None, start_total_period=None, start_frequency=None, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The Laser of a PushBot
Parameters: - laser (PushBotLaser) – The PushBotLaser value to control
- protocol (MunichIoEthernetProtocol) – The protocol instance to get commands from
- start_active_time – The “active time” value to send at the start
- start_total_period – The “total period” value to send at the start
- start_frequency – The “frequency” to send at the start
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device.
Parameters: command_protocol (MunichIoSpiNNakerLinkProtocol) – The protocol to use for this device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
-
class
spynnaker8.external_devices.
PushBotEthernetLEDDevice
(led, protocol, start_active_time_front=None, start_active_time_back=None, start_total_period=None, start_frequency=None, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The LED of a PushBot
Parameters: - led (PushBotLED) – The PushBotLED parameter to control
- protocol (MunichIoEthernetProtocol) – The protocol instance to get commands from
- start_active_time_front – The “active time” to set for the front LED at the start
- start_active_time_back – The “active time” to set for the back LED at the start
- start_total_period – The “total period” to set at the start
- start_frequency – The “frequency” to set at the start
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device.
Parameters: command_protocol (MunichIoSpiNNakerLinkProtocol) – The protocol to use for this device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
-
class
spynnaker8.external_devices.
PushBotEthernetMotorDevice
(motor, protocol, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The motor of a PushBot
Parameters: - motor (PushBotMotor) – a PushBotMotor value to indicate the motor to control
- protocol (MunichIoEthernetProtocol) – The protocol used to control the device
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device.
Parameters: command_protocol (MunichIoSpiNNakerLinkProtocol) – The protocol to use for this device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
-
class
spynnaker8.external_devices.
PushBotEthernetSpeakerDevice
(speaker, protocol, start_active_time=0, start_total_period=0, start_frequency=0, start_melody=None, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The Speaker of a PushBot
Parameters: - speaker (PushBotSpeaker) – The PushBotSpeaker value to control
- protocol (MunichIoEthernetProtocol) – The protocol instance to get commands from
- start_active_time – The “active time” to set at the start
- start_total_period – The “total period” to set at the start
- start_frequency – The “frequency” to set at the start
- start_melody – The “melody” to set at the start
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device.
Parameters: command_protocol (MunichIoSpiNNakerLinkProtocol) – The protocol to use for this device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
-
class
spynnaker8.external_devices.
PushBotEthernetRetinaDevice
(protocol, resolution, pushbot_ip_address, pushbot_port=56000, injector_port=None, local_host=None, local_port=None, retina_injector_label='PushBotRetinaInjector')[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.abstract_push_bot_retina_device.AbstractPushBotRetinaDevice
,spynnaker.pyNN.external_devices_models.abstract_ethernet_sensor.AbstractEthernetSensor
Parameters: - protocol (MunichIoEthernetProtocol) –
- resolution (PushBotRetinaResolution) –
- pushbot_ip_address –
- pushbot_port –
- injector_port –
- local_host –
- local_port –
- retina_injector_label –
-
get_database_connection
()[source]¶ Get a Database Connection instance that this device uses to inject packets
Return type: SpynnakerLiveSpikesConnection Return type: PushBotRetinaConnection
-
get_injector_parameters
()[source]¶ Get the parameters of the Spike Injector to use with this device
Return type: dict(str,Any)
-
class
spynnaker8.external_devices.
PushBotLifSpinnakerLink
(**kwargs)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.external_device_lif_control.ExternalDeviceLifControl
Control module for a PushBot connected to a SpiNNaker Link
Parameters: - protocol (MunichIoSpiNNakerLinkProtocol) – How to talk to the bot.
- devices (iterable(AbstractMulticastControllableDevice)) – The devices on the bot that we are interested in.
- tau_m (float) – LIF neuron parameter (defaulted)
- cm (float) – LIF neuron parameter (defaulted)
- v_rest (float) – LIF neuron parameter (defaulted)
- v_reset (float) – LIF neuron parameter (defaulted)
- tau_syn_E (float) – LIF neuron parameter (defaulted)
- tau_syn_I (float) – LIF neuron parameter (defaulted)
- tau_refrac (float) – LIF neuron parameter (defaulted)
- i_offset (float) – LIF neuron parameter (defaulted)
- v (float) – LIF neuron parameter (defaulted)
- isyn_exc (float) – LIF neuron parameter (defaulted)
- isyn_inh (float) – LIF neuron parameter (defaulted)
-
class
spynnaker8.external_devices.
PushBotSpiNNakerLinkLaserDevice
(laser, protocol, spinnaker_link_id, n_neurons=1, label=None, board_address=None, start_active_time=0, start_total_period=0, start_frequency=0)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_laser_device.PushBotEthernetLaserDevice
,pacman.model.graphs.application.application_spinnaker_link_vertex.ApplicationSpiNNakerLinkVertex
The Laser of a PushBot
Parameters: - laser (PushBotLaser) – Which laser device to control
- protocol (MunichIoSpiNNakerLinkProtocol) – The protocol instance to get commands from
- spinnaker_link_id (int) – The SpiNNakerLink that the PushBot is connected to
- n_neurons (int) – The number of neurons in the device
- label (str) – A label for the device
- board_address (str) – The IP address of the board that the device is connected to
- start_active_time – The “active time” value to send at the start
- start_total_period – The “total period” value to send at the start
- start_frequency – The “frequency” to send at the start
-
default_parameters
= {'board_address': None, 'label': None, 'n_neurons': 1, 'start_active_time': 0, 'start_frequency': 0, 'start_total_period': 0}¶
-
class
spynnaker8.external_devices.
PushBotSpiNNakerLinkLEDDevice
(led, protocol, spinnaker_link_id, n_neurons=1, label=None, board_address=None, start_active_time_front=None, start_active_time_back=None, start_total_period=None, start_frequency=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_led_device.PushBotEthernetLEDDevice
,pacman.model.graphs.application.application_spinnaker_link_vertex.ApplicationSpiNNakerLinkVertex
The LED of a PushBot
Parameters: - led (PushBotLED) – The LED devic to control
- protocol (MunichIoSpiNNakerLinkProtocol) – The protocol instance to get commands from
- spinnaker_link_id (int) – The SpiNNakerLink connected to
- n_neurons (int) – The number of neurons in the device
- label (str) – The label of the device
- board_address (str) – The IP address of the board that the device is connected to
- start_active_time_front – The “active time” to set for the front LED at the start
- start_active_time_back – The “active time” to set for the back LED at the start
- start_total_period – The “total period” to set at the start
- start_frequency – The “frequency” to set at the start
-
default_parameters
= {'board_address': None, 'label': None, 'n_neurons': 1, 'start_active_time_back': None, 'start_active_time_front': None, 'start_frequency': None, 'start_total_period': None}¶
-
class
spynnaker8.external_devices.
PushBotSpiNNakerLinkMotorDevice
(motor, protocol, spinnaker_link_id, n_neurons=1, label=None, board_address=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_motor_device.PushBotEthernetMotorDevice
,pacman.model.graphs.application.application_spinnaker_link_vertex.ApplicationSpiNNakerLinkVertex
The motor of a PushBot
Parameters: - motor (PushBotMotor) – the motor to control
- protocol (MunichIoSpiNNakerLinkProtocol) – The protocol used to control the device
- spinnaker_link_id (int) – The SpiNNakerLink connected to
- n_neurons (int) – The number of neurons in the device
- label (str) – The label of the device
- board_address (str) – The IP address of the board that the device is connected to
-
default_parameters
= {'board_address': None, 'label': None, 'n_neurons': 1}¶
-
class
spynnaker8.external_devices.
PushBotSpiNNakerLinkSpeakerDevice
(speaker, protocol, spinnaker_link_id, n_neurons=1, label=None, board_address=None, start_active_time=50, start_total_period=100, start_frequency=None, start_melody=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_speaker_device.PushBotEthernetSpeakerDevice
,pacman.model.graphs.application.application_spinnaker_link_vertex.ApplicationSpiNNakerLinkVertex
The speaker of a PushBot
Parameters: - speaker (PushBotSpeaker) – The PushBotSpeaker value to control
- protocol (MunichIoSpiNNakerLinkProtocol) – The protocol instance to get commands from
- spinnaker_link_id (int) – The SpiNNakerLink connected to
- n_neurons (int) – The number of neurons in the device
- label (str) – The label of the device
- board_address (str) – The IP address of the board that the device is connected to
- start_active_time – The “active time” to set at the start
- start_total_period – The “total period” to set at the start
- start_frequency – The “frequency” to set at the start
- start_melody – The “melody” to set at the start
-
default_parameters
= {'board_address': None, 'label': None, 'n_neurons': 1, 'start_active_time': 50, 'start_frequency': None, 'start_melody': None, 'start_total_period': 100}¶
-
class
spynnaker8.external_devices.
PushBotSpiNNakerLinkRetinaDevice
(*args, **kwargs)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.abstract_push_bot_retina_device.AbstractPushBotRetinaDevice
,pacman.model.graphs.application.application_spinnaker_link_vertex.ApplicationSpiNNakerLinkVertex
-
default_parameters
= {'board_address': None, 'label': None}¶
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
-
class
spynnaker8.external_devices.
SpynnakerLiveSpikesConnection
(receive_labels=None, send_labels=None, local_host=None, local_port=19999, live_packet_gather_label='LiveSpikeReceiver')[source]¶ Bases:
spinn_front_end_common.utilities.connections.live_event_connection.LiveEventConnection
A connection for receiving and sending live spikes from and to SpiNNaker
Parameters: - receive_labels (iterable(str)) – Labels of population from which live spikes will be received.
- send_labels (iterable(str)) – Labels of population to which live spikes will be sent
- local_host (str) – Optional specification of the local hostname or IP address of the interface to listen on
- local_port (int) – Optional specification of the local port to listen on. Must match the port that the toolchain will send the notification on (19999 by default)
-
send_spike
(label, neuron_id, send_full_keys=False)[source]¶ Send a spike from a single neuron
Parameters:
-
send_spikes
(label, neuron_ids, send_full_keys=False)[source]¶ Send a number of spikes
Parameters: - label (str) – The label of the population from which the spikes will originate
- neuron_ids (list(int)) – array-like of neuron IDs sending spikes
- send_full_keys (bool) – Determines whether to send full 32-bit keys, getting the key for each neuron from the database, or whether to send 16-bit neuron IDs directly
-
class
spynnaker8.external_devices.
SpynnakerPoissonControlConnection
(poisson_labels=None, local_host=None, local_port=19999, control_label_extension='_control')[source]¶ Bases:
spinn_front_end_common.utilities.connections.live_event_connection.LiveEventConnection
Parameters: - poisson_labels (iterable(str)) – Labels of Poisson populations to be controlled
- local_host (str) – Optional specification of the local hostname or IP address of the interface to listen on
- local_port (int) – Optional specification of the local port to listen on. Must match the port that the toolchain will send the notification on (19999 by default)
- control_label_extension (str) – The extra name added to the label of each Poisson source
-
add_init_callback
(label, init_callback)[source]¶ Add a callback to be called to initialise a vertex
Parameters: - label (str) – The label of the vertex to be notified about. Must be one of the vertices listed in the constructor
- init_callback (callable(str, int, float, float) -> None) – A function to be called to initialise the vertex. This should take as parameters the label of the vertex, the number of neurons in the population, the run time of the simulation in milliseconds, and the simulation timestep in milliseconds
-
add_pause_stop_callback
(label, pause_stop_callback)[source]¶ Add a callback for the pause and stop state of the simulation
Parameters: - label (str) – the label of the function to be sent
- pause_stop_callback (callable(str, LiveEventConnection) -> None) – A function to be called when the pause or stop message has been received. This function should take the label of the referenced vertex, and an instance of this class, which can be used to send events.
Return type:
-
add_poisson_label
(label)[source]¶ Parameters: label (str) – The label of the Poisson source population.
-
add_receive_callback
(label, live_event_callback, translate_key=False)[source]¶ Add a callback for the reception of live events from a vertex
Parameters: - label (str) – The label of the vertex to be notified about. Must be one of the vertices listed in the constructor
- live_event_callback (callable(str, int, list(int)) -> None) – A function to be called when events are received. This should take as parameters the label of the vertex, the simulation timestep when the event occurred, and an array-like of atom IDs.
- translate_key (bool) – True if the key is to be converted to an atom ID, False if the key should stay a key
-
add_start_callback
(label, start_callback)[source]¶ Add a callback for the start of the simulation
Parameters: - start_callback (callable(str, LiveEventConnection) -> None) – A function to be called when the start message has been received. This function should take the label of the referenced vertex, and an instance of this class, which can be used to send events
- label (str) – the label of the function to be sent
-
add_start_resume_callback
(label, start_resume_callback)[source]¶ Add a callback for the start and resume state of the simulation
Parameters: - label (str) – the label of the function to be sent
- start_resume_callback (callable(str, LiveEventConnection) -> None) – A function to be called when the start or resume message has been received. This function should take the label of the referenced vertex, and an instance of this class, which can be used to send events.
Return type:
-
spynnaker8.external_devices.
activate_live_output_for
(population, database_notify_host=None, database_notify_port_num=None, database_ack_port_num=None, board_address=None, port=None, host=None, tag=None, strip_sdp=True, use_prefix=False, key_prefix=None, prefix_type=None, message_type=<EIEIOType.KEY_32_BIT: 2>, right_shift=0, payload_as_time_stamps=True, notify=True, use_payload_prefix=True, payload_prefix=None, payload_right_shift=0, number_of_packets_sent_per_time_step=0)¶ Output the spikes from a given population from SpiNNaker as they occur in the simulation.
Parameters: - population (PyNNPopulationCommon) – The population to activate the live output for
- database_notify_host (str) – The hostname for the device which is listening to the database notification.
- database_ack_port_num (int) – The port number to which a external device will acknowledge that they have finished reading the database and are ready for it to start execution
- database_notify_port_num (int) – The port number to which a external device will receive the database is ready command
- board_address (str) – A fixed board address required for the tag, or None if any address is OK
- key_prefix (int or None) – the prefix to be applied to the key
- prefix_type (EIEIOPrefix) – if the prefix type is 32 bit or 16 bit
- message_type (EIEIOType) – If the message is a EIEIO command message, or an EIEIO data message with 16 bit or 32 bit keys.
- payload_as_time_stamps (bool) –
- right_shift (int) –
- use_payload_prefix (bool) –
- notify (bool) –
- payload_prefix (int or None) –
- payload_right_shift (int) –
- number_of_packets_sent_per_time_step (int) –
- port (int) – The UDP port to which the live spikes will be sent. If not specified, the port will be taken from the “live_spike_port” parameter in the “Recording” section of the sPyNNaker configuration file.
- host (str) – The host name or IP address to which the live spikes will be sent. If not specified, the host will be taken from the “live_spike_host” parameter in the “Recording” section of the sPyNNaker configuration file.
- tag (int) – The IP tag to be used for the spikes. If not specified, one will be automatically assigned
- strip_sdp (bool) – Determines if the SDP headers will be stripped from the transmitted packet.
- use_prefix (bool) – Determines if the spike packet will contain a common prefix for the spikes
- label (str) – The label of the gatherer vertex
- partition_ids (list(str)) – The names of the partitions to create edges for
-
spynnaker8.external_devices.
activate_live_output_to
(population, device)¶ Activate the output of spikes from a population to an external device. Note that all spikes will be sent to the device.
Parameters: - population (PyNNPopulationCommon) – The pyNN population object from which spikes will be sent.
- device (PyNNPopulationCommon or ApplicationVertex) – The pyNN population or external device to which the spikes will be sent.
-
spynnaker8.external_devices.
SpikeInjector
(notify=True, database_notify_host=None, database_notify_port_num=None, database_ack_port_num=None)[source]¶ Supports adding a spike injector to the application graph.
Parameters: - notify (bool) – Whether to register for notifications
- database_notify_host (str or None) – the hostname for the device which is listening to the database notification.
- database_ack_port_num (int or None) – the port number to which a external device will acknowledge that they have finished reading the database and are ready for it to start execution
- database_notify_port_num (int or None) – The port number to which a external device will receive the database is ready command
-
spynnaker8.external_devices.
register_database_notification_request
(hostname, notify_port, ack_port)[source]¶ Adds a socket system which is registered with the notification protocol
Parameters: Return type:
-
spynnaker8.external_devices.
run_forever
()[source]¶ Supports running forever in PyNN 0.8/0.9 format
Returns: returns when the application has started running on the SpiNNaker platform.
-
spynnaker8.external_devices.
add_poisson_live_rate_control
(poisson_population, control_label_extension='_control', receive_port=None, database_notify_host=None, database_notify_port_num=None, database_ack_port_num=None, notify=True, reserve_reverse_ip_tag=False)¶ Add a live rate controller to a Poisson population.
Parameters: - poisson_population (PyNNPopulationCommon) – The population to control
- control_label_extension (str) – An extension to add to the label of the Poisson source. Must match up with the equivalent in the SpynnakerPoissonControlConnection
- receive_port (int) – The port that the SpiNNaker board should listen on
- database_notify_host (str) – the hostname for the device which is listening to the database notification.
- database_ack_port_num (int) – the port number to which a external device will acknowledge that they have finished reading the database and are ready for it to start execution
- database_notify_port_num (int) – The port number to which an external device will receive the database is ready command
- notify (bool) – adds to the notification protocol if set.
- reserve_reverse_ip_tag (bool) – True if a reverse IP tag is to be used, False if SDP is to be used (default)