spinnman.model package¶
Subpackages¶
Module contents¶
-
class
spinnman.model.
ADCInfo
(adc_data, offset)[source]¶ Bases:
object
Container for the ADC data thats been retrieved from an FPGA.
Parameters: adc_data (bytes) – bytes from an SCP packet containing ADC information Raises: SpinnmanInvalidParameterException – If the message does not contain valid ADC information
-
class
spinnman.model.
BMPConnectionData
(cabinet, frame, ip_address, boards, port_num)[source]¶ Bases:
object
Contains the details of a BMP connection.
-
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: Raises: SpinnmanInvalidParameterException – If the data doesn’t contain valid system data information
-
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
-
virtual_core_ids
¶ A list of available cores by virtual core ID (including the monitor).
Return type: iterable(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: -
clear_ethernet_ip_address
()[source]¶ Forces the Ethernet IP address to None, in case of an errant chip.
-
-
class
spinnman.model.
CPUInfo
(x, y, p, cpu_data, offset)[source]¶ Bases:
object
Represents information about the state of a CPU.
Parameters: -
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: 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
-
monitor_mailbox_command
¶ The command currently in the mailbox being sent from the application to the monitor processor.
Returns: The command Return type: 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
-
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: list(int)
-
run_time_error
¶ The reason for a run time error.
Returns: The run time error Return type: 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
-
time
¶ The time at which the application started.
Returns: The time in seconds since 00:00:00 on the 1st January 1970 Return type: int
-
user
¶ The current user values (user0 - user3).
Returns: An array of 4 values, one for each user value Return type: list(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:
-
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 (list(DiagnosticFilterDestination)) – Increment the counter if one or more of the given destinations match
- sources (list(DiagnosticFilterSource)) – Increment the counter if one or more of the given sources match (or None or empty list to match all)
- payload_statuses (list(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 (list(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 (list(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 (list(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.
ExecutableTargets
[source]¶ Bases:
object
Encapsulate the binaries and cores on which to execute them.
-
add_processor
(binary, chip_x, chip_y, chip_p, executable_type=None)[source]¶ Add a processor to the executable targets
Parameters: - binary (str) – the binary path for executable
- chip_x (int) – the coordinate on the machine in terms of x for the chip
- chip_y (int) – the coordinate on the machine in terms of y for the chip
- chip_p (int) – the processor ID to place this executable on
- executable_type (ExecutableType) – the executable type for locating n cores of
-
add_subsets
(binary, subsets, executable_type=None)[source]¶ Add core subsets to a binary.
Parameters: - binary (str) – the path to the binary needed to be executed
- subsets (CoreSubsets) – the subset of cores that the binary needs to be loaded on
- executable_type (ExecutableType) – The type of this executable.
None
means don’t record it.
-
all_core_subsets
¶ All the core subsets for all the binaries.
Return type: CoreSubsets
-
executable_types_in_binary_set
()[source]¶ Get the executable types in the set of binaries.
Returns: iterable of the executable types in this binary set. Return type: iterable(ExecutableType)
-
get_binaries_of_executable_type
(executable_type)[source]¶ Get the binaries of a given a executable type.
Parameters: executable_type (ExecutableType) – the executable type enum value Returns: iterable of binaries with that executable type Return type: iterable(str)
-
get_cores_for_binary
(binary)[source]¶ Get the cores that a binary is to run on.
Parameters: binary (str) – The binary to find the cores for
-
get_n_cores_for_executable_type
(executable_type)[source]¶ Get the number of cores that the executable type is using.
Parameters: executable_type (ExecutableType) – the executable type for locating n cores of Returns: the number of cores using this executable type Return type: int
-
-
class
spinnman.model.
HeapElement
(block_address, next_address, free)[source]¶ Bases:
object
An element of one of the heaps on SpiNNaker.
Parameters:
-
class
spinnman.model.
IOBuffer
(x, y, p, iobuf)[source]¶ Bases:
object
The contents of IOBUF for a core.
Parameters:
-
class
spinnman.model.
MachineDimensions
(width, height)[source]¶ Bases:
object
Represents the size of a machine in chips.
Parameters:
-
class
spinnman.model.
P2PTable
(width, height, column_data)[source]¶ Bases:
object
Represents a P2P routing table read from the machine.
Parameters: -
static
get_column_offset
(column)[source]¶ Get the offset of the next column in the table from the P2P base address.
Parameters: column (int) – 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 (int) – The height of the machine
-
get_route
(x, y)[source]¶ Get the route to follow from this chip to the given chip.
Parameters: Return type:
-
is_route
(x, y)[source]¶ Determines if there is a route in the P2P table to the given chip.
Parameters: Return type:
-
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: Raises: SpinnmanInvalidParameterException – If the number of register values is not 16
-
errors_set
¶ A list of errors that have been detected.
Return type: list(RouterError)
-
n_dropped_fixed_route_packets
¶ The number of fixed-route packets received that were dropped.
Return type: int
-
n_dropped_multicast_packets
¶ The number of multicast packets received that were dropped.
Return type: int
-
n_dropped_nearest_neighbour_packets
¶ The number of nearest-neighbour packets received that were dropped.
Return type: int
-
n_dropped_peer_to_peer_packets
¶ The number of peer-to-peer packets received that were dropped.
Return type: int
-
n_external_fixed_route_packets
¶ The number of fixed-route packets received from external links.
Return type: int
-
n_external_multicast_packets
¶ The number of multicast packets received from external links.
Return type: int
-
n_external_nearest_neighbour_packets
¶ The number of nearest-neighbour packets received from external links.
Return type: int
-
n_external_peer_to_peer_packets
¶ The number of peer-to-peer packets received from external links.
Return type: int
-
n_local_fixed_route_packets
¶ The number of fixed-route packets received from local cores.
Return type: int
-
n_local_multicast_packets
¶ The number of multicast packets received from local cores.
Return type: int
-
n_local_nearest_neighbour_packets
¶ The number of nearest-neighbour packets received from local cores.
Return type: int
-
n_local_peer_to_peer_packets
¶ The number of peer-to-peer packets received from local cores.
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(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: Raises: SpinnmanInvalidParameterException – If the message does not contain valid version information