spynnaker.pyNN.models.utility_models.delays package¶

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.

Parameters: n_delay_stages (int) – delay_per_stage (int) – vertex_slice (Slice) –
add_delay(source_id, stage)[source]
Parameters: source_id (int) – stage (int) –
delay_block
Return type: ndarray
class spynnaker.pyNN.models.utility_models.delays.DelayExtensionMachineVertex(resources_required, label, constraints=None, app_vertex=None, vertex_slice=None, slice_index=None)[source]

Bases: pacman.model.graphs.machine.machine_vertex.MachineVertex, spinn_front_end_common.interface.provenance.provides_provenance_data_from_machine_impl.ProvidesProvenanceDataFromMachineImpl, spinn_front_end_common.abstract_models.abstract_has_associated_binary.AbstractHasAssociatedBinary, spinn_front_end_common.abstract_models.abstract_generates_data_specification.AbstractGeneratesDataSpecification

Parameters: resources_required (ResourceContainer) – The resources required by the vertex label (str) – The optional name of the vertex constraints (iterable(AbstractConstraint)) – The optional initial constraints of the vertex app_vertex (ApplicationVertex) – The application vertex that caused this machine vertex to be created. If None, there is no such application vertex. vertex_slice (Slice) – The slice of the application vertex that this machine vertex implements.
BACKGROUND_MAX_QUEUED_NAME = 'Max_backgrounds_queued'
BACKGROUND_OVERLOADS_NAME = 'Times_the_background_queue_overloaded'
COUNT_SATURATION_NAME = 'saturation_count'
DELAYED_FOR_TRAFFIC_NAME = 'Number_of_times_delayed_to_spread_traffic'
class EXTRA_PROVENANCE_DATA_ENTRIES[source]

Bases: enum.Enum

An enumeration.

MAX_BACKGROUND_QUEUED = 11
N_BACKGROUND_OVERLOADS = 12
N_BUFFER_OVERFLOWS = 4
N_DELAYS = 5
N_LATE_SPIKES = 10
N_PACKETS_ADDED = 2
N_PACKETS_DROPPED_DUE_TO_INVALID_KEY = 9
N_PACKETS_LOST_DUE_TO_COUNT_SATURATION = 7
N_PACKETS_PROCESSED = 1
N_PACKETS_RECEIVED = 0
N_PACKETS_SENT = 3
N_PACKETS_WITH_INVALID_NEURON_IDS = 8
N_TIMES_TDMA_FELL_BEHIND = 6
INPUT_BUFFER_LOST_NAME = 'Times_the_input_buffer_lost_packets'
INVALID_KEY_COUNT_NAME = 'invalid_key_count'
INVALID_NEURON_ID_COUNT_NAME = 'invalid_neuron_count'
MISMATCH_ADDED_FROM_PROCESSED_NAME = 'Number_of_packets_added_to_delay_slot'
N_EXTRA_PROVENANCE_DATA_ENTRIES = 13
N_LATE_SPIKES_NAME = 'Number_of_late_spikes'
N_PACKETS_PROCESSED_NAME = 'Number_of_packets_processed'
N_PACKETS_RECEIVED_NAME = 'Number_of_packets_received'
N_PACKETS_SENT_NAME = 'Number_of_packets_sent'
gen_on_machine()[source]

Determine if the given slice needs to be generated on the machine

Parameters: vertex_slice (Slice) – bool
generate_data_specification(spec, placement, machine_graph, 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 machine_graph (MachineGraph) – routing_infos (RoutingInfo) – None
get_binary_file_name()[source]

Get the binary name to be run for this vertex.

Return type: str
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 The number of keys required 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.
resources_required

The resources required by the vertex

Return type: ResourceContainer
write_delay_parameters(spec, vertex_slice, key, incoming_key, incoming_mask)[source]

Generate Delay Parameter data

Parameters: spec (DataSpecificationGenerator) – vertex_slice (Slice) – key (int) – incoming_key (int) – incoming_mask (int) –
class spynnaker.pyNN.models.utility_models.delays.DelayExtensionVertex(n_neurons, delay_per_stage, n_delay_stages, source_vertex, constraints=None, label='DelayExtension')[source]

Bases: spinn_front_end_common.abstract_models.impl.tdma_aware_application_vertex.TDMAAwareApplicationVertex, spynnaker.pyNN.models.abstract_models.abstract_has_delay_stages.AbstractHasDelayStages, spinn_front_end_common.abstract_models.abstract_provides_outgoing_partition_constraints.AbstractProvidesOutgoingPartitionConstraints

Provide delays to incoming spikes in multiples of the maximum delays of a neuron (typically 16 or 32)

Parameters: n_neurons (int) – the number of neurons delay_per_stage (int) – the delay per stage n_delay_stages (int) – the (initial) number of delay stages needed source_vertex (ApplicationVertex) – where messages are coming from constraints (iterable(AbstractConstraint)) – the vertex constraints label (str) – the vertex label
MAX_DTCM_AVAILABLE = 54756
MAX_SLOTS = 8
MISMATCHED_DELAY_PER_STAGE_ERROR_MESSAGE = 'The delay per stage is already set to {}, and therefore {} is not yet feasible. Please report it to Spinnaker user mail list.'
SAFETY_FACTOR = 5000
add_delays(vertex_slice, source_ids, stages)[source]

Add delayed connections for a given vertex slice

Parameters: vertex_slice (Slice) – source_ids (list(int)) – stages (list(int)) –
add_generator_data(max_row_n_synapses, max_delayed_row_n_synapses, pre_slices, post_slices, pre_vertex_slice, post_vertex_slice, synapse_information, max_stage, max_delay_per_stage)[source]

Add delays for a connection to be generated

Parameters: max_row_n_synapses (int) – The maximum number of synapses in a row max_delayed_row_n_synapses (int) – The maximum number of synapses in a delay row pre_slices (list(Slice)) – The list of slices of the pre application vertex post_slices (list(Slice)) – The list of slices of the post application vertex pre_vertex_slice (Slice) – The slice of the pre applcation vertex currently being considered post_vertex_slice (Slice) – The slice of the post application vertex currently being considered synapse_information (SynapseInformation) – The synapse information of the connection synapse_information – max_stage (int) – The maximum delay stage
delay_blocks_for(vertex_slice)[source]
delay_generator_data(vertex_slice)[source]
delay_params_size(vertex_slice)[source]

The size of the delay parameters for a given vertex slice

Parameters: slice (Slice) – The slice to get the size of the parameters for
delay_per_stage
drop_late_spikes
gen_on_machine(vertex_slice)[source]

Determine if the given slice needs to be generated on the machine

Parameters: vertex_slice (Slice) – bool
static get_max_delay_ticks_supported(delay_ticks_at_post_vertex)[source]
get_n_cores()[source]

Get the number of cores this application vertex is using in the TDMA.

Returns: the number of cores to use in the TDMA int
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 A list of constraints list(AbstractConstraint)
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

Return type: int The maximum number of delay stages required by any connection out of this delay extension vertex int
set_new_n_delay_stages_and_delay_per_stage(n_delay_stages, delay_per_stage)[source]
source_vertex
Return type: ApplicationVertex