Previous topic

spinnman.model.core_subset module

Next topic

spinnman.model.cpu_info module

This Page

spinnman.model.core_subsets module

class spinnman.model.core_subsets.CoreSubsets(core_subsets=None)[source]

Bases: object

Represents a group of CoreSubsets, with a maximum of one per chip

Parameters:core_subsets (iterable of spinnman.model.core_subset.CoreSubset) – An iterable of cores for each desired chip
Raises spinnman.exceptions.SpinnmanInvalidParameterException:
 If there is more than one subset with the same core x and y coordinates

Attributes

core_subsets The one-per-chip subsets

Methods

add_core_subset(core_subset) Add a core subset to the set
add_processor(x, y, processor_id) Add a processor on a given chip to the set
is_chip(x, y) Determine if the chip with coordinates (x, y) is in the subset
is_core(x, y, processor_id) Determine if there is a chip with coordinates (x, y) in the subset, which has a core with the given id in the subset

Detailed Methods

add_core_subset(core_subset)[source]

Add a core subset to the set

Parameters:core_subset (spinnman.model.core_subset.CoreSubset) – The core subset to add
Returns:Nothing is returned
Return type:None
Raises spinnman.exceptions.SpinnmanInvalidParameterException:
 If there is already a subset with the same core x and y coordinates
add_processor(x, y, processor_id)[source]

Add a processor on a given chip to the set

Parameters:
  • x (int) – The x-coordinate of the chip
  • y (int) – The y-coordinate of the chip
  • processor_id – A processor id
Returns:

Nothing is returned

Return type:

None

Raises spinnman.exceptions.SpinnmanInvalidParameterException:
 

If there is already a processor on the given chip with the same id

is_chip(x, y)[source]

Determine if the chip with coordinates (x, y) is in the subset

Parameters:
  • x (int) – The x-coordinate of a chip
  • y (int) – The y-coordinate of a chip
Returns:

True if the chip with coordinates (x, y) is in the subset

Return type:

bool

is_core(x, y, processor_id)[source]

Determine if there is a chip with coordinates (x, y) in the subset, which has a core with the given id in the subset

Parameters:
  • x (int) – The x-coordinate of a chip
  • y (int) – The y-coordinate of a chip
  • processor_id (int) – The id of a core
Returns:

True if there is a chip with coordinates (x, y) in the subset, which has a core with the given id in the subset