spinn_front_end_common.utility_models package¶
Module contents¶
- class spinn_front_end_common.utility_models.ChipPowerMonitorMachineVertex(label: str, sampling_frequency: int)¶
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() ExecutableType [source]¶
The type of binary that implements this vertex.
- Returns:
start-type
- Return type:
- 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_start_type() ExecutableType [source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- get_recorded_data(placement: Placement) ndarray [source]¶
Get data from SDRAM given placement and buffer manager. Also arranges for provenance data to be available.
- get_recorded_region_ids() List[int] [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_recording_region_base_address(placement: Placement) int [source]¶
Get the recording region base address.
- property sdram_required: AbstractSDRAM¶
The SDRAM space required by the vertex.
- Return type:
- class spinn_front_end_common.utility_models.CommandSender(label: str)¶
Bases:
AbstractOneAppOneMachineVertex
[CommandSenderMachineVertex
]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: Iterable[MultiCastCommand], pause_stop_commands: Iterable[MultiCastCommand], timed_commands: Iterable[MultiCastCommand], vertex_to_send_to: AbstractVertex)[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() Tuple[List[ApplicationEdge], List[str]] [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: str) BaseKeyAndMask [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: str, app_vertex: CommandSender)¶
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 DataRegions(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
IntEnum
The ids for each region of the data this Population used.
- 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: Iterable[MultiCastCommand], pause_stop_commands: Iterable[MultiCastCommand], timed_commands: Iterable[MultiCastCommand], vertex_to_send_to: AbstractVertex)[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() Tuple[List[MachineEdge], List[str]] [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: 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_start_type() ExecutableType [source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- get_edges_and_partitions(pre_vertex: CS, vertex_type: Type[V], edge_type: Callable[[CS, V], E]) Tuple[List[E], List[str]] [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: str) BaseKeyAndMask [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: Sized) int [source]¶
- Parameters:
commands (list(MultiCastCommand)) –
- Return type:
- 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:
- class spinn_front_end_common.utility_models.DataSpeedUpPacketGatherMachineVertex(x: int, y: int, ip_address: str)¶
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_MASK = 4294967291¶
- 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'¶
- NEW_SEQ_KEY = 4294967288¶
- NEW_SEQ_KEY_OFFSET = 1¶
- OUT_REPORT_NAME = 'routers_used_in_speed_up_process.rpt'¶
- TRANSACTION_ID_KEY = 4294967285¶
- TRANSACTION_ID_KEY_OFFSET = 4¶
- 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_start_type() ExecutableType [source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- get_data(extra_monitor: ExtraMonitorSupportMachineVertex, placement: Placement, memory_address: int, length_in_bytes: int) 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: Placement)[source]¶
Get provenance data items for a placement and store them in the provenance DB.
- Parameters:
placement (Placement) – the placement of the object
- property iptags: List[IPtagResource]¶
The
IPTag
s used by this vertex, if any.- Return type:
iterable(IPtagResource)
- static load_application_routing_tables() None [source]¶
Set all chips to have application table loaded in the router.
- static load_system_routing_tables() None [source]¶
Set all chips to have the system table loaded in the router.
- property sdram_required: ConstantSDRAM¶
The SDRAM space required by the vertex.
- Return type:
- send_data_into_spinnaker(x: int, y: int, base_address: int, data: BinaryIO | bytes | str | int, *, n_bytes: int | None = None, offset: int = 0, cpu: int = 0)[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 a string)
n_bytes (int) – how many bytes to read, or None if not set
offset (int) – where in the data to start from
cpu (int) – Ignored; can only target SDRAM so unimportant
- set_cores_for_data_streaming() None [source]¶
Helper method for setting the router timeouts to a state usable for data streaming.
- set_router_wait1_timeout(timeout: Tuple[int, int])[source]¶
Set the wait1 field for a set of routers.
- class spinn_front_end_common.utility_models.EIEIOParameters(receive_port: int | None = None, receive_sdp_port: int = 1, receive_tag: int | None = None, receive_rate: float = 10.0, virtual_key: int | None = None, prefix: int | None = None, prefix_type: EIEIOPrefix | None = None, check_keys: bool = False, send_buffer_partition_id: str | None = None, reserve_reverse_ip_tag: bool = False, injection_partition_id: str | None = None)¶
Bases:
object
- Parameters:
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_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
- class spinn_front_end_common.utility_models.ExtraMonitorSupportMachineVertex(reinject_point_to_point: bool = False, reinject_nearest_neighbour: bool = False, reinject_fixed_route: bool = False)¶
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:
- 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_start_type() ExecutableType [source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- get_provenance_data_from_machine(placement: Placement)[source]¶
Get provenance data items for a placement and store them in the provenance DB.
- Parameters:
placement (Placement) – the placement of the object
- get_reinjection_status() ReInjectionStatus [source]¶
Get the reinjection status from this extra monitor vertex.
- Returns:
the reinjection status for this vertex
- Return type:
- get_reinjection_status_for_vertices() Dict[Chip, ReInjectionStatus] [source]¶
Get the reinjection status from a set of extra monitor cores.
- Return type:
- load_application_mc_routes() None [source]¶
Get the extra monitor cores to load up the application-based multicast routes (used by the Data In protocol).
- load_system_mc_routes() None [source]¶
Get the extra monitor cores to load up the system-based multicast routes (used by the Data In protocol).
- reset_reinjection_counters(extra_monitor_cores_to_set: Iterable[ExtraMonitorSupportMachineVertex])[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: AbstractSDRAM¶
The SDRAM space required by the vertex.
- Return type:
- set_reinjection_packets(point_to_point: bool | None = None, multicast: bool | None = None, nearest_neighbour: bool | None = None, fixed_route: bool | None = 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.
- static static_get_binary_file_name() str [source]¶
The name of the binary implementing this vertex.
- Return type:
- static static_get_binary_start_type() ExecutableType [source]¶
The type of the binary implementing this vertex.
- Return type:
- class spinn_front_end_common.utility_models.LivePacketGather(params: LivePacketGatherParameters, label: str | None = None)¶
Bases:
ApplicationVertex
[LivePacketGatherMachineVertex
]A vertex that gathers and forwards multicast packets to the host.
- Parameters:
params (LivePacketGatherParameters) – The parameters object
label (str) – An optional label
- property params: LivePacketGatherParameters¶
The params value passed into the init.
- Return type:
- class spinn_front_end_common.utility_models.LivePacketGatherMachineVertex(lpg_params: LivePacketGatherParameters, app_vertex: LivePacketGather | None = None, label: str | None = None)¶
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'¶
- add_incoming_source(m_vertex: MachineVertex, partition_id: str)[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: 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_start_type() ExecutableType [source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- property iptags: List[IPtagResource]¶
The
IPTag
s used by this vertex, if any.- Return type:
iterable(IPtagResource)
- property params: LivePacketGatherParameters¶
The lpg_params as passed into the init.
- Return type:
- 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:
- class spinn_front_end_common.utility_models.MultiCastCommand(key: int, payload: int | None = None, *, time: int | None = None, repeat: int = 0, delay_between_repeats: int = 0)¶
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: bool¶
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: str | None, vertex_slice: Slice | None = None, app_vertex: ReverseIpTagMultiCastSource | None = None, n_keys: int | None = None, eieio_params: EIEIOParameters | None = None, send_buffer_times: _SendBufferTimes = None)¶
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)
eieio_params – General parameters passed from the application vertex.
send_buffer_times (ndarray) – An array of arrays of time steps at which keys should be sent (one array for each key, default disabled)
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
- buffering_input() bool [source]¶
Return True if the input of this vertex is to be buffered.
- Return type:
- enable_recording(new_state: bool = True)[source]¶
Enable recording of the keys sent.
- Parameters:
new_state (bool) –
- 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_start_type() ExecutableType [source]¶
Get the start type of the binary to be run.
- Return type:
ExecutableType
- get_recorded_region_ids() List[int] [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_recording_region_base_address(placement: Placement) int [source]¶
Get the recording region base address.
- get_regions() Collection[int] [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: _SendBufferTimes, recording_enabled: bool, receive_rate: float, n_keys: int) VariableSDRAM [source]¶
- Parameters:
- Return type:
- get_virtual_key() int [source]¶
Updates and returns the virtual key. None is give a zero value
- Return type:
int or None
- property injection_partition_id: str¶
The partition that packets are being injected with.
- Return type:
- property is_in_injection_mode: bool¶
Whether this vertex is actually in injection mode.
- Return type:
- 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 reverse_iptags: List[ReverseIPtagResource]¶
The
ReverseIPTag
s used by this vertex, if any.- Return type:
iterable(ReverseIPtagResource)
- rewind(region: int)[source]¶
Rewinds the internal buffer in preparation of re-sending the spikes.
- Parameters:
region (int) – The region to rewind
- property sdram_required: AbstractSDRAM¶
The SDRAM space required by the vertex.
- Return type:
- property send_buffer_times: _SendBufferTimes¶
When events will be sent.
- property send_buffers: Dict[int, BufferedSendingRegion]¶
- Return type:
- class spinn_front_end_common.utility_models.ReverseIpTagMultiCastSource(n_keys: int, label: str | None = None, max_atoms_per_core: int | Tuple[int, ...] | None = 9223372036854775807, receive_port: int | None = None, receive_sdp_port: int = 1, receive_tag: IPTag | None = None, receive_rate: int = 10, virtual_key: int | None = None, prefix: int | None = None, prefix_type: EIEIOPrefix | None = None, check_keys: bool = False, send_buffer_times: ndarray | List[ndarray] | None = None, send_buffer_partition_id: str | None = None, reserve_reverse_ip_tag: bool = False, injection_partition_id: str | None = None, splitter: AbstractSplitterCommon | None = None)¶
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 (AbstractSplitterCommon or None) – the splitter object needed for this vertex
- create_machine_vertex(vertex_slice: Slice, sdram: AbstractSDRAM, label: str | None = None) ReverseIPTagMulticastSourceMachineVertex [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:
- enable_recording(new_state: bool = True)[source]¶
Turns on or of the recording for this vertex.
- Parameters:
new_state (bool) – True if recording should be done
- get_fixed_key_and_mask(partition_id: str) BaseKeyAndMask | None [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
- get_sdram_used_by_atoms(vertex_slice: Slice) AbstractSDRAM [source]¶
Get the separate SDRAM requirements for a range of atoms.
- Parameters:
vertex_slice (Slice) – the low value of atoms to calculate resources from
- Return type:
- class spinn_front_end_common.utility_models.StreamingContextManager(gatherers: Iterable[DataSpeedUpPacketGatherMachineVertex])¶
Bases:
ContextManager
[None
]The implementation of the context manager object for streaming configuration control.
- Parameters:
gatherers (iterable(DataSpeedUpPacketGatherMachineVertex)) –