pacman.model.resources package

Submodules

pacman.model.resources.abstract_resource module

class pacman.model.resources.abstract_resource.AbstractResource[source]

Bases: object

Represents some finite resource

get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int

pacman.model.resources.cpu_cycles_per_tick_resource module

class pacman.model.resources.cpu_cycles_per_tick_resource.CPUCyclesPerTickResource(cycles)[source]

Bases: pacman.model.resources.abstract_resource.AbstractResource

Represents the number of CPU clock cycles per tick used or available on a core of a chip in the machine

Parameters:cycles (int) – The number of CPU clock cycles
Raises:None – No known exceptions are raised
get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int

pacman.model.resources.dtcm_resource module

class pacman.model.resources.dtcm_resource.DTCMResource(dtcm)[source]

Bases: pacman.model.resources.abstract_resource.AbstractResource

Represents the amount of local core memory available or used on a core on a chip of the machine

Parameters:dtcm (int) – The amount of DTCM in bytes
Raises:None – No known exceptions are raised
get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int

pacman.model.resources.element_free_space module

class pacman.model.resources.element_free_space.ElementFreeSpace(start_address, size)[source]

Bases: object

size
start_address

pacman.model.resources.iptag_resource module

class pacman.model.resources.iptag_resource.IPtagResource(ip_address, port, strip_sdp, tag=None, traffic_identifier='DEFAULT')[source]

Bases: pacman.model.resources.abstract_resource.AbstractResource

Represents the amount of local core memory available or used on a core on a chip of the machine

Parameters:
  • ip_address (str) – The ip address of the host that will receive data from this tag
  • port (int or None) – The port that will
  • strip_sdp (bool) – Whether the tag requires that SDP headers are stripped before transmission of data
  • tag (int) – A fixed tag id to assign, or None if any tag is OK
  • traffic_identifier (str) – The traffic to be sent using this tag; traffic with the same traffic_identifier can be sent using the same tag
get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int
ip_address

The ip address to assign to the tag

Returns:An ip address
Return type:str
port

The port of the tag

Returns:The port of the tag
Return type:int
strip_sdp

Whether SDP headers should be stripped for this tag

Returns:True if the headers should be stripped, False otherwise
Return type:bool
tag

The tag required, or None if any tag is OK

Returns:The tag or None
Return type:int
traffic_identifier

the traffic identifier for this iptag

pacman.model.resources.resource_container module

class pacman.model.resources.resource_container.ResourceContainer(dtcm=None, sdram=None, cpu_cycles=None, iptags=None, reverse_iptags=None)[source]

Bases: object

container object for the types of resources so that ordering is no longer a risk

Container object for the types of resources

Parameters:
  • dtcm (None or pacman.models.resources.dtcm_resource.DTCMResource) – the amount of dtcm used
  • sdram (None or pacman.models.resources.sdram_resource.SDRAMResource) – the amount of sdram used
  • cpu_cycles (None or pacman.models.resources.cpu_cycles_per_tick_resource.CPUCyclesPerTickResource) – the amount of cpu used
  • iptags (None or list of pacman.models.resources.iptag_resource.IPtagResource) – the iptags required
  • reverse_iptags (None or list of pacman.models.resources.reverse_iptag_resource.ReverseIPtagResource) – the reverse iptags required
Return type:

pacman.models.resources.resource_container.ResourceContainer

Raises:

None – does not raise any known exception

cpu_cycles
dtcm
extend(other)[source]
iptags
reverse_iptags
sdram
sdram_tags

pacman.model.resources.reverse_iptag_resource module

class pacman.model.resources.reverse_iptag_resource.ReverseIPtagResource(port=None, sdp_port=1, tag=None)[source]

Bases: pacman.model.resources.abstract_resource.AbstractResource

Represents the amount of local core memory available or used on a core on a chip of the machine

Parameters:
  • port (int) – The target port of the tag or None to assign elsewhere
  • port – The UDP port to listen to on the board for this tag
  • sdp_port (int) – The SDP port number to be used when constructing SDP packets from the received UDP packets for this tag
  • tag (int or None) – A fixed tag id to assign, or None if any tag is OK
get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int
port

The port of the tag

Returns:The port of the tag
Return type:int
sdp_port

The SDP port to use when constructing the SDP message from the received UDP message

tag

The tag required, or None if any tag is OK

Returns:The tag or None
Return type:int

pacman.model.resources.sdram_resource module

class pacman.model.resources.sdram_resource.SDRAMResource(sdram)[source]

Bases: pacman.model.resources.abstract_resource.AbstractResource

Represents an amount of SDRAM used or available on a chip in the machine

Parameters:sdram (int) – The amount of SDRAM in bytes
Raises:None – No known exceptions are raised
get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int See pacman.model.resources.abstract_resource        .AbstractResource.get_value()

Module contents

class pacman.model.resources.AbstractResource[source]

Bases: object

Represents some finite resource

get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int
class pacman.model.resources.CPUCyclesPerTickResource(cycles)[source]

Bases: pacman.model.resources.abstract_resource.AbstractResource

Represents the number of CPU clock cycles per tick used or available on a core of a chip in the machine

Parameters:cycles (int) – The number of CPU clock cycles
Raises:None – No known exceptions are raised
get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int
class pacman.model.resources.DTCMResource(dtcm)[source]

Bases: pacman.model.resources.abstract_resource.AbstractResource

Represents the amount of local core memory available or used on a core on a chip of the machine

Parameters:dtcm (int) – The amount of DTCM in bytes
Raises:None – No known exceptions are raised
get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int
class pacman.model.resources.ElementFreeSpace(start_address, size)[source]

Bases: object

size
start_address
class pacman.model.resources.IPtagResource(ip_address, port, strip_sdp, tag=None, traffic_identifier='DEFAULT')[source]

Bases: pacman.model.resources.abstract_resource.AbstractResource

Represents the amount of local core memory available or used on a core on a chip of the machine

Parameters:
  • ip_address (str) – The ip address of the host that will receive data from this tag
  • port (int or None) – The port that will
  • strip_sdp (bool) – Whether the tag requires that SDP headers are stripped before transmission of data
  • tag (int) – A fixed tag id to assign, or None if any tag is OK
  • traffic_identifier (str) – The traffic to be sent using this tag; traffic with the same traffic_identifier can be sent using the same tag
get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int
ip_address

The ip address to assign to the tag

Returns:An ip address
Return type:str
port

The port of the tag

Returns:The port of the tag
Return type:int
strip_sdp

Whether SDP headers should be stripped for this tag

Returns:True if the headers should be stripped, False otherwise
Return type:bool
tag

The tag required, or None if any tag is OK

Returns:The tag or None
Return type:int
traffic_identifier

the traffic identifier for this iptag

class pacman.model.resources.ResourceContainer(dtcm=None, sdram=None, cpu_cycles=None, iptags=None, reverse_iptags=None)[source]

Bases: object

container object for the types of resources so that ordering is no longer a risk

Container object for the types of resources

Parameters:
  • dtcm (None or pacman.models.resources.dtcm_resource.DTCMResource) – the amount of dtcm used
  • sdram (None or pacman.models.resources.sdram_resource.SDRAMResource) – the amount of sdram used
  • cpu_cycles (None or pacman.models.resources.cpu_cycles_per_tick_resource.CPUCyclesPerTickResource) – the amount of cpu used
  • iptags (None or list of pacman.models.resources.iptag_resource.IPtagResource) – the iptags required
  • reverse_iptags (None or list of pacman.models.resources.reverse_iptag_resource.ReverseIPtagResource) – the reverse iptags required
Return type:

pacman.models.resources.resource_container.ResourceContainer

Raises:

None – does not raise any known exception

cpu_cycles
dtcm
extend(other)[source]
iptags
reverse_iptags
sdram
sdram_tags
class pacman.model.resources.ReverseIPtagResource(port=None, sdp_port=1, tag=None)[source]

Bases: pacman.model.resources.abstract_resource.AbstractResource

Represents the amount of local core memory available or used on a core on a chip of the machine

Parameters:
  • port (int) – The target port of the tag or None to assign elsewhere
  • port – The UDP port to listen to on the board for this tag
  • sdp_port (int) – The SDP port number to be used when constructing SDP packets from the received UDP packets for this tag
  • tag (int or None) – A fixed tag id to assign, or None if any tag is OK
get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int
port

The port of the tag

Returns:The port of the tag
Return type:int
sdp_port

The SDP port to use when constructing the SDP message from the received UDP message

tag

The tag required, or None if any tag is OK

Returns:The tag or None
Return type:int
class pacman.model.resources.SDRAMResource(sdram)[source]

Bases: pacman.model.resources.abstract_resource.AbstractResource

Represents an amount of SDRAM used or available on a chip in the machine

Parameters:sdram (int) – The amount of SDRAM in bytes
Raises:None – No known exceptions are raised
get_value()[source]

Get the amount of the resource used or available

Returns:The amount of the resource
Return type:int See pacman.model.resources.abstract_resource        .AbstractResource.get_value()