spinn_front_end_common.abstract_models.impl package¶
Module contents¶
-
class
spinn_front_end_common.abstract_models.impl.
MachineAllocationController
(thread_name)[source]¶ Bases:
spinn_front_end_common.abstract_models.abstract_machine_allocation_controller.AbstractMachineAllocationController
How to manage the allocation of a machine so that it gets cleaned up neatly when the script dies.
Parameters: thread_name (str) –
-
class
spinn_front_end_common.abstract_models.impl.
MachineDataSpecableVertex
[source]¶ Bases:
spinn_front_end_common.abstract_models.abstract_generates_data_specification.AbstractGeneratesDataSpecification
Support for a vertex that simplifies generating a data specification.
-
generate_data_specification
(spec, placement, machine_graph, routing_info, tags)[source]¶ Generate a data specification.
Parameters: - spec (DataSpecificationGenerator) – The data specification to write to
- placement (Placement) – The placement the vertex is located at
- machine_graph (MachineGraph) – (Injected)
- routing_info (RoutingInfo) – (Injected)
- tags (Tags) – (Injected)
Return type:
-
generate_machine_data_specification
(spec, placement, machine_graph, routing_info, iptags, reverse_iptags)[source]¶ Parameters: - spec (DataSpecificationGenerator) – The data specification to write into.
- placement (Placement) – Where this node is on the SpiNNaker machine.
- machine_graph (MachineGraph) – The graph containing this node.
- routing_info (RoutingInfo) – The routing info.
- iptags (iterable(IPTag) or None) – The (forward) IP tags for the vertex, if any
- reverse_iptags (iterable(ReverseIPTag) or None) – The reverse IP tags for the vertex, if any
Return type:
-
-
class
spinn_front_end_common.abstract_models.impl.
ProvidesKeyToAtomMappingImpl
[source]¶ Bases:
spinn_front_end_common.abstract_models.abstract_provides_key_to_atom_mapping.AbstractProvidesKeyToAtomMapping
-
routing_key_partition_atom_mapping
(routing_info, partition)[source]¶ Returns a list of atom to key mapping.
Parameters: - routing_info (RoutingInfo) – the routing info object to consider
- partition (OutgoingEdgePartition) – the routing partition to handle.
Returns: a iterable of tuples of atom IDs to keys.
Return type:
-
-
class
spinn_front_end_common.abstract_models.impl.
TDMAAwareApplicationVertex
(label, constraints, max_atoms_per_core, splitter=None)[source]¶ Bases:
pacman.model.graphs.application.application_vertex.ApplicationVertex
An application vertex that contains the code for using TDMA to spread packet transmission to try to avoid overloading any SpiNNaker routers.
Parameters: - label (str or None) – The name of the vertex.
- constraints (iterable(AbstractConstraint) or None) – The initial constraints of the vertex.
- max_atoms_per_core (int) – The max number of atoms that can be placed on a core, used in partitioning.
Raises: PacmanInvalidParameterException – If one of the constraints is not valid
-
find_n_phases_for
(machine_graph, n_keys_map)[source]¶ Compute the number of phases needed for this application vertex. This is the maximum number of packets any machine vertex created by this application vertex can send in one simulation time step.
Parameters: - machine_graph (MachineGraph) –
- n_keys_map (AbstractMachinePartitionNKeysMap) –
Return type:
-
generate_tdma_data_specification_data
(vertex_index)[source]¶ Generates the TDMA configuration data needed for the data spec
Parameters: vertex_index (int) – the machine vertex index in the pop Returns: array of data to write. Return type: list(int)
-
get_n_cores
()[source]¶ Get the number of cores this application vertex is using in the TDMA.
Returns: the number of cores to use in the TDMA Return type: int
-
get_tdma_provenance_item
(x, y, p, desc_label, tdma_slots_missed)[source]¶ Get the provenance item used for the TDMA provenance
Parameters:
-
set_initial_offset
(new_value)[source]¶ Sets the initial offset
Parameters: new_value (int) – the new initial offset, in clock ticks