spinnman.messages.scp.impl package¶
Submodules¶
spinnman.messages.scp.impl.count_state_response module¶
- class spinnman.messages.scp.impl.count_state_response.CountStateResponse[source]¶
Bases:
AbstractSCPResponse
An SCP response to a request for the number of cores in a given state.
spinnman.messages.scp.impl.get_chip_info_response module¶
- class spinnman.messages.scp.impl.get_chip_info_response.GetChipInfoResponse[source]¶
Bases:
AbstractSCPResponse
An SCP response to a request for the version of software running.
- property chip_info: ChipSummaryInfo¶
The chip information received.
- Return type:
spinnman.messages.scp.impl.get_version_response module¶
- class spinnman.messages.scp.impl.get_version_response.GetVersionResponse[source]¶
Bases:
AbstractSCPResponse
An SCP response to a request for the version of software running.
- read_data_bytestring(data: bytes, offset: int) None [source]¶
Reads the remainder of the data following the header.
- property version_info: VersionInfo | None¶
The version information received.
- Return type:
spinnman.messages.scp.impl.iptag_get_info_response module¶
Module contents¶
- class spinnman.messages.scp.impl.AppCopyRun(x: int, y: int, link: int, size: int, app_id: int, processors: Iterable[int] | None, checksum: int, wait: bool = False)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]An SCP request to copy an application and start it.
- 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
link (int) – The ID of the link from which to copy
size (int) – The number of bytes to read, must be divisible by 4
app_id (int) – The app to associate the copied binary with
processors (list(int)) – The processors to start on the chip
checksum (int) – The checksum of the data to copy
wait (bool) – Whether to start in wait mode or not
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.AppStop(app_id: int)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]An SCP Request to stop an application.
- Parameters:
app_id (int) – The ID of the application, between 0 and 255
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.ApplicationRun(app_id: int, x: int, y: int, processors: Iterable[int] | None, wait: bool = False)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]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(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() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.BMPGetVersion(board: int)¶
Bases:
BMPRequest
[_BMPVersion
]An SCP request to read the version of software running on a core.
- Parameters:
board (int) – The board to get the version from
- Raises:
SpinnmanInvalidParameterException –
If the chip coordinates are out of range
If the processor is out of range
- class spinnman.messages.scp.impl.CheckOKResponse(operation: str, command: Enum | int | str)¶
Bases:
AbstractSCPResponse
An SCP response to a request which returns nothing other than OK.
- Parameters:
- class spinnman.messages.scp.impl.CountState(x: int, y: int, app_id: int, state: CPUState)¶
Bases:
AbstractSCPRequest
[CountStateResponse
]An SCP Request to get a count of the cores in a particular state.
- Parameters:
- get_scp_response() CountStateResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.DoSync(do_sync: bool)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]An SCP Request to control synchronisation.
- Parameters:
do_sync (bool) – Whether to synchronise or not
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.FillRequest(x: int, y: int, base_address: int, data: int, size: int)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]An SCP request to fill a region of memory on a chip with repeated data
- 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 fill from
data (int) – The data to fill in the space with
size (int) – The number of bytes to fill in
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.FixedRouteInit(x: int, y: int, entry: int, app_id: int = 0)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]Sets a fixed route 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
entry (int) – the fixed route entry converted for writing
app_id (int) – The ID of the application with which to associate the routes. If not specified, defaults to 0.
- Raises:
SpinnmanInvalidParameterException –
If x is out of range
If y is out of range
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.FixedRouteRead(x: int, y: int, app_id: int)¶
Bases:
AbstractSCPRequest
[_FixedRouteResponse
]Gets a fixed route 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.
- Raises:
SpinnmanInvalidParameterException –
If x is out of range
If y is out of range
- class spinnman.messages.scp.impl.FloodFillData(nearest_neighbour_id: int, block_no: int, base_address: int, data: bytes, offset: int = 0, length: int | None = None)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]A request to start a flood fill of data.
- Parameters:
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.FloodFillEnd(nearest_neighbour_id: int, app_id: int = 0, processors: Iterable[int] | None = None, wait: bool = False)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]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 (list(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() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.FloodFillStart(nearest_neighbour_id: int, n_blocks: int, x: int | None = None, y: int | None = None)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]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-coordinate 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() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.GetChipInfo(x: int, y: int, with_size: bool = False)¶
Bases:
AbstractSCPRequest
[GetChipInfoResponse
]An SCP request to read the chip information from a core.
- Parameters:
- get_scp_response() GetChipInfoResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.GetVersion(x: int, y: int, p: int)¶
Bases:
AbstractSCPRequest
[GetVersionResponse
]An SCP request to read the version of software running on a core.
- Parameters:
- Raises:
SpinnmanInvalidParameterException –
If the chip coordinates are out of range
If the processor is out of range
- get_scp_response() GetVersionResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.IPTagClear(x: int, y: int, tag: int)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]An SCP Request to clear an IP Tag.
- Parameters:
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.IPTagGet(x: int, y: int, tag: int)¶
Bases:
AbstractSCPRequest
[IPTagGetResponse
]An SCP Request to get an IP tag.
- Parameters:
- class spinnman.messages.scp.impl.IPTagGetInfo(x: int, y: int)¶
Bases:
AbstractSCPRequest
[IPTagGetInfoResponse
]An SCP Request information about IP tags.
- Parameters:
- get_scp_response() IPTagGetInfoResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.IPTagSet(x: int, y: int, host: bytearray | List[int], port: int, tag: int, *, strip: bool = False, use_sender: bool = False)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]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 or list(int)) – 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
use_sender (bool) – if the sender IP address and port should be used
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.IPTagSetTTO(x: int, y: int, tag_timeout: IPTAG_TIME_OUT_WAIT_TIMES)¶
Bases:
AbstractSCPRequest
[IPTagGetInfoResponse
]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 (IPTAG_TIME_OUT_WAIT_TIMES) – The timeout value
- get_scp_response() IPTagGetInfoResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.ReadFPGARegister(fpga_num: int, register: int, board: int)¶
Bases:
BMPRequest
[_SCPReadFPGARegisterResponse
]Requests the data from a FPGA’s register.
Sets up a read FPGA register request.
- Parameters:
- class spinnman.messages.scp.impl.ReadLink(coordinates: Tuple[int, int, int], link: int, base_address: int, size: int)¶
Bases:
AbstractSCPRequest
[Response
]An SCP request to read a region of memory via a link on a chip.
- Parameters:
coordinates (tuple(int,int,int)) – The coordinates of the core of the chip whose neighbour will be read from; X and Y between 0 and 255, CPU core normally 0 (or if a BMP then the board slot number)
link (int) – The ID of the link down which to send the query
base_address (int) – The positive base address to start the read from
size (int) – The number of bytes to read, between 1 and 256
- class spinnman.messages.scp.impl.ReadMemory(coordinates: Tuple[int, int, int], base_address: int, size: int)¶
Bases:
AbstractSCPRequest
[Response
]An SCP request to read a region of memory on a chip.
- Parameters:
- Raises:
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
- class spinnman.messages.scp.impl.ReverseIPTagSet(x: int, y: int, destination_x: int, destination_y: int, destination_p: int, port: int, tag: int, sdp_port: int)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]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() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.RouterAlloc(x: int, y: int, app_id: int, n_entries: int)¶
Bases:
AbstractSCPRequest
[RouterAllocResponse
]An SCP Request to allocate space for routing entries.
- Parameters:
- class spinnman.messages.scp.impl.RouterClear(x: int, y: int)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]A request to clear the router on a chip.
- Parameters:
- Raises:
SpinnmanInvalidParameterException –
If x is out of range
If y is out of range
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.RouterInit(x: int, y: int, n_entries: int, table_address: int, base_address: int, app_id: int)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]A request to initialise the router on a chip.
- 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
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:
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() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.SDRAMAlloc(x: int, y: int, app_id: int, size: int, tag: int | None = None, retry_tag: bool = True)¶
Bases:
AbstractSCPRequest
[_AllocResponse
]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.
retry_tag (bool) – If a tag is used, add a safety check to retry the tag. This can avoid issues with re-allocating memory on a retry message.
- class spinnman.messages.scp.impl.SDRAMDeAlloc(x: int, y: int, *, app_id: int | None = None, base_address: int | None = None)¶
Bases:
AbstractSCPRequest
[_SCPSDRAMDeAllocResponse
]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
- class spinnman.messages.scp.impl.SendSignal(app_id: int, signal: Signal)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]An SCP Request to send a signal to cores.
- Parameters:
- Raises:
SpinnmanInvalidParameterException – If app_id is out of range
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.SetPower(power_command: PowerCommand, boards: int | Iterable[int], *, delay: float = 0.0, board_to_send_to: int = 0)¶
Bases:
BMPRequest
[BMPOKResponse
]An SCP request for the BMP to power on or power off a rack of boards.
Note
There is currently a bug in the BMP that means some boards don’t respond to power commands not sent to BMP 0. Thus changing the board_to_send_to parameter is not recommended!
- Parameters:
power_command (PowerCommand) – The power command being sent
boards (int or list(int)) – The boards on the same backplane to power on or off
delay (float) – Number of seconds delay between power state changes of the different boards.
board_to_send_to (int) –
The optional board to send the command to if this is to be sent to a frame of boards.
Note
Leave this at the default because of hardware bugs.
- get_scp_response() BMPOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.WriteFPGARegister(fpga_num: int, address: int, value: int, board: int)¶
Bases:
BMPRequest
[BMPOKResponse
]A request for writing a word to a 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:
- get_scp_response() BMPOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.WriteLink(coordinates: Tuple[int, int, int], link: int, base_address: int, data: bytes)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]A request to write memory on a neighbouring chip.
- Parameters:
coordinates (tuple(int,int,int)) – The coordinates of the core of the chip whose neighbour will be written to; X and Y between 0 and 255, CPU core normally 0 (or if a BMP then the board slot number)
link (int) – The link number to write to between 0 and 5 (or if a BMP, the FPGA between 0 and 2)
base_address (int) – The base_address to start writing to
data (bytes) – Up to 256 bytes of data to write
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type:
- class spinnman.messages.scp.impl.WriteMemory(coordinates: Tuple[int, int, int], base_address: int, data: bytes)¶
Bases:
AbstractSCPRequest
[CheckOKResponse
]A request to write memory on a chip.
- Parameters:
coordinates (tuple(int,int,int)) – The coordinates of the chip, X and Y between 0 and 255, and P between 0 and 17 (normally 0 when writing to SDRAM; may be other values when writing to ITCM or DTCM); these are 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 bytes) – between 1 and 256 bytes of data to write; this is not checked due to speed restrictions
- get_scp_response() CheckOKResponse [source]¶
Get an SCP response message to be used to process any response received.
- Returns:
An SCP response, or None if no response is required
- Return type: