spinnman.processes package¶
Submodules¶
spinnman.processes.abstract_multi_connection_process module¶
-
class
spinnman.processes.abstract_multi_connection_process.
AbstractMultiConnectionProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_process.AbstractProcess
A process that uses multiple connections in communication.
spinnman.processes.abstract_multi_connection_process_connection_selector module¶
spinnman.processes.abstract_process module¶
spinnman.processes.abstract_single_connection_process module¶
-
class
spinnman.processes.abstract_single_connection_process.
AbstractSingleConnectionProcess
(connection_selector, n_retries=10)[source]¶ Bases:
spinnman.processes.abstract_process.AbstractProcess
A process that uses a single connection in communication.
spinnman.processes.application_run_process module¶
-
class
spinnman.processes.application_run_process.
ApplicationRunProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
spinnman.processes.de_alloc_sdram_process module¶
spinnman.processes.fill_process module¶
-
class
spinnman.processes.fill_process.
FillDataType
(value, struct_type, doc='')[source]¶ Bases:
enum.Enum
An enumeration.
-
BYTE
= 1¶
-
HALF_WORD
= 2¶
-
WORD
= 4¶
-
struct
¶ An object that can pack and unpack 4 bytes-worth of this type.
Return type: struct.Struct
-
struct_type
¶ The struct descriptor for packing and unpacking 4 bytes-worth of this type.
Return type: str
-
-
class
spinnman.processes.fill_process.
FillProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for filling memory.
spinnman.processes.get_cpu_info_process module¶
spinnman.processes.get_heap_process module¶
-
class
spinnman.processes.get_heap_process.
GetHeapProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
spinnman.processes.get_machine_process module¶
-
class
spinnman.processes.get_machine_process.
GetMachineProcess
(connection_selector, ignore_chips, ignore_cores, ignore_links, max_core_id, max_sdram_size=None)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for getting the machine details over a set of connections.
-
get_chip_info
()[source]¶ Get the chip information for the machine.
Note
get_machine_details()
must have been called first.
-
spinnman.processes.get_routes_process module¶
-
class
spinnman.processes.get_routes_process.
GetMultiCastRoutesProcess
(connection_selector, app_id=None)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for reading the multicast routing table of a SpiNNaker chip.
spinnman.processes.get_tags_process module¶
spinnman.processes.get_version_process module¶
-
class
spinnman.processes.get_version_process.
GetVersionProcess
(connection_selector, n_retries=10)[source]¶ Bases:
spinnman.processes.abstract_single_connection_process.AbstractSingleConnectionProcess
A process for getting the version of the machine.
spinnman.processes.load_fixed_route_routing_entry_process module¶
-
class
spinnman.processes.load_fixed_route_routing_entry_process.
LoadFixedRouteRoutingEntryProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
-
load_fixed_route
(x, y, fixed_route, app_id=0)[source]¶ Load a fixed route routing entry onto a chip.
Parameters: - x (int) – The x-coordinate of the chip, between 0 and 255; this is not checked due to speed restrictions.
- y (int) – The y-coordinate of the chip, between 0 and 255; this is not checked due to speed restrictions.
- fixed_route – the fixed route entry
- app_id (int) – The ID of the application with which to associate the routes. If not specified, defaults to 0.
Return type: None
-
spinnman.processes.load_routes_process module¶
-
class
spinnman.processes.load_routes_process.
LoadMultiCastRoutesProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for loading the multicast routing table on a SpiNNaker chip.
spinnman.processes.malloc_sdram_process module¶
-
class
spinnman.processes.malloc_sdram_process.
MallocSDRAMProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for allocating a block of SDRAM on a SpiNNaker chip.
-
base_address
¶
-
spinnman.processes.most_direct_connection_selector module¶
-
class
spinnman.processes.most_direct_connection_selector.
MostDirectConnectionSelector
(machine, connections)[source]¶ -
A selector that goes for the most direct connection for the message.
Parameters: connections – The connections to be used
spinnman.processes.read_fixed_route_routing_entry_process module¶
-
class
spinnman.processes.read_fixed_route_routing_entry_process.
ReadFixedRouteRoutingEntryProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for reading a chip’s fixed route routing entry.
Creates the process for writing a fixed route entry to a chip’s router.
Parameters: connection_selector – the SC&MP connection selector -
read_fixed_route
(x, y, app_id=0)[source]¶ Reads a fixed route routing table entry.
Parameters: - x (int) – The x-coordinate of the chip, between 0 and 255; this is not checked due to speed restrictions
- y (int) – The y-coordinate of the chip, between 0 and 255; this is not checked due to speed restrictions
- app_id (int) – The ID of the application with which to associate the routes. If not specified, defaults to 0.
Return type: None
-
spinnman.processes.read_iobuf_process module¶
-
class
spinnman.processes.read_iobuf_process.
ReadIOBufProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for reading IOBUF memory (mostly log messages) from a SpiNNaker core.
spinnman.processes.read_memory_process module¶
-
class
spinnman.processes.read_memory_process.
ReadMemoryProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for reading memory on a SpiNNaker chip.
spinnman.processes.read_router_diagnostics_process module¶
-
class
spinnman.processes.read_router_diagnostics_process.
ReadRouterDiagnosticsProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for reading the diagnostic data block from a SpiNNaker router.
spinnman.processes.round_robin_connection_selector module¶
spinnman.processes.send_single_command_process module¶
spinnman.processes.write_memory_flood_process module¶
-
class
spinnman.processes.write_memory_flood_process.
WriteMemoryFloodProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for writing memory on multiple SpiNNaker chips at once.
spinnman.processes.write_memory_process module¶
-
class
spinnman.processes.write_memory_process.
WriteMemoryProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for writing memory on a SpiNNaker chip.
-
write_memory_from_bytearray
(x, y, p, base_address, data, offset, n_bytes)[source]¶ Writes memory onto a SpiNNaker chip from a bytearray.
Parameters: - x – The x-coordinate of the chip where the memory is to be written to
- y – The y-coordinate of the chip where the memory is to be written to
- p – The processor of the chip where the memory is to be written to
- processor_address – the (x, y, p) coords of the chip in question
- base_address – the address in SDRAM to start writing
- data (bytearray or bytes) – the data to write
- offset – where in the data to start writing from
- n_bytes – how much data to write
Return type: None
-
write_memory_from_reader
(x, y, p, base_address, reader, n_bytes)[source]¶ Writes memory onto a SpiNNaker chip from a reader.
Parameters: - x – The x-coordinate of the chip where the memory is to be written to
- y – The y-coordinate of the chip where the memory is to be written to
- p – The processor of the chip where the memory is to be written to
- base_address – the address in SDRAM to start writing
- reader (
io.RawIOBase
orio.BufferedIOBase
) – the readable object containing the data to write - n_bytes – how much data to write
Return type: None
-
Module contents¶
-
class
spinnman.processes.
AbstractMultiConnectionProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_process.AbstractProcess
A process that uses multiple connections in communication.
-
class
spinnman.processes.
ApplicationRunProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
-
class
spinnman.processes.
DeAllocSDRAMProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
-
no_blocks_freed
¶
-
-
class
spinnman.processes.
GetCPUInfoProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
-
class
spinnman.processes.
GetHeapProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
-
class
spinnman.processes.
GetMachineProcess
(connection_selector, ignore_chips, ignore_cores, ignore_links, max_core_id, max_sdram_size=None)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for getting the machine details over a set of connections.
-
get_chip_info
()[source]¶ Get the chip information for the machine.
Note
get_machine_details()
must have been called first.
-
-
class
spinnman.processes.
GetMultiCastRoutesProcess
(connection_selector, app_id=None)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for reading the multicast routing table of a SpiNNaker chip.
-
class
spinnman.processes.
GetTagsProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
-
class
spinnman.processes.
GetVersionProcess
(connection_selector, n_retries=10)[source]¶ Bases:
spinnman.processes.abstract_single_connection_process.AbstractSingleConnectionProcess
A process for getting the version of the machine.
-
class
spinnman.processes.
FillDataType
(value, struct_type, doc='')[source]¶ Bases:
enum.Enum
An enumeration.
-
BYTE
= 1¶
-
HALF_WORD
= 2¶
-
WORD
= 4¶
-
struct
¶ An object that can pack and unpack 4 bytes-worth of this type.
Return type: struct.Struct
-
struct_type
¶ The struct descriptor for packing and unpacking 4 bytes-worth of this type.
Return type: str
-
-
class
spinnman.processes.
FillProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for filling memory.
-
class
spinnman.processes.
LoadFixedRouteRoutingEntryProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
-
load_fixed_route
(x, y, fixed_route, app_id=0)[source]¶ Load a fixed route routing entry onto a chip.
Parameters: - x (int) – The x-coordinate of the chip, between 0 and 255; this is not checked due to speed restrictions.
- y (int) – The y-coordinate of the chip, between 0 and 255; this is not checked due to speed restrictions.
- fixed_route – the fixed route entry
- app_id (int) – The ID of the application with which to associate the routes. If not specified, defaults to 0.
Return type: None
-
-
class
spinnman.processes.
LoadMultiCastRoutesProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for loading the multicast routing table on a SpiNNaker chip.
-
class
spinnman.processes.
MallocSDRAMProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for allocating a block of SDRAM on a SpiNNaker chip.
-
base_address
¶
-
-
class
spinnman.processes.
MostDirectConnectionSelector
(machine, connections)[source]¶ -
A selector that goes for the most direct connection for the message.
Parameters: connections – The connections to be used
-
class
spinnman.processes.
ReadFixedRouteRoutingEntryProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for reading a chip’s fixed route routing entry.
Creates the process for writing a fixed route entry to a chip’s router.
Parameters: connection_selector – the SC&MP connection selector -
read_fixed_route
(x, y, app_id=0)[source]¶ Reads a fixed route routing table entry.
Parameters: - x (int) – The x-coordinate of the chip, between 0 and 255; this is not checked due to speed restrictions
- y (int) – The y-coordinate of the chip, between 0 and 255; this is not checked due to speed restrictions
- app_id (int) – The ID of the application with which to associate the routes. If not specified, defaults to 0.
Return type: None
-
-
class
spinnman.processes.
ReadIOBufProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for reading IOBUF memory (mostly log messages) from a SpiNNaker core.
-
class
spinnman.processes.
ReadMemoryProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for reading memory on a SpiNNaker chip.
-
class
spinnman.processes.
ReadRouterDiagnosticsProcess
(connection_selector)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for reading the diagnostic data block from a SpiNNaker router.
-
class
spinnman.processes.
RoundRobinConnectionSelector
(connections)[source]¶ -
Parameters: connections – The connections to be used
-
class
spinnman.processes.
SendSingleCommandProcess
(connection_selector, n_retries=3, timeout=1.0)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
-
class
spinnman.processes.
WriteMemoryFloodProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for writing memory on multiple SpiNNaker chips at once.
-
class
spinnman.processes.
WriteMemoryProcess
(next_connection_selector, n_retries=10, timeout=1.0, n_channels=8, intermediate_channel_waits=7)[source]¶ Bases:
spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess
A process for writing memory on a SpiNNaker chip.
-
write_memory_from_bytearray
(x, y, p, base_address, data, offset, n_bytes)[source]¶ Writes memory onto a SpiNNaker chip from a bytearray.
Parameters: - x – The x-coordinate of the chip where the memory is to be written to
- y – The y-coordinate of the chip where the memory is to be written to
- p – The processor of the chip where the memory is to be written to
- processor_address – the (x, y, p) coords of the chip in question
- base_address – the address in SDRAM to start writing
- data (bytearray or bytes) – the data to write
- offset – where in the data to start writing from
- n_bytes – how much data to write
Return type: None
-
write_memory_from_reader
(x, y, p, base_address, reader, n_bytes)[source]¶ Writes memory onto a SpiNNaker chip from a reader.
Parameters: - x – The x-coordinate of the chip where the memory is to be written to
- y – The y-coordinate of the chip where the memory is to be written to
- p – The processor of the chip where the memory is to be written to
- base_address – the address in SDRAM to start writing
- reader (
io.RawIOBase
orio.BufferedIOBase
) – the readable object containing the data to write - n_bytes – how much data to write
Return type: None
-