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)[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) –
Return type:bool
generate_data_specification(spec, placement, machine_graph, routing_infos)[source]

Generate a data specification.

Parameters:
Return type:

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
Returns:The number of keys required
Return type:int
parse_extra_provenance_items(label, names, 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.
  • names (list(str)) – The base names describing the location of the machine vertex producing the provenance.
  • provenance_data (list(int)) – The list of words of raw provenance data.
Returns:

The interpreted provenance items.

Return type:

iterable(ProvenanceDataItem)

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:
class spynnaker.pyNN.models.utility_models.delays.DelayExtensionVertex(n_neurons, delay_per_stage, max_delay_to_support, 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
  • max_delay_to_support (int) – the max delay this will cover
  • source_vertex (ApplicationVertex) – where messages are coming from
  • constraints (iterable(AbstractConstraint)) – the vertex constraints
  • label (str) – the vertex label
MAX_DTCM_AVAILABLE = 54756
MAX_TICKS_POSSIBLE_TO_SUPPORT = 128
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:
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
  • machine_time_step (int) – sim machine time step
delay_blocks_for(vertex_slice)[source]
delay_generator_data(vertex_slice)[source]
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) –
Return type:bool
static get_max_delay_ticks_supported(delay_ticks_at_post_vertex)[source]
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
Returns:A list of constraints
Return type: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
Return type:int
set_new_n_delay_stages_and_delay_per_stage(new_post_vertex_n_delay, new_max_delay)[source]
source_vertex
Return type:ApplicationVertex