spinnaker_graph_front_end.utilities package¶
Submodules¶
spinnaker_graph_front_end.utilities.data_utils module¶
- spinnaker_graph_front_end.utilities.data_utils.generate_steps_system_data_region(spec: DataSpecificationGenerator, region_id: int, machine_vertex: SimulatorVertex) None[source]¶
Generate a system data region for step-based simulations.
- Parameters:
spec – The data specification to write to
region_id – The region to write to
machine_vertex – The machine vertex to write for
- spinnaker_graph_front_end.utilities.data_utils.generate_system_data_region(spec: DataSpecificationGenerator, region_id: int, machine_vertex: AbstractHasAssociatedBinary) None[source]¶
Generate a system data region for time-based simulations.
- Parameters:
spec – The data specification to write to
region_id – The region to write to
machine_vertex – The machine vertex to write for
Module contents¶
- class spinnaker_graph_front_end.utilities.SimulatorVertex(label: str | None, binary_name: str, vertex_slice: Slice | None = None)[source]¶
Bases:
MachineVertex,AbstractHasAssociatedBinaryA machine vertex that is implemented by a binary APLX that supports the spin1_api simulation control protocol.
- Parameters:
label – The label for the vertex.
binary_name – The name of the APLX implementing the vertex.
vertex_slice – The slice of the application vertex that this machine vertex implements.
- property front_end: ModuleType¶
The main front end that is handling this simulator vertex.
- generate_recording_region(spec: DataSpecificationGenerator, region_id: int, channel_sizes: List[int]) None[source]¶
Generate the recording region for the data specification.
- Parameters:
spec – The data specification being built
region_id – Which region is the recording region.
- generate_system_region(spec: DataSpecificationGenerator, region_id: int = 0) None[source]¶
Generate the system region for the data specification. Assumes that the vertex uses the system timestep and time scale factor.
Note
Do not use this with untimed vertices.
- Parameters:
spec – The data specification being built
region_id – Which region is the system region. Defaults to 0 because it is almost always the first one.
- get_binary_start_type() ExecutableType[source]¶
- Returns:
The start type of the binary to be run.
- get_recording_channel_data(recording_id: int) Tuple[bytes, bool][source]¶
Get the data from a recording channel. The simulation must have
spinnaker_graph_front_end.run()before this will work, and the vertex must set up the recording region beforehand.- Parameters:
recording_id – Which recording channel to fetch
- Returns:
the data, and whether any data was lost
- property placement: Placement¶
Get the placement of this vertex.
Note
Only valid after the simulation has run!
- abstract property sdram_required: AbstractSDRAM¶
The SDRAM space required by the vertex.