spinnman.messages.scp.impl package

Submodules

spinnman.messages.scp.impl.scp_app_stop_request module

class spinnman.messages.scp.impl.scp_app_stop_request.SCPAppStopRequest(app_id)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to stop an application

Parameters:app_id (int) – The id of the application, between 0 and 255
get_scp_response()[source]

spinnman.messages.scp.impl.scp_application_run_request module

class spinnman.messages.scp.impl.scp_application_run_request.SCPApplicationRunRequest(app_id, x, y, processors, wait=False)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP request to run an application loaded on a chip

Parameters:
  • app_id (int) – The id of the application to run, between 16 and 255
  • x (int) – The x-coordinate of the chip to run on, between 0 and 255
  • y (int) – The y-coordinate of the chip to run on, between 0 and 255
  • processors (list of int) – The processors on the chip where the executable should be started, between 1 and 17
  • wait (bool) – True if the processors should enter a “wait” state on starting
get_scp_response()[source]

See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response()

spinnman.messages.scp.impl.scp_bmp_set_led_request module

SCPBMPSetLedRequest

class spinnman.messages.scp.impl.scp_bmp_set_led_request.SCPBMPSetLedRequest(led, action, boards)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_bmp_request.AbstractSCPBMPRequest

Set the led(s) of a board to either on, off or toggling

Parameters:
  • led (int or iterable of int) – Number of the LED or an iterable of LEDs to set the state of (0-7)
  • action (spinnman.messages.scp.scp_led_action.SCPLEDAction) – State to set the LED to, either on, off or toggle
  • boards (int or iterable of int) – Specifies the board to control the LEDs of. This may also be an iterable of multiple boards (in the same frame).
Return type:

None

get_scp_response()[source]

Get the response from the write fpga register request

spinnman.messages.scp.impl.scp_bmp_version_request module

SCPBMPVersionRequest

class spinnman.messages.scp.impl.scp_bmp_version_request.SCPBMPVersionRequest(board)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_bmp_request.AbstractSCPBMPRequest

An SCP request to read the version of software running on a core

Parameters:board (int) – The board to get the version from
Raises:spinnman.exceptions.SpinnmanInvalidParameterException
  • If the chip coordinates are out of range
  • If the processor is out of range
get_scp_response()[source]

See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response()

spinnman.messages.scp.impl.scp_check_ok_response module

class spinnman.messages.scp.impl.scp_check_ok_response.SCPCheckOKResponse(operation, command)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse

An SCP response to a request which returns nothing other than OK

Parameters:
  • operation (str) – The operation being performed
  • command (str) – The command that was sent
read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

spinnman.messages.scp.impl.scp_chip_info_request module

class spinnman.messages.scp.impl.scp_chip_info_request.SCPChipInfoRequest(x, y, with_size=False)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP request to read the chip information from a core

Parameters:
  • x (int) – The x-coordinate of the chip to read from, between 0 and 255
  • y (int) – The y-coordinate of the chip to read from, between 0 and 255
  • with_size (bool) – True if the size should be included in the response, False if not
get_scp_response()[source]

See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response()

spinnman.messages.scp.impl.scp_chip_info_response module

class spinnman.messages.scp.impl.scp_chip_info_response.SCPChipInfoResponse[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse

An SCP response to a request for the version of software running

chip_info

The chip information received

Return type:spinnman.model.chip_summary_info.ChipSummaryInfo
read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

spinnman.messages.scp.impl.scp_count_state_request module

class spinnman.messages.scp.impl.scp_count_state_request.SCPCountStateRequest(app_id, state)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to get a count of the cores in a particular state

Parameters:
  • app_id (int) – The id of the application, between 0 and 255
  • state (spinnman.model.cpu_state.CPUState) – The state to count
get_scp_response()[source]

spinnman.messages.scp.impl.scp_count_state_response module

class spinnman.messages.scp.impl.scp_count_state_response.SCPCountStateResponse[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse

An SCP response to a request for the number of cores in a given state

count

The count of the number of cores with the requested state

Return type:int
read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

spinnman.messages.scp.impl.scp_dpri_exit_request module

class spinnman.messages.scp.impl.scp_dpri_exit_request.SCPDPRIExitRequest(x, y, p)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to exit the dropped packet reinjection

Parameters:
  • x (int) – The x-coordinate of a chip, between 0 and 255
  • y (int) – The y-coordinate of a chip, between 0 and 255
  • p (int) – The processor running the dropped packet reinjector, between 0 and 17
get_scp_response()[source]

spinnman.messages.scp.impl.scp_dpri_get_status_request module

class spinnman.messages.scp.impl.scp_dpri_get_status_request.SCPDPRIGetStatusRequest(x, y, p)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to get the status of the dropped packet reinjection

Parameters:
  • x (int) – The x-coordinate of a chip, between 0 and 255
  • y (int) – The y-coordinate of a chip, between 0 and 255
  • p (int) – The processor running the dropped packet reinjector, between 0 and 17
get_scp_response()[source]

spinnman.messages.scp.impl.scp_dpri_get_status_response module

class spinnman.messages.scp.impl.scp_dpri_get_status_response.SCPDPRIGetStatusResponse[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse

An SCP response to a request for the dropped packet reinjection status

dpri_status
read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

spinnman.messages.scp.impl.scp_dpri_reset_counters_request module

class spinnman.messages.scp.impl.scp_dpri_reset_counters_request.SCPDPRIResetCountersRequest(x, y, p)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to reset the statistics counters of the dropped packet reinjection

Parameters:
  • x (int) – The x-coordinate of a chip, between 0 and 255
  • y (int) – The y-coordinate of a chip, between 0 and 255
  • p (int) – The processor running the dropped packet reinjector, between 0 and 17
get_scp_response()[source]

spinnman.messages.scp.impl.scp_dpri_set_reinjection_packet_types module

class spinnman.messages.scp.impl.scp_dpri_set_reinjection_packet_types.SCPDPRISetReinjectionPacketTypesRequest(x, y, p, packet_types)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to set the dropped packet reinjected packet types

Parameters:
  • x (int) – The x-coordinate of a chip, between 0 and 255
  • y (int) – The y-coordinate of a chip, between 0 and 255
  • p (int) – The processor running the dropped packet reinjector, between 0 and 17
  • packet_types (None or list of py:class:spinnman.messages.scp.scp_dpri_packet_type_flags.SCPDPRIPacketTypeFlags) – The types of packet to reinject - if empty or None reinjection is disabled
get_scp_response()[source]

spinnman.messages.scp.impl.scp_dpri_set_router_emergency_timeout_request module

class spinnman.messages.scp.impl.scp_dpri_set_router_emergency_timeout_request.SCPDPRISetRouterEmergencyTimeoutRequest(x, y, p, timeout_mantissa, timeout_exponent)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to set the router emergency timeout for dropped packet reinjection

Parameters:
  • x (int) – The x-coordinate of a chip, between 0 and 255
  • y (int) – The y-coordinate of a chip, between 0 and 255
  • p (int) – The processor running the dropped packet reinjector, between 0 and 17
  • timeout_mantissa (int) – The mantissa of the timeout value, between 0 and 15
  • timeout_exponent – The exponent of the timeout value, between 0 and 15
get_scp_response()[source]

spinnman.messages.scp.impl.scp_dpri_set_router_timeout_request module

class spinnman.messages.scp.impl.scp_dpri_set_router_timeout_request.SCPDPRISetRouterTimeoutRequest(x, y, p, timeout_mantissa, timeout_exponent)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to set the router timeout for dropped packet reinjection

Parameters:
  • x (int) – The x-coordinate of a chip, between 0 and 255
  • y (int) – The y-coordinate of a chip, between 0 and 255
  • p (int) – The processor running the dropped packet reinjector, between 0 and 17
  • timeout_mantissa (int) – The mantissa of the timeout value, between 0 and 15
  • timeout_exponent – The exponent of the timeout value, between 0 and 15
get_scp_response()[source]

spinnman.messages.scp.impl.scp_flood_fill_data_request module

class spinnman.messages.scp.impl.scp_flood_fill_data_request.SCPFloodFillDataRequest(nearest_neighbour_id, block_no, base_address, data, offset=0, length=None)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

A request to start a flood fill of data

Parameters:
  • nearest_neighbour_id (int) – The id of the packet, between 0 and 127
  • block_no (int) – Which block this block is, between 0 and 255
  • base_address (int) – The base address where the data is to be loaded
  • data (bytearray) – The data to load, between 4 and 256 bytes and the size must be divisible by 4
bytestring
get_scp_response()[source]

spinnman.messages.scp.impl.scp_flood_fill_end_request module

class spinnman.messages.scp.impl.scp_flood_fill_end_request.SCPFloodFillEndRequest(nearest_neighbour_id, app_id=0, processors=None, wait=False)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

A request to start a flood fill of data

Parameters:
  • nearest_neighbour_id (int) – The id of the packet, between 0 and 127
  • app_id (int) – The application id to start using the data, between 16 and 255. If not specified, no application is started
  • processors (iterable of int) – A list of processors on which to start the application, each between 1 and 17. If not specified, no application is started.
  • wait (bool) – True if the binary should go into a “wait” state before executing
get_scp_response()[source]

spinnman.messages.scp.impl.scp_flood_fill_start_request module

class spinnman.messages.scp.impl.scp_flood_fill_start_request.SCPFloodFillStartRequest(nearest_neighbour_id, n_blocks, x=None, y=None)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

A request to start a flood fill of data

Parameters:
  • nearest_neighbour_id (int) – The id of the packet, between 0 and 127
  • n_blocks (int) – The number of blocks of data that will be sent, between 0 and 255
  • x (int) – The x-coordindate of the chip to load the data on to. If not specified, the data will be loaded on to all chips
  • y (int) – The y-coordinate of the chip to load the data on to. If not specified, the data will be loaded on to all chips
get_scp_response()[source]

spinnman.messages.scp.impl.scp_iptag_clear_request module

class spinnman.messages.scp.impl.scp_iptag_clear_request.SCPIPTagClearRequest(x, y, tag)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to clear an IP Tag

Parameters:
  • x (int) – The x-coordinate of a chip, between 0 and 255
  • y (int) – The y-coordinate of a chip, between 0 and 255
  • tag (int) – The tag, between 0 and 7
get_scp_response()[source]

spinnman.messages.scp.impl.scp_iptag_get_request module

class spinnman.messages.scp.impl.scp_iptag_get_request.SCPTagGetRequest(x, y, tag)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to get an IP tag

Parameters:
  • x (int) – The x-coordinate of a chip, between 0 and 255
  • y (int) – The y-coordinate of a chip, between 0 and 255
  • tag (int) – The tag to get details of, between 0 and 7
  • tag – The tag, between 0 and 7
get_scp_response()[source]

spinnman.messages.scp.impl.scp_iptag_get_response module

class spinnman.messages.scp.impl.scp_iptag_get_response.SCPIPTagGetResponse[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse

An SCP response to a request for an IP tags

count

The count of the number of packets that have been sent with the tag

Return type:int
flags

The flags of the tag

Return type:int
in_use

True if the tag is marked as being in use

Return type:bool
ip_address

The IP address of the tag, as a bytearray of 4 bytes

Return type:bytearray
is_arp

True if the tag is in the ARP state (where the MAC address is being looked up - transient state so unlikely)

Return type:bool
is_reverse

True if the tag is a reverse tag

Return type:bool
is_temporary

True if the tag is temporary

Return type:bool
mac_address

The MAC address of the tag, as a bytearray of 6 bytes

Return type:bytearray
port

The port of the tag

Return type:int
read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

rx_port

The receive port of the tag

Return type:int
spin_chip_x

The x-coordinate of the chip on which the tag is defined

Return type:int
spin_chip_y

The y-coordinate of the chip on which the tag is defined

Return type:int
spin_cpu

The cpu id of the ip tag

Return type:int
spin_port

The spin-port of the ip tag

Return type:int
strip_sdp

True if the tag is to strip sdp

Return type:bool
timeout

The timeout of the tag

Return type:int

spinnman.messages.scp.impl.scp_iptag_info_request module

class spinnman.messages.scp.impl.scp_iptag_info_request.SCPTagInfoRequest(x, y)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request information about IP tags

Parameters:
  • x (int) – The x-coordinate of a chip, between 0 and 255
  • y (int) – The y-coordinate of a chip, between 0 and 255
get_scp_response()[source]

spinnman.messages.scp.impl.scp_iptag_info_response module

class spinnman.messages.scp.impl.scp_iptag_info_response.SCPIPTagInfoResponse[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse

An SCP response to a request for information about IP tags

fixed_size

The count of the number of fixed IP tag entries

Return type:int
pool_size

The count of the IP tag pool size

Return type:int
read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

transient_timeout

The timeout for transient IP tags (i.e. responses to SCP commands)

Return type:int

spinnman.messages.scp.impl.scp_iptag_set_request module

class spinnman.messages.scp.impl.scp_iptag_set_request.SCPIPTagSetRequest(x, y, host, port, tag, strip)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to set an IP Tag

Parameters:
  • x (int) – The x-coordinate of a chip, between 0 and 255
  • y (int) – The y-coordinate of a chip, between 0 and 255
  • host (bytearray) – The host address, as an array of 4 bytes
  • port (int) – The port, between 0 and 65535
  • tag (int) – The tag, between 0 and 7
  • strip (bool) – if the SDP header should be striped from the packet.
get_scp_response()[source]

spinnman.messages.scp.impl.scp_iptag_tto_request module

class spinnman.messages.scp.impl.scp_iptag_tto_request.SCPIPTagTTORequest(x, y, tag_timeout)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP request to set the transient timeout for future SCP requests

Parameters:
  • x (int) – The x-coordinate of the chip to run on, between 0 and 255
  • y (int) – The y-coordinate of the chip to run on, between 0 and 255
  • tag_timeout – The timeout value, via the IPTAG_TIME_OUT_WAIT_TIMES enum located in spinnman.constants
get_scp_response()[source]

See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response()

spinnman.messages.scp.impl.scp_led_request module

class spinnman.messages.scp.impl.scp_led_request.SCPLEDRequest(x, y, cpu, led_states)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

A request to change the state of an LED

Parameters:
  • x (int) – The x-coordinate of the chip, between 0 and 255
  • y (int) – The y-coordinate of the chip, between 0 and 255
  • cpu (int) – The CPU-number to use to set the LED.
  • led_states (dict) – A dictionary mapping LED index to state with 0 being off, 1 on and 2 inverted.
get_scp_response()[source]

See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response()

spinnman.messages.scp.impl.scp_power_request module

SCPPowerRequest

class spinnman.messages.scp.impl.scp_power_request.SCPPowerRequest(power_command, boards, delay=0.0)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_bmp_request.AbstractSCPBMPRequest

An SCP request for the BMP to power on or power off a rack of boards

Parameters:
  • power_command (spinnman.messages.scp.scp_power_command.SCPPowerCommand) – The power command being sent
  • boards (int or iterable of int) – The boards on the same backplane to power on or off
  • delay (int) – Number of seconds delay between power state changes of the different boards.
Return type:

None

get_scp_response()[source]

Get the response from the powering message

spinnman.messages.scp.impl.scp_read_adc_request module

ScpReadAdcRequest

class spinnman.messages.scp.impl.scp_read_adc_request.SCPReadADCRequest(board)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_bmp_request.AbstractSCPBMPRequest

SCP Request for the data from the BMP including voltages and temperature.

Parameters:board – which board to request the adc register from
Return type:None
get_scp_response()[source]

spinnman.messages.scp.impl.scp_read_adc_response module

class spinnman.messages.scp.impl.scp_read_adc_response.SCPReadADCResponse[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_bmp_reponse.AbstractSCPBMPResponse

An SCP response to a request for ADC information

adc_info

The ADC information

read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

spinnman.messages.scp.impl.scp_read_fpga_register_request module

SCPReadFPGARegisterRequest

class spinnman.messages.scp.impl.scp_read_fpga_register_request.SCPReadFPGARegisterRequest(fpga_num, register, board)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_bmp_request.AbstractSCPBMPRequest

Requests the data from a fpga’s register

sets up a read fpga register request

Parameters:
  • fpga_num – FPGA number (0, 1 or 2) to communicate with.
  • register – Register address to read to (will be rounded down to the nearest 32-bit word boundary).
  • board – which board to request the fpga register from
Return type:

None

get_scp_response()[source]

spinnman.messages.scp.impl.scp_read_fpga_register_response module

SCPReadFPGARegisterResponse

class spinnman.messages.scp.impl.scp_read_fpga_register_response.SCPReadFPGARegisterResponse[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_bmp_reponse.AbstractSCPBMPResponse

An SCP response to a request for the version of software running

fpga_register

The register information received

Return type:int
read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

spinnman.messages.scp.impl.scp_read_memory_request module

class spinnman.messages.scp.impl.scp_read_memory_request.SCPReadMemoryRequest(x, y, base_address, size, cpu=0)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP request to read a region of memory on a chip

Parameters:
  • x (int) – The x-coordinate of the chip to read from, between 0 and 255
  • y (int) – The y-coordinate of the chip to read from, between 0 and 255
  • base_address (int) – The positive base address to start the read from
  • size (int) – The number of bytes to read, between 1 and 256
Raises:

spinnman.exceptions.SpinnmanInvalidParameterException

  • If the chip coordinates are out of range
  • If the base address is not a positive number
  • If the size is out of range

get_scp_response()[source]

See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response()

spinnman.messages.scp.impl.scp_read_memory_response module

class spinnman.messages.scp.impl.scp_read_memory_response.SCPReadMemoryResponse[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse

An SCP response to a request to read a region of memory on a chip

data

The data read - note that the data starts at offset

Return type:bytearray
length

The length of the valid data

Return type:int
offset

The offset where the valid data starts

Return type:int
read_data_bytestring(data, offset)[source]

spinnman.messages.scp.impl.scp_reverse_iptag_set_request module

class spinnman.messages.scp.impl.scp_reverse_iptag_set_request.SCPReverseIPTagSetRequest(x, y, destination_x, destination_y, destination_p, port, tag, sdp_port)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to set an IP Tag

Parameters:
  • x (int) – The x-coordinate of a chip, between 0 and 255
  • y (int) – The y-coordinate of a chip, between 0 and 255
  • destination_x (int) – The x-coordinate of the destination chip, between 0 and 255
  • destination_y (int) – The y-coordinate of the destination chip, between 0 and 255
  • destination_p (int) – the id of the destination processor, between 0 and 17
  • port (int) – The port, between 0 and 65535
  • tag (int) – The tag, between 0 and 7
get_scp_response()[source]

spinnman.messages.scp.impl.scp_router_alloc_request module

class spinnman.messages.scp.impl.scp_router_alloc_request.SCPRouterAllocRequest(x, y, app_id, n_entries)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to allocate space for routing entries

Parameters:
  • x (int) – The x-coordinate of the chip to allocate on, between 0 and 255
  • y (int) – The y-coordinate of the chip to allocate on, between 0 and 255
  • app_id (int) – The id of the application, between 0 and 255
  • n_entries (int) – The number of entries to allocate
get_scp_response()[source]

spinnman.messages.scp.impl.scp_router_alloc_response module

class spinnman.messages.scp.impl.scp_router_alloc_response.SCPRouterAllocResponse[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse

An SCP response to a request to allocate router entries

base_address

The base address allocated, or 0 if none

Return type:int
read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

spinnman.messages.scp.impl.scp_router_clear_request module

class spinnman.messages.scp.impl.scp_router_clear_request.SCPRouterClearRequest(x, y)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

A request to clear the router on 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
Raises:

spinnman.exceptions.SpinnmanInvalidParameterException

  • If x is out of range
  • If y is out of range

get_scp_response()[source]

spinnman.messages.scp.impl.scp_router_init_request module

class spinnman.messages.scp.impl.scp_router_init_request.SCPRouterInitRequest(x, y, n_entries, table_address, base_address, app_id)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

A request to initialize the router on 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
  • n_entries (int) – The number of entries in the table, more than 0
  • table_address (int) – The allocated table address
  • base_address (int) – The base_address containing the entries
  • app_id (int) – The id of the application with which to associate the routes. If not specified, defaults to 0.
Raises:

spinnman.exceptions.SpinnmanInvalidParameterException

  • If x is out of range
  • If y is out of range
  • If n_entries is 0 or less
  • If table_address is not positive
  • If base_address is not positive

get_scp_response()[source]

spinnman.messages.scp.impl.scp_sdram_alloc_request module

class spinnman.messages.scp.impl.scp_sdram_alloc_request.SCPSDRAMAllocRequest(x, y, app_id, size, tag=None)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to allocate space in the SDRAM space

Parameters:
  • x (int) – The x-coordinate of the chip to allocate on, between 0 and 255
  • y (int) – The y-coordinate of the chip to allocate on, between 0 and 255
  • app_id (int) – The id of the application, between 0 and 255
  • size (int) – The size in bytes of memory to be allocated
  • tag (int) – the tag for the SDRAM, a 8-bit (chip-wide) tag that can be looked up by a SpiNNaker application to discover the address of the allocated block. If 0 then no tag is applied.
get_scp_response()[source]

spinnman.messages.scp.impl.scp_sdram_alloc_response module

class spinnman.messages.scp.impl.scp_sdram_alloc_response.SCPSDRAMAllocResponse(size)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse

An SCP response to a request to allocate space in SDRAM

base_address

The base address allocated, or 0 if none

Return type:int
read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

spinnman.messages.scp.impl.scp_sdram_de_alloc_request module

class spinnman.messages.scp.impl.scp_sdram_de_alloc_request.SCPSDRAMDeAllocRequest(x, y, app_id, base_address=None)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to free space in the SDRAM

Parameters:
  • x (int) – The x-coordinate of the chip to allocate on, between 0 and 255
  • y (int) – The y-coordinate of the chip to allocate on, between 0 and 255
  • app_id (int) – The id of the application, between 0 and 255
  • base_address (int or None) – The start address in SDRAM to which the block needs to be deallocated, or none if deallocating via app_id
get_scp_response()[source]

spinnman.messages.scp.impl.scp_sdram_de_alloc_response module

class spinnman.messages.scp.impl.scp_sdram_de_alloc_response.SCPSDRAMDeAllocResponse[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse

An SCP response to a request to deallocate SDRAM

number_of_blocks_freed

The number of allocated blocks that have been freed from the app_id given

Return type:int
read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

spinnman.messages.scp.impl.scp_send_signal_request module

class spinnman.messages.scp.impl.scp_send_signal_request.SCPSendSignalRequest(app_id, signal)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP Request to send a signal to cores

Parameters:
  • app_id (int) – The id of the application, between 0 and 255
  • signal (spinnman.messages.scp.scp_signal.SCPSignal) – The signal to send
Raises:

spinnman.exceptions.SpinnmanInvalidParameterException – If app_id is out of range

get_scp_response()[source]

spinnman.messages.scp.impl.scp_version_request module

class spinnman.messages.scp.impl.scp_version_request.SCPVersionRequest(x, y, p)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

An SCP request to read the version of software running on a core

Parameters:
  • x (int) – The x-coordinate of the chip to read from, between 0 and 255
  • y (int) – The y-coordinate of the chip to read from, between 0 and 255
  • p (int) – The id of the processor to read the version from, between 0 and 31
Raises:

spinnman.exceptions.SpinnmanInvalidParameterException

  • If the chip coordinates are out of range
  • If the processor is out of range

get_scp_response()[source]

See spinnman.messages.scp.abstract_scp_request.AbstractSCPRequest.get_scp_response()

spinnman.messages.scp.impl.scp_version_response module

class spinnman.messages.scp.impl.scp_version_response.SCPVersionResponse[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_response.AbstractSCPResponse

An SCP response to a request for the version of software running

read_data_bytestring(data, offset)[source]

See spinnman.messages.scp.abstract_scp_response.AbstractSCPResponse.read_data_bytestring()

version_info

The version information received

Return type:spinnman.model.version_info.VersionInfo

spinnman.messages.scp.impl.scp_write_fpga_register_request module

ScpWriteFPGARegisterRequest

class spinnman.messages.scp.impl.scp_write_fpga_register_request.SCPWriteFPGARegisterRequest(fpga_num, addr, value, board)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_bmp_request.AbstractSCPBMPRequest

A request for writing data to a FPGA register

Write the value of an FPGA (SPI) register.

See the SpI/O project’s spinnaker_fpga design’s README for a listing of FPGA registers. The SpI/O project can be found on GitHub at: https://github.com/SpiNNakerManchester/spio/

Parameters:
  • fpga_num (int) – FPGA number (0, 1 or 2) to communicate with.
  • addr (int) – Register address to read or write to (will be rounded down to the nearest 32-bit word boundary).
  • value (int) – A 32-bit int value to write to the register
get_scp_response()[source]
Return type:SCPCheckOKResponse

spinnman.messages.scp.impl.scp_write_memory_request module

class spinnman.messages.scp.impl.scp_write_memory_request.SCPWriteMemoryRequest(x, y, base_address, data, cpu=0)[source]

Bases: spinnman.messages.scp.abstract_messages.abstract_scp_request.AbstractSCPRequest

A request to write memory on 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
  • base_address (int) – The base_address to start writing to the base address is not checked to see if its not valid
  • data (bytearray or string) – between 1 and 256 bytes of data to write this is not checked due to speed restrictions
bytestring
get_scp_response()[source]

Module contents