pacman.utilities.utility_objs package

Module contents

class pacman.utilities.utility_objs.ChipCounter(n_cores_per_chip=15, sdram_per_chip=104857600)[source]

Bases: object

A counter of how many chips are needed to hold machine vertices. This does not look at the fixed_locations of the vertices at all. The value produced will be a (hopefully) worst-case estimate and should not be used to decide failure in terms of space!

add_core(resources)[source]
property n_chips
Return type:

int

class pacman.utilities.utility_objs.Field(lo, hi, value, tag=SUPPORTED_TAGS.ROUTING, name=None)[source]

Bases: object

Field object used in a field constraint for key allocation.

Parameters:
  • lo (int) – the low bit in the routing table entry for this field

  • hi (int) – the high bit in the routing table entry for this field

  • value (int) – the value to store in this field

  • tag (SUPPORTED_TAGS) – field tag

  • name (str or None) – field name

property hi

The high bit in the routing table entry for this field.

Return type:

int

property lo

The low bit in the routing table entry for this field.

Return type:

int

property name

The field name.

Return type:

str or UUID

property tag

The field tag.

Return type:

SUPPORTED_TAGS

property value

The value to store in this field.

Return type:

int

class pacman.utilities.utility_objs.SUPPORTED_TAGS(value)[source]

Bases: Enum

An enumeration.

APPLICATION = 0
ROUTING = 1