spinn_front_end_common.utilities.utility_objs package

Module contents

class spinn_front_end_common.utilities.utility_objs.DataWritten(start_address, memory_used, memory_written)[source]

Bases: object

Describes data written to SpiNNaker.

Parameters:
  • start_address (int) –
  • memory_used (int) –
  • memory_written (int) –
memory_used
memory_written
start_address
class spinn_front_end_common.utilities.utility_objs.DPRIFlags(value, doc='')[source]

Bases: enum.Enum

SCP Dropped Packet Reinjection (DPRI) packet type flags

FIXED_ROUTE = 8
MULTICAST = 1
NEAREST_NEIGHBOUR = 4
POINT_TO_POINT = 2
class spinn_front_end_common.utilities.utility_objs.ExecutableFinder(binary_search_paths=None, include_common_binaries_folder=True)[source]

Bases: spinn_utilities.executable_finder.ExecutableFinder

Manages a set of folders in which to search for binaries, and allows for binaries to be discovered within this path. This adds a default location to look to the base class.

Parameters:
  • binary_search_paths (iterable(str)) – The initial set of folders to search for binaries.
  • include_common_binaries_folder (bool) – If True (i.e. the default), the spinn_front_end_common.common_model_binaries folder is searched for binaries. If you are not using the common models, or the model binary names conflict with your own, this parameter can be used to avoid this issue. Note that the folder will be appended to the value of binary_search_paths, so the common binary search path will be looked in last.
class spinn_front_end_common.utilities.utility_objs.ExecutableType(value, start_state, end_state, supports_auto_pause_and_resume, doc='')[source]

Bases: enum.Enum

The different types of executable from the perspective of how they are started and controlled.

NO_APPLICATION = 3

Situation where there user has supplied no application but for some reason still wants to run.

RUNNING = 0

Runs immediately without waiting for barrier and then exits.

SYNC = 1

Calls spin1_start(SYNC_WAIT) and then eventually spin1_exit().

SYSTEM = 4

Runs immediately without waiting for barrier and never ends.

USES_SIMULATION_INTERFACE = 2

Calls simulation_run() and simulation_exit() / simulation_handle_pause_resume().

class spinn_front_end_common.utilities.utility_objs.LivePacketGatherParameters(port=None, hostname=None, tag=None, strip_sdp=True, use_prefix=False, key_prefix=None, prefix_type=None, message_type=<EIEIOType.KEY_32_BIT: 2>, right_shift=0, payload_as_time_stamps=True, use_payload_prefix=True, payload_prefix=None, payload_right_shift=0, number_of_packets_sent_per_time_step=0, label=None, board_address=None)[source]

Bases: object

Parameter holder for LPGs so that they can be instantiated at a later date.

Raises:ConfigurationException – If the parameters passed are known to be an invalid combination.
board_address
get_iptag_resource()[source]

Get a description of the IPtag that the LPG for these parameters will require.

Return type:IPtagResource
hostname
key_prefix
label
message_type
number_of_packets_sent_per_time_step
payload_as_time_stamps
payload_prefix
payload_right_shift
port
prefix_type
right_shift
strip_sdp
tag
use_payload_prefix
use_prefix
class spinn_front_end_common.utilities.utility_objs.PowerUsed[source]

Bases: object

Describes the power used by a simulation.

active_cores

Enumeration of the coordinates of the cores that can report active energy usage.

Return type:iterable(tuple(int, int, int))
active_routers

Enumeration of the coordinates of the routers that can report active energy usage.

Return type:iterable(tuple(int, int))
add_core_active_energy(x, y, p, joules)[source]

Adds energy for a particular core. It can be called multiple times per core.

Only intended to be used during construction of this object.

Parameters:
  • x (int) –
  • y (int) –
  • p (int) –
  • joules (float) – the energy to add for this core, in Joules.
add_router_active_energy(x, y, joules)[source]

Adds energy for a particular router. It can be called multiple times per router.

Only intended to be used during construction of this object.

Parameters:
  • x (int) –
  • y (int) –
  • joules (float) – the energy to add for this router, in Joules.
baseline_joules

Baseline/idle energy used, in Joules. This is used by things like the frames the SpiNNaker boards are held in, the cooling system, etc.

Return type:float
booted_time_secs

Time taken when the machine is booted, in seconds.

Return type:float
chip_energy_joules

Energy used by all SpiNNaker chips during active simulation running, in Joules.

Return type:float
data_gen_joules

Energy used during the data generation phase, in Joules. Assumes that the SpiNNaker system has been shut down.

Return type:float
data_gen_time_secs

Time taken by data generation phase, in seconds.

Return type:float
exec_time_secs

Time taken by active simulation running, in seconds.

Return type:float
fpga_exec_energy_joules

Energy used by all FPGAs during active simulation running, in Joules. This is included in the total FPGA energy.

Return type:float
fpga_total_energy_joules

Energy used by all FPGAs in total, in Joules.

Return type:float
get_core_active_energy_joules(x, y, p)[source]

Energy used (above idle baseline) by a particular core, in Joules.

Unused cores always report 0.0 for this.

Parameters:
Return type:

float

get_router_active_energy_joules(x, y)[source]

Energy used (above idle baseline) by a particular router, in Joules.

Unused routers always report 0.0 for this.

Parameters:
Return type:

float

loading_joules

Energy used during data loading, in Joules.

Return type:float
loading_time_secs

Time taken by data loading, in seconds.

Return type:float
mapping_joules

Energy used during the mapping phase, in Joules. Assumes that the SpiNNaker system has been shut down.

Return type:float
mapping_time_secs

Time taken by the mapping phase, in seconds.

Return type:float
num_chips

The total number of chips used.

Return type:int
num_cores

The total number of cores used, including for SCAMP.

Return type:int
num_fpgas

The total number of FPGAs used.

Return type:int
num_frames

The total number of frames used.

Return type:int
packet_joules

Energy used by packet transmission, in Joules.

Return type:float
saving_joules

Energy used during data extraction, in Joules.

Return type:float
saving_time_secs

Time taken by data extraction, in seconds.

Return type:float
total_energy_joules

Total of all energy costs, in Joules.

Return type:float
total_time_secs

Time taken in total, in seconds.

Return type:float
class spinn_front_end_common.utilities.utility_objs.ProvenanceDataItem(names, value, report=False, message='')[source]

Bases: object

Container for provenance data

Parameters:
  • names (list(str)) – A list of strings representing the naming hierarchy of this item
  • value (int or float or str) – The value of the item
  • report (bool) – True if the item should be reported to the user
  • message (str) – The message to send to the end user if report is True
message

The message to report to the end user, or None if no message

Return type:str
names

The hierarchy of names of this bit of provenance data

Return type:list(str)
value

The value of the item

Return type:int or float or str
class spinn_front_end_common.utilities.utility_objs.ReInjectionStatus(data, offset)[source]

Bases: object

Represents a status information report from dropped packet reinjection.

Parameters:
  • data (bytes) – The data containing the information
  • offset (int) – The offset in the data where the information starts
is_reinjecting_fixed_route

True if re-injection of fixed-route packets is enabled

Return type:bool
is_reinjecting_multicast

True if re-injection of multicast packets is enabled

Return type:bool
is_reinjecting_nearest_neighbour

True if re-injection of nearest neighbour packets is enabled

Return type:bool
is_reinjecting_point_to_point

True if re-injection of point-to-point packets is enabled

Return type:bool
n_dropped_packet_overflows

Of the n_dropped_packets received, how many were lost due to not having enough space in the queue of packets to reinject

Return type:int
n_dropped_packets

The number of packets dropped by the router and received by the reinjection functionality (may not fit in the queue though)

Return type:int

The number of times that when a dropped packet was caused due to a link failing to take the packet.

Return type:int
n_missed_dropped_packets

The number of times that when a dropped packet was read it was found that another one or more packets had also been dropped, but had been missed

Return type:int
n_processor_dumps

The number of times that when a dropped packet was caused due to a processor failing to take the packet.

Return type:int
n_reinjected_packets

Of the n_dropped_packets received, how many packets were successfully re injected

Return type:int
router_wait1_timeout

The WAIT1 timeout value of the router, in cycles.

Return type:int
router_wait1_timeout_parameters

The WAIT1 timeout value of the router as mantissa and exponent.

Return type:tuple(int,int)
router_wait2_timeout

The WAIT2 timeout value of the router, in cycles.

Return type:int
router_wait2_timeout_parameters

The WAIT2 timeout value of the router as mantissa and exponent.

Return type:tuple(int,int)