spynnaker.pyNN.external_devices_models package¶
Subpackages¶
- spynnaker.pyNN.external_devices_models.push_bot package
- Subpackages
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_control_modules package
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet package
- Submodules
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_laser_device module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_led_device module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_motor_device module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_retina_device module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_speaker_device module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_retina_connection module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_translator module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_wifi_connection module
- Module contents
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_parameters package
- Submodules
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_parameters.push_bot_laser module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_parameters.push_bot_led module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_parameters.push_bot_motor module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_parameters.push_bot_retina_resolution module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_parameters.push_bot_retina_viewer module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_parameters.push_bot_speaker module
- Module contents
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_spinnaker_link package
- Submodules
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_spinnaker_link.push_bot_spinnaker_link_laser_device module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_spinnaker_link.push_bot_spinnaker_link_led_device module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_spinnaker_link.push_bot_spinnaker_link_motor_device module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_spinnaker_link.push_bot_spinnaker_link_retina_device module
- spynnaker.pyNN.external_devices_models.push_bot.push_bot_spinnaker_link.push_bot_spinnaker_link_speaker_device module
- Module contents
- Submodules
- spynnaker.pyNN.external_devices_models.push_bot.abstract_push_bot_output_device module
- spynnaker.pyNN.external_devices_models.push_bot.abstract_push_bot_retina_device module
- Module contents
- Subpackages
Submodules¶
spynnaker.pyNN.external_devices_models.abstract_ethernet_controller module¶
-
class
spynnaker.pyNN.external_devices_models.abstract_ethernet_controller.
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
-
get_message_translator
()[source]¶ Get the translator of messages
Return type: spynnaker.pyNN.external_devices_models.AbstractEthernetTranslator
-
spynnaker.pyNN.external_devices_models.abstract_ethernet_sensor module¶
spynnaker.pyNN.external_devices_models.abstract_ethernet_translator module¶
spynnaker.pyNN.external_devices_models.abstract_multicast_controllable_device module¶
-
class
spynnaker.pyNN.external_devices_models.abstract_multicast_controllable_device.
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_key
¶ The key that must be sent to the device to control it
Return type: int
-
device_control_max_value
¶ The maximum value to send to the device
Return type: float
-
device_control_min_value
¶ The minimum value to send to the device
Return type: float
-
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_timesteps_between_sending
¶ The number of timesteps between sending commands to the device. This defines the “sampling interval” for the device.
Return type: int
-
device_control_uses_payload
¶ True if the control of the device accepts an arbitrary valued payload, the value of which will change the devices behaviour
Return type: bool
-
-
class
spynnaker.pyNN.external_devices_models.abstract_multicast_controllable_device.
SendType
[source]¶ Bases:
enum.Enum
The data type to be sent in the payload of the multicast packet
-
SEND_TYPE_ACCUM
= 2¶
-
SEND_TYPE_FRACT
= 4¶
-
SEND_TYPE_INT
= 0¶
-
SEND_TYPE_UACCUM
= 3¶
-
SEND_TYPE_UFRACT
= 5¶
-
SEND_TYPE_UINT
= 1¶
-
spynnaker.pyNN.external_devices_models.arbitrary_fpga_device module¶
-
class
spynnaker.pyNN.external_devices_models.arbitrary_fpga_device.
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
spynnaker.pyNN.external_devices_models.external_device_lif_control module¶
-
class
spynnaker.pyNN.external_devices_models.external_device_lif_control.
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)[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 or None) – A list of constraints to give to the vertex, or None
Returns: An application vertex for the population
Return type:
-
spynnaker.pyNN.external_devices_models.external_device_lif_control_vertex module¶
-
class
spynnaker.pyNN.external_devices_models.external_device_lif_control_vertex.
ExternalDeviceLifControlVertex
(devices, create_edges, max_atoms_per_core, neuron_impl, pynn_model, translator=None, spikes_per_second=None, label=None, ring_buffer_sigma=None, incoming_spike_buffer_size=None, constraints=None)[source]¶ Bases:
spynnaker.pyNN.models.neuron.abstract_population_vertex.AbstractPopulationVertex
,spynnaker.pyNN.external_devices_models.abstract_ethernet_controller.AbstractEthernetController
,spinn_front_end_common.abstract_models.abstract_provides_outgoing_partition_constraints.AbstractProvidesOutgoingPartitionConstraints
,spinn_front_end_common.abstract_models.abstract_vertex_with_dependent_vertices.AbstractVertexWithEdgeToDependentVertices
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
Parameters: - n_neurons – The number of neurons in the population
- devices – The AbstractMulticastControllableDevice instances to be controlled by the population
- create_edges – True if edges to the devices should be added by this dev (set to False if using the dev over Ethernet using a translator)
- translator – Translator to be used when used for Ethernet communication. Must be provided if the dev is to be controlled over Ethernet.
-
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)
-
get_external_devices
()[source]¶ Get the external devices that are to be controlled by the controller
-
get_message_translator
()[source]¶ Get the translator of messages
Return type: spynnaker.pyNN.external_devices_models.AbstractEthernetTranslator
-
get_outgoing_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge 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)
-
get_outgoing_partition_ids
()[source]¶ Get the partition IDs of messages coming out of the controller
Return type: list(str)
-
routing_key_partition_atom_mapping
(routing_info, partition)[source]¶ Returns a list of atom to key mapping.
Parameters: - routing_info (RoutingInfo) – the routing info object to consider
- partition (AbstractOutgoingEdgePartition) – the routing partition to handle.
Returns: a iterable of tuples of atom IDs to keys.
Return type: iterable(tuple(int,int))
spynnaker.pyNN.external_devices_models.external_spinnaker_link_cochlea_device module¶
-
class
spynnaker.pyNN.external_devices_models.external_spinnaker_link_cochlea_device.
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
spynnaker.pyNN.external_devices_models.external_spinnaker_link_fpga_retina_device module¶
-
class
spynnaker.pyNN.external_devices_models.external_spinnaker_link_fpga_retina_device.
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: - mode – The retina “mode”
- retina_key – The value of the top 16-bits of the key
- spinnaker_link_id – The SpiNNaker link to which the retina is connected
- polarity – The “polarity” of the retina data
- label –
- board_address –
-
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 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)
-
spynnaker.pyNN.external_devices_models.external_spinnaker_link_fpga_retina_device.
get_spike_value_from_fpga_retina
(key, mode)[source]¶
spynnaker.pyNN.external_devices_models.munich_spinnaker_link_motor_device module¶
-
class
spynnaker.pyNN.external_devices_models.munich_spinnaker_link_motor_device.
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_has_associated_binary.AbstractHasAssociatedBinary
,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 - has a real vertex and an external device vertex
-
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) – The slice of atoms that the machine vertex will cover
- 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: None
-
get_binary_start_type
()[source]¶ Get the start type of the binary to be run.
Return type: ExecutableType
-
get_outgoing_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge 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)
-
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 Raises: None – this method does not raise any known exception
-
n_atoms
¶ The number of atoms in the vertex
Return type: int
-
spynnaker.pyNN.external_devices_models.munich_spinnaker_link_retina_device module¶
-
class
spynnaker.pyNN.external_devices_models.munich_spinnaker_link_retina_device.
MunichRetinaDevice
(retina_key, spinnaker_link_id, position, label=None, 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
-
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 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)
-
-
spynnaker.pyNN.external_devices_models.munich_spinnaker_link_retina_device.
get_spike_value_from_robot_retina
(key)[source]¶
spynnaker.pyNN.external_devices_models.threshold_type_multicast_device_control module¶
-
class
spynnaker.pyNN.external_devices_models.threshold_type_multicast_device_control.
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
-
add_parameters
(parameters)[source]¶ Add the initial values of the parameters to the parameter holder
Parameters: parameters ( spinn_utilities.ranged.range_dictionary.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 ( spinn_utilities.ranged.range_dictionary.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)[source]¶ Get the values to be written to the machine for this model
Parameters: - parameters (
spinn_utilities.ranged.range_dictionary.RangeDictionary
) – The holder of the parameters - state_variables (
spinn_utilities.ranged.range_dictionary.RangeDictionary
) – The holder of the state variables - vertex_slice – The slice of variables being retrieved
Returns: A list with the same length as self.struct.field_types
Return type: A list of (single value or list of values or RangedList)
- parameters (
-
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 – The values read from the machine, one for each struct element
- parameters – The holder of the parameters to update
- state_variables – The holder of the state variables to update
-
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
-
get_message_translator
()[source]¶ Get the translator of messages
Return type: spynnaker.pyNN.external_devices_models.AbstractEthernetTranslator
-
-
class
spynnaker.pyNN.external_devices_models.
AbstractEthernetSensor
[source]¶ Bases:
object
-
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
-
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_key
¶ The key that must be sent to the device to control it
Return type: int
-
device_control_max_value
¶ The maximum value to send to the device
Return type: float
-
device_control_min_value
¶ The minimum value to send to the device
Return type: float
-
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_timesteps_between_sending
¶ The number of timesteps between sending commands to the device. This defines the “sampling interval” for the device.
Return type: int
-
device_control_uses_payload
¶ True if the control of the device accepts an arbitrary valued payload, the value of which will change the devices behaviour
Return type: bool
-
-
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)[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 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
-
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: - mode – The retina “mode”
- retina_key – The value of the top 16-bits of the key
- spinnaker_link_id – The SpiNNaker link to which the retina is connected
- polarity – The “polarity” of the retina data
- label –
- board_address –
-
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 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.
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_has_associated_binary.AbstractHasAssociatedBinary
,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 - has a real vertex and an external device vertex
-
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) – The slice of atoms that the machine vertex will cover
- 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: None
-
get_binary_start_type
()[source]¶ Get the start type of the binary to be run.
Return type: ExecutableType
-
get_outgoing_partition_constraints
(partition)[source]¶ Get constraints to be added to the given edge 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)
-
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 Raises: None – this method does not raise any known exception
-
n_atoms
¶ The number of atoms in the vertex
Return type: int
-
-
class
spynnaker.pyNN.external_devices_models.
MunichRetinaDevice
(retina_key, spinnaker_link_id, position, label=None, 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
-
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 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
-
add_parameters
(parameters)[source]¶ Add the initial values of the parameters to the parameter holder
Parameters: parameters ( spinn_utilities.ranged.range_dictionary.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 ( spinn_utilities.ranged.range_dictionary.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)[source]¶ Get the values to be written to the machine for this model
Parameters: - parameters (
spinn_utilities.ranged.range_dictionary.RangeDictionary
) – The holder of the parameters - state_variables (
spinn_utilities.ranged.range_dictionary.RangeDictionary
) – The holder of the state variables - vertex_slice – The slice of variables being retrieved
Returns: A list with the same length as self.struct.field_types
Return type: A list of (single value or list of values or RangedList)
- parameters (
-
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 – The values read from the machine, one for each struct element
- parameters – The holder of the parameters to update
- state_variables – The holder of the state variables to update
-