spinnaker_graph_front_end.utilities package


spinnaker_graph_front_end.utilities.data_utils module

spinnaker_graph_front_end.utilities.data_utils.generate_steps_system_data_region(spec, region_id, machine_vertex)[source]

Generate a system data region for step-based simulations.

spinnaker_graph_front_end.utilities.data_utils.generate_system_data_region(spec, region_id, machine_vertex)[source]

Generate a system data region for time-based simulations.


Module contents

class spinnaker_graph_front_end.utilities.SimulatorVertex(label, binary_name, constraints=())[source]

Bases: pacman.model.graphs.machine.machine_vertex.MachineVertex, spinn_front_end_common.abstract_models.abstract_has_associated_binary.AbstractHasAssociatedBinary

A machine vertex that is implemented by a binary APLX that supports the spin1_api simulation control protocol.

  • label (str) – The label for the vertex.
  • binary_name (str) – The name of the APLX implementing the vertex.
  • constraints (Iterable(AbstractConstraint)) – Any placement or key-allocation constraints on the vertex.

The main front end that is handling this simulator vertex.

Return type:ModuleType
generate_recording_region(spec, region_id, channel_sizes)[source]

Generate the recording region for the data specification.

  • spec (DataSpecificationGenerator) – The data specification being built
  • region_id (int) – Which region is the recording region.
  • sizes (list(int)) – The sizes of each of the recording channels. The length of the list is the number of recording channels.
generate_system_region(spec, region_id=0)[source]

Generate the system region for the data specification. Assumes that the vertex uses the system timestep and time scale factor.


Do not use this with untimed vertices.

  • spec (DataSpecificationGenerator) – The data specification being built
  • region_id (int) – Which region is the system region. Defaults to 0 because it is almost always the first one.

Get the binary name to be run for this vertex.

Return type:str

Get the start type of the binary to be run.

Return type:ExecutableType

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 (int) – Which recording channel to fetch
Returns:the data, and whether any data was lost
Return type:tuple(bytes, bool)

Get the placement of this vertex.


Only valid after the simulation has run!

Return type:Placement