spinn_machine.data package¶
Submodules¶
spinn_machine.data.machine_data_writer module¶
-
class
spinn_machine.data.machine_data_writer.
MachineDataWriter
(state)[source]¶ Bases:
spinn_utilities.data.utils_data_writer.UtilsDataWriter
,spinn_machine.data.MachineDataView
See UtilsDataWriter
This class is designed to only be used directly within the SpiNNMachine repository unittests as all methods are available to subclasses
Creates a new writer clearing all previous data and sets the state
Parameters: state (Data_Status) – State writer should be in -
clear_machine
()[source]¶ Clears any previously set machine
Designed to only be used by ASB to remove a max machine before allocating an actual one. Any other use is not supported. Will be removed without notice if max_machine is no longer done.
-
get_user_accessed_machine
()[source]¶ Reports if …View.get_machine has been called outside of sim.run
Designed to only be used from ASB. Any other use is not supported
-
Module contents¶
-
class
spinn_machine.data.
MachineDataView
¶ Bases:
spinn_utilities.data.utils_data_view.UtilsDataView
Adds the extra Methods to the View for Machine level.
See UtilsDataView for a more detailed description.
This class is designed to only be used directly within the SpiNNMachine repository as all methods are available to subclasses
-
classmethod
get_chip_at
(x, y)[source]¶ Gets the chip at x and y
Almost Semantic sugar for machine.get_chip_at
The method however does not return None but rather raises a KeyError if the chip is not known
Parameters: Return type: Raises: - SpiNNUtilsException – If the machine is currently unavailable
- KeyError – If the chip does not exist but the machine does
-
classmethod
get_machine
()[source]¶ Returns the Machine if it has been set
In Mock mode will create and return a virtual 8 * 8 board
Raises: SpiNNUtilsException – If the machine is currently unavailable Return type: Machine
-
classmethod
get_nearest_ethernet
(x, y)[source]¶ Gets the nearest ethernet x and y for the chip at x, y if it exists
If there is no machine or no chip at (x, y) this method, or any other issue will just return x,y
Parameters: Returns: Chip(x,y)’s nearest_ethernet info or if that is not available just x, and y
Return type:
-
classmethod
has_machine
()[source]¶ Reports if a machine is currently set or can be mocked
Return type: bool
-
classmethod