spinn_machine.version package¶
Submodules¶
spinn_machine.version.abstract_version module¶
- class spinn_machine.version.abstract_version.AbstractVersion(max_cores_per_chip: int, max_sdram_per_chip: int)[source]¶
Bases:
object
Base class for the version classes.
Version classes are the main way to create a Machine object of the correct class.
The version classes contain properties that will change depending on the version.
- abstract property chip_core_map: Mapping[Tuple[int, int], int]¶
A map off the expected x,y coordinates on a standard board to the most likely number of cores on that chip.
- abstract property clock_speeds_hz: List[int]¶
The processor clock speeds in Hz this processor can run at
- Return type:
- create_machine(width: int | None, height: int | None, origin: str | None = None) Machine [source]¶
Creates a new empty machine based on the width, height and version.
- Parameters:
- Returns:
A subclass of Machine with no chips in it
- Return type:
- Raises:
SpinnMachineInvalidParameterException – If the size is unexpected
- abstract property dtcm_bytes: int¶
The Data Tightly Coupled Memory available on a processor in bytes
- Return type:
- property expected_xys: Sequence[Tuple[int, int]]¶
List of the standard x,y coordinates of chips for this version.
Remember that will the board may have dead or excluded chips.
- Returns:
- fpga_links() List[Tuple[int, int, int, int, int]] [source]¶
The list of Local X, Y, link, fpga_link_id and fpga_id
These are applied local to each Ethernet Chip and even if the link is connected to another board
- abstract get_potential_ethernet_chips(width: int, height: int) Sequence[Tuple[int, int]] [source]¶
Get the coordinates of chips that should be Ethernet chips.
This may well be passed down to SpiNNakerTriadGeometry.
Note
This methods assumes that width and height would pass
verify_size()
. If not, the results may be wrong.
- abstract illegal_ethernet_message(x: int, y: int) str | None [source]¶
Checks if x and y could be for an Ethernet.
This method will return an explanation if the values for x and y are known be illegal for an Ethernet chip.
Due to the limited information available this method will generate False negatives. So this method returning None does not imply that x, y is an Ethernet location
- property max_cores_per_chip: int¶
Gets the maximum number of cores per chip for the whole system.
There is no guarantee that there will be any chips with this many cores, only that there will be no cores with more.
- Return type:
- property max_sdram_per_chip: int¶
Gets the maximum SDRAM per chip for the whole system.
While it is likely that all Chips will have this SDRAM this should not be counted on. Ask each Chip for its SDRAM.
- Returns:
the default SDRAM per chip
- Return type:
- abstract property minimum_cores_expected: int¶
The minimum number of Chip that we expect from a Chip
If there are less that this number of Cores Machine.validate and other methods are allowed to raise an exception
- Return type:
- Returns:
The lowest number of cores to accept before flagging a Chip to be blacklisted
- property n_chips_per_board: int¶
The normal number of chips on each board of this version.
Remember that will the board may have dead or excluded chips.
- Return type:
- abstract property n_router_entries: int¶
The standard number of router entries in a router table.
While it is likely that all chips will have this number it should not be counted on. Ask each chip’s router for the correct value.
- Return type:
- size_from_n_boards(n_boards: int) Tuple[int, int] [source]¶
Returns the size needed to support this many boards.
- Parameters:
n_boards (int)
- Return type:
- Raises:
SpinnMachineException – If multiple boards are needed but not supported
- size_from_n_chips(n_chips: int) Tuple[int, int] [source]¶
Returns the size needed to support this many chips.
Designed for use with virtual boards. Does not include a safety factor for blacklisted Chips. For real machines a slightly bigger Machine may be needed.
- Parameters:
n_boards (int)
- Return type:
- Raises:
SpinnMachineException – If multiple boards are needed but not supported
- size_from_n_cores(n_cores: int) Tuple[int, int] [source]¶
Returns the size needed to support this many cores.
Takes into consideration scamp and monitor cores.
Designed for use with virtual boards. Does not include a safety factor for blacklisted cores or chips. For real machines a slightly bigger Machine may be needed.
- spinnaker_links() List[Tuple[int, int, int]] [source]¶
The list of Local X, Y and link Id to add spinnaker links to
These are applied local to each Ethernet Chip and only if the link is not connected to another board
spinn_machine.version.version_201 module¶
- class spinn_machine.version.version_201.Version201[source]¶
Bases:
AbstractVersion
Code for the 1 Chip test Spin2 board versions
- property chip_core_map: Mapping[Tuple[int, int], int]¶
A map off the expected x,y coordinates on a standard board to the most likely number of cores on that chip.
- property clock_speeds_hz: List[int]¶
The processor clock speeds in Hz this processor can run at
- Return type:
- property dtcm_bytes: int¶
The Data Tightly Coupled Memory available on a processor in bytes
- Return type:
- fpga_links() List[Tuple[int, int, int, int, int]] [source]¶
The list of Local X, Y, link, fpga_link_id and fpga_id
These are applied local to each Ethernet Chip and even if the link is connected to another board
- get_potential_ethernet_chips(width: int, height: int) Sequence[Tuple[int, int]] [source]¶
Get the coordinates of chips that should be Ethernet chips.
This may well be passed down to SpiNNakerTriadGeometry.
Note
This methods assumes that width and height would pass
verify_size()
. If not, the results may be wrong.
- illegal_ethernet_message(x: int, y: int) str | None [source]¶
Checks if x and y could be for an Ethernet.
This method will return an explanation if the values for x and y are known be illegal for an Ethernet chip.
Due to the limited information available this method will generate False negatives. So this method returning None does not imply that x, y is an Ethernet location
- property minimum_cores_expected: int¶
The minimum number of Chip that we expect from a Chip
If there are less that this number of Cores Machine.validate and other methods are allowed to raise an exception
- Return type:
- Returns:
The lowest number of cores to accept before flagging a Chip to be blacklisted
- property n_router_entries: int¶
The standard number of router entries in a router table.
While it is likely that all chips will have this number it should not be counted on. Ask each chip’s router for the correct value.
- Return type:
spinn_machine.version.version_3 module¶
- class spinn_machine.version.version_3.Version3[source]¶
Bases:
VersionSpin1
Code for the small Spin1 4 Chip boards
Covers versions 2 and 3
- property chip_core_map: Mapping[Tuple[int, int], int]¶
A map off the expected x,y coordinates on a standard board to the most likely number of cores on that chip.
- fpga_links() List[Tuple[int, int, int, int, int]] [source]¶
The list of Local X, Y, link, fpga_link_id and fpga_id
These are applied local to each Ethernet Chip and even if the link is connected to another board
- get_potential_ethernet_chips(width: int, height: int) Sequence[Tuple[int, int]] [source]¶
Get the coordinates of chips that should be Ethernet chips.
This may well be passed down to SpiNNakerTriadGeometry.
Note
This methods assumes that width and height would pass
verify_size()
. If not, the results may be wrong.
- illegal_ethernet_message(x: int, y: int) str | None [source]¶
Checks if x and y could be for an Ethernet.
This method will return an explanation if the values for x and y are known be illegal for an Ethernet chip.
Due to the limited information available this method will generate False negatives. So this method returning None does not imply that x, y is an Ethernet location
spinn_machine.version.version_5 module¶
- class spinn_machine.version.version_5.Version5[source]¶
Bases:
VersionSpin1
Code for the large Spin1 48 Chip boards
Covers versions 4 and 5
- property chip_core_map: Mapping[Tuple[int, int], int]¶
A map off the expected x,y coordinates on a standard board to the most likely number of cores on that chip.
- fpga_links() List[Tuple[int, int, int, int, int]] [source]¶
The list of Local X, Y, link, fpga_link_id and fpga_id
These are applied local to each Ethernet Chip and even if the link is connected to another board
- get_potential_ethernet_chips(width: int, height: int) Sequence[Tuple[int, int]] [source]¶
Get the coordinates of chips that should be Ethernet chips.
This may well be passed down to SpiNNakerTriadGeometry.
Note
This methods assumes that width and height would pass
verify_size()
. If not, the results may be wrong.
- illegal_ethernet_message(x: int, y: int) str | None [source]¶
Checks if x and y could be for an Ethernet.
This method will return an explanation if the values for x and y are known be illegal for an Ethernet chip.
Due to the limited information available this method will generate False negatives. So this method returning None does not imply that x, y is an Ethernet location
- size_from_n_boards(n_boards: int) Tuple[int, int] [source]¶
Returns the size needed to support this many boards.
- Parameters:
n_boards (int)
- Return type:
- Raises:
SpinnMachineException – If multiple boards are needed but not supported
spinn_machine.version.version_spin1 module¶
- class spinn_machine.version.version_spin1.VersionSpin1[source]¶
Bases:
AbstractVersion
Shared code for all Spin1 board versions
- property clock_speeds_hz: List[int]¶
The processor clock speeds in Hz this processor can run at
- Return type:
- property dtcm_bytes: int¶
The Data Tightly Coupled Memory available on a processor in bytes
- Return type:
- property minimum_cores_expected: int¶
The minimum number of Chip that we expect from a Chip
If there are less that this number of Cores Machine.validate and other methods are allowed to raise an exception
- Return type:
- Returns:
The lowest number of cores to accept before flagging a Chip to be blacklisted
spinn_machine.version.version_strings module¶
- class spinn_machine.version.version_strings.VersionStrings(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
A description of strings in cfg settings to say test versions
As additional Versions are added this should allow easy testing of these as far as possible.
- ANY = 1¶
- BIG = 3¶
- FOUR_PLUS = 2¶
- MULTIPLE_BOARDS = 4¶
- WRAPPABLE = 5¶
- classmethod from_string(value: str) VersionStrings [source]¶
Gets a VersionString object from a String
- Parameters:
value (str)
- Return type:
- property options: List[int]¶
The list of the versions covered by this string
This list can grow as new versions are added
Module contents¶
- spinn_machine.version.version_factory() AbstractVersion ¶
Creates a Machine Version class based on cfg settings.
- Returns:
A subclass of AbstractVersion
- Raises:
SpinnMachineException – If the cfg version is not set correctly