spynnaker.pyNN.external_devices_models package¶
Subpackages¶
- spynnaker.pyNN.external_devices_models.push_bot package
Module contents¶
-
class
spynnaker.pyNN.external_devices_models.
AbstractEthernetController
[source]¶ Bases:
object
A controller that can send multicast packets which can be received over Ethernet and translated to control an external device
-
get_external_devices
()[source]¶ Get the external devices that are to be controlled by the controller
Return type: iterable(AbstractMulticastControllableDevice)
-
get_message_translator
()[source]¶ Get the translator of messages
Return type: AbstractEthernetTranslator
-
-
class
spynnaker.pyNN.external_devices_models.
AbstractEthernetSensor
[source]¶ Bases:
object
-
get_database_connection
()[source]¶ Get a Database Connection instance that this device uses to inject packets
Return type: SpynnakerLiveSpikesConnection
-
get_injector_parameters
()[source]¶ Get the parameters of the Spike Injector to use with this device
Return type: dict(str,Any)
-
get_n_neurons
()[source]¶ Get the number of neurons that will be sent out by the device
Return type: int
-
get_translator
()[source]¶ Get a translator of multicast commands to Ethernet commands
Return type: AbstractEthernetTranslator
-
-
class
spynnaker.pyNN.external_devices_models.
AbstractEthernetTranslator
[source]¶ Bases:
object
A module that can translate packets received over Ethernet into control of an external device
-
class
spynnaker.pyNN.external_devices_models.
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:
-
class
spynnaker.pyNN.external_devices_models.
AbstractMulticastControllableDevice
[source]¶ Bases:
object
A device that can be controlled by sending multicast packets to it, either directly, or via Ethernet using an AbstractEthernetTranslator
-
device_control_partition_id
¶ A partition ID to give to an outgoing edge partition that will control this device
Return type: str
-
device_control_scaling_factor
¶ The scaling factor used to send the payload to this device.
Return type: int
-
device_control_send_type
¶ The type of data to be sent.
Return type: SendType
-
-
class
spynnaker.pyNN.external_devices_models.
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, drop_late_spikes, splitter)[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
spynnaker.pyNN.external_devices_models.
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
spynnaker.pyNN.external_devices_models.
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 (AbstractOutgoingEdgePartition) – 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
spynnaker.pyNN.external_devices_models.
MachineMunichMotorDevice
(speed, sample_time, update_time, delay_time, delta_threshold, continue_if_not_different, label=None, constraints=None, app_vertex=None)[source]¶ Bases:
pacman.model.graphs.machine.machine_vertex.MachineVertex
,spinn_front_end_common.abstract_models.abstract_generates_data_specification.AbstractGeneratesDataSpecification
,spinn_front_end_common.abstract_models.abstract_has_associated_binary.AbstractHasAssociatedBinary
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
,spinn_front_end_common.interface.provenance.provides_provenance_data_from_machine_impl.ProvidesProvenanceDataFromMachineImpl
An Omnibot motor control device. This has a real vertex and an external device vertex.
Parameters: -
INPUT_BUFFER_FULL_NAME
= 'Times_the_input_buffer_lost_packets'¶ The name of the provenance item saying that packets were lost.
-
MOTOR_PARTITION_ID
= 'MOTOR'¶
-
generate_data_specification
(spec, placement, routing_info)[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_binary_start_type
()[source]¶ Get the start type of the binary to be run.
Return type: ExecutableType
-
get_n_keys_for_partition
(_partition)[source]¶ Get the number of keys required by the given partition of edges.
Parameters: _partition (OutgoingEdgePartition) – An partition that comes out of this vertex Returns: The number of keys required Return type: int
-
parse_extra_provenance_items
(label, x, y, p, provenance_data)[source]¶ Convert the remaining provenance words (those not in the standard set) into provenance items.
Called by
get_provenance_data_from_machine()
Parameters: - label (str) – A descriptive label for the vertex (derived from label and placed position) to be used for provenance error reporting to the user.
- x (int) – x coordinate of the chip where this core
- y (int) – y coordinate of the core where this core
- p (int) – virtual id of the core
- provenance_data (list(int)) – The list of words of raw provenance data.
-
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
-
resources_required
¶ The resources required by the vertex
Return type: ResourceContainer
-
-
class
spynnaker.pyNN.external_devices_models.
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.abstract.abstract_one_app_one_machine_vertex.AbstractOneAppOneMachineVertex
,spinn_front_end_common.abstract_models.abstract_vertex_with_dependent_vertices.AbstractVertexWithEdgeToDependentVertices
An Omnibot motor control device. This has a real vertex and an external device vertex.
Parameters: -
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)
-
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)
-
-
class
spynnaker.pyNN.external_devices_models.
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'¶ Select the left retina
-
MERGED_POLARITY
= 'MERGED'¶
-
RIGHT_RETINA
= 'RIGHT'¶ Select the right retina
-
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 (AbstractOutgoingEdgePartition) – 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
spynnaker.pyNN.external_devices_models.
ThresholdTypeMulticastDeviceControl
(device)[source]¶ Bases:
spynnaker.pyNN.models.neuron.threshold_types.abstract_threshold_type.AbstractThresholdType
A threshold type that can send multicast keys with the value of membrane voltage as the payload
Parameters: device (list(AbstractMulticastControllableDevice)) – -
add_parameters
(parameters)[source]¶ Add the initial values of the parameters to the parameter holder
Parameters: parameters (RangeDictionary) – A holder of the parameters
-
add_state_variables
(state_variables)[source]¶ Add the initial values of the state variables to the state variables holder
Parameters: state_variables (RangeDictionary) – A holder of the state variables
-
get_n_cpu_cycles
(n_neurons)[source]¶ Get the number of CPU cycles required to update the state
Parameters: n_neurons (int) – The number of neurons to get the cycles for Return type: int
-
get_units
(variable)[source]¶ Get the units of the given variable
Parameters: variable (str) – The name of the variable
-
get_values
(parameters, state_variables, vertex_slice, ts)[source]¶ Get the values to be written to the machine for this model
Parameters: - parameters (RangeDictionary) – The holder of the parameters
- state_variables (RangeDictionary) – The holder of the state variables
- vertex_slice (Slice) – The slice of variables being retrieved
- ts (float) – The time to be advanced in one call to the update of this component
Returns: A list with the same length as self.struct.field_types
Return type: list(int or float or list(int) or list(float) or RangedList)
-
has_variable
(variable)[source]¶ Determine if this component has a variable by the given name
Parameters: variable (str) – The name of the variable Return type: bool
-
update_values
(values, parameters, state_variables)[source]¶ Update the parameters and state variables with the given struct values that have been read from the machine
Parameters: - values (list(list)) – The values read from the machine, one for each struct element
- parameters (RangeDictionary) – The holder of the parameters to update
- state_variables (RangeDictionary) – The holder of the state variables to update
-