spynnaker.pyNN package¶
Subpackages¶
- spynnaker.pyNN.connections package
- spynnaker.pyNN.external_devices_models package
- Subpackages
- spynnaker.pyNN.external_devices_models.push_bot package
- Module contents
- Subpackages
- spynnaker.pyNN.extra_algorithms package
- spynnaker.pyNN.model_binaries package
- spynnaker.pyNN.models package
- Subpackages
- spynnaker.pyNN.models.abstract_models package
- spynnaker.pyNN.models.common package
- spynnaker.pyNN.models.neural_projections package
- spynnaker.pyNN.models.neural_properties package
- spynnaker.pyNN.models.neuron package
- Subpackages
- spynnaker.pyNN.models.neuron.additional_inputs package
- spynnaker.pyNN.models.neuron.builds package
- spynnaker.pyNN.models.neuron.implementations package
- spynnaker.pyNN.models.neuron.input_types package
- spynnaker.pyNN.models.neuron.neuron_models package
- spynnaker.pyNN.models.neuron.plasticity package
- spynnaker.pyNN.models.neuron.structural_plasticity package
- Subpackages
- spynnaker.pyNN.models.neuron.structural_plasticity.synaptogenesis package
- Module contents
- Subpackages
- spynnaker.pyNN.models.neuron.synapse_dynamics package
- spynnaker.pyNN.models.neuron.synapse_types package
- spynnaker.pyNN.models.neuron.threshold_types package
- Submodules
- spynnaker.pyNN.models.neuron.key_space_tracker module
- spynnaker.pyNN.models.neuron.master_pop_table module
- spynnaker.pyNN.models.neuron.synapse_io module
- spynnaker.pyNN.models.neuron.synaptic_matrices module
- spynnaker.pyNN.models.neuron.synaptic_matrix module
- spynnaker.pyNN.models.neuron.synaptic_matrix_app module
- Module contents
- Subpackages
- spynnaker.pyNN.models.populations package
- spynnaker.pyNN.models.spike_source package
- spynnaker.pyNN.models.utility_models package
- Submodules
- spynnaker.pyNN.models.abstract_pynn_model module
- spynnaker.pyNN.models.defaults module
- spynnaker.pyNN.models.projection module
- spynnaker.pyNN.models.recorder module
- Module contents
- Subpackages
- spynnaker.pyNN.protocols package
- spynnaker.pyNN.utilities package
- Subpackages
- Submodules
- spynnaker.pyNN.utilities.bit_field_utilities module
- spynnaker.pyNN.utilities.constants module
- spynnaker.pyNN.utilities.data_cache module
- spynnaker.pyNN.utilities.extracted_data module
- spynnaker.pyNN.utilities.fake_HBP_Portal_machine_provider module
- spynnaker.pyNN.utilities.running_stats module
- spynnaker.pyNN.utilities.struct module
- spynnaker.pyNN.utilities.utility_calls module
- spynnaker.pyNN.utilities.variable_cache module
- Module contents
Submodules¶
spynnaker.pyNN.abstract_spinnaker_common module¶
-
class
spynnaker.pyNN.abstract_spinnaker_common.
AbstractSpiNNakerCommon
(graph_label, database_socket_addresses, n_chips_required, n_boards_required, timestep, min_delay, time_scale_factor=None)[source]¶ Bases:
spinn_front_end_common.interface.abstract_spinnaker_base.AbstractSpinnakerBase
Main interface for neural code.
Parameters: - graph_label (str) –
- database_socket_addresses (iterable(SocketAddress)) –
- n_chips_required (int or None) –
- n_boards_required (int or None) –
- timestep (float or None) – machine_time_step but in milli seconds. If None uses the cfg value
- min_delay (float) –
- hostname (str) –
- time_scale_factor (float or None) –
-
add_application_vertex
(vertex)[source]¶ Parameters: vertex (ApplicationVertex) – the vertex to add to the graph
Raises: - ConfigurationException – when both graphs contain vertices
- PacmanConfigurationException – If there is an attempt to add the same vertex more than once
-
id_counter
¶ The id_counter, currently used by the populations.
Note
Maybe it could live in the pop class???
Return type: int
-
min_delay
¶ The minimum supported delay, in milliseconds.
-
static
register_binary_search_path
(search_path)[source]¶ Register an additional binary search path for executables.
Parameters: search_path (str) – absolute search path for binaries Return type: None
-
stop
(turn_off_machine=None, clear_routing_tables=None, clear_tags=None)[source]¶ Parameters: - turn_off_machine (bool or None) – decides if the machine should be powered down after running the execution. Note that this powers down all boards connected to the BMP connections given to the transceiver
- clear_routing_tables (bool or None) – informs the tool chain if it should turn off the clearing of the routing tables
- clear_tags (bool or None) – informs the tool chain if it should clear the tags off the machine at stop
Return type:
spynnaker.pyNN.exceptions module¶
-
exception
spynnaker.pyNN.exceptions.
DelayExtensionException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.ConfigurationException
Raised when a delay extension vertex fails.
-
exception
spynnaker.pyNN.exceptions.
FilterableException
[source]¶ Bases:
spynnaker.pyNN.exceptions.SpynnakerException
Raised when it is not possible to determine if an edge should be filtered.
-
exception
spynnaker.pyNN.exceptions.
InvalidParameterType
[source]¶ Bases:
spynnaker.pyNN.exceptions.SpynnakerException
Raised when a parameter is not recognised.
-
exception
spynnaker.pyNN.exceptions.
MemReadException
[source]¶ Bases:
spynnaker.pyNN.exceptions.SpynnakerException
Raised when the PyNN front end fails to read a certain memory region.
-
exception
spynnaker.pyNN.exceptions.
SpynnakerException
[source]¶ Bases:
Exception
Superclass of all exceptions from the PyNN module.
-
exception
spynnaker.pyNN.exceptions.
SpynnakerSplitterConfigurationException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.ConfigurationException
Raised when a splitter configuration fails.
-
exception
spynnaker.pyNN.exceptions.
SynapseRowTooBigException
(max_size, message)[source]¶ Bases:
spynnaker.pyNN.exceptions.SpynnakerException
Raised when a synapse row is bigger than is allowed.
Parameters: - max_size – the maximum permitted size of row
- message – the excepton message
-
max_size
¶ The maximum size allowed.
-
exception
spynnaker.pyNN.exceptions.
SynapticBlockGenerationException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.ConfigurationException
Raised when the synaptic manager fails to generate a synaptic block.
-
exception
spynnaker.pyNN.exceptions.
SynapticBlockReadException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.ConfigurationException
Raised when the synaptic manager fails to read a synaptic block or convert it into readable values.
-
exception
spynnaker.pyNN.exceptions.
SynapticConfigurationException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.ConfigurationException
Raised when the synaptic manager fails for some reason.
-
exception
spynnaker.pyNN.exceptions.
SynapticMaxIncomingAtomsSupportException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.ConfigurationException
Raised when a synaptic sublist exceeds the max atoms possible to be supported.
spynnaker.pyNN.spynnaker_external_device_plugin_manager module¶
-
class
spynnaker.pyNN.spynnaker_external_device_plugin_manager.
SpynnakerExternalDevicePluginManager
[source]¶ Bases:
object
User-level interface for the external device plugin manager.
-
static
activate_live_output_for
(population, database_notify_host=None, database_notify_port_num=None, database_ack_port_num=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, translate_keys=False)[source]¶ Output the spikes from a given population from SpiNNaker as they occur in the simulation.
Parameters: - population (Population) – 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
- 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
- translate_keys (bool) – Whether the incoming keys from the cores should be translated to global keys rather than core-based keys
-
static
activate_live_output_to
(population, device, partition_id='SPIKE')[source]¶ Activate the output of spikes from a population to an external device. Note that all spikes will be sent to the device.
Parameters: - population (Population) – The pyNN population object from which spikes will be sent.
- device (Population or ApplicationVertex) – The pyNN population or external device to which the spikes will be sent.
- partition_id (str) – The partition ID to activate live output to.
-
static
add_database_socket_address
(database_notify_host, database_notify_port_num, database_ack_port_num)[source]¶ Parameters: - database_notify_host (str or None) – Host to talk to tell that the database (and application) is ready.
- database_notify_port_num (int or None) – Port to talk to tell that the database (and application) is ready.
- database_ack_port_num (int or None) – Port on which to listen for an acknowledgement that the simulation should start.
-
static
add_edge
(vertex, device_vertex, partition_id)[source]¶ Add an edge between two vertices (often a vertex and a external device) on a given partition.
Parameters: - vertex (ApplicationVertex) – the pre-vertex to connect the edge from
- device_vertex (ApplicationVertex) – the post vertex to connect the edge to
- partition_id (str) – the partition identifier for making nets
-
static
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)[source]¶ Add a live rate controller to a Poisson population.
Parameters: - poisson_population (Population) – 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)
-
static
add_socket_address
(socket_address)[source]¶ Add a socket address to the list to be checked by the notification protocol.
Parameters: socket_address (SocketAddress) – the socket address
-
static
update_live_packet_gather_tracker
(vertex_to_record_from, lpg_label, port=None, hostname=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, use_payload_prefix=True, payload_prefix=None, payload_right_shift=0, number_of_packets_sent_per_time_step=0, partition_ids=None, translate_keys=False)[source]¶ Add an edge from a vertex to the live packet gatherer, builds as needed and has all the parameters for the creation of the live packet gatherer if needed.
Parameters: - vertex_to_record_from (ApplicationVertex or MachineVertex) –
- lpg_label (str) –
- port (int) –
- hostname (str) –
- tag (int) –
- strip_sdp (bool) –
- use_prefix (bool) –
- key_prefix (int) –
- prefix_type (EIEIOPrefix) –
- message_type (EIEIOType) –
- right_shift (int) –
- payload_as_time_stamps (bool) –
- use_payload_prefix (bool) –
- payload_prefix (int) –
- payload_right_shift (int) –
- number_of_packets_sent_per_time_step (int) –
- partition_ids (list(str)) –
- translate_keys (bool) –
-
static