spinnman.utilities package


spinnman.utilities.appid_tracker module

class spinnman.utilities.appid_tracker.AppIdTracker(app_ids_in_use=None, min_app_id=17, max_app_id=254)[source]

Bases: object

A tracker of AppId to make it easier to allocate new ids

  • app_ids_in_use (list of int or None) – The ids that are already in use
  • min_app_id (int) – The smallest app id to use
  • max_app_id (int) – The largest app id to use

Allocate a given id - raises KeyError if the id is not present

Parameters:allocated_id – The id to allocate

Free a given id - raises KeyError if the id is out of range

Parameters:id_to_free – The id to free

Get a new unallocated id

Return type:int

spinnman.utilities.locate_connected_machine_ip_address module

locates any spinnaker mchines ipadress from the auto trnasmitted packet from none booted spinnaker machines

spinnman.utilities.reports module

spinnman.utilities.reports.generate_machine_report(report_directory, machine, connections)[source]

Generate report on the physical structure of the target SpiNNaker machine.

  • report_directory (str) – the directory to which reports are stored
  • machine (spinnmachine.machine.Machine object) – the machine python object
  • connections (iterable of implementations of spinnman.connections.abstract_connection.AbstractConnection) – the list of connections to the machine
Return type:



IOError – when a file cannot be opened for some reason

spinnman.utilities.utility_functions module

spinnman.utilities.utility_functions.get_router_timeout_value(mantissa, exponent)[source]

Get the timeout value of a router in ticks, given the mantissa and exponent of the value

  • mantissa (int) – The mantissa of the value, between 0 and 15
  • exponent (int) – The exponent of the value, between 0 and 15

Get the timeout value of a router in ticks, given an 8-bit floating point value stored in an int(!)

Parameters:value (int) – The value to convert

Get the address of the vcpu_t structure for the given core

Parameters:p (int) – The core
spinnman.utilities.utility_functions.send_port_trigger_message(connection, board_address)[source]

Sends a port trigger message using a connection to (hopefully) open a port in a NAT and/or firewall to allow incoming packets to be received

  • connection – The UDP connection down which the trigger message should be sent
  • board_address – The address of the SpiNNaker board to which the message should be sent
spinnman.utilities.utility_functions.work_out_bmp_from_machine_details(hostname, number_of_boards)[source]

Work out the BMP connection ip address given the machine details. This is assumed to be the IP address of the machine, with 1 subtracted from the final part e.g. if the machine IP address is, the BMP IP address is assumed to be

  • hostname – the spinnaker machine main hostname or IP address
  • number_of_boards – the number of boards in the machine

The BMP connection data

Module contents