spynnaker.pyNN.models.utility_models.delays package

Module contents

class spynnaker.pyNN.models.utility_models.delays.DelayExtensionMachineVertex(sdram: AbstractSDRAM, label: str, vertex_slice: Slice, app_vertex: ApplicationVertex | None = None)

Bases: MachineVertex, ProvidesProvenanceDataFromMachineImpl, AbstractHasAssociatedBinary, AbstractGeneratesDataSpecification

Vertex that implements a delay extension. Not expected to be directly referenced in user code.

Parameters:
  • sdram – The SDRAM required by the vertex

  • label – The name of the vertex

  • vertex_slice – The slice of the vertex

  • app_vertex – The application vertex that caused this machine vertex to be created. If None, there is no such application vertex.

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'
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 = 12
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'
property app_vertex: DelayExtensionVertex

The application vertex that caused this machine vertex to be created. If None, there is no such application vertex.

generate_data_specification(spec: DataSpecificationGenerator, placement: Placement) None[source]

Generate a data specification.

Parameters:
  • spec – The data specification to write to

  • placement – The placement the vertex is located at

get_binary_file_name() str[source]
Returns:

The binary name to be run for this vertex.

get_binary_start_type() ExecutableType[source]
Returns:

The start type of the binary to be run.

get_n_keys_for_partition(partition_id: str) int[source]

Get the number of keys required by the given partition of edges.

Parameters:

partition_id – The identifier of the partition; the partition_id param is only used by some MachineVertex subclasses

Returns:

The number of keys required

parse_extra_provenance_items(label: str, x: int, y: int, p: int, provenance_data: Sequence[int]) None[source]

Convert the remaining provenance words (those not in the standard set) into provenance items.

Called by get_provenance_data_from_machine()

Parameters:
  • label – A descriptive label for the vertex (derived from label and placed position) to be used for provenance error reporting to the user.

  • x – x coordinate of the chip where this core

  • y – y coordinate of the core where this core

  • p – virtual id of the core

  • provenance_data – The list of words of raw provenance data.

property sdram_required: AbstractSDRAM

The SDRAM space required by the vertex.

write_delay_parameters(spec: DataSpecificationGenerator, vertex_slice: Slice, key: int | None, incoming_key: int, incoming_mask: int) None[source]

Generate Delay Parameter data.

Parameters:
  • spec

  • vertex_slice

  • key

  • incoming_key

  • incoming_mask

class spynnaker.pyNN.models.utility_models.delays.DelayExtensionVertex(partition: ApplicationEdgePartition, delay_per_stage: int, n_delay_stages: int, n_colour_bits: int, label: str = 'DelayExtension')

Bases: ColouredApplicationVertex, AbstractHasDelayStages

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

Parameters:
  • partition – The partition that this delay is supporting

  • delay_per_stage – the delay per stage

  • n_delay_stages – the (initial) number of delay stages needed

  • n_colour_bits – the number of bits for event colouring

  • label – the vertex label

MAX_DTCM_AVAILABLE = 54756
MAX_SLOTS = 8
SAFETY_FACTOR = 5000
add_outgoing_edge(edge: DelayedApplicationEdge) None[source]

Add an outgoing edge to the delay extension.

Parameters:

edge – The edge to add

property atoms_shape: Tuple[int, ...]

The “shape” of the atoms in the vertex i.e. how the atoms are split between the dimensions of the vertex. By default everything is 1-dimensional, so the value will be a 1-tuple but can be overridden by a vertex that supports multiple dimensions.

delay_params_size() int[source]
Returns:

The size of the delay parameters.

property delay_per_stage: int

The delay per stage, in timesteps.

property drop_late_spikes: bool

Whether to drop late spikes.

static get_max_delay_ticks_supported(delay_ticks_at_post_vertex: int) int[source]
Parameters:

delay_ticks_at_post_vertex

Returns:

The max ticks the combination of delay and post vertex can handle.

property n_atoms: int

The number of atoms in this vertex.

property n_colour_bits: int

The number of colour bits sent by this vertex.

Assumed 0 unless overridden

property n_delay_stages: int

The maximum number of delay stages required by any connection out of this delay extension vertex.

property outgoing_edges: Sequence[DelayedApplicationEdge]

The outgoing edges from this vertex.

property partition: ApplicationEdgePartition

The partition that this delay is supporting.

set_new_n_delay_stages_and_delay_per_stage(n_delay_stages: int, delay_per_stage: int) None[source]

Sets the delays per stages. Verifies delay per stage is unchanged.

Parameters:
  • n_delay_stages

  • delay_per_stage

property source_vertex: ApplicationVertex

The pre vertex of the delayed partition.