spinnman.processes package

Submodules

spinnman.processes.abstract_multi_connection_process module

class spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess(next_connection_selector, n_retries=3, timeout=0.5, 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

class spinnman.processes.abstract_multi_connection_process_connection_selector.AbstractMultiConnectionProcessConnectionSelector(connections)[source]

Bases: object

A connection selector for multi-connection processes

Parameters:connections – The connections to be used
get_next_connection(message)[source]

Get the index of the next connection for the process from a list of connections

Parameters:message – The SCP message to be sent
Return type:int

spinnman.processes.abstract_process module

class spinnman.processes.abstract_process.AbstractProcess[source]

Bases: object

An abstract process for talking to SpiNNaker efficiently

check_for_error(print_exception=False)[source]
is_error()[source]

spinnman.processes.abstract_single_connection_process module

class spinnman.processes.abstract_single_connection_process.AbstractSingleConnectionProcess(connection_selector)[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(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

run(app_id, core_subsets, wait)[source]

spinnman.processes.de_alloc_sdram_process module

class spinnman.processes.de_alloc_sdram_process.DeAllocSDRAMProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

de_alloc_sdram(x, y, app_id, base_address=None)[source]
handle_sdram_alloc_response(response)[source]
no_blocks_freed

spinnman.processes.fill_process module

class spinnman.processes.fill_process.FillDataType(value, struct_type, doc='')[source]

Bases: enum.Enum

BYTE = 1
HALF_WORD = 2
WORD = 4
struct_type
class spinnman.processes.fill_process.FillProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

A process for filling memory

fill_memory(x, y, base_address, data, size, data_type)[source]

spinnman.processes.get_cpu_info_process module

class spinnman.processes.get_cpu_info_process.GetCPUInfoProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

get_cpu_info(core_subsets)[source]
handle_read_vcpu_offset(x, y, response)[source]
handle_response(x, y, p, response)[source]

spinnman.processes.get_heap_process module

class spinnman.processes.get_heap_process.GetHeapProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

get_heap(x, y, pointer=<SystemVariableDefinition.sdram_heap_address: _Definition(offset=76, data_type=<_DataType.INT: 4>, default=0, array_size=None, doc='The base address of the user SDRAM heap')>)[source]

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 that get_machine_details must have been called first

get_machine_details(boot_x, boot_y, width, height)[source]

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

get_routes(x, y, base_address)[source]
handle_read_response(offset, response)[source]

spinnman.processes.get_tags_process module

class spinnman.processes.get_tags_process.GetTagsProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

get_tags(connection)[source]
handle_get_tag_response(tag, board_address, response)[source]
handle_tag_info_response(response)[source]

spinnman.processes.get_version_process module

class spinnman.processes.get_version_process.GetVersionProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_single_connection_process.AbstractSingleConnectionProcess

A process for getting the version of the machine

get_version(x, y, p)[source]

spinnman.processes.load_fixed_route_routing_entry_process module

class spinnman.processes.load_fixed_route_routing_entry_process.LoadFixedRouteRoutingEntryProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

creates the process for writing a fixed route entry to a chips router

Parameters:connection_selector – the scamp connection selector
load_fixed_route(x, y, fixed_route, app_id)[source]

loads 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

handle_router_alloc_response(response)[source]
load_routes(x, y, routes, app_id)[source]

spinnman.processes.malloc_sdram_process module

class spinnman.processes.malloc_sdram_process.MallocSDRAMProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

base_address
handle_sdram_alloc_response(response)[source]
malloc_sdram(x, y, size, app_id, tag)[source]

spinnman.processes.most_direct_connection_selector module

class spinnman.processes.most_direct_connection_selector.MostDirectConnectionSelector(machine, connections)[source]

Bases: spinnman.processes.abstract_multi_connection_process_connection_selector.AbstractMultiConnectionProcessConnectionSelector

MostDirectConnectionSelector: selector that goes for the most direct connection for the message

get_next_connection(message)[source]
set_machine(new_machine)[source]

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

supports reading of a chips fixed route routing entry

creates the process for writing a fixed route entry to a chips router

Parameters:connection_selector – the scamp connection selector
handle_read_response(response)[source]
read_fixed_route(x, y, app_id)[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 memory

handle_extra_iobuf_response(x, y, p, n, offset, response)[source]
handle_first_iobuf_response(x, y, p, n, base_address, first_read_size, response)[source]
handle_iobuf_address_response(iobuf_size, x, y, p, response)[source]
read_iobuf(iobuf_size, core_subsets)[source]

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

handle_response(offset, response)[source]
read_memory(x, y, p, base_address, length)[source]

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

get_router_diagnostics(x, y)[source]
handle_control_register_response(response)[source]
handle_error_status_response(response)[source]
handle_register_response(response)[source]

spinnman.processes.round_robin_connection_selector module

class spinnman.processes.round_robin_connection_selector.RoundRobinConnectionSelector(connections)[source]

Bases: spinnman.processes.abstract_multi_connection_process_connection_selector.AbstractMultiConnectionProcessConnectionSelector

RoundRobinConnectionSelector: selector

get_next_connection(message)[source]

spinnman.processes.send_single_command_process module

class spinnman.processes.send_single_command_process.SendSingleCommandProcess(connection_selector, n_retries=3, timeout=0.5)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

execute(request)[source]
handle_response(response)[source]

spinnman.processes.write_memory_flood_process module

class spinnman.processes.write_memory_flood_process.WriteMemoryFloodProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

A process for writing memory

write_memory_from_bytearray(nearest_neighbour_id, base_address, data, offset, n_bytes)[source]
write_memory_from_reader(nearest_neighbour_id, base_address, data, n_bytes)[source]

spinnman.processes.write_memory_process module

class spinnman.processes.write_memory_process.WriteMemoryProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

A process for writing memory

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 coord of the chip in question
  • y – the y coord of the chip in question
  • p – the p coord of the chip in question
  • base_address – the address in sdram to start writing
  • data – 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, data, n_bytes)[source]

Module contents

class spinnman.processes.AbstractMultiConnectionProcess(next_connection_selector, n_retries=3, timeout=0.5, 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(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

run(app_id, core_subsets, wait)[source]
class spinnman.processes.DeAllocSDRAMProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

de_alloc_sdram(x, y, app_id, base_address=None)[source]
handle_sdram_alloc_response(response)[source]
no_blocks_freed
class spinnman.processes.GetCPUInfoProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

get_cpu_info(core_subsets)[source]
handle_read_vcpu_offset(x, y, response)[source]
handle_response(x, y, p, response)[source]
class spinnman.processes.GetHeapProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

get_heap(x, y, pointer=<SystemVariableDefinition.sdram_heap_address: _Definition(offset=76, data_type=<_DataType.INT: 4>, default=0, array_size=None, doc='The base address of the user SDRAM heap')>)[source]
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 that get_machine_details must have been called first

get_machine_details(boot_x, boot_y, width, height)[source]
class spinnman.processes.GetMultiCastRoutesProcess(connection_selector, app_id=None)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

get_routes(x, y, base_address)[source]
handle_read_response(offset, response)[source]
class spinnman.processes.GetTagsProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

get_tags(connection)[source]
handle_get_tag_response(tag, board_address, response)[source]
handle_tag_info_response(response)[source]
class spinnman.processes.GetVersionProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_single_connection_process.AbstractSingleConnectionProcess

A process for getting the version of the machine

get_version(x, y, p)[source]
class spinnman.processes.FillProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

A process for filling memory

fill_memory(x, y, base_address, data, size, data_type)[source]
class spinnman.processes.FillDataType(value, struct_type, doc='')[source]

Bases: enum.Enum

BYTE = 1
HALF_WORD = 2
WORD = 4
struct_type
class spinnman.processes.LoadMultiCastRoutesProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

handle_router_alloc_response(response)[source]
load_routes(x, y, routes, app_id)[source]
class spinnman.processes.MallocSDRAMProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

base_address
handle_sdram_alloc_response(response)[source]
malloc_sdram(x, y, size, app_id, tag)[source]
class spinnman.processes.MostDirectConnectionSelector(machine, connections)[source]

Bases: spinnman.processes.abstract_multi_connection_process_connection_selector.AbstractMultiConnectionProcessConnectionSelector

MostDirectConnectionSelector: selector that goes for the most direct connection for the message

get_next_connection(message)[source]
set_machine(new_machine)[source]
class spinnman.processes.ReadIOBufProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

A process for reading memory

handle_extra_iobuf_response(x, y, p, n, offset, response)[source]
handle_first_iobuf_response(x, y, p, n, base_address, first_read_size, response)[source]
handle_iobuf_address_response(iobuf_size, x, y, p, response)[source]
read_iobuf(iobuf_size, core_subsets)[source]
class spinnman.processes.ReadMemoryProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

A process for reading memory

handle_response(offset, response)[source]
read_memory(x, y, p, base_address, length)[source]
class spinnman.processes.ReadRouterDiagnosticsProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

get_router_diagnostics(x, y)[source]
handle_control_register_response(response)[source]
handle_error_status_response(response)[source]
handle_register_response(response)[source]
class spinnman.processes.RoundRobinConnectionSelector(connections)[source]

Bases: spinnman.processes.abstract_multi_connection_process_connection_selector.AbstractMultiConnectionProcessConnectionSelector

RoundRobinConnectionSelector: selector

get_next_connection(message)[source]
class spinnman.processes.SendSingleCommandProcess(connection_selector, n_retries=3, timeout=0.5)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

execute(request)[source]
handle_response(response)[source]
class spinnman.processes.WriteMemoryFloodProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

A process for writing memory

write_memory_from_bytearray(nearest_neighbour_id, base_address, data, offset, n_bytes)[source]
write_memory_from_reader(nearest_neighbour_id, base_address, data, n_bytes)[source]
class spinnman.processes.WriteMemoryProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

A process for writing memory

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 coord of the chip in question
  • y – the y coord of the chip in question
  • p – the p coord of the chip in question
  • base_address – the address in sdram to start writing
  • data – 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, data, n_bytes)[source]
class spinnman.processes.ReadFixedRouteRoutingEntryProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

supports reading of a chips fixed route routing entry

creates the process for writing a fixed route entry to a chips router

Parameters:connection_selector – the scamp connection selector
handle_read_response(response)[source]
read_fixed_route(x, y, app_id)[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.LoadFixedRouteRoutingEntryProcess(connection_selector)[source]

Bases: spinnman.processes.abstract_multi_connection_process.AbstractMultiConnectionProcess

creates the process for writing a fixed route entry to a chips router

Parameters:connection_selector – the scamp connection selector
load_fixed_route(x, y, fixed_route, app_id)[source]

loads 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