spynnaker.pyNN.models.utility_models.delays package

Module contents

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

Bases: MachineVertex, ProvidesProvenanceDataFromMachineImpl, AbstractHasAssociatedBinary, AbstractGeneratesDataSpecification

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

Parameters:
  • sdram (AbstractSDRAM) – The SDRAM required by the vertex

  • label (str) – The name of the vertex

  • vertex_slice (Slice) – The slice 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.

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.

Return type:

ApplicationVertex or None

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

Generate a data specification.

Parameters:
  • spec (DataSpecificationGenerator) – The data specification to write to

  • placement (Placement) – The placement the vertex is located at

get_binary_file_name() str[source]

Get the binary name to be run for this vertex.

Return type:

str

get_binary_start_type() ExecutableType[source]

Get the start type of the binary to be run.

Return type:

ExecutableType

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 (str) – The identifier of the partition; the partition_id param is only used by some MachineVertex subclasses

Returns:

The number of keys required

Return type:

int

parse_extra_provenance_items(label: str, x: int, y: int, p: int, provenance_data: Sequence[int])[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.

property sdram_required: AbstractSDRAM

The SDRAM space required by the vertex.

Return type:

AbstractSDRAM

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(partition: ApplicationEdgePartition, delay_per_stage: int, n_delay_stages: int, n_colour_bits: int, label: str = 'DelayExtension')

Bases: ApplicationVertex, AbstractHasDelayStages

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

Parameters:
  • partition (ApplicationEdgePartition) – The partition that this delay is supporting

  • delay_per_stage (int) – the delay per stage

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

  • n_colour_bits (int) – the number of bits for event colouring

  • label (str) – the vertex label

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

Add an outgoing edge to the delay extension.

Parameters:

edge (DelayedApplicationEdge) – 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.

Return type:

tuple(int, …)

delay_params_size()[source]

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]

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

Parameters:

delay_ticks_at_post_vertex (int)

Return type:

int

property n_atoms: int

The number of atoms in this vertex.

Return type:

int

property n_colour_bits: int

The number of bits for event colouring.

property n_delay_stages: int

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

Return type:

int

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)[source]

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

Parameters:
  • n_delay_stages (int)

  • delay_per_stage (int)

property source_vertex: ApplicationVertex

The pre vertex of the delayed partition.

Return type:

ApplicationVertex