spinnman package¶
Subpackages¶
- spinnman.connections package
- spinnman.data package
- spinnman.extended package
- Submodules
- spinnman.extended.extended_transceiver module
ExtendedTransceiverExtendedTransceiver.execute()ExtendedTransceiver.execute_application()ExtendedTransceiver.free_sdram()ExtendedTransceiver.free_sdram_by_app_id()ExtendedTransceiver.get_heap()ExtendedTransceiver.get_iobuf_from_core()ExtendedTransceiver.get_router_diagnostic_filter()ExtendedTransceiver.is_connected()ExtendedTransceiver.number_of_boards_locatedExtendedTransceiver.read_adc_data()ExtendedTransceiver.read_neighbour_memory()ExtendedTransceiver.set_led()ExtendedTransceiver.set_leds()ExtendedTransceiver.set_watch_dog()ExtendedTransceiver.write_memory_flood()ExtendedTransceiver.write_neighbour_memory()
- spinnman.extended.version3transceiver module
- spinnman.extended.version5transceiver module
- Module contents
- spinnman.messages package
- spinnman.model package
- Subpackages
- Module contents
ADCInfoBMPConnectionDataCPUInfoCPUInfo.application_idCPUInfo.application_mailbox_commandCPUInfo.application_mailbox_data_addressCPUInfo.application_nameCPUInfo.get_status_string()CPUInfo.iobuf_addressCPUInfo.link_registerCPUInfo.mock_info()CPUInfo.monitor_mailbox_commandCPUInfo.monitor_mailbox_data_addressCPUInfo.pCPUInfo.physical_cpu_idCPUInfo.processor_state_registerCPUInfo.registersCPUInfo.run_time_errorCPUInfo.software_error_countCPUInfo.software_source_filename_addressCPUInfo.software_source_line_numberCPUInfo.software_versionCPUInfo.stack_pointerCPUInfo.stateCPUInfo.timeCPUInfo.userCPUInfo.xCPUInfo.y
CPUInfosChipInfoChipInfo.cpu_clock_mhzChipInfo.cpu_information_base_addressChipInfo.first_free_router_entryChipInfo.iobuf_sizeChipInfo.ip_addressChipInfo.is_ethernet_availableChipInfo.links_availableChipInfo.nearest_ethernet_xChipInfo.nearest_ethernet_yChipInfo.physical_to_virtual_core_mapChipInfo.router_table_copy_address()ChipInfo.sdram_base_addressChipInfo.sdram_heap_addressChipInfo.system_ram_heap_addressChipInfo.system_sdram_base_addressChipInfo.virtual_core_idsChipInfo.virtual_to_physical_core_mapChipInfo.xChipInfo.x_sizeChipInfo.yChipInfo.y_size
ChipSummaryInfoChipSummaryInfo.clear_ethernet_ip_address()ChipSummaryInfo.core_statesChipSummaryInfo.ethernet_ip_addressChipSummaryInfo.is_ethernet_availableChipSummaryInfo.largest_free_sdram_blockChipSummaryInfo.largest_free_sram_blockChipSummaryInfo.n_coresChipSummaryInfo.n_free_multicast_routing_entriesChipSummaryInfo.nearest_ethernet_xChipSummaryInfo.nearest_ethernet_yChipSummaryInfo.parent_linkChipSummaryInfo.working_linksChipSummaryInfo.xChipSummaryInfo.y
DiagnosticFilterDiagnosticFilter.default_routing_statusesDiagnosticFilter.destinationsDiagnosticFilter.emergency_routing_statusesDiagnosticFilter.enable_interrupt_on_counter_eventDiagnosticFilter.filter_wordDiagnosticFilter.match_emergency_routing_status_to_incoming_packetDiagnosticFilter.packet_typesDiagnosticFilter.payload_statusesDiagnosticFilter.read_from_int()DiagnosticFilter.sources
ExecutableTargetsExecutableTargets.add_processor()ExecutableTargets.add_subsets()ExecutableTargets.all_core_subsetsExecutableTargets.binariesExecutableTargets.executable_types_in_binary_set()ExecutableTargets.get_binaries_of_executable_type()ExecutableTargets.get_cores_for_binary()ExecutableTargets.get_n_cores_for_executable_type()ExecutableTargets.known()ExecutableTargets.total_processors
HeapElementIOBufferMachineDimensionsP2PTableRouterDiagnosticsRouterDiagnostics.error_countRouterDiagnostics.error_statusRouterDiagnostics.errors_setRouterDiagnostics.monRouterDiagnostics.n_dropped_fixed_route_packetsRouterDiagnostics.n_dropped_multicast_packetsRouterDiagnostics.n_dropped_nearest_neighbour_packetsRouterDiagnostics.n_dropped_peer_to_peer_packetsRouterDiagnostics.n_external_fixed_route_packetsRouterDiagnostics.n_external_multicast_packetsRouterDiagnostics.n_external_nearest_neighbour_packetsRouterDiagnostics.n_external_peer_to_peer_packetsRouterDiagnostics.n_local_fixed_route_packetsRouterDiagnostics.n_local_multicast_packetsRouterDiagnostics.n_local_nearest_neighbour_packetsRouterDiagnostics.n_local_peer_to_peer_packetsRouterDiagnostics.registersRouterDiagnostics.user_0RouterDiagnostics.user_1RouterDiagnostics.user_2RouterDiagnostics.user_3RouterDiagnostics.user_registersRouterDiagnostics.wait_1RouterDiagnostics.wait_2
VersionInfo
- spinnman.processes package
- Module contents
AbstractMultiConnectionProcessAbstractMultiConnectionProcessConnectionSelectorApplicationCopyRunProcessApplicationRunProcessClearRoutesProcessConnectionSelectorFixedConnectionSelectorGetCPUInfoProcessGetExcludeCPUInfoProcessGetHeapProcessGetIncludeCPUInfoProcessGetMachineProcessGetMultiCastRoutesProcessGetNCoresInStateProcessGetTagsProcessGetVersionProcessLoadFixedRouteRoutingEntryProcessLoadMultiCastRoutesProcessMallocSDRAMProcessMostDirectConnectionSelectorReadFixedRouteRoutingEntryProcessReadIOBufProcessReadMemoryProcessReadRouterDiagnosticsProcessRoundRobinConnectionSelectorSendSingleCommandProcessSetMemoryProcessWriteMemoryProcess
- Module contents
- spinnman.spalloc package
- Submodules
- spinnman.spalloc.proxy_protocol module
- spinnman.spalloc.session module
- spinnman.spalloc.spalloc_boot_connection module
- spinnman.spalloc.spalloc_scp_connection module
- spinnman.spalloc.spalloc_transceiver module
- Module contents
AbstractSpallocClientSpallocClientSpallocEIEIOConnectionSpallocEIEIOListenerSpallocEIEIOListener.local_ip_addressSpallocEIEIOListener.local_portSpallocEIEIOListener.receive_eieio_message()SpallocEIEIOListener.send()SpallocEIEIOListener.send_eieio_message_to_core()SpallocEIEIOListener.send_to()SpallocEIEIOListener.send_to_chip()SpallocEIEIOListener.update_tag()SpallocEIEIOListener.update_tag_by_ip()
SpallocJobSpallocJob.connect_for_booting()SpallocJob.connect_to_board()SpallocJob.create_transceiver()SpallocJob.destroy()SpallocJob.get_connections()SpallocJob.get_root_host()SpallocJob.get_session_credentials_for_db()SpallocJob.get_state()SpallocJob.open_eieio_connection()SpallocJob.open_eieio_listener_connection()SpallocJob.open_udp_listener_connection()SpallocJob.read_data()SpallocJob.reset_routing()SpallocJob.wait_for_state_change()SpallocJob.wait_until_ready()SpallocJob.where_is_machine()SpallocJob.write_data()
SpallocMachineSpallocProxiedConnectionSpallocStateis_server_address()
- spinnman.transceiver package
- Submodules
- spinnman.transceiver.base_transceiver module
BaseTransceiverBaseTransceiver.add_cpu_information_from_core()BaseTransceiver.add_scamp_connections()BaseTransceiver.bmp_selectorBaseTransceiver.boot_led_0_valueBaseTransceiver.clear_ip_tag()BaseTransceiver.clear_multicast_routes()BaseTransceiver.clear_router_diagnostic_counters()BaseTransceiver.close()BaseTransceiver.control_sync()BaseTransceiver.discover_scamp_connections()BaseTransceiver.execute_flood()BaseTransceiver.get_clock_drift()BaseTransceiver.get_connections()BaseTransceiver.get_core_state_count()BaseTransceiver.get_cpu_infos()BaseTransceiver.get_iobuf()BaseTransceiver.get_machine_details()BaseTransceiver.get_multicast_routes()BaseTransceiver.get_region_base_address()BaseTransceiver.get_router_diagnostics()BaseTransceiver.get_scamp_connection_selector()BaseTransceiver.get_tags()BaseTransceiver.load_fixed_route()BaseTransceiver.load_multicast_routes()BaseTransceiver.malloc_sdram()BaseTransceiver.malloc_sdram_multi()BaseTransceiver.read_bmp_version()BaseTransceiver.read_fixed_route()BaseTransceiver.read_fpga_register()BaseTransceiver.read_memory()BaseTransceiver.read_user()BaseTransceiver.read_word()BaseTransceiver.reset_routing()BaseTransceiver.scamp_connection_selectorBaseTransceiver.send_chip_update_provenance_and_exit()BaseTransceiver.send_sdp_message()BaseTransceiver.send_signal()BaseTransceiver.set_ip_tag()BaseTransceiver.set_reverse_ip_tag()BaseTransceiver.set_router_diagnostic_filter()BaseTransceiver.stop_application()BaseTransceiver.update_provenance_and_exit()BaseTransceiver.wait_for_cores_to_be_in_state()BaseTransceiver.write_fpga_register()BaseTransceiver.write_memory()BaseTransceiver.write_user()BaseTransceiver.write_user_many()
- spinnman.transceiver.extendable_transceiver module
- spinnman.transceiver.version3transceiver module
- spinnman.transceiver.version5transceiver module
- spinnman.transceiver.virtual5transceiver module
- Module contents
MockableTransceiverMockableTransceiver.add_cpu_information_from_core()MockableTransceiver.add_scamp_connections()MockableTransceiver.bmp_selectorMockableTransceiver.clear_ip_tag()MockableTransceiver.clear_multicast_routes()MockableTransceiver.clear_router_diagnostic_counters()MockableTransceiver.close()MockableTransceiver.control_sync()MockableTransceiver.discover_scamp_connections()MockableTransceiver.execute_flood()MockableTransceiver.get_clock_drift()MockableTransceiver.get_connections()MockableTransceiver.get_core_state_count()MockableTransceiver.get_cpu_infos()MockableTransceiver.get_iobuf()MockableTransceiver.get_machine_details()MockableTransceiver.get_multicast_routes()MockableTransceiver.get_region_base_address()MockableTransceiver.get_router_diagnostics()MockableTransceiver.get_scamp_connection_selector()MockableTransceiver.get_tags()MockableTransceiver.load_fixed_route()MockableTransceiver.load_multicast_routes()MockableTransceiver.malloc_sdram()MockableTransceiver.read_bmp_version()MockableTransceiver.read_fixed_route()MockableTransceiver.read_fpga_register()MockableTransceiver.read_memory()MockableTransceiver.read_user()MockableTransceiver.read_word()MockableTransceiver.scamp_connection_selectorMockableTransceiver.send_chip_update_provenance_and_exit()MockableTransceiver.send_sdp_message()MockableTransceiver.send_signal()MockableTransceiver.set_ip_tag()MockableTransceiver.set_reverse_ip_tag()MockableTransceiver.set_router_diagnostic_filter()MockableTransceiver.stop_application()MockableTransceiver.update_provenance_and_exit()MockableTransceiver.wait_for_cores_to_be_in_state()MockableTransceiver.write_fpga_register()MockableTransceiver.write_memory()MockableTransceiver.write_user()MockableTransceiver.written_memory
TransceiverTransceiver.add_cpu_information_from_core()Transceiver.add_scamp_connections()Transceiver.clear_ip_tag()Transceiver.clear_multicast_routes()Transceiver.clear_router_diagnostic_counters()Transceiver.close()Transceiver.control_sync()Transceiver.discover_scamp_connections()Transceiver.execute_flood()Transceiver.get_clock_drift()Transceiver.get_connections()Transceiver.get_core_state_count()Transceiver.get_cpu_infos()Transceiver.get_iobuf()Transceiver.get_machine_details()Transceiver.get_multicast_routes()Transceiver.get_region_base_address()Transceiver.get_router_diagnostics()Transceiver.get_scamp_connection_selector()Transceiver.get_tags()Transceiver.load_fixed_route()Transceiver.load_multicast_routes()Transceiver.malloc_sdram()Transceiver.malloc_sdram_multi()Transceiver.read_bmp_version()Transceiver.read_fixed_route()Transceiver.read_fpga_register()Transceiver.read_memory()Transceiver.read_user()Transceiver.read_word()Transceiver.reset_routing()Transceiver.send_chip_update_provenance_and_exit()Transceiver.send_sdp_message()Transceiver.send_signal()Transceiver.set_ip_tag()Transceiver.set_reverse_ip_tag()Transceiver.set_router_diagnostic_filter()Transceiver.stop_application()Transceiver.update_provenance_and_exit()Transceiver.wait_for_cores_to_be_in_state()Transceiver.write_fpga_register()Transceiver.write_memory()Transceiver.write_user()Transceiver.write_user_many()
create_transceiver_from_connections()create_transceiver_from_hostname()
- spinnman.utilities package
Submodules¶
spinnman.board_test_configuration module¶
- class spinnman.board_test_configuration.BoardTestConfiguration[source]¶
Bases:
objectConfiguration to use for a test board
- set_up_remote_board(version: int | None = None) None[source]¶
Gets a remote board to test, returning the first that it finds.
Search order is - Local 4 Chip board - 48 Chip board “spinn-4.cs.man.ac.uk” - Local 48 Chip board if at 192.168.240.1 - Virtual machine
The first three ignore the version param the last needs it
Sets the version field in the configs.
- Parameters:
version – Version for a virtual if no physical board found
- Raises:
unittest.SkipTest – If no physical machine found and no version provided
spinnman.config_setup module¶
- spinnman.config_setup.add_spinnman_cfg() None[source]¶
Add the local configuration and all dependent configuration files.
spinnman.constants module¶
- spinnman.constants.BMP_MISSING_TEMP: int = -32768¶
Temperature value returned when a probe is not connected.
- spinnman.constants.BMP_POST_POWER_ON_SLEEP_TIME: float = 5.0¶
Time to sleep after powering on boards
- spinnman.constants.BMP_TEMP_SCALE: float = 0.00390625¶
Multiplier to convert from temperature probe values to degrees Celsius.
- spinnman.constants.BMP_V_SCALE_12: float = 0.003662109375¶
Multiplier to convert from ADC value to volts for 12 V lines.
- spinnman.constants.BMP_V_SCALE_2_5: float = 0.0006103515625¶
Multiplier to convert from ADC value to volts for lines less than 2.5 V.
- spinnman.constants.BMP_V_SCALE_3_3: float = 0.00091552734375¶
Multiplier to convert from ADC value to volts for 3.3 V lines.
- spinnman.constants.BOOT_RETRIES: int = 3¶
This is the number of retries during boot - this is different because otherwise boot takes too long (retrying on a non-booted machine will never work)
- spinnman.constants.CPU_INFO_OFFSET: int = 3842011136¶
The address of the start of the VCPU structure (copied from sark.h)
- spinnman.constants.CPU_IOBUF_ADDRESS_OFFSET: int = 88¶
The address at which the iobuf address starts
- spinnman.constants.CPU_USER_OFFSET: int = 4¶
The number of bytes the user start address moves each time
- class spinnman.constants.EIEIO_COMMAND_IDS(value)[source]¶
Bases:
EnumA listing of what SpiNNaker specific EIEIO commands there are.
- DATABASE = 1¶
Database handshake with external program; not routed via SpiNNaker
- EVENT_PADDING = 2¶
Fill in buffer area with padding
- EVENT_STOP = 3¶
End of all buffers, stop execution
- HOST_DATA_READ = 9¶
Host confirming data being read form SpiNNaker memory
- HOST_DATA_READ_ACK = 12¶
Host confirming request to read data received
- HOST_SEND_SEQUENCED_DATA = 7¶
Buffers being sent from host to SpiNNaker
- SPINNAKER_REQUEST_BUFFERS = 6¶
Spinnaker requesting new buffers for spike source population
- SPINNAKER_REQUEST_READ_DATA = 8¶
Buffers available to be read from a buffered out vertex
- START_RESUME_NOTIFICATION = 11¶
Command for notifying the external devices that the simulation has started
- START_SENDING_REQUESTS = 5¶
Start complaining that there is SDRAM free space for buffers
- STOP_PAUSE_NOTIFICATION = 10¶
Command for notifying the external devices that the simulation has stopped
- STOP_SENDING_REQUESTS = 4¶
Stop complaining that there is SDRAM free space for buffers
- class spinnman.constants.IPTAG_TIME_OUT_WAIT_TIMES(value)[source]¶
Bases:
EnumThe values used by the SCP IP tag time outs. These control how long to wait for any message request which requires a response, before raising an error.
The value is calculated via the following formula:
10ms * 2^(tag_timeout_value - 1)
- TIMEOUT_10_ms = 1¶
- TIMEOUT_1280_ms = 8¶
- TIMEOUT_160_ms = 5¶
- TIMEOUT_20_ms = 2¶
- TIMEOUT_2560_ms = 9¶
- TIMEOUT_320_ms = 6¶
- TIMEOUT_40_ms = 3¶
- TIMEOUT_640_ms = 7¶
- TIMEOUT_80_ms = 4¶
- class spinnman.constants.READ_TYPES(value)[source]¶
Bases:
EnumThe types of read available from SARK. These values are used to tell SARK how to read the data in a time efficient manner.
- BYTE = 0¶
- HALF_WORD = 1¶
- WORD = 2¶
- spinnman.constants.ROUTER_DEFAULT_FILTERS_MAX_POSITION: int = 11¶
Point where default filters finish and user set-able ones are available
- spinnman.constants.ROUTER_DIAGNOSTIC_FILTER_SIZE: int = 4¶
Size of a router diagnostic filter control register in bytes
- spinnman.constants.ROUTER_FILTER_CONTROLS_OFFSET: int = 512¶
Offset for the router filter controls first register (one word each)
- spinnman.constants.ROUTER_REGISTER_BASE_ADDRESS: int = 3774873600¶
The base address of a routers diagnostic filter controls
- spinnman.constants.ROUTER_REGISTER_P2P_ADDRESS: int = 3774939136¶
The base address of a routers p2p routing table
- class spinnman.constants.ROUTER_REGISTER_REGISTERS(value)[source]¶
Bases:
EnumThe indices to the router registers.
- DUMP_FR = 11¶
- DUMP_MC = 8¶
- DUMP_NN = 10¶
- DUMP_PP = 9¶
- EXT_FR = 7¶
- EXT_MC = 1¶
- EXT_NN = 5¶
- EXT_PP = 3¶
- LOC_FR = 6¶
- LOC_MC = 0¶
- LOC_NN = 4¶
- LOC_PP = 2¶
- USER_0 = 12¶
- USER_1 = 13¶
- USER_2 = 14¶
- USER_3 = 15¶
- spinnman.constants.SCP_TIMEOUT_COUNT = 5.0¶
This is the default timeout when using SCP count (can take a bit longer)
- spinnman.constants.SYSTEM_VARIABLE_BASE_ADDRESS: int = 4110450432¶
The base address of the system variable structure in System ram
- spinnman.constants.SYSTEM_VARIABLE_BYTES: int = 256¶
The size of the system variable structure in bytes
- spinnman.constants.UDP_BOOT_CONNECTION_DEFAULT_PORT: int = 54321¶
The default port of the connection
- spinnman.constants.UDP_MESSAGE_MAX_SIZE: int = 256¶
The max size a UDP packet can be, excluding headers
- spinnman.constants.address_length_dtype: Dict[Tuple[int, int], READ_TYPES] = {(0, 0): READ_TYPES.WORD, (0, 1): READ_TYPES.BYTE, (0, 2): READ_TYPES.HALF_WORD, (0, 3): READ_TYPES.BYTE, (1, 0): READ_TYPES.BYTE, (1, 1): READ_TYPES.BYTE, (1, 2): READ_TYPES.BYTE, (1, 3): READ_TYPES.BYTE, (2, 0): READ_TYPES.HALF_WORD, (2, 1): READ_TYPES.BYTE, (2, 2): READ_TYPES.HALF_WORD, (2, 3): READ_TYPES.BYTE, (3, 0): READ_TYPES.BYTE, (3, 1): READ_TYPES.BYTE, (3, 2): READ_TYPES.BYTE, (3, 3): READ_TYPES.BYTE}¶
This is a mapping between read address in the mapping between word byte position, the number of bytes you wish to read, and the type of time efficient way to read said amount of bytes via SARK
spinnman.exceptions module¶
- exception spinnman.exceptions.SpallocException[source]¶
Bases:
SpinnmanExceptionRaised when there is a problem with the Spalloc session or job.
- exception spinnman.exceptions.SpiNNManCoresNotInStateException(timeout: float | None, expected_states: FrozenSet[CPUState], failed_core_states: CPUInfos)[source]¶
Bases:
SpinnmanTimeoutExceptionCores failed to reach a given state within a timeout.
- Parameters:
timeout
expected_states
failed_core_states
- exception spinnman.exceptions.SpinnmanBootException[source]¶
Bases:
SpinnmanIOExceptionAn exception that something went wrong with find scamp and boot.
- Parameters:
problem – The problem with the IO
- exception spinnman.exceptions.SpinnmanEIEIOPacketParsingException(parsing_format: str, packet: bytes)[source]¶
Bases:
SpinnmanExceptionUnable to complete the parsing of the EIEIO packet received. The routine used is invalid or the content of the packet is invalid.
- Parameters:
parsing_format
packet
- exception spinnman.exceptions.SpinnmanEOFException[source]¶
Bases:
SpinnmanIOExceptionAn exception that we’re trying to do I/O on a closed socket. That isn’t going to work!
- Parameters:
problem – The problem with the IO
- exception spinnman.exceptions.SpinnmanException[source]¶
Bases:
ExceptionSuperclass of exceptions that occur when dealing with communication with SpiNNaker.
- exception spinnman.exceptions.SpinnmanGenericProcessException(exception: Exception, tb: TracebackType, x: int, y: int, p: int, phys_p: str, tb2: TracebackType | None = None)[source]¶
Bases:
SpinnmanExceptionEncapsulates exceptions from processes which communicate with some core/chip.
- Parameters:
exception
x
y
p
phys_p
- exception spinnman.exceptions.SpinnmanGroupedProcessException(error_requests: List[AbstractSCPRequest], exceptions: List[Exception], trace_backs: List[TracebackType], connections: List[SCAMPConnection])[source]¶
Bases:
SpinnmanExceptionEncapsulates exceptions from processes which communicate with a collection of cores/chips.
- Parameters:
error_requests – List of the requests that cause the error.
exceptions – List of the exceptions caught. In the same order as the requests that caused the exception.
trace_backs – List of the trace backs cause In the same order as the requests that caused the exception.
- :param connections:List of connections used.
In the same order as the requests that caused the exception.
- exception spinnman.exceptions.SpinnmanIOException(problem: str)[source]¶
Bases:
SpinnmanExceptionAn exception that something went wrong with the underlying IO.
- Parameters:
problem – The problem with the IO
- exception spinnman.exceptions.SpinnmanInvalidPacketException(packet_type: str, problem: str)[source]¶
Bases:
SpinnmanExceptionAn exception that indicates that a packet was not in the expected format.
- Parameters:
packet_type – The type of packet expected
problem – The problem with the packet
- exception spinnman.exceptions.SpinnmanInvalidParameterException(parameter: str, value: T, problem: str)[source]¶
Bases:
SpinnmanException,Generic[T]An exception that indicates that the value of one of the parameters passed was invalid.
- Parameters:
parameter – The name of the parameter that is invalid
value – The value of the parameter that is invalid
problem – The problem with the parameter
- property value: T¶
The value that is invalid.
- exception spinnman.exceptions.SpinnmanInvalidParameterTypeException(parameter: str, param_type: str, problem: str)[source]¶
Bases:
SpinnmanExceptionAn exception that indicates that the type of one of the parameters passed was invalid.
- Parameters:
parameter – The name of the parameter that is invalid
param_type – The type of the parameter that is invalid
problem – The problem with the parameter
- exception spinnman.exceptions.SpinnmanTimeoutException(operation: T, timeout: float | None, msg: str | None = None)[source]¶
Bases:
SpinnmanException,Generic[T]An exception that indicates that a timeout occurred before an operation could finish.
- Parameters:
operation – The operation being performed
timeout – The timeout value in seconds
- property operation: T¶
The operation that was performed.
- exception spinnman.exceptions.SpinnmanUnexpectedResponseCodeException(operation: str, command: str, response: str | SCPResult)[source]¶
Bases:
SpinnmanExceptionIndicate that a response code returned from the board was unexpected for the current operation.
- Parameters:
operation – The operation being performed
command – The command being executed
response – The response received in error
- exception spinnman.exceptions.SpinnmanUnsupportedOperationException(operation: str)[source]¶
Bases:
SpinnmanExceptionAn exception that indicates that the given operation is not supported.
- Parameters:
operation – The operation being requested
spinnman.get_cores_in_run_state module¶
This is a script used to check the state of a SpiNNaker machine.
- spinnman.get_cores_in_run_state.get_cores_in_run_state(txrx: Transceiver, app_id: int, print_all_chips: bool) None[source]¶
Prints the state of all cores with this app id
- Parameters:
txrx – Transceiver to ask the state from
app_id – ID to affect the count but not the detail print out
print_all_chips – Flag to say all Chips should be listed before the states printout
Module contents¶
Used to communicate with a SpiNNaker Board. The main part of this package is
the Transceiver class. This can be used to
send and receive packets in various SpiNNaker formats, depending on what
connections are available.
Functional Requirements¶
Connect to and communicate with a machine using a number of different connections.
Boot a machine with the expected version of the software.
If the machine is already booted but the version is not the version expected, an exception will be thrown.
Check the version of the software which the machine is booted with.
Query the state of the machine to determine:
What the current state of the machine is in terms of the chips and cores available, the SDRAM available on the chips and which links are available between which chips.
What external links to the host exist (and separately add the discovered links to the set of links used to communicate with the machine).
What is running on the machine and where, and what the current status of those processes are.
How many cores are in a given state.
What is in the IOBUF buffers.
What the current routing entries for a given router are.
What the routing status counter values are.
Load application binaries on to the machine, either to individual cores or via a “flood-fill” mechanism to multiple cores simultaneously (which may be a subset of the cores on a subset of the chips).
Write data to SDRAM, either on an individual chip, or via a “flood-fill” mechanism to multiple chips simultaneously.
Send a signal to an application.
Read data from SDRAM on an individual chip.
Send and receive SpiNNaker packets where the connections allow this.
If no connection supports this packet type, an exception is thrown.
The user should be able to select which connection is used. Selection of a connection which does not support the traffic type will also result in an exception.
Send and receive SCP and SDP packets where the connections allow this.
If no connection supports the packet type, an exception is thrown.
The user should be able to select which connection is used. Selection of a connection which does not support the traffic type will also result in an exception.
It should be possible to call any of the functions simultaneously, including the same function more than once.
Where possible, multiple connections should be used to overlap calls.
The functions should not return until they have confirmed that any messages sent have been received, and any responses have been received.
Functions should not respond with the result of a different function.
Functions can further sub-divide the call into a number of separate calls that can be divided across the available connections, so long as the other requirements are met.
More than one machine can be connected to the same host.
Once the subset of connections has been worked out for each machine, the operation of these machines should be independent.
Use Cases¶
Connecting is done by using
create_transceiver_from_hostname().boot_board()andget_scamp_version()are used to ensure that the board is booted correctly before starting a simulation.get_machine_details()is used to get a representation of the current state of the machine, which is used to decide where executables are to be run on the board for a particular simulation, where any external peripherals are connected, and how messages between the executables and/or the external peripherals are to be routed.write_memory()andexecute()are used to write parameters and execute executables on the boardsend_signal()is used to send a signal which starts, stops or pauses a simulation.get_core_state_count()is used to determine if a simulation is complete or has gone into an error state.get_iobuf(),get_cpu_infos()andget_router_diagnostics()are used to diagnose a problem with a simulation.read_memory()is used to read some statistics recorded in SDRAM after a simulation.