spinn_front_end_common.utility_models package¶
Submodules¶
spinn_front_end_common.utility_models.lpg_splitter module¶
- class spinn_front_end_common.utility_models.lpg_splitter.LPGSplitter[source]¶
Bases:
AbstractSplitterCommon
Splitter for the
LivePacketGather
vertex.- create_machine_vertices(chip_counter)[source]¶
Method for specific splitter objects to override.
- Parameters:
chip_counter (ChipCounter) – counter of used chips
- create_vertices(system_placements)[source]¶
Special way of making LPG machine vertices, where one is placed on each Ethernet-enabled chip.
Note
This adds to system placements.
- get_in_coming_vertices(partition_id)[source]¶
Get machine post-vertices for a given partition.
The input vertices are the ones that will serve as target vertices for external edges.
Note
This method returns all that could be used for any source machine vertex in the given partition.
- Parameters:
partition_id (str) – The identifier of the incoming partition
- Return type:
- get_out_going_vertices(partition_id)[source]¶
Get machine pre-vertices.
The output vertices are the ones that will serve as source vertices for external edges.
- Parameters:
partition_id (str) – The identifier of the outgoing partition
- Return type:
- get_source_specific_in_coming_vertices(source_vertex, partition_id)[source]¶
Get machine post-vertices for a given source.
The input vertices are the ones that will serve as target vertices for external edges.
Note
This method allows filtering of the targets for a specific source machine vertex.
This default method makes every machine vertex a target for the source. This should be overridden if there are specific machine vertices for any given source vertex.
- Parameters:
source_vertex (ApplicationVertex) – The source to get incoming vertices for
partition_id (str) – The identifier of the incoming partition
- Returns:
A list of tuples of (target machine vertex, list of source machine or application vertices that should hit the target)
- Return type:
list(tuple(MachineVertex, list(MachineVertex or ApplicationVertex)))
- machine_vertices_for_recording(variable_to_record)[source]¶
Gets the machine vertices which are recording this variable.
- Parameters:
variable_to_record (str) – the variable to get machine vertices for.
- Returns:
list of machine vertices
- Return type:
iterable(MachineVertex)
- property targeted_lpgs¶
Which LPG machine vertex is targeted by which machine vertex and partition.
- Returns:
A set of (LPG machine vertex, source machine vertex, partition_id)
- Return type:
set(tuple(LivePacketGatherMachineVertex, MachineVertex, str))
Module contents¶
- class spinn_front_end_common.utility_models.ChipPowerMonitorMachineVertex(label, sampling_frequency)[source]¶
Bases:
MachineVertex
,AbstractHasAssociatedBinary
,AbstractGeneratesDataSpecification
,AbstractReceiveBuffersToHost
Machine vertex for C code representing functionality to record idle times in a machine graph.
Note
This is an unusual machine vertex, in that it has no associated application vertex.
- Parameters:
- static binary_start_type()[source]¶
The type of binary that implements this vertex.
- Returns:
start-type
- Return type:
- generate_data_specification(spec, 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_start_type()[source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- get_recorded_data(placement)[source]¶
Get data from SDRAM given placement and buffer manager. Also arranges for provenance data to be available.
- get_recorded_region_ids()[source]¶
Get the recording region IDs that have been recorded using buffering.
- Returns:
The region numbers that have active recording
- Return type:
iterable(int)
- static get_resources(sampling_frequency)[source]¶
Get the resources used by this vertex.
- Parameters:
sampling_frequency (float) –
- Return type:
- property sdram_required¶
The SDRAM space required by the vertex.
- Return type:
- class spinn_front_end_common.utility_models.CommandSender(label)[source]¶
Bases:
AbstractOneAppOneMachineVertex
A utility for sending commands to a vertex (possibly an external device) at fixed times in the simulation or in response to simulation events (e.g., starting and stopping).
- Parameters:
label (str) – The label of this vertex
- add_commands(start_resume_commands, pause_stop_commands, timed_commands, vertex_to_send_to)[source]¶
Add commands to be sent down a given edge.
- Parameters:
start_resume_commands (iterable(MultiCastCommand)) – The commands to send when the simulation starts or resumes from pause
pause_stop_commands (iterable(MultiCastCommand)) – The commands to send when the simulation stops or pauses after running
timed_commands (iterable(MultiCastCommand)) – The commands to send at specific times
vertex_to_send_to (AbstractVertex) – The vertex these commands are to be sent to
- edges_and_partitions()[source]¶
Construct application edges from this vertex to the app vertices that this vertex knows how to target (and has keys allocated for).
- Returns:
edges, partition IDs
- Return type:
tuple(list(ApplicationEdge), list(str))
- get_fixed_key_and_mask(partition_id)[source]¶
Get a fixed key and mask for the application vertex or None if not fixed (the default). See
get_machine_gixed_key_and_mask()
for the conditions.- Parameters:
partition_id (str) – The identifier of the partition to get the key for
- Return type:
BaseKeyAndMask or None
- class spinn_front_end_common.utility_models.CommandSenderMachineVertex(label, app_vertex=None)[source]¶
Bases:
MachineVertex
,ProvidesProvenanceDataFromMachineImpl
,AbstractHasAssociatedBinary
,AbstractGeneratesDataSpecification
Machine vertex for injecting packets at particular times or in response to particular events into a SpiNNaker application.
- Parameters:
label (str) – The label of this vertex
app_vertex (CommandSender) –
- BINARY_FILE_NAME = 'command_sender_multicast_source.aplx'¶
- class DATA_REGIONS(value)[source]¶
Bases:
IntEnum
An enumeration.
- COMMANDS_AT_START_RESUME = 2¶
- COMMANDS_AT_STOP_PAUSE = 3¶
- COMMANDS_WITH_ARBITRARY_TIMES = 1¶
- PROVENANCE_REGION = 4¶
- SYSTEM_REGION = 0¶
- add_commands(start_resume_commands, pause_stop_commands, timed_commands, vertex_to_send_to)[source]¶
Add commands to be sent down a given edge.
- Parameters:
start_resume_commands (iterable(MultiCastCommand)) – The commands to send when the simulation starts or resumes from pause
pause_stop_commands (iterable(MultiCastCommand)) – the commands to send when the simulation stops or pauses after running
timed_commands (iterable(MultiCastCommand)) – The commands to send at specific times
vertex_to_send_to (AbstractVertex) – The vertex these commands are to be sent to
- edges_and_partitions()[source]¶
Construct machine edges from this vertex to the machine vertices that this vertex knows how to target (and has keys allocated for).
- Returns:
edges, partition IDs
- Return type:
tuple(list(MachineEdge), list(str))
- generate_data_specification(spec, 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_start_type()[source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- get_edges_and_partitions(pre_vertex, vertex_type, edge_type)[source]¶
Construct edges from this vertex to the vertices that this vertex knows how to target (and has keys allocated for).
Note
Do not call this directly from outside either a
CommandSender
or aCommandSenderMachineVertex
.- Parameters:
pre_vertex (CommandSender or CommandSenderMachineVertex) –
vertex_type (type) – subclass of
AbstractVertex
edge_type (type) – subclass of
AbstractEdge
- Returns:
edges, partition IDs
- Return type:
tuple(list(AbstractEdge), list(str))
- get_fixed_key_and_mask(partition_id)[source]¶
Get the key and mask for the given partition.
- Parameters:
partition_id (str) – The partition to get the key for
- Return type:
- classmethod get_n_command_bytes(commands)[source]¶
- Parameters:
commands (list(MultiCastCommand)) –
- Return type:
- 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.
- property sdram_required¶
The SDRAM space required by the vertex.
- Return type:
- class spinn_front_end_common.utility_models.DataSpeedUpPacketGatherMachineVertex(x, y, ip_address)[source]¶
Bases:
MachineVertex
,AbstractGeneratesDataSpecification
,AbstractHasAssociatedBinary
,AbstractProvidesProvenanceDataFromMachine
Machine vertex for handling fast data transfer between host and SpiNNaker. This machine vertex is only ever placed on chips with a working Ethernet connection; it collaborates with the
ExtraMonitorSupportMachineVertex
to write data on other chips.Note
This is an unusual machine vertex, in that it has no associated application vertex.
- Parameters:
- BASE_KEY = 4294967289¶
base key (really nasty hack to tie in fixed route keys)
- BASE_MASK = 4294967291¶
to use with multicast stuff (reinjection acks have to be fixed route)
- END_FLAG_KEY = 4294967286¶
- END_FLAG_KEY_OFFSET = 3¶
- FIRST_DATA_KEY = 4294967287¶
- FIRST_DATA_KEY_OFFSET = 2¶
- FLAG_FOR_MISSING_ALL_SEQUENCES = 4294967294¶
- IN_REPORT_NAME = 'speeds_gained_in_speed_up_process.rpt'¶
report name for tracking performance gains
- NEW_SEQ_KEY = 4294967288¶
- NEW_SEQ_KEY_OFFSET = 1¶
- OUT_REPORT_NAME = 'routers_used_in_speed_up_process.rpt'¶
report name for tracking used routers
- TRANSACTION_ID_KEY = 4294967285¶
- TRANSACTION_ID_KEY_OFFSET = 4¶
- calculate_max_seq_num()[source]¶
Deduce the max sequence number expected to be received.
- Returns:
the biggest sequence number expected
- Return type:
- clear_reinjection_queue()[source]¶
Clears the queues for reinjection.
- Parameters:
placements (Placements) – the placements object
- generate_data_specification(spec, 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_start_type()[source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- get_data(extra_monitor, placement, memory_address, length_in_bytes)[source]¶
Gets data from a given core and memory address.
- Parameters:
extra_monitor (ExtraMonitorSupportMachineVertex) – the extra monitor used for this data
placement (Placement) – placement object for where to get data from
memory_address (int) – the address in SDRAM to start reading from
length_in_bytes (int) – the length of data to read in bytes
- Returns:
byte array of the data
- Return type:
- get_provenance_data_from_machine(placement)[source]¶
Get an iterable of provenance data items.
- Parameters:
placement (Placement) – the placement of the object
- Return type:
iterable
- property iptags¶
The
IPTag
s used by this vertex, if any.- Return type:
iterable(IPtagResource)
- static load_application_routing_tables()[source]¶
Set all chips to have application table loaded in the router.
- static load_system_routing_tables()[source]¶
Set all chips to have the system table loaded in the router.
- static locate_correct_write_data_function_for_chip_location(uses_advanced_monitors, x, y, transceiver, extra_monitor_cores_to_ethernet_connection_map)[source]¶
Supports other components figuring out which gatherer and function to call for writing data onto SpiNNaker.
- Parameters:
uses_advanced_monitors (bool) – Whether the system is using advanced monitors
x (int) – the chip x coordinate to write data to
y (int) – the chip y coordinate to write data to
transceiver (Transceiver) – the SpiNNMan instance
extra_monitor_cores_to_ethernet_connection_map (dict(tuple(int,int), DataSpeedUpPacketGatherMachineVertex)) – mapping between cores and connections
- Returns:
a write function of either a LPG or the spinnMan
- Return type:
callable
- property sdram_required¶
The SDRAM space required by the vertex.
- Return type:
- send_data_into_spinnaker(x, y, base_address, data, n_bytes=None, offset=0, cpu=0, is_filename=False)[source]¶
Sends a block of data into SpiNNaker to a given chip.
- Parameters:
x (int) – chip x for data
y (int) – chip y for data
base_address (int) – the address in SDRAM to start writing memory
data (bytes or bytearray or memoryview or str) – the data to write (or filename to load data from, if
is_filename
is True; that’s the only time this is a str)n_bytes (int) – how many bytes to read, or None if not set
offset (int) – where in the data to start from
cpu (int) –
is_filename (bool) – whether data is actually a file.
- set_cores_for_data_streaming()[source]¶
Helper method for setting the router timeouts to a state usable for data streaming.
- set_router_wait1_timeout(timeout)[source]¶
Set the wait1 field for a set of routers.
- Parameters:
placements (Placements) –
- class spinn_front_end_common.utility_models.ExtraMonitorSupportMachineVertex(reinject_point_to_point=False, reinject_nearest_neighbour=False, reinject_fixed_route=False)[source]¶
Bases:
MachineVertex
,AbstractHasAssociatedBinary
,AbstractGeneratesDataSpecification
,AbstractProvidesProvenanceDataFromMachine
Machine vertex for talking to extra monitor cores. Supports reinjection control and the faster data transfer protocols.
Usually deployed once per chip.
Note
This is an unusual machine vertex, in that it has no associated application vertex.
- Parameters:
- clear_reinjection_queue(extra_monitor_cores_to_set)[source]¶
Clears the queues for reinjection.
- Parameters:
extra_monitor_cores_to_set (iterable(ExtraMonitorSupportMachineVertex)) – Which extra monitors need to clear their queues.
- generate_data_specification(spec, 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_start_type()[source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- get_provenance_data_from_machine(placement)[source]¶
Get an iterable of provenance data items.
- Parameters:
placement (Placement) – the placement of the object
- Return type:
iterable
- get_reinjection_status()[source]¶
Get the reinjection status from this extra monitor vertex.
- Returns:
the reinjection status for this vertex
- Return type:
- get_reinjection_status_for_vertices()[source]¶
Get the reinjection status from a set of extra monitor cores.
- Return type:
- load_application_mc_routes()[source]¶
Get the extra monitor cores to load up the application-based multicast routes (used by the Data In protocol).
- load_system_mc_routes()[source]¶
Get the extra monitor cores to load up the system-based multicast routes (used by the Data In protocol).
- Parameters:
transceiver (Transceiver) – the spinnMan interface
- reset_reinjection_counters(extra_monitor_cores_to_set)[source]¶
Resets the counters for reinjection.
- Parameters:
transceiver (Transceiver) – the spinnMan interface
extra_monitor_cores_to_set (iterable(ExtraMonitorSupportMachineVertex)) – which monitors control the routers to reset the counters of
- property sdram_required¶
The SDRAM space required by the vertex.
- Return type:
- set_reinjection_packets(point_to_point=None, multicast=None, nearest_neighbour=None, fixed_route=None)[source]¶
- Parameters:
point_to_point (bool or None) – If point to point should be set, or None if left as before
multicast (bool or None) – If multicast should be set, or None if left as before
nearest_neighbour (bool or None) – If nearest neighbour should be set, or None if left as before
fixed_route (bool or None) – If fixed route should be set, or None if left as before.
- set_router_wait1_timeout(timeout, extra_monitor_cores_to_set)[source]¶
Supports setting of the router time outs for a set of chips via their extra monitor cores. This sets the timeout for the time between when a packet arrives and when it starts to be emergency routed. (Actual emergency routing is disabled by default.)
- Parameters:
timeout (tuple(int,int)) – The mantissa and exponent of the timeout value, each between 0 and 15
extra_monitor_cores_to_set (iterable(ExtraMonitorSupportMachineVertex)) – which monitors control the routers to set the timeout of
- set_router_wait2_timeout(timeout, extra_monitor_cores_to_set)[source]¶
Supports setting of the router time outs for a set of chips via their extra monitor cores. This sets the timeout for the time between when a packet starts to be emergency routed and when it is dropped. (Actual emergency routing is disabled by default.)
- Parameters:
timeout (tuple(int,int)) – The mantissa and exponent of the timeout value, each between 0 and 15
extra_monitor_cores_to_set (iterable(ExtraMonitorSupportMachineVertex)) – which monitors control the routers to set the timeout of
- static static_get_binary_file_name()[source]¶
The name of the binary implementing this vertex.
- Return type:
- static static_get_binary_start_type()[source]¶
The type of the binary implementing this vertex.
- Return type:
- property transaction_id¶
- class spinn_front_end_common.utility_models.LivePacketGather(params, label=None)[source]¶
Bases:
ApplicationVertex
A vertex that gathers and forwards multicast packets to the host.
- Parameters:
params (LivePacketGatherParameters) – The parameters object
label (str) – An optional label
- property params¶
- class spinn_front_end_common.utility_models.LivePacketGatherMachineVertex(lpg_params, app_vertex=None, label=None)[source]¶
Bases:
MachineVertex
,ProvidesProvenanceDataFromMachineImpl
,AbstractGeneratesDataSpecification
,AbstractHasAssociatedBinary
Used to gather multicast packets coming from cores and stream them out to a receiving application on host. Only ever deployed on chips with a working Ethernet connection.
- Parameters:
lpg_params (LivePacketGatherParameters) – The parameters object
app_vertex (LivePacketGather) – The application vertex
label (str) – An optional label
- KEY_ENTRY_SIZE = 12¶
- TRAFFIC_IDENTIFIER = 'LPG_EVENT_STREAM'¶
Used to identify tags involved with the live packet gatherer.
- add_incoming_source(m_vertex, partition_id)[source]¶
Add a machine vertex source incoming into this gatherer.
- Parameters:
m_vertex (MachineVertex) – The source machine vertex
partition_id (str) – The incoming partition id
- generate_data_specification(spec, 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_start_type()[source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- property iptags¶
The
IPTag
s used by this vertex, if any.- Return type:
iterable(IPtagResource)
- property params¶
- 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.
- property sdram_required¶
The SDRAM space required by the vertex.
- Return type:
- class spinn_front_end_common.utility_models.MultiCastCommand(key, payload=None, time=None, repeat=0, delay_between_repeats=0)[source]¶
Bases:
object
A command to be sent to a vertex.
- Parameters:
key (int) – The key of the command
payload (int or None) – The payload of the command
time (int or None) – The time within the simulation at which to send the command, or
None
if this is not a timed commandrepeat (int) – The number of times that the command should be repeated after sending it once. This could be used to ensure that the command is sent despite lost packets. Must be between 0 and 65535
delay_between_repeats (int) – The amount of time in microseconds to wait between sending repeats of the same command. Must be between 0 and 65535, and must be 0 if repeat is 0
- Raises:
ConfigurationException – If the repeat or delay are out of range
- property is_payload¶
Whether this command has a payload. By default, this returns True if the payload passed in to the constructor is not None, but this can be overridden to indicate that a payload will be generated, despite None being passed to the constructor
- Return type:
- class spinn_front_end_common.utility_models.ReverseIPTagMulticastSourceMachineVertex(label, vertex_slice=None, app_vertex=None, n_keys=None, receive_port=None, receive_sdp_port=1, receive_tag=None, receive_rate=10, virtual_key=None, prefix=None, prefix_type=None, check_keys=False, send_buffer_times=None, send_buffer_partition_id=None, reserve_reverse_ip_tag=False, injection_partition_id=None)[source]¶
Bases:
MachineVertex
,AbstractGeneratesDataSpecification
,AbstractHasAssociatedBinary
,AbstractSupportsDatabaseInjection
,ProvidesProvenanceDataFromMachineImpl
,SendsBuffersFromHostPreBufferedImpl
,AbstractReceiveBuffersToHost
A model which allows events to be injected into SpiNNaker and converted in to multicast packets.
- Parameters:
label (str or None) – The label of this vertex
vertex_slice (Slice or None) – The slice served via this multicast source
app_vertex (ApplicationVertex or None) – The associated application vertex
n_keys (int) – The number of keys to be sent via this multicast source (can’t be None if vertex_slice is also None)
board_address (str) – The IP address of the board on which to place this vertex if receiving data, either buffered or live (by default, any board is chosen)
receive_port (int) – The port on the board that will listen for incoming event packets (default is to disable this feature; set a value to enable it, or set the reserve_reverse_ip_tag parameter to True if a random port is to be used)
receive_sdp_port (int) – The SDP port to listen on for incoming event packets (defaults to 1)
receive_tag (int) – The IP tag to use for receiving live events (uses any by default)
receive_rate (float) –
virtual_key (int) – The base multicast key to send received events with (assigned automatically by default)
prefix (int) – The prefix to “or” with generated multicast keys (default is no prefix)
prefix_type (EIEIOPrefix) – Whether the prefix should apply to the upper or lower half of the multicast keys (default is upper half)
check_keys (bool) – True if the keys of received events should be verified before sending (default False)
send_buffer_times (ndarray) – An array of arrays of time steps at which keys should be sent (one array for each key, default disabled)
send_buffer_partition_id (str) – The ID of the partition containing the edges down which the events are to be sent
reserve_reverse_ip_tag (bool) – True if the source should set up a tag through which it can receive packets; if port is set to None this can be used to enable the reception of packets on a randomly assigned port, which can be read from the database
injection_partition (str) – If not None, will enable injection and specify the partition to send injected keys with
label – The optional name of the vertex
app_vertex – The application vertex that caused this machine vertex to be created. If None, there is no such application vertex.
vertex_slice – The slice of the application vertex that this machine vertex implements.
- Raises:
PacmanValueError – If the slice of the machine_vertex is too big
AttributeError – If a not-None app_vertex is not an ApplicationVertex
- enable_recording(new_state=True)[source]¶
Enable recording of the keys sent.
- Parameters:
new_state (bool) –
- generate_data_specification(spec, 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_start_type()[source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- get_recorded_region_ids()[source]¶
Get the recording region IDs that have been recorded using buffering.
- Returns:
The region numbers that have active recording
- Return type:
iterable(int)
- get_regions()[source]¶
Get the set of regions for which there are keys to be sent.
- Returns:
Iterable of region IDs
- Return type:
iterable(int)
- classmethod get_sdram_usage(send_buffer_times, recording_enabled, receive_rate, n_keys)[source]¶
- Parameters:
- Return type:
- get_virtual_key()[source]¶
Updates and returns the virtual key. None is give a zero value
- Return type:
int or None
- property injection_partition_id¶
The partition that packets are being injected with.
- Return type:
- 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.
- property reverse_iptags¶
The
ReverseIPTag
s used by this vertex, if any.- Return type:
iterable(ReverseIPtagResource)
- rewind(region)[source]¶
Rewinds the internal buffer in preparation of re-sending the spikes.
- Parameters:
region (int) – The region to rewind
- property sdram_required¶
The SDRAM space required by the vertex.
- Return type:
- property send_buffer_times¶
When events will be sent.
- property send_buffers¶
- Return type:
- class spinn_front_end_common.utility_models.ReverseIpTagMultiCastSource(n_keys, label=None, max_atoms_per_core=9223372036854775807, receive_port=None, receive_sdp_port=1, receive_tag=None, receive_rate=10, virtual_key=None, prefix=None, prefix_type=None, check_keys=False, send_buffer_times=None, send_buffer_partition_id=None, reserve_reverse_ip_tag=False, injection_partition_id=None, splitter=None)[source]¶
Bases:
ApplicationVertex
,LegacyPartitionerAPI
A model which will allow events to be injected into a SpiNNaker machine and converted into multicast packets.
- Parameters:
n_keys (int) – The number of keys to be sent via this multicast source
label (str) – The label of this vertex
max_atoms_per_core (int) –
board_address (str or None) – The IP address of the board on which to place this vertex if receiving data, either buffered or live (by default, any board is chosen)
receive_port (int or None) – The port on the board that will listen for incoming event packets (default is to disable this feature; set a value to enable it)
receive_sdp_port (int) – The SDP port to listen on for incoming event packets (defaults to 1)
receive_tag (IPTag) – The IP tag to use for receiving live events (uses any by default)
receive_rate (float) – The estimated rate of packets that will be sent by this source
virtual_key (int) – The base multicast key to send received events with (assigned automatically by default)
prefix (int) – The prefix to “or” with generated multicast keys (default is no prefix)
prefix_type (EIEIOPrefix) – Whether the prefix should apply to the upper or lower half of the multicast keys (default is upper half)
check_keys (bool) – True if the keys of received events should be verified before sending (default False)
send_buffer_times (ndarray(ndarray(numpy.int32)) or list(ndarray(int32)) or None) – An array of arrays of times at which keys should be sent (one array for each key, default disabled)
send_buffer_partition_id (str or None) – The ID of the partition containing the edges down which the events are to be sent
reserve_reverse_ip_tag (bool) – Extra flag for input without a reserved port
injection_partition (str) – If not None, will enable injection and specify the partition to send injected keys with
splitter (None or AbstractSplitterCommon) – the splitter object needed for this vertex
- create_machine_vertex(vertex_slice, sdram, label=None)[source]¶
Create a machine vertex from this application vertex.
- Parameters:
vertex_slice (Slice) – The slice of atoms that the machine vertex will cover.
sdram (AbstractSDRAM) – The SDRAM used by the machine vertex.
label (str or None) – human readable label for the machine vertex
- Returns:
The created machine vertex
- Return type:
- get_fixed_key_and_mask(partition_id)[source]¶
Get a fixed key and mask for the application vertex or None if not fixed (the default). See
get_machine_gixed_key_and_mask()
for the conditions.- Parameters:
partition_id (str) – The identifier of the partition to get the key for
- Return type:
BaseKeyAndMask or None
- class spinn_front_end_common.utility_models.StreamingContextManager(gatherers)[source]¶
Bases:
object
The implementation of the context manager object for streaming configuration control.
- Parameters:
gatherers (iterable(DataSpeedUpPacketGatherMachineVertex)) –