spinnman.model package¶
Subpackages¶
- spinnman.model.enums package
- Submodules
- spinnman.model.enums.cpu_state module
- spinnman.model.enums.diagnostic_filter_default_routing_status module
- spinnman.model.enums.diagnostic_filter_destination module
- spinnman.model.enums.diagnostic_filter_emergency_routing_status module
- spinnman.model.enums.diagnostic_filter_packet_type module
- spinnman.model.enums.diagnostic_filter_payload_status module
- spinnman.model.enums.diagnostic_filter_source module
- spinnman.model.enums.mailbox_command module
- spinnman.model.enums.p2p_table_route module
- spinnman.model.enums.run_time_error module
- Module contents
Submodules¶
spinnman.model.adc_info module¶
ADCInfo
-
class
spinnman.model.adc_info.
ADCInfo
(adc_data, offset)[source]¶ Bases:
object
container for the ADC data thats been retrieved from a fpga
Parameters: adc_data (str) – bytes from an SCP packet containing adc information Raises: spinnman.exceptions.SpinnmanInvalidParameterException – If the message does not contain valid adc information -
fan_0
¶ property for fan 0
-
fan_1
¶ property for fan 1
-
temp_btm
¶ property for temp btm
-
temp_ext_0
¶ property for temp ext 0
-
temp_ext_1
¶ property for temp_ext_1
-
temp_top
¶ property for temp_top
-
voltage_1_2a
¶ property for voltage 1 2a
-
voltage_1_2b
¶ property for voltage 1 2b
-
voltage_1_2c
¶ property for voltage 1 2c
-
voltage_1_8
¶ property for voltage 1 8
-
voltage_3_3
¶ property for voltage 3 3
-
voltage_supply
¶ property for voltage supply
-
spinnman.model.bmp_connection_data module¶
-
class
spinnman.model.bmp_connection_data.
BMPConnectionData
(cabinet, frame, ip_address, boards, port_num)[source]¶ Bases:
object
Contains the details of a BMP connection
-
boards
¶ Iterable of integers for the boards to be addressed
Return type: iterable of int
-
cabinet
¶ Get the cabinet number
Return type: int
-
frame
¶ Get the frame number
Return type: int
-
ip_address
¶ Get the IP address of the BMP
Return type: str
-
port_num
¶ The port number associated with this BMP connection
Returns: The port number
-
spinnman.model.chip_info module¶
-
class
spinnman.model.chip_info.
ChipInfo
(system_data, offset)[source]¶ Bases:
object
Represents the system variables for a chip, received from the chip SDRAM
Parameters: - system_data (str) – An bytestring retrieved from SDRAM on the board
- offset – The offset into the bytestring where the actual data starts
Raises: spinnman.exceptions.SpinnmanInvalidParameterException – If the data doesn’t contain valid system data information
-
cpu_clock_mhz
¶ The speed of the CPU clock in MHz
Return type: int
-
cpu_information_base_address
¶ The base address of the cpu information structure
Return type: int
-
first_free_router_entry
¶ The id of the first free routing entry on the chip
Return type: int
-
iobuf_size
¶ The size of the iobuf buffers in bytes
Return type: int
-
ip_address
¶ The ip address of the chip, or None if no Ethernet
Return type: str
-
is_ethernet_available
¶ True if the Ethernet is running on this chip, False otherwise
Return type: bool
-
links_available
¶ The links that are available on the chip
Return type: iterable of int
-
nearest_ethernet_x
¶ The x-coordinate of the nearest chip with Ethernet
Return type: int
-
nearest_ethernet_y
¶ The y-coordinate of the nearest chip with Ethernet
Return type: int
-
physical_to_virtual_core_map
¶ The physical core id to virtual core id map; entries with a value of 0xFF are non-operational cores
Return type: bytearray
-
sdram_base_address
¶ The base address of the user region of SDRAM on the chip
Return type: int
-
sdram_heap_address
¶ The address of the base of the heap in SDRAM
Return type: int
-
system_ram_heap_address
¶ The address of the base of the heap in system RAM
Return type: int
-
system_sdram_base_address
¶ The base address of the System SDRAM region on the chip
Return type: int
-
virtual_core_ids
¶ A list of available cores by virtual core id (including the monitor)
Return type: iterable of int
-
x
¶ The x-coordinate of the chip
Return type: int
-
x_size
¶ The number of chips in the x-dimension
Return type: int
-
y
¶ The y-coordinate of the chip
Return type: int
-
y_size
¶ The number of chips in the y-dimension
Return type: int
spinnman.model.chip_summary_info module¶
-
class
spinnman.model.chip_summary_info.
ChipSummaryInfo
(chip_summary_data, offset, x, y)[source]¶ Bases:
object
Represents the chip summary information read via an SCP command
Parameters: - chip_summary_data (bytearray) – The data from the SCP response
- offset (int) – The offset into the data where the data starts
- x – The x-coordinate of the chip that this data is from
- y – The y-coordinate of the chip that this data is from
-
core_states
¶ The state of the cores on the chip (list of one per core)
Return type: list of py:class:spinnman.model.cpu_state.CPUState
-
ethernet_ip_address
¶ The IP address of the Ethernet if up, or None if not
Return type: str
-
is_ethernet_available
¶ Determines if the Ethernet connection is available on this chip
Return type: bool
-
largest_free_sdram_block
¶ The size of the largest block of free SDRAM in bytes
Return type: int
-
largest_free_sram_block
¶ The size of the largest block of free SRAM in bytes
Return type: int
-
n_cores
¶ The number of cores working on the chip (including monitors)
Return type: int
-
n_free_multicast_routing_entries
¶ The number of multicast routing entries free on this chip
Return type: int
-
nearest_ethernet_x
¶ The x coordinate of the nearest Ethernet chip
Return type: int
-
nearest_ethernet_y
¶ The y coordinate of the nearest Ethernet chip
Return type: int
-
working_links
¶ The ids of the working links outgoing from this chip
Return type: list of int
-
x
¶ The x-coordinate of the chip that this data is from
Return type: int
-
y
¶ The y-coordinate of the chip that this data is from
Return type: int
spinnman.model.cpu_info module¶
-
class
spinnman.model.cpu_info.
CPUInfo
(x, y, p, cpu_data, offset)[source]¶ Bases:
object
Represents information about the state of a CPU
Parameters: - x (int) – The x-coordinate of a chip
- y (int) – The y-coordinate of a chip
- p (int) – The id of a core on the chip
- cpu_data (str) – A bytestring received from SDRAM on the board
-
application_id
¶ The id of the application running on the core
Returns: The id of the application Return type: int
-
application_mailbox_command
¶ The command currently in the mailbox being sent from the monitor processor to the application
Returns: The command Return type: spinnman.model.enums.mailbox_command.MailboxCommand
-
application_mailbox_data_address
¶ The address of the data in SDRAM for the application mailbox
Returns: The address of the data Return type: int
-
application_name
¶ The name of the application running on the core
Returns: The name of the application Return type: str
-
iobuf_address
¶ The address of the IOBUF buffer in SDRAM
Returns: The address Return type: int
-
link_register
¶ The current link register value (LR)
Returns: The LR value Return type: int
-
monitor_mailbox_command
¶ The command currently in the mailbox being sent from the application to the monitor processor
Returns: The command Return type: spinnman.model.mailbox_command.MailboxCommand
-
monitor_mailbox_data_address
¶ The address of the data in SDRAM of the monitor mailbox
Returns: The address of the data Return type: int
-
p
¶ The id of the core on the chip
Returns: The id of the core Return type: int
-
physical_cpu_id
¶ The physical id of this processor
Returns: The physical id of the processor Return type: int
-
processor_state_register
¶ The value in the processor state register (PSR)
Returns: The PSR value Return type: int
-
registers
¶ The current register values (r0 - r7)
Returns: An array of 8 values, one for each register Return type: array of int
-
run_time_error
¶ The reason for a run time error
Returns: The run time error Return type: spinnman.model.enums.run_time_error.RunTimeError
-
software_error_count
¶ The number of software errors counted
Returns: The number of software errors Return type: int
-
software_source_filename_address
¶ The address of the filename of the software source
Returns: The filename Return type: str
-
software_source_line_number
¶ The line number of the software source
Returns: The line number Return type: int
-
software_version
¶ The software version
Returns: The software version Return type: int
-
stack_pointer
¶ The current stack pointer value (SP)
Returns: The SP value Return type: int
-
state
¶ The current state of the core
Returns: The state of the core Return type: spinnman.model.enums.cpu_state.CPUState
-
time
¶ The time at which the application started
Returns: The time in seconds since 00:00:00 on the 1st January 1970 Return type: long
-
user
¶ The current user values (user0 - user3)
Returns: An array of 4 values, one for each user value Return type: array of int
-
x
¶ The x-coordinate of the chip containing the core
Returns: The x-coordinate of the chip Return type: int
-
y
¶ The y-coordinate of the chip containing the core
Returns: The y-coordinate of the chip Return type: int
spinnman.model.cpu_infos module¶
-
class
spinnman.model.cpu_infos.
CPUInfos
[source]¶ Bases:
object
A set of CPU information objects
-
add_processor
(x, y, processor_id, cpu_info)[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 (int) – A processor id
- cpu_info (
spinnman.model.enums.cpu_info.CPUInfo
) – The CPU information for the core
-
cpu_infos
¶ the one per core core info
Returns: iterable of x,y,p core info
-
spinnman.model.diagnostic_filter module¶
-
class
spinnman.model.diagnostic_filter.
DiagnosticFilter
(enable_interrupt_on_counter_event, match_emergency_routing_status_to_incoming_packet, destinations, sources, payload_statuses, default_routing_statuses, emergency_routing_statuses, packet_types)[source]¶ Bases:
object
A router diagnostic counter filter, which counts packets passing through the router with certain properties. The counter will be incremented so long as the packet matches one of the values in each field i.e. one of each of the destinations, sources, payload_statuses, default_routing_statuses, emergency_routing_statuses and packet_types
Parameters: - enable_interrupt_on_counter_event (bool) – Indicates whether an interrupt should be raised when this rule matches
- match_emergency_routing_status_to_incoming_packet (bool) – Indicates whether the emergency routing statuses should be matched against packets arriving at this router (if True), or if they should be matched against packets leaving this router (if False)
- destinations (iterable of
spinnman.model.diagnostic_filter_destination.DiagnosticFilterDestination
) – Increment the counter if one or more of the given destinations match - sources (iterable of
spinnman.model.diagnostic_filter_source.DiagnosticFilterSource
) – Increment the counter if one or more of the given sources match (or None or empty list to match all) - payload_statuses (iterable of
spinnman.model.diagnostic_filter_payload_status.DiagnosticFilterPayloadStatus
) – Increment the counter if one or more of the given payload statuses match (or None or empty list to match all) - default_routing_statuses (iterable of
spinnman.model.diagnostic_filter_default_routing_status.DiagnosticFilterDefaultRoutingStatus
) – Increment the counter if one or more of the given default routing statuses match (or None or empty list to match all) - emergency_routing_statuses (iterable of
spinnman.model.diagnostic_filter_emergency_routing_status.DiagnosticFilterEmergencyRoutingStatus
) – Increment the counter if one or more of the given emergency routing statuses match (or None or empty list to match all) - packet_types (iterable of
spinnman.model.diagnostic_filter_packet_type.DiagnosticFilterPacketType
) – Increment the counter if one or more of the given packet types match (or None or empty list to match all)
-
default_routing_statuses
¶
-
destinations
¶
-
emergency_routing_statuses
¶
-
enable_interrupt_on_counter_event
¶
-
filter_word
¶ A word of data that can be written to the router to set up the filter
-
match_emergency_routing_status_to_incoming_packet
¶
-
packet_types
¶
-
payload_statuses
¶
-
sources
¶
spinnman.model.dpri_status module¶
-
class
spinnman.model.dpri_status.
DPRIStatus
(data, offset)[source]¶ Bases:
object
Represents a status information from dropped packet reinjection
Parameters: - data (str) – The data containing the information
- offset (int) – The offset in the data where the information starts
-
is_reinjecting_fixed_route
¶ True if reinjection of fixed-route packets is enabled
-
is_reinjecting_multicast
¶ True if reinjection of multicast packets is enabled
-
is_reinjecting_nearest_neighbour
¶ True if reinjection of nearest neighbour packets is enabled
-
is_reinjecting_point_to_point
¶ True if reinjection of point-to-point packets is enabled
-
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
-
n_dropped_packets
¶ The number of packets dropped by the router and received by the reinjector (may not fit in the queue though)
-
n_link_dumps
¶ The number of times that when a dropped packet was caused due to a link failing to take the packet.
Returns: 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
-
n_processor_dumps
¶ The number of times that when a dropped packet was caused due to a processor failing to take the packet.
Returns: int
-
n_reinjected_packets
¶ Of the n_dropped_packets received, how many packets were successfully reinjected
-
router_emergency_timeout
¶ The WAIT2 timeout value of the router in cycles
-
router_timeout
¶ The WAIT1 timeout value of the router in cycles
spinnman.model.executable_targets module¶
-
class
spinnman.model.executable_targets.
ExecutableTargets
[source]¶ Bases:
object
Encapsulate the binaries and cores on which to execute them
-
add_processor
(binary, chip_x, chip_y, chip_p)[source]¶ Add a processor to the executable targets
Parameters: - binary – the binary path for executable
- chip_x – the coordinate on the machine in terms of x for the chip
- chip_y – the coordinate on the machine in terms of y for the chip
- chip_p – the processor id to place this executable on
Returns:
-
add_subsets
(binary, subsets)[source]¶ Add core subsets to a binary
Parameters: - binary – the path to the binary needed to be executed
- subsets – the subset of cores that the binary needs to be loaded on
Returns:
-
all_core_subsets
¶ All the core subsets for all the binaries
-
binaries
¶ The binaries of the executables
-
get_cores_for_binary
(binary)[source]¶ Get the cores that a binary is to run on
Parameters: binary – The binary to find the cores for
-
total_processors
¶ The total number of cores to be loaded
-
spinnman.model.io_buffer module¶
-
class
spinnman.model.io_buffer.
IOBuffer
(x, y, p, iobuf)[source]¶ Bases:
object
The contents of IOBUF for a core
Parameters: - x (int) – The x-coordinate of a chip
- y (int) – The y-coordinate of a chip
- p (int) – The p-coordinate of a chip
- iobuf (str) – The contents of the buffer for the chip
Raises: None – No known exceptions are raised
-
iobuf
¶ The contents of the buffer
Returns: The contents of the buffer Return type: str
-
p
¶ The id of the core on the chip
Returns: The id of the core Return type: int
-
x
¶ The x-coordinate of the chip containing the core
Returns: The x-coordinate of the chip Return type: int
-
y
¶ The y-coordinate of the chip containing the core
Returns: The y-coordinate of the chip Return type: int
spinnman.model.machine_dimensions module¶
-
class
spinnman.model.machine_dimensions.
MachineDimensions
(width, height)[source]¶ Bases:
object
Represents the size of a machine in chips
Parameters: - width (int) – The width of the machine in chips
- height (int) – The height of the machine in chips
Raises: None – No known exceptions are raised
-
height
¶ The height of the machine in chips
Returns: The height Return type: int
-
width
¶ The width of the machine in chips
Returns: The width Return type: int
spinnman.model.p2p_table module¶
-
class
spinnman.model.p2p_table.
P2PTable
(width, height, column_data)[source]¶ Bases:
object
Represents a P2P table read from the machine
-
static
get_column_offset
(column)[source]¶ Get the offset of the next column in the table from the P2P base address
Parameters: column – The column to be read
-
static
get_n_column_bytes
(height)[source]¶ Get the number of bytes to be read for each column of the table
Parameters: height – The height of the machine
-
get_route
(x, y)[source]¶ Get the route to follow from this chip to the given chip
Parameters: - x – The x-coordinate of the chip to find the route to
- y – The y-coordinate of the chip to find the route to
-
height
¶ The height of the machine that this table represents
-
is_route
(x, y)[source]¶ Determines if there is a route in the P2P table to the given chip
Parameters: - x – The x-coordinate of the chip to look up
- y – The y-coordinate of the chip to look up
-
width
¶ The width of the machine that this table represents
-
static
spinnman.model.router_diagnostics module¶
-
class
spinnman.model.router_diagnostics.
RouterDiagnostics
(control_register, error_status, register_values)[source]¶ Bases:
object
Represents a set of diagnostic information available from a chip router
Parameters: - control_register (int) – The value of the control register
- error_status (int) – The value of the error_status
- register_values (iterable of int) – The values of the 16 router registers
Raises: spinnman.exceptions.SpinnmanInvalidParameterException – If the number of register values is not 16
-
error_status
¶ The error status
Returns: The error status Return type: int
-
mon
¶ The “mon” part of the control register
Returns: The mon bits Return type: int
-
n_dropped_fixed_route_packets
¶ The number of fixed-route packets received that were dropped
Returns: The number of packets Return type: int
-
n_dropped_multicast_packets
¶ The number of multicast packets received that were dropped
Returns: The number of packets Return type: int
-
n_dropped_nearest_neighbour_packets
¶ The number of nearest-neighbour packets received that were dropped
Returns: The number of packets Return type: int
-
n_dropped_peer_to_peer_packets
¶ The number of peer-to-peer packets received that were dropped
Returns: The number of packets Return type: int
-
n_external_fixed_route_packets
¶ The number of fixed-route packets received from external links
Returns: The number of packets Return type: int
-
n_external_multicast_packets
¶ The number of multicast packets received from external links
Returns: The number of packets Return type: int
-
n_external_nearest_neighbour_packets
¶ The number of nearest-neighbour packets received from external links
Returns: The number of packets Return type: int
-
n_external_peer_to_peer_packets
¶ The number of peer-to-peer packets received from external links
Returns: The number of packets Return type: int
-
n_local_fixed_route_packets
¶ The number of fixed-route packets received from local cores
Returns: The number of packets Return type: int
-
n_local_multicast_packets
¶ The number of multicast packets received from local cores
Returns: The number of packets Return type: int
-
n_local_nearest_neighbour_packets
¶ The number of nearest-neighbour packets received from local cores
Returns: The number of packets Return type: int
-
n_local_peer_to_peer_packets
¶ The number of peer-to-peer packets received from local cores
Returns: The number of packets Return type: int
-
registers
¶ The values in all of the registers. Can be used to directly access the registers if they have been programmed to give different values
Returns: An array of 16 values Return type: array of int
-
user_0
¶ the data gained from the user 0 router diag filter
Returns: the number of packets captured by this filter.
-
user_1
¶ the data gained from the user 1 router diag filter
Returns: the number of packets captured by this filter.
-
user_2
¶ the data gained from the user 2 router diag filter
Returns: the number of packets captured by this filter.
-
user_3
¶ the data gained from the user 3 router diag filter
Returns: the number of packets captured by this filter.
-
user_registers
¶ The values in the user control registers
Returns: An array of 4 values Return type: array of int
-
wait_1
¶ The wait_1 part of the control register
Returns: The wait_1 bits Return type: int
-
wait_2
¶ The wait_2 part of the control register
Returns: The wait_2 bits Return type: int
spinnman.model.version_info module¶
-
class
spinnman.model.version_info.
VersionInfo
(version_data, offset=0)[source]¶ Bases:
object
Decodes SC&MP/SARK version information as returned by the SVER command
Parameters: - version_data (bytearray) – bytes from an SCP packet containing version information
- offset – the offset in the bytes from an SCP packet containing version information
Raises: spinnman.exceptions.SpinnmanInvalidParameterException – If the message does not contain valid version information
-
build_date
¶ The build date of the software
Returns: The number of seconds since 1st January 1970 Return type: long
-
hardware
¶ The hardware being run on
Returns: The hardware Return type: str
-
name
¶ The name of the software
Returns: The name Return type: str
-
p
¶ The processor id of the processor where the information was obtained
Returns: the processor id Return type: int
-
version_number
¶ The version number of the software
Returns: The version Return type: float
-
version_string
¶ The version information as text
Returns: The version information Return type: str
-
x
¶ The x-coordinate of the chip where the information was obtained
Returns: the x-coordinate Return type: int
-
y
¶ The y-coordinate of the chip where the information was obtained
Returns: The y-coordinate Return type: int
Module contents¶
-
class
spinnman.model.
ADCInfo
(adc_data, offset)[source]¶ Bases:
object
container for the ADC data thats been retrieved from a fpga
Parameters: adc_data (str) – bytes from an SCP packet containing adc information Raises: spinnman.exceptions.SpinnmanInvalidParameterException – If the message does not contain valid adc information -
fan_0
¶ property for fan 0
-
fan_1
¶ property for fan 1
-
temp_btm
¶ property for temp btm
-
temp_ext_0
¶ property for temp ext 0
-
temp_ext_1
¶ property for temp_ext_1
-
temp_top
¶ property for temp_top
-
voltage_1_2a
¶ property for voltage 1 2a
-
voltage_1_2b
¶ property for voltage 1 2b
-
voltage_1_2c
¶ property for voltage 1 2c
-
voltage_1_8
¶ property for voltage 1 8
-
voltage_3_3
¶ property for voltage 3 3
-
voltage_supply
¶ property for voltage supply
-
-
class
spinnman.model.
BMPConnectionData
(cabinet, frame, ip_address, boards, port_num)[source]¶ Bases:
object
Contains the details of a BMP connection
-
boards
¶ Iterable of integers for the boards to be addressed
Return type: iterable of int
-
cabinet
¶ Get the cabinet number
Return type: int
-
frame
¶ Get the frame number
Return type: int
-
ip_address
¶ Get the IP address of the BMP
Return type: str
-
port_num
¶ The port number associated with this BMP connection
Returns: The port number
-
-
class
spinnman.model.
ChipInfo
(system_data, offset)[source]¶ Bases:
object
Represents the system variables for a chip, received from the chip SDRAM
Parameters: - system_data (str) – An bytestring retrieved from SDRAM on the board
- offset – The offset into the bytestring where the actual data starts
Raises: spinnman.exceptions.SpinnmanInvalidParameterException – If the data doesn’t contain valid system data information
-
cpu_clock_mhz
¶ The speed of the CPU clock in MHz
Return type: int
-
cpu_information_base_address
¶ The base address of the cpu information structure
Return type: int
-
first_free_router_entry
¶ The id of the first free routing entry on the chip
Return type: int
-
iobuf_size
¶ The size of the iobuf buffers in bytes
Return type: int
-
ip_address
¶ The ip address of the chip, or None if no Ethernet
Return type: str
-
is_ethernet_available
¶ True if the Ethernet is running on this chip, False otherwise
Return type: bool
-
links_available
¶ The links that are available on the chip
Return type: iterable of int
-
nearest_ethernet_x
¶ The x-coordinate of the nearest chip with Ethernet
Return type: int
-
nearest_ethernet_y
¶ The y-coordinate of the nearest chip with Ethernet
Return type: int
-
physical_to_virtual_core_map
¶ The physical core id to virtual core id map; entries with a value of 0xFF are non-operational cores
Return type: bytearray
-
sdram_base_address
¶ The base address of the user region of SDRAM on the chip
Return type: int
-
sdram_heap_address
¶ The address of the base of the heap in SDRAM
Return type: int
-
system_ram_heap_address
¶ The address of the base of the heap in system RAM
Return type: int
-
system_sdram_base_address
¶ The base address of the System SDRAM region on the chip
Return type: int
-
virtual_core_ids
¶ A list of available cores by virtual core id (including the monitor)
Return type: iterable of int
-
x
¶ The x-coordinate of the chip
Return type: int
-
x_size
¶ The number of chips in the x-dimension
Return type: int
-
y
¶ The y-coordinate of the chip
Return type: int
-
y_size
¶ The number of chips in the y-dimension
Return type: int
-
class
spinnman.model.
ChipSummaryInfo
(chip_summary_data, offset, x, y)[source]¶ Bases:
object
Represents the chip summary information read via an SCP command
Parameters: - chip_summary_data (bytearray) – The data from the SCP response
- offset (int) – The offset into the data where the data starts
- x – The x-coordinate of the chip that this data is from
- y – The y-coordinate of the chip that this data is from
-
core_states
¶ The state of the cores on the chip (list of one per core)
Return type: list of py:class:spinnman.model.cpu_state.CPUState
-
ethernet_ip_address
¶ The IP address of the Ethernet if up, or None if not
Return type: str
-
is_ethernet_available
¶ Determines if the Ethernet connection is available on this chip
Return type: bool
-
largest_free_sdram_block
¶ The size of the largest block of free SDRAM in bytes
Return type: int
-
largest_free_sram_block
¶ The size of the largest block of free SRAM in bytes
Return type: int
-
n_cores
¶ The number of cores working on the chip (including monitors)
Return type: int
-
n_free_multicast_routing_entries
¶ The number of multicast routing entries free on this chip
Return type: int
-
nearest_ethernet_x
¶ The x coordinate of the nearest Ethernet chip
Return type: int
-
nearest_ethernet_y
¶ The y coordinate of the nearest Ethernet chip
Return type: int
-
working_links
¶ The ids of the working links outgoing from this chip
Return type: list of int
-
x
¶ The x-coordinate of the chip that this data is from
Return type: int
-
y
¶ The y-coordinate of the chip that this data is from
Return type: int
-
class
spinnman.model.
CPUInfo
(x, y, p, cpu_data, offset)[source]¶ Bases:
object
Represents information about the state of a CPU
Parameters: - x (int) – The x-coordinate of a chip
- y (int) – The y-coordinate of a chip
- p (int) – The id of a core on the chip
- cpu_data (str) – A bytestring received from SDRAM on the board
-
application_id
¶ The id of the application running on the core
Returns: The id of the application Return type: int
-
application_mailbox_command
¶ The command currently in the mailbox being sent from the monitor processor to the application
Returns: The command Return type: spinnman.model.enums.mailbox_command.MailboxCommand
-
application_mailbox_data_address
¶ The address of the data in SDRAM for the application mailbox
Returns: The address of the data Return type: int
-
application_name
¶ The name of the application running on the core
Returns: The name of the application Return type: str
-
iobuf_address
¶ The address of the IOBUF buffer in SDRAM
Returns: The address Return type: int
-
link_register
¶ The current link register value (LR)
Returns: The LR value Return type: int
-
monitor_mailbox_command
¶ The command currently in the mailbox being sent from the application to the monitor processor
Returns: The command Return type: spinnman.model.mailbox_command.MailboxCommand
-
monitor_mailbox_data_address
¶ The address of the data in SDRAM of the monitor mailbox
Returns: The address of the data Return type: int
-
p
¶ The id of the core on the chip
Returns: The id of the core Return type: int
-
physical_cpu_id
¶ The physical id of this processor
Returns: The physical id of the processor Return type: int
-
processor_state_register
¶ The value in the processor state register (PSR)
Returns: The PSR value Return type: int
-
registers
¶ The current register values (r0 - r7)
Returns: An array of 8 values, one for each register Return type: array of int
-
run_time_error
¶ The reason for a run time error
Returns: The run time error Return type: spinnman.model.enums.run_time_error.RunTimeError
-
software_error_count
¶ The number of software errors counted
Returns: The number of software errors Return type: int
-
software_source_filename_address
¶ The address of the filename of the software source
Returns: The filename Return type: str
-
software_source_line_number
¶ The line number of the software source
Returns: The line number Return type: int
-
software_version
¶ The software version
Returns: The software version Return type: int
-
stack_pointer
¶ The current stack pointer value (SP)
Returns: The SP value Return type: int
-
state
¶ The current state of the core
Returns: The state of the core Return type: spinnman.model.enums.cpu_state.CPUState
-
time
¶ The time at which the application started
Returns: The time in seconds since 00:00:00 on the 1st January 1970 Return type: long
-
user
¶ The current user values (user0 - user3)
Returns: An array of 4 values, one for each user value Return type: array of int
-
x
¶ The x-coordinate of the chip containing the core
Returns: The x-coordinate of the chip Return type: int
-
y
¶ The y-coordinate of the chip containing the core
Returns: The y-coordinate of the chip Return type: int
-
class
spinnman.model.
CPUInfos
[source]¶ Bases:
object
A set of CPU information objects
-
add_processor
(x, y, processor_id, cpu_info)[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 (int) – A processor id
- cpu_info (
spinnman.model.enums.cpu_info.CPUInfo
) – The CPU information for the core
-
cpu_infos
¶ the one per core core info
Returns: iterable of x,y,p core info
-
-
class
spinnman.model.
DiagnosticFilter
(enable_interrupt_on_counter_event, match_emergency_routing_status_to_incoming_packet, destinations, sources, payload_statuses, default_routing_statuses, emergency_routing_statuses, packet_types)[source]¶ Bases:
object
A router diagnostic counter filter, which counts packets passing through the router with certain properties. The counter will be incremented so long as the packet matches one of the values in each field i.e. one of each of the destinations, sources, payload_statuses, default_routing_statuses, emergency_routing_statuses and packet_types
Parameters: - enable_interrupt_on_counter_event (bool) – Indicates whether an interrupt should be raised when this rule matches
- match_emergency_routing_status_to_incoming_packet (bool) – Indicates whether the emergency routing statuses should be matched against packets arriving at this router (if True), or if they should be matched against packets leaving this router (if False)
- destinations (iterable of
spinnman.model.diagnostic_filter_destination.DiagnosticFilterDestination
) – Increment the counter if one or more of the given destinations match - sources (iterable of
spinnman.model.diagnostic_filter_source.DiagnosticFilterSource
) – Increment the counter if one or more of the given sources match (or None or empty list to match all) - payload_statuses (iterable of
spinnman.model.diagnostic_filter_payload_status.DiagnosticFilterPayloadStatus
) – Increment the counter if one or more of the given payload statuses match (or None or empty list to match all) - default_routing_statuses (iterable of
spinnman.model.diagnostic_filter_default_routing_status.DiagnosticFilterDefaultRoutingStatus
) – Increment the counter if one or more of the given default routing statuses match (or None or empty list to match all) - emergency_routing_statuses (iterable of
spinnman.model.diagnostic_filter_emergency_routing_status.DiagnosticFilterEmergencyRoutingStatus
) – Increment the counter if one or more of the given emergency routing statuses match (or None or empty list to match all) - packet_types (iterable of
spinnman.model.diagnostic_filter_packet_type.DiagnosticFilterPacketType
) – Increment the counter if one or more of the given packet types match (or None or empty list to match all)
-
default_routing_statuses
¶
-
destinations
¶
-
emergency_routing_statuses
¶
-
enable_interrupt_on_counter_event
¶
-
filter_word
¶ A word of data that can be written to the router to set up the filter
-
match_emergency_routing_status_to_incoming_packet
¶
-
packet_types
¶
-
payload_statuses
¶
-
sources
¶
-
class
spinnman.model.
DPRIStatus
(data, offset)[source]¶ Bases:
object
Represents a status information from dropped packet reinjection
Parameters: - data (str) – The data containing the information
- offset (int) – The offset in the data where the information starts
-
is_reinjecting_fixed_route
¶ True if reinjection of fixed-route packets is enabled
-
is_reinjecting_multicast
¶ True if reinjection of multicast packets is enabled
-
is_reinjecting_nearest_neighbour
¶ True if reinjection of nearest neighbour packets is enabled
-
is_reinjecting_point_to_point
¶ True if reinjection of point-to-point packets is enabled
-
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
-
n_dropped_packets
¶ The number of packets dropped by the router and received by the reinjector (may not fit in the queue though)
-
n_link_dumps
¶ The number of times that when a dropped packet was caused due to a link failing to take the packet.
Returns: 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
-
n_processor_dumps
¶ The number of times that when a dropped packet was caused due to a processor failing to take the packet.
Returns: int
-
n_reinjected_packets
¶ Of the n_dropped_packets received, how many packets were successfully reinjected
-
router_emergency_timeout
¶ The WAIT2 timeout value of the router in cycles
-
router_timeout
¶ The WAIT1 timeout value of the router in cycles
-
class
spinnman.model.
ExecutableTargets
[source]¶ Bases:
object
Encapsulate the binaries and cores on which to execute them
-
add_processor
(binary, chip_x, chip_y, chip_p)[source]¶ Add a processor to the executable targets
Parameters: - binary – the binary path for executable
- chip_x – the coordinate on the machine in terms of x for the chip
- chip_y – the coordinate on the machine in terms of y for the chip
- chip_p – the processor id to place this executable on
Returns:
-
add_subsets
(binary, subsets)[source]¶ Add core subsets to a binary
Parameters: - binary – the path to the binary needed to be executed
- subsets – the subset of cores that the binary needs to be loaded on
Returns:
-
all_core_subsets
¶ All the core subsets for all the binaries
-
binaries
¶ The binaries of the executables
-
get_cores_for_binary
(binary)[source]¶ Get the cores that a binary is to run on
Parameters: binary – The binary to find the cores for
-
total_processors
¶ The total number of cores to be loaded
-
-
class
spinnman.model.
IOBuffer
(x, y, p, iobuf)[source]¶ Bases:
object
The contents of IOBUF for a core
Parameters: - x (int) – The x-coordinate of a chip
- y (int) – The y-coordinate of a chip
- p (int) – The p-coordinate of a chip
- iobuf (str) – The contents of the buffer for the chip
Raises: None – No known exceptions are raised
-
iobuf
¶ The contents of the buffer
Returns: The contents of the buffer Return type: str
-
p
¶ The id of the core on the chip
Returns: The id of the core Return type: int
-
x
¶ The x-coordinate of the chip containing the core
Returns: The x-coordinate of the chip Return type: int
-
y
¶ The y-coordinate of the chip containing the core
Returns: The y-coordinate of the chip Return type: int
-
class
spinnman.model.
MachineDimensions
(width, height)[source]¶ Bases:
object
Represents the size of a machine in chips
Parameters: - width (int) – The width of the machine in chips
- height (int) – The height of the machine in chips
Raises: None – No known exceptions are raised
-
height
¶ The height of the machine in chips
Returns: The height Return type: int
-
width
¶ The width of the machine in chips
Returns: The width Return type: int
-
class
spinnman.model.
P2PTable
(width, height, column_data)[source]¶ Bases:
object
Represents a P2P table read from the machine
-
static
get_column_offset
(column)[source]¶ Get the offset of the next column in the table from the P2P base address
Parameters: column – The column to be read
-
static
get_n_column_bytes
(height)[source]¶ Get the number of bytes to be read for each column of the table
Parameters: height – The height of the machine
-
get_route
(x, y)[source]¶ Get the route to follow from this chip to the given chip
Parameters: - x – The x-coordinate of the chip to find the route to
- y – The y-coordinate of the chip to find the route to
-
height
¶ The height of the machine that this table represents
-
is_route
(x, y)[source]¶ Determines if there is a route in the P2P table to the given chip
Parameters: - x – The x-coordinate of the chip to look up
- y – The y-coordinate of the chip to look up
-
width
¶ The width of the machine that this table represents
-
static
-
class
spinnman.model.
RouterDiagnostics
(control_register, error_status, register_values)[source]¶ Bases:
object
Represents a set of diagnostic information available from a chip router
Parameters: - control_register (int) – The value of the control register
- error_status (int) – The value of the error_status
- register_values (iterable of int) – The values of the 16 router registers
Raises: spinnman.exceptions.SpinnmanInvalidParameterException – If the number of register values is not 16
-
error_status
¶ The error status
Returns: The error status Return type: int
-
mon
¶ The “mon” part of the control register
Returns: The mon bits Return type: int
-
n_dropped_fixed_route_packets
¶ The number of fixed-route packets received that were dropped
Returns: The number of packets Return type: int
-
n_dropped_multicast_packets
¶ The number of multicast packets received that were dropped
Returns: The number of packets Return type: int
-
n_dropped_nearest_neighbour_packets
¶ The number of nearest-neighbour packets received that were dropped
Returns: The number of packets Return type: int
-
n_dropped_peer_to_peer_packets
¶ The number of peer-to-peer packets received that were dropped
Returns: The number of packets Return type: int
-
n_external_fixed_route_packets
¶ The number of fixed-route packets received from external links
Returns: The number of packets Return type: int
-
n_external_multicast_packets
¶ The number of multicast packets received from external links
Returns: The number of packets Return type: int
-
n_external_nearest_neighbour_packets
¶ The number of nearest-neighbour packets received from external links
Returns: The number of packets Return type: int
-
n_external_peer_to_peer_packets
¶ The number of peer-to-peer packets received from external links
Returns: The number of packets Return type: int
-
n_local_fixed_route_packets
¶ The number of fixed-route packets received from local cores
Returns: The number of packets Return type: int
-
n_local_multicast_packets
¶ The number of multicast packets received from local cores
Returns: The number of packets Return type: int
-
n_local_nearest_neighbour_packets
¶ The number of nearest-neighbour packets received from local cores
Returns: The number of packets Return type: int
-
n_local_peer_to_peer_packets
¶ The number of peer-to-peer packets received from local cores
Returns: The number of packets Return type: int
-
registers
¶ The values in all of the registers. Can be used to directly access the registers if they have been programmed to give different values
Returns: An array of 16 values Return type: array of int
-
user_0
¶ the data gained from the user 0 router diag filter
Returns: the number of packets captured by this filter.
-
user_1
¶ the data gained from the user 1 router diag filter
Returns: the number of packets captured by this filter.
-
user_2
¶ the data gained from the user 2 router diag filter
Returns: the number of packets captured by this filter.
-
user_3
¶ the data gained from the user 3 router diag filter
Returns: the number of packets captured by this filter.
-
user_registers
¶ The values in the user control registers
Returns: An array of 4 values Return type: array of int
-
wait_1
¶ The wait_1 part of the control register
Returns: The wait_1 bits Return type: int
-
wait_2
¶ The wait_2 part of the control register
Returns: The wait_2 bits Return type: int
-
class
spinnman.model.
VersionInfo
(version_data, offset=0)[source]¶ Bases:
object
Decodes SC&MP/SARK version information as returned by the SVER command
Parameters: - version_data (bytearray) – bytes from an SCP packet containing version information
- offset – the offset in the bytes from an SCP packet containing version information
Raises: spinnman.exceptions.SpinnmanInvalidParameterException – If the message does not contain valid version information
-
build_date
¶ The build date of the software
Returns: The number of seconds since 1st January 1970 Return type: long
-
hardware
¶ The hardware being run on
Returns: The hardware Return type: str
-
name
¶ The name of the software
Returns: The name Return type: str
-
p
¶ The processor id of the processor where the information was obtained
Returns: the processor id Return type: int
-
version_number
¶ The version number of the software
Returns: The version Return type: float
-
version_string
¶ The version information as text
Returns: The version information Return type: str
-
x
¶ The x-coordinate of the chip where the information was obtained
Returns: the x-coordinate Return type: int
-
y
¶ The y-coordinate of the chip where the information was obtained
Returns: The y-coordinate Return type: int