spinn_front_end_common.abstract_models package

Subpackages

Submodules

spinn_front_end_common.abstract_models.abstract_supports_bit_field_routing_compression module

class spinn_front_end_common.abstract_models.abstract_supports_bit_field_routing_compression.AbstractSupportsBitFieldRoutingCompression[source]

Bases: object

Marks a machine vertex that can support having the on-chip bitfield compressor running on its core.

abstractmethod bit_field_base_address(placement: Placement) int[source]

Returns the SDRAM address for the bit-field table data.

Parameters:

placement

Returns:

the SDRAM address for the bitfield address

abstractmethod regeneratable_sdram_blocks_and_sizes(placement: Placement) List[Tuple[int, int]][source]

Returns the SDRAM addresses and sizes for the cores’ SDRAM that are available (borrowed) for generating bitfield tables.

Parameters:

placement

Returns:

list of tuples containing (the SDRAM address for the cores SDRAM address’s for the core’s SDRAM that can be used to generate bitfield tables loaded, and the size of memory chunks located there)

Module contents

class spinn_front_end_common.abstract_models.AbstractGeneratesDataSpecification

Bases: object

A machine vertex that generates a data specification that describes what its binary’s initialisation data is.

abstractmethod 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

abstract property label: str | None

The current label to the vertex.

This label could change when the vertex is added to the graph.

See MachineVertex.label

Defined here too so can be called on object known to be this type

abstract property sdram_required: AbstractSDRAM

The SDRAM space required by the vertex.

See MachineVertex.sdram_required

Defined here too so can be called on object known to be this type

class spinn_front_end_common.abstract_models.AbstractHasAssociatedBinary

Bases: object

Marks a machine graph vertex that can be launched on a SpiNNaker core.

abstractmethod get_binary_file_name() str[source]
Returns:

The binary name to be run for this vertex.

abstractmethod get_binary_start_type() ExecutableType[source]
Returns:

The start type of the binary to be run.

class spinn_front_end_common.abstract_models.AbstractRewritesDataSpecification

Bases: object

Indicates an object that allows data to be changed after run, and so can rewrite the data specification.

abstractmethod regenerate_data_specification(spec: DataSpecificationReloader, placement: Placement) None[source]

Regenerate the data specification, only generating regions that have changed and need to be reloaded.

Parameters:
  • spec – Where to write the regenerated spec

  • placement – Where are we regenerating for?

abstractmethod reload_required() bool[source]
Returns:

True if any data region needs to be reloaded.

abstractmethod set_reload_required(new_value: bool) None[source]

Indicate that the regions have been reloaded.

Parameters:

new_value – the new value

class spinn_front_end_common.abstract_models.AbstractSendMeMulticastCommandsVertex

Bases: object

A device that may be a virtual vertex which wants to commands to be sent to it as multicast packets at fixed points in the simulation.

Note

The device might not be a vertex at all. It could instead be instantiated entirely host side, in which case these methods will never be called.

abstract property pause_stop_commands: Iterable[MultiCastCommand]

The commands needed when pausing or stopping simulation.

abstract property start_resume_commands: Iterable[MultiCastCommand]

The commands needed when starting or resuming simulation.

abstract property timed_commands: List[MultiCastCommand]

The commands to be sent at given times in the simulation.

class spinn_front_end_common.abstract_models.AbstractSupportsDatabaseInjection

Bases: object

Marks a machine vertex as supporting injection of information via a database running on the controlling host.

abstract property injection_partition_id: str

The partition that packets are being injected with.

abstract property is_in_injection_mode: bool

Whether this vertex is actually in injection mode.

class spinn_front_end_common.abstract_models.AbstractVertexWithEdgeToDependentVertices

Bases: object

A vertex with a dependent vertices, which should be connected to this vertex by an edge directly to each of them.

abstractmethod dependent_vertices() Iterable[ApplicationVertex][source]
Returns:

The vertices which this vertex depends upon.

abstractmethod edge_partition_identifiers_for_dependent_vertex(vertex: ApplicationVertex) Iterable[str][source]
Parameters:

vertex

Returns:

The dependent edge identifiers for a particular dependent vertex.

class spinn_front_end_common.abstract_models.HasCustomAtomKeyMap

Bases: object

An object that can provide a custom atom-key mapping for a partition. Useful when there isn’t a one-to-one correspondence between atoms and keys for a given partition.

abstractmethod get_atom_key_map(pre_vertex: MachineVertex, partition_id: str, routing_info: RoutingInfo) Iterable[Tuple[int, int]][source]

Get the mapping between atoms and keys for the given partition id, and for the given machine pre-vertex.

Parameters:
  • pre_vertex – The machine vertex to get the map for

  • partition_id – The partition to get the map for

  • routing_info – Routing information

Returns:

A list of (atom_id, key)

class spinn_front_end_common.abstract_models.LiveOutputDevice

Bases: object

Indicates a device that will live-output other vertices, and so has a different mapping of keys to atoms.

abstractmethod get_device_output_keys() Dict[MachineVertex, List[Tuple[int, int]]][source]

Get the atom key mapping to be output for each machine vertex received by the device to be output. Note that the device may change the keys as they pass through it, and this needs to be recognised here.

Returns:

Mapping of machine vertex to list of (atom_id, key)