|
spinnaker_tools development
SpiNNaker API, sark, sc&mp, bmp firmware and build tools
|
Command handling for SC&MP. More...
Macros | |
| #define | SCAMP_ID_STR "SC&MP/SpiNNaker" |
| Version command string for SC&MP. | |
Enumerations | |
| enum | signal_type { SIG_TYPE_MC = 0 , SIG_TYPE_P2P = 1 , SIG_TYPE_NN = 2 } |
| The types of messages to use to send signals. More... | |
Functions | |
| uint | cmd_nnp (sdp_msg_t *msg) |
| Generic nearest-neighbour message injection command handler. | |
| uint | cmd_ffd (sdp_msg_t *msg) |
| Flood fill data command handler. | |
| uint | cmd_iptag (sdp_msg_t *msg, uint srce_ip) |
| IPTag manipulation command handler. | |
| uint | cmd_ver (sdp_msg_t *msg) |
| Version command handler. | |
| uint | cmd_link_read (sdp_msg_t *msg) |
| Link read command handler. | |
| uint | cmd_link_write (sdp_msg_t *msg) |
| Link write command handler. | |
| uint | cmd_as (sdp_msg_t *msg) |
| Application start command handler. | |
| uint | cmd_ar (sdp_msg_t *msg) |
| Application reset command handler. | |
| uint | cmd_rtr (sdp_msg_t *msg) |
| Router control command handler. | |
| uint | cmd_info (sdp_msg_t *msg) |
| General chip information command handler. | |
| uint | pkt_tx (uint tcr, uint data, uint key) |
| Add a SpiNNaker message to the queue of messages to send. | |
| uint | cmd_sig (sdp_msg_t *msg) |
| Signal command handler. | |
| uint | cmd_alloc (sdp_msg_t *msg) |
| Resource allocation command handler. | |
| uint | cmd_remap (sdp_msg_t *msg) |
| Core remap command handler. | |
| uint | cmd_app_copy_run (sdp_msg_t *msg) |
| Copy an application from an adjacent chip, then start it. | |
| uint | cmd_sync (sdp_msg_t *msg) |
| Synchronization of cores handler. | |
| uint | n_cores_in_state (uint app_id, uint state) |
| void | return_msg_err (sdp_msg_t *msg, uint rc, uint extra_size) |
| Adds a result message to the main message queue. | |
| void | return_msg_ok (sdp_msg_t *msg) |
| Adds an OK result message to the main message queue. | |
| void | send_count_response (uint msg_ptr, uint n_sent_packets) |
| uint | cmd_count (sdp_msg_t *msg) |
| uint | scamp_debug (sdp_msg_t *msg, uint srce_ip) |
| General debugging and control command handler. | |
Variables | |
| volatile uint | do_sync |
| Whether to perform clock synchronization (on by default at start) | |
| uint | n_beacons_sent |
| Time beacon counter. | |
| char | eth_map [12][12] |
| Local ethernet chip locator map. | |
| volatile uint | p2p_count_result |
| Reserved for performing a P2P count operation. | |
| volatile uint | p2p_count_n_results |
| uint | p2p_count_id |
| static uint | count_in_progress = 0 |
Command handling for SC&MP.
| enum signal_type |
Generic nearest-neighbour message injection command handler.
| [in] | msg | SCP message |
Flood fill data command handler.
| [in] | msg | SCP message |
IPTag manipulation command handler.
| [in,out] | msg | SCP message; will be updated with response code and payload |
| [in] | srce_ip | Source IP address (needed in some modes) |
Version command handler.
| [in,out] | msg | SCP message; will be updated with response code and payload |
Link read command handler.
| [in,out] | msg | SCP message, will be updated with result + payload |
msg Link write command handler.
| [in,out] | msg | SCP message, will be updated with result |
Application start command handler.
| [in] | msg | SCP message |
Application reset command handler.
| [in,out] | msg | SCP message, will be updated with result |
Router control command handler.
| [in,out] | msg | SCP message, will be updated with result + payload |
msg General chip information command handler.
Get information about this chip. Intended to support a host probing the machine for its basic information.
No input arguments expected.
The response will contain arg1-3 as desribed below with an additional data payload indicating the application states of all cores.
The data payload consists of (in order):
| [in,out] | msg | SCP message, will be updated with result + payload |
msg Add a SpiNNaker message to the queue of messages to send.
| [in] | tcr | Control word |
| [in] | data | Payload word |
| [in] | key | Key word |
Signal command handler.
| [in,out] | msg | SCP message; will be updated with response code and payload |
Resource allocation command handler.
| [in,out] | msg | SCP message, will be updated with result + payload |
msg Core remap command handler.
| [in,out] | msg | SCP message, will be updated with result |
Copy an application from an adjacent chip, then start it.
| [in,out] | msg | SCP message, will be updated with result |
msg Synchronization of cores handler.
| [in,out] | msg | SCP message, will be updated with result |
Adds a result message to the main message queue.
| [in] | msg | The SCP message holding the reply. Ownership transferred by this call. |
| [in] | rc | The return code. |
| [in] | extra_size | Size over and above error size |
|
extern |
Adds an OK result message to the main message queue.
| [in] | msg | The SCP message holding the reply. Ownership transferred by this call. |
General debugging and control command handler.
Delegates to:
based on the sdp_msg_t::cmd_rc contents.
| [in,out] | msg | The SCP message. Will be updated with response. |
| [in] | srce_ip | Source IP address. Only used for cmd_iptag() |
|
extern |
Local ethernet chip locator map.
Given a P2P address, compute P2P address of chip with Ethernet interface on same PCB. Table is for standard 48-chip boards only. Will work with 4-chip boards - may not work for more exotic combinations! Also computes the position of the chip on the PCB as offset from (0,0)
Each byte in this table is a pair of X,Y values which are subtracted from a P2P address to give the address of the Ethernet-attached chip on the same 48-chip PCB.