spynnaker.pyNN.models.utility_models.delays package¶
Submodules¶
spynnaker.pyNN.models.utility_models.delays.delay_block module¶
spynnaker.pyNN.models.utility_models.delays.delay_extension_machine_vertex module¶
-
class
spynnaker.pyNN.models.utility_models.delays.delay_extension_machine_vertex.
DelayExtensionMachineVertex
(resources_required, label, constraints=None)[source]¶ Bases:
pacman.model.graphs.machine.machine_vertex.MachineVertex
,spinn_front_end_common.interface.provenance.provides_provenance_data_from_machine_impl.ProvidesProvenanceDataFromMachineImpl
-
class
EXTRA_PROVENANCE_DATA_ENTRIES
¶ Bases:
enum.Enum
An enumeration.
-
N_BUFFER_OVERFLOWS
= 4¶
-
N_DELAYS
= 5¶
-
N_PACKETS_ADDED
= 2¶
-
N_PACKETS_PROCESSED
= 1¶
-
N_PACKETS_RECEIVED
= 0¶
-
N_PACKETS_SENT
= 3¶
-
-
N_EXTRA_PROVENANCE_DATA_ENTRIES
= 6¶
-
get_provenance_data_from_machine
(transceiver, placement)[source]¶ Retrieve the provenance data.
Parameters: - transceiver (Transceiver) – How to talk to the machine
- placement (Placement) – Which vertex are we retrieving from, and where was it
Return type: list(ProvenanceDataItem)
-
resources_required
¶ The resources required by the vertex
Return type: ResourceContainer
-
class
spynnaker.pyNN.models.utility_models.delays.delay_extension_vertex module¶
-
class
spynnaker.pyNN.models.utility_models.delays.delay_extension_vertex.
DelayExtensionVertex
(n_neurons, delay_per_stage, source_vertex, machine_time_step, timescale_factor, constraints=None, label='DelayExtension')[source]¶ Bases:
pacman.model.graphs.application.application_vertex.ApplicationVertex
,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.abstract_provides_n_keys_for_partition.AbstractProvidesNKeysForPartition
Provide delays to incoming spikes in multiples of the maximum delays of a neuron (typically 16 or 32)
Parameters: - n_neurons – the number of neurons
- delay_per_stage – the delay per stage
- source_vertex – where messages are coming from
- machine_time_step – how long is the machine time step
- timescale_factor – what slowdown factor has been applied
- constraints – the vertex constraints
- label – the vertex label
-
add_delays
(vertex_slice, source_ids, stages)[source]¶ Add delayed connections for a given vertex slice
-
add_generator_data
(max_row_n_synapses, max_delayed_row_n_synapses, pre_slices, pre_slice_index, post_slices, post_slice_index, pre_vertex_slice, post_vertex_slice, synapse_information, max_stage, machine_time_step)[source]¶ Add delays for a connection to be generated
-
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
-
gen_on_machine
(vertex_slice)[source]¶ Determine if the given slice needs to be generated on the machine
-
generate_data_specification
(spec, placement, machine_graph, graph_mapper, routing_infos)[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_n_keys_for_partition
(partition, graph_mapper)[source]¶ Get the number of keys required by the given partition of edges.
Parameters: - partition (AbstractOutgoingEdgePartition) – An partition that comes out of this vertex
- graph_mapper (
GraphMapper
) – A mapper between the graphs
Returns: A list of constraints
Return type: list(AbstractConstraint)
-
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, graph)[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
-
n_delay_stages
¶ The maximum number of delay stages required by any connection out of this delay extension vertex
-
source_vertex
¶
spynnaker.pyNN.models.utility_models.delays.delay_generator_data module¶
-
class
spynnaker.pyNN.models.utility_models.delays.delay_generator_data.
DelayGeneratorData
(max_row_n_synapses, max_delayed_row_n_synapses, pre_slices, pre_slice_index, post_slices, post_slice_index, pre_vertex_slice, post_vertex_slice, synapse_information, max_stage, machine_time_step)[source]¶ Bases:
object
Data for each connection of the delay generator
-
BASE_SIZE
= 32¶
-
gen_data
¶ Get the data to be written for this connection
Return type: numpy array of uint32
-
size
¶ The size of the generated data in bytes
Return type: int
-
Module contents¶
-
class
spynnaker.pyNN.models.utility_models.delays.
DelayBlock
(n_delay_stages, delay_per_stage, vertex_slice)[source]¶ Bases:
object
A block of delays for a vertex.
-
delay_block
¶
-
-
class
spynnaker.pyNN.models.utility_models.delays.
DelayExtensionMachineVertex
(resources_required, label, constraints=None)[source]¶ Bases:
pacman.model.graphs.machine.machine_vertex.MachineVertex
,spinn_front_end_common.interface.provenance.provides_provenance_data_from_machine_impl.ProvidesProvenanceDataFromMachineImpl
-
class
EXTRA_PROVENANCE_DATA_ENTRIES
¶ Bases:
enum.Enum
An enumeration.
-
N_BUFFER_OVERFLOWS
= 4¶
-
N_DELAYS
= 5¶
-
N_PACKETS_ADDED
= 2¶
-
N_PACKETS_PROCESSED
= 1¶
-
N_PACKETS_RECEIVED
= 0¶
-
N_PACKETS_SENT
= 3¶
-
-
N_EXTRA_PROVENANCE_DATA_ENTRIES
= 6¶
-
get_provenance_data_from_machine
(transceiver, placement)[source]¶ Retrieve the provenance data.
Parameters: - transceiver (Transceiver) – How to talk to the machine
- placement (Placement) – Which vertex are we retrieving from, and where was it
Return type: list(ProvenanceDataItem)
-
resources_required
¶ The resources required by the vertex
Return type: ResourceContainer
-
class
-
class
spynnaker.pyNN.models.utility_models.delays.
DelayExtensionVertex
(n_neurons, delay_per_stage, source_vertex, machine_time_step, timescale_factor, constraints=None, label='DelayExtension')[source]¶ Bases:
pacman.model.graphs.application.application_vertex.ApplicationVertex
,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.abstract_provides_n_keys_for_partition.AbstractProvidesNKeysForPartition
Provide delays to incoming spikes in multiples of the maximum delays of a neuron (typically 16 or 32)
Parameters: - n_neurons – the number of neurons
- delay_per_stage – the delay per stage
- source_vertex – where messages are coming from
- machine_time_step – how long is the machine time step
- timescale_factor – what slowdown factor has been applied
- constraints – the vertex constraints
- label – the vertex label
-
add_delays
(vertex_slice, source_ids, stages)[source]¶ Add delayed connections for a given vertex slice
-
add_generator_data
(max_row_n_synapses, max_delayed_row_n_synapses, pre_slices, pre_slice_index, post_slices, post_slice_index, pre_vertex_slice, post_vertex_slice, synapse_information, max_stage, machine_time_step)[source]¶ Add delays for a connection to be generated
-
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
-
gen_on_machine
(vertex_slice)[source]¶ Determine if the given slice needs to be generated on the machine
-
generate_data_specification
(spec, placement, machine_graph, graph_mapper, routing_infos)[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_n_keys_for_partition
(partition, graph_mapper)[source]¶ Get the number of keys required by the given partition of edges.
Parameters: - partition (AbstractOutgoingEdgePartition) – An partition that comes out of this vertex
- graph_mapper (
GraphMapper
) – A mapper between the graphs
Returns: A list of constraints
Return type: list(AbstractConstraint)
-
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, graph)[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
-
n_delay_stages
¶ The maximum number of delay stages required by any connection out of this delay extension vertex
-
source_vertex
¶