SpiNNFrontEndCommon 7.2.2
Common support code for user-facing front end systems.
|
The implementation of the Extra Monitor. More...
#include <sark.h>
#include <stdbool.h>
#include <common-typedefs.h>
#include <spinn_extra.h>
#include "common.h"
#include "data_specification.h"
#include <wfi.h>
Go to the source code of this file.
Data Structures | |
struct | dumped_packet_t |
dumped packet type More... | |
struct | pkt_queue_t |
packet queue type | |
struct | sdp_data_out_t |
message payload for the data speed up out SDP messages More... | |
struct | router_entry_t |
router entry positions in sdram More... | |
struct | data_in_data_items_t |
data positions in sdram for data in config More... | |
struct | reinjector_status_response_packet_t |
defintion of response packet for reinjector status More... | |
struct | reinject_config_t |
how the reinjection configuration is laid out in memory. More... | |
struct | data_speed_out_config_t |
human readable definitions of each element in the transmission region More... | |
struct | extra_monitor_provenance_t |
The information in the provenance region. More... | |
Macros | |
#define | DMA_BURST_SIZE 4 |
Use DMA bursts of 16 (24) transfer units (double words) | |
#define | N_DMA_BUFFERS 2 |
the number of DMA buffers to build | |
#define | END_FLAG_SIZE 4 |
flag size for saying ended, in bytes | |
#define | END_FLAG 0xFFFFFFFF |
flag for saying stuff has ended | |
#define | SDP_TIMEOUT 1000 |
timeout for trying to end SDP packet | |
#define | LENGTH_OF_SDP_HEADER 8 |
extra length adjustment for the SDP header, in bytes | |
#define | N_ROUTER_ENTRIES 1024 |
max router entries | |
#define | INVALID_ROUTER_ENTRY_KEY 0xFFFFFFFF |
hardcoded invalud router entry state for key | |
#define | INVALID_ROUTER_ENTRY_MASK 0x00000000 |
hardcoded invalid router entry state for mask | |
#define | INVALID_ROUTER_ENTRY_ROUTE 0xFF000000 |
hardcoded invalid router entry state for route | |
#define | APP_ID_MASK_FROM_FREE 0x000000FF |
mask to get app id from free entry of rtr_entry_t | |
#define | APP_ID_OFFSET_FROM_FREE 24 |
offset for getting app id from free | |
#define | N_BASIC_SYSTEM_ROUTER_ENTRIES 1 |
number of entries in the multicast router for SARK and SCAMP | |
#define | N_USABLE_ROUTER_ENTRIES (N_ROUTER_ENTRIES - N_BASIC_SYSTEM_ROUTER_ENTRIES) |
number of entries in the multicast router that we can manage | |
#define | TDMA_WAIT_PERIOD 0 |
Throttle power on the MC transmissions if needed (assume not needed) | |
#define | ROUTER_INITIAL_TIMEOUT 0x4f |
The initial timeout of the router. | |
#define | TICK_PERIOD 10 |
Amount to call the timer callback. | |
#define | PKT_QUEUE_SIZE 4096 |
dumped packet queue length | |
#define | ROUTER_TIMEOUT_MAX 0xFF |
Maximum router timeout value. | |
Enumerations | |
enum | { SEQUENCE_NUMBER_SIZE = 1 , TRANSACTION_ID_SIZE = 1 , SDP_PAYLOAD_WORDS , SDP_PAYLOAD_BYTES = SDP_PAYLOAD_WORDS * sizeof(uint) } |
Sizes of things to do with data speed up out message sizes. More... | |
enum | data_out_sdp_commands { SDP_CMD_START_SENDING_DATA = 100 , SDP_CMD_START_OF_MISSING_SDP_PACKETS = 1000 , SDP_CMD_MORE_MISSING_SDP_PACKETS = 1001 , SDP_CMD_CLEAR = 2000 } |
SDP flags. More... | |
enum | { CPU_SLOT = SLOT_0 , CC_SLOT = SLOT_1 , TIMER_SLOT = SLOT_2 , DMA_SLOT = SLOT_3 , DMA_ERROR_SLOT = SLOT_4 , DMA_TIMEOUT_SLOT = SLOT_5 , MC_PAYLOAD_SLOT = SLOT_6 } |
VIC slot definitions. More... | |
enum | dma_tags_for_data_speed_up { DMA_TAG_READ_FOR_TRANSMISSION = 0 , DMA_TAG_READ_FOR_RETRANSMISSION = 1 , DMA_TAG_RETRANSMISSION_READING = 2 , DMA_TAG_FOR_WRITING_MISSING_SEQ_NUMS = 3 } |
SDP tags used by the SDRAM reader component. More... | |
enum | missing_seq_num_data_positions { POSITION_OF_NO_MISSING_SEQ_PACKETS = 2 , START_OF_MISSING_MORE = 2 , START_OF_MISSING_SEQ_NUMS = 3 } |
position in message for missing sequence numbers More... | |
enum | functionality_to_port_num_map { REINJECTION_PORT = 4 , DATA_SPEED_UP_OUT_PORT = 5 , DATA_SPEED_UP_IN_PORT = 6 } |
values for SDP port numbers that this core will respond to More... | |
enum | data_spec_regions { CONFIG_REINJECTION = 0 , CONFIG_DATA_SPEED_UP_OUT = 1 , CONFIG_DATA_SPEED_UP_IN = 2 , PROVENANCE_REGION = 3 } |
DSG region identifiers. More... | |
enum | speed_up_in_command { SDP_COMMAND_FOR_SAVING_APPLICATION_MC_ROUTING = 6 , SDP_COMMAND_FOR_LOADING_APPLICATION_MC_ROUTES = 7 , SDP_COMMAND_FOR_LOADING_SYSTEM_MC_ROUTES = 8 } |
Commands for supporting Data In routing. More... | |
enum | callback_priorities { SDP = 0 , DMA = 0 } |
values for the priority for each callback More... | |
Functions | |
void | sark_int_han (void) |
The standard SARK CPU interrupt handler. | |
static void * | dse_block (uint index) |
Get the DSG region with the given index. | |
static void | publish_transaction_id (int transaction_id) |
publishes the current transaction ID to the user1 register. | |
static void * | sdram_alloc (uint size) |
allocate a block of SDRAM (to be freed with sdram_free()) | |
static void | sdram_free (void *data) |
free a block of SDRAM allocated with sdram_alloc() | |
static uint | sdram_max_block_size (void) |
the maximum SDRAM block size | |
static sdp_msg_t * | get_message_from_mailbox (void) |
How to get an SDP message out of the mailbox correctly. | |
static void | vic_interrupt_done (void) |
Marks the end of an interrupt handler from the VIC's perspective. | |
static void | set_vic_callback (uint8_t slot, uint type, vic_interrupt_handler_t callback) |
Install an interrupt handler. | |
static void | reinjection_enable_comms_interrupt (void) |
Enable the interrupt when the Communications Controller can accept another packet. | |
static void | reinjection_disable_comms_interrupt (void) |
Disable the interrupt when the Communications Controller can accept another packet. | |
static bool | reinjection_can_send_now (void) |
Whether the comms hardware can accept packet now. | |
static void | reinjection_timer_callback (void) |
the plugin callback for the timer | |
static void | reinjection_reinject_packet (const dumped_packet_t *pkt) |
Does the actual reinjection of a packet. | |
static void | reinjection_ready_to_send_callback (void) |
Called when the router can accept a packet and the reinjection queue is non-empty. | |
static void | reinjection_dropped_packet_callback (void) |
the callback plugin for handling dropped packets | |
static void | reinjection_read_packet_types (const reinject_config_t *config) |
reads a DSG memory region to set packet types for reinjection | |
static void | reinjection_set_wait1_timeout (uint payload) |
Set the wait1 router timeout. | |
static void | reinjection_set_wait2_timeout (uint payload) |
Set the wait2 router timeout. | |
static int | reinjection_set_timeout_sdp (sdp_msg_t *msg) |
Set the router wait1 timeout. | |
static int | reinjection_set_emergency_timeout_sdp (sdp_msg_t *msg) |
Set the router wait2 timeout. | |
static int | reinjection_set_packet_types (sdp_msg_t *msg) |
Set the re-injection options. | |
static int | reinjection_get_status (sdp_msg_t *msg) |
Get the status and put it in the packet. | |
static int | reinjection_reset_counters (sdp_msg_t *msg) |
Reset the counters. | |
static int | reinjection_exit (sdp_msg_t *msg) |
Stop the reinjector. | |
static void | reinjection_clear (void) |
Clear the queue of messages to reinject. | |
static int | reinjection_clear_message (sdp_msg_t *msg) |
Clear the queue of messages to reinject. | |
static uint | reinjection_sdp_command (sdp_msg_t *msg) |
handles the commands for the reinjector code. | |
static void | reinjection_configure_timer (void) |
SARK level timer interrupt setup. | |
static void | reinjection_configure_comms_controller (void) |
Store this chip's p2p address for future use. | |
static void | reinjection_configure_router (void) |
sets up SARK and router to have a interrupt when a packet is dropped | |
static void | data_in_clear_router (void) |
Clears all (non-SARK/SCAMP) entries from the router. | |
static void | data_in_process_boundary (void) |
Resets the state due to reaching the end of a data stream. | |
static void | data_in_process_address (uint data) |
Sets the next location to write data at. | |
static void | data_in_process_data (uint data) |
Writes a word in a stream and advances the write pointer. | |
static void | process_mc_payload_packet (void) |
Process a multicast packet with payload. | |
static void | data_in_load_router (router_entry_t *sdram_address, uint n_entries) |
Writes router entries to the router. | |
static void | data_in_save_router (void) |
reads in routers entries and places in application sdram location | |
static void | data_in_speed_up_load_in_system_tables (data_in_data_items_t *items) |
Sets up system routes on router. | |
static void | data_in_speed_up_load_in_application_routes (void) |
Sets up application routes on router. | |
static uint | data_in_speed_up_command (sdp_msg_t *msg) |
The handler for all control messages coming in for data in speed up functionality. | |
static void | send_fixed_route_packet (uint32_t key, uint32_t data) |
Sends a fixed route packet with payload. | |
static void | data_out_send_data_block (uint32_t current_dma_pointer, uint32_t n_elements_to_send, uint32_t first_packet_key, uint32_t second_packet_key) |
takes a DMA'ed block and transmits its contents as fixed route packets to the packet gatherer. | |
static void | data_out_start_dma_read (uint32_t dma_tag, void *source, void *destination, uint n_words) |
Initiate a DMA read, copying from SDRAM into DTCM. | |
static void | data_out_read (uint32_t dma_tag, uint32_t offset, uint32_t items_to_read) |
sets off a DMA reading a block of SDRAM in preparation for sending to the packet gatherer | |
static void | data_out_send_end_flag (void) |
Sends the end flag to the packet gatherer. | |
static void | data_out_dma_complete_reading_for_original_transmission (void) |
DMA complete callback for reading for original transmission. | |
static void | data_out_write_missing_seq_nums_into_sdram (uint32_t data[], uint length, uint32_t start_offset) |
Basic write sequence numbers to SDRAM that need retransmitting. | |
static void | data_out_store_missing_seq_nums (uint32_t data[], uint length, bool first) |
Store sequence numbers into SDRAM. | |
static void | data_out_retransmission_dma_read (void) |
sets off a DMA for retransmission stuff | |
static void | data_out_dma_complete_read_missing_seqeuence_nums (void) |
reads in missing sequence numbers and sets off the reading of SDRAM for the equivalent data | |
static void | data_out_dma_complete_reading_retransmission_data (void) |
DMA complete callback for have read missing sequence number data. | |
static void | data_out_dma_complete_writing_missing_seq_to_sdram (void) |
DMA complete callback for have read missing sequence number data. | |
static void | data_out_speed_up_command (sdp_msg_pure_data *msg) |
the handler for all messages coming in for data speed up functionality. | |
static void | data_out_dma_complete (void) |
The handler for all DMAs complete. | |
static void | data_out_dma_error (void) |
the handler for DMA errors | |
static void | data_out_dma_timeout (void) |
the handler for DMA timeouts (hopefully unlikely...) | |
static void | reinjection_initialise (void) |
Sets up data and callbacks required by the reinjection system. | |
static void | data_out_initialise (void) |
Sets up data and callbacks required by the data speed up system. | |
static void | data_in_initialise (void) |
Sets up data and callback required by the data in speed up system. | |
static void | provenance_initialise (void) |
Set up where we collect provenance. | |
void | c_main (void) |
main entry point | |
Variables | |
static uint | reinject_p2p_source_id |
The content of the communications controller SAR register. | |
static pkt_queue_t | reinject_pkt_queue |
dumped packet queue | |
static uint | reinject_n_dropped_packets |
Count of all packets dropped by router. | |
static uint | reinject_n_missed_dropped_packets |
Count of packets dumped because the router was itself overloaded. | |
static uint | reinject_n_dropped_packet_overflows |
Count of packets lost because we ran out of queue space. | |
static uint | reinject_n_reinjected_packets |
Count of all packets reinjected. | |
static uint | reinject_n_link_dumped_packets |
Estimated count of packets dropped by router because a destination link is busy. | |
static uint | reinject_n_processor_dumped_packets |
Estimated count of packets dropped by router because a destination core (local) is busy. | |
static uint | reinject_link_proc_bits |
Which links and processors packets were dumped from (cumulative bit field) | |
static bool | reinject_mc |
Flag: whether to reinject multicast packets. | |
static bool | reinject_pp |
Flag: whether to reinject point-to-point packets. | |
static bool | reinject_nn |
Flag: whether to reinject nearest neighbour packets. | |
static bool | reinject_fr |
Flag: whether to reinject fixed route packets. | |
static bool | reinject_run = true |
Whether we are running the reinjector. | |
static router_entry_t * | data_in_saved_application_router_table = NULL |
Where we save a copy of the application code's router table while the system router table entries are loaded. | |
static uint | data_in_address_key = 0 |
This packet contains the address of the start of a stream. | |
static uint | data_in_data_key = 0 |
This packet contains a word of data in the stream. | |
static uint | data_in_boundary_key = 0 |
This packet is the end of a stream. | |
static address_t | data_in_write_address = NULL |
Where we will write the next received word. NULL if not in a stream. | |
static address_t | data_in_first_write_address = NULL |
Where we wrote the first word in the stream. NULL if not in a stream. | |
static int | data_in_application_table_n_valid_entries = 0 |
The size of the data_in_saved_application_router_table. | |
static bool | data_in_last_table_load_was_system = false |
Do we have the system router table loaded? | |
static uint32_t | data_out_data_to_transmit [N_DMA_BUFFERS][ITEMS_PER_DATA_PACKET] |
The DTCM buffers holding data to transmit. DMA targets. | |
static uint32_t | data_out_transmit_dma_pointer = 0 |
Which data_out_data_to_transmit buffer is the target of the current DMA transfer. | |
static uint32_t | data_out_position_in_store = 0 |
Index (by words) into the block of SDRAM being read. | |
static uint32_t | data_out_num_items_read = 0 |
Size of the current DMA transfer. | |
static uint32_t | data_out_transaction_id = 0 |
The current transaction identifier, identifying the stream of items being moved. | |
static bool | data_out_first_transmission = true |
Whether we are about the first transmission in a stream. | |
static bool | data_out_has_finished = false |
Whether we have reached the end of a stream. | |
static uint32_t | data_out_retransmitted_seq_num_items_read = 0 |
The size of payload DMA'd into the send buffer. | |
static uint32_t | data_out_n_missing_seq_packets = 0 |
The number of missing packets that the host wants us to resend. | |
static uint32_t | data_out_n_missing_seq_nums_in_sdram = 0 |
The number of sequence numbers of missing packets that we've accumulated. | |
static uint32_t | data_out_n_elements_to_read_from_sdram = 0 |
The number of words that remain to be read from SDRAM. | |
static address_t | data_out_missing_seq_num_sdram_address = NULL |
Buffer in SDRAM where the sequence numbers of missing packets are stored. | |
static uint32_t | data_out_max_seq_num = 0 |
The maximum sequence number that can be in a transmission stream. | |
static uint32_t | data_out_retransmit_seq_nums [ITEMS_PER_DATA_PACKET] |
DTCM buffer of sequence numbers to be retransmitted. | |
static uint32_t | data_out_position_for_retransmission = 0 |
Used to track where we are in the retransmissions. | |
static uint32_t | data_out_missing_seq_num_being_processed = 0 |
The current sequence number for the chunk being being DMA'd in. | |
static uint32_t | data_out_read_data_position = 0 |
Index into data_out_retransmit_seq_nums used to track where we are in a chunk of sequence numbers to retransmit. | |
static uint32_t | data_out_dma_port_last_used = 0 |
The tag of the current DMA. | |
static bool | data_out_in_retransmission_mode = false |
Whether we're transmitting or retransmitting. | |
static address_t | data_out_store_address = NULL |
The location in SDRAM where data is being read out from. | |
static uint32_t | data_out_basic_data_key = 0 |
The SpiNNaker packet key for a piece of data. | |
static uint32_t | data_out_new_sequence_key = 0 |
The SpiNNaker packet key for the start of a sequence. | |
static uint32_t | data_out_first_data_key = 0 |
The SpiNNaker packet key for the first piece of data of some data. | |
static uint32_t | data_out_transaction_id_key = 0 |
The SpiNNaker packet key for the transaction ID. | |
static uint32_t | data_out_end_flag_key = 0 |
The SpiNNaker packet key for the end of a stream. | |
static bool | data_out_stop = false |
Whether the data out streaming has been asked to stop. | |
static ushort | my_addr |
Where are we (as a P2P address)? | |
static extra_monitor_provenance_t * | prov |
Where we collect provenance in SDRAM. | |
static data_specification_metadata_t * | dse_regions |
The DSE regions structure. | |
The implementation of the Extra Monitor.
The purpose of this application is to provide extra monitor functions (such as reinjection control) that do not fit in SCAMP, and to provide an endpoint on each chip for streaming data in and out at high speed (while the main user application is not running).
Definition in file extra_monitor_support.c.
struct dumped_packet_t |
dumped packet type
Definition at line 178 of file extra_monitor_support.c.
Data Fields | ||
---|---|---|
router_packet_header_t | hdr | Header word of packet. |
uint | key | Key word of packet. |
uint | pld | Payload word of packet (might be undefined) |
struct sdp_data_out_t |
message payload for the data speed up out SDP messages
Definition at line 206 of file extra_monitor_support.c.
Data Fields | ||
---|---|---|
data_out_sdp_commands | command | What operation are we dealing with. |
uint | transaction_id |
What is the transaction ID. This is used to stop confusion when critical packets get lost |
address_t | sdram_location | What location are we talking about. |
uint | length | How much data are we moving. |
struct router_entry_t |
router entry positions in sdram
Definition at line 220 of file extra_monitor_support.c.
Data Fields | ||
---|---|---|
uint32_t | key | The SpiNNaker router key. |
uint32_t | mask | The SpiNNaker router mask. |
uint32_t | route | The SpiNNaker router route (to use when masked key matches) |
struct data_in_data_items_t |
data positions in sdram for data in config
Definition at line 227 of file extra_monitor_support.c.
Data Fields | ||
---|---|---|
uint32_t | address_mc_key | What key to use to receive an address to write to. |
uint32_t | data_mc_key | What key to use to receive a word to write. |
uint32_t | boundary_mc_key | What key to use to receive an instruction that writing is done. |
uint32_t | n_system_router_entries | The number of system (non-app, non-SCAMP) router entries to use for Data In. |
router_entry_t | system_router_entries[] | The system (non-app, non-SCAMP) router entries to use for Data In. |
struct reinjector_status_response_packet_t |
defintion of response packet for reinjector status
Definition at line 248 of file extra_monitor_support.c.
Data Fields | ||
---|---|---|
uint | router_timeout |
The current router timeout. See SpiNNaker Data Sheet, Section 10.11, register r0, field wait1 |
uint | router_emergency_timeout |
The current router emergency timeout. See SpiNNaker Data Sheet, Section 10.11, register r0, field wait2 |
uint | n_dropped_packets | The number of packets that were dropped. |
uint | n_missed_dropped_packets | The number of packets that were dumped by the router. |
uint | n_dropped_packets_overflows | The number of packets that were dropped due to overflow. |
uint | n_reinjected_packets | The number of packets that were reinjected. |
uint | n_link_dumped_packets | The number of packets dropped because a link was busy. |
uint | n_processor_dumped_packets | The number of packets dropped because a processor was busy. |
uint | packet_types_reinjected | What packet types are we reinjecting. |
uint | link_proc_bits | The link / processor bit fields of dropped packets. |
struct reinject_config_t |
how the reinjection configuration is laid out in memory.
Definition at line 280 of file extra_monitor_support.c.
Data Fields | ||
---|---|---|
uint | multicast_flag |
Whether we are reinjecting multicast packets.
|
uint | point_to_point_flag |
Whether we are reinjecting point-to-point packets.
|
uint | fixed_route_flag |
Whether we are reinjecting fixed route packets.
|
uint | nearest_neighbour_flag |
Whether we are reinjecting nearest neighbour packets.
|
uint | reinjection_base_mc_key |
struct data_speed_out_config_t |
human readable definitions of each element in the transmission region
Definition at line 326 of file extra_monitor_support.c.
Data Fields | ||
---|---|---|
uint | my_key | The key to say here is a piece of data. |
uint | new_seq_key | The key to say that we are starting a new sequence. |
uint | first_data_key | The key to say that this data is the first. |
uint | transaction_id_key | The key to say that this data is a transaction identifier. |
uint | end_flag_key | The key to say that we've finished transmitting data. |
struct extra_monitor_provenance_t |
The information in the provenance region.
Definition at line 340 of file extra_monitor_support.c.
Data Fields | ||
---|---|---|
uint | n_sdp_packets | The total number of relevant SDP packets processed. |
uint | n_in_streams | The number of times we've streamed data in. |
uint | n_out_streams | The number of times we've streamed data out. |
uint | n_router_changes | The number of times we've modified the router. |
#define DMA_BURST_SIZE 4 |
Use DMA bursts of 16 (24) transfer units (double words)
See SpiNNaker Data Sheet, Section 7.4, register r3
Definition at line 55 of file extra_monitor_support.c.
#define N_DMA_BUFFERS 2 |
the number of DMA buffers to build
Definition at line 58 of file extra_monitor_support.c.
#define END_FLAG_SIZE 4 |
flag size for saying ended, in bytes
Definition at line 65 of file extra_monitor_support.c.
#define END_FLAG 0xFFFFFFFF |
flag for saying stuff has ended
Definition at line 67 of file extra_monitor_support.c.
#define SDP_TIMEOUT 1000 |
timeout for trying to end SDP packet
Definition at line 99 of file extra_monitor_support.c.
#define LENGTH_OF_SDP_HEADER 8 |
extra length adjustment for the SDP header, in bytes
Definition at line 102 of file extra_monitor_support.c.
#define N_ROUTER_ENTRIES 1024 |
max router entries
Definition at line 109 of file extra_monitor_support.c.
#define INVALID_ROUTER_ENTRY_KEY 0xFFFFFFFF |
hardcoded invalud router entry state for key
Definition at line 112 of file extra_monitor_support.c.
#define INVALID_ROUTER_ENTRY_MASK 0x00000000 |
hardcoded invalid router entry state for mask
Definition at line 115 of file extra_monitor_support.c.
#define INVALID_ROUTER_ENTRY_ROUTE 0xFF000000 |
hardcoded invalid router entry state for route
Definition at line 118 of file extra_monitor_support.c.
#define APP_ID_MASK_FROM_FREE 0x000000FF |
mask to get app id from free entry of rtr_entry_t
Definition at line 121 of file extra_monitor_support.c.
#define APP_ID_OFFSET_FROM_FREE 24 |
offset for getting app id from free
Definition at line 124 of file extra_monitor_support.c.
#define N_BASIC_SYSTEM_ROUTER_ENTRIES 1 |
number of entries in the multicast router for SARK and SCAMP
Definition at line 127 of file extra_monitor_support.c.
#define N_USABLE_ROUTER_ENTRIES (N_ROUTER_ENTRIES - N_BASIC_SYSTEM_ROUTER_ENTRIES) |
number of entries in the multicast router that we can manage
Definition at line 130 of file extra_monitor_support.c.
#define TDMA_WAIT_PERIOD 0 |
Throttle power on the MC transmissions if needed (assume not needed)
Definition at line 137 of file extra_monitor_support.c.
#define ROUTER_INITIAL_TIMEOUT 0x4f |
The initial timeout of the router.
Definition at line 140 of file extra_monitor_support.c.
#define TICK_PERIOD 10 |
Amount to call the timer callback.
Definition at line 143 of file extra_monitor_support.c.
#define PKT_QUEUE_SIZE 4096 |
dumped packet queue length
Definition at line 146 of file extra_monitor_support.c.
#define ROUTER_TIMEOUT_MAX 0xFF |
Maximum router timeout value.
Definition at line 149 of file extra_monitor_support.c.
Sizes of things to do with data speed up out message sizes.
Definition at line 70 of file extra_monitor_support.c.
SDP flags.
Definition at line 86 of file extra_monitor_support.c.
VIC slot definitions.
Definition at line 156 of file extra_monitor_support.c.
SDP tags used by the SDRAM reader component.
Definition at line 193 of file extra_monitor_support.c.
position in message for missing sequence numbers
Definition at line 241 of file extra_monitor_support.c.
values for SDP port numbers that this core will respond to
Definition at line 297 of file extra_monitor_support.c.
DSG region identifiers.
Enumerator | |
---|---|
CONFIG_REINJECTION | Reinjector configuration. |
CONFIG_DATA_SPEED_UP_OUT | Data Speed Up (Outbound) configuration. |
CONFIG_DATA_SPEED_UP_IN | Data Speed Up (Inbound) configuration. |
PROVENANCE_REGION | Provenance collection region (format: extra_monitor_provenance_t) |
Definition at line 304 of file extra_monitor_support.c.
Commands for supporting Data In routing.
Definition at line 316 of file extra_monitor_support.c.
values for the priority for each callback
Definition at line 352 of file extra_monitor_support.c.
Get the DSG region with the given index.
Does not validate the DSG header!
[in] | index | The index into the region table. |
Definition at line 562 of file extra_monitor_support.c.
publishes the current transaction ID to the user1 register.
The register is a place where it can be read from host and by debugging tools.
[in] | transaction_id | The value to store |
Definition at line 572 of file extra_monitor_support.c.
allocate a block of SDRAM (to be freed with sdram_free())
[in] | size | the size of the block |
NULL
if allocation failed Definition at line 579 of file extra_monitor_support.c.
free a block of SDRAM allocated with sdram_alloc()
[in] | data | the block to free |
Definition at line 586 of file extra_monitor_support.c.
the maximum SDRAM block size
Definition at line 593 of file extra_monitor_support.c.
How to get an SDP message out of the mailbox correctly.
NULL
if message buffer allocation failed. Definition at line 600 of file extra_monitor_support.c.
Marks the end of an interrupt handler from the VIC's perspective.
Definition at line 612 of file extra_monitor_support.c.
|
inlinestatic |
Install an interrupt handler.
[in] | slot | Where to install the handler (controls priority). |
[in] | type | What we are handling. |
[in] | callback | The interrupt handler to install. |
Definition at line 620 of file extra_monitor_support.c.
Enable the interrupt when the Communications Controller can accept another packet.
Definition at line 635 of file extra_monitor_support.c.
Disable the interrupt when the Communications Controller can accept another packet.
Definition at line 643 of file extra_monitor_support.c.
Whether the comms hardware can accept packet now.
Definition at line 651 of file extra_monitor_support.c.
the plugin callback for the timer
Definition at line 656 of file extra_monitor_support.c.
|
inlinestatic |
Does the actual reinjection of a packet.
[in] | pkt | The packet to reinject. |
Definition at line 684 of file extra_monitor_support.c.
Called when the router can accept a packet and the reinjection queue is non-empty.
Definition at line 710 of file extra_monitor_support.c.
the callback plugin for handling dropped packets
Definition at line 748 of file extra_monitor_support.c.
|
static |
reads a DSG memory region to set packet types for reinjection
[in] | config | where to read the reinjection packet types from |
Definition at line 823 of file extra_monitor_support.c.
Set the wait1 router timeout.
[in] | payload | The encoded value to set. Must be in legal range. |
Definition at line 864 of file extra_monitor_support.c.
Set the wait2 router timeout.
[in] | payload | The encoded value to set. Must be in legal range. |
Definition at line 871 of file extra_monitor_support.c.
Set the router wait1 timeout.
Delegates to reinjection_set_timeout()
[in,out] | msg | The message requesting the change. Will be updated with response |
Definition at line 883 of file extra_monitor_support.c.
Set the router wait2 timeout.
Delegates to reinjection_set_emergency_timeout()
[in,out] | msg | The message requesting the change. Will be updated with response |
Definition at line 907 of file extra_monitor_support.c.
Set the re-injection options.
[in,out] | msg | The message requesting the change. Will be updated with response |
Definition at line 928 of file extra_monitor_support.c.
Get the status and put it in the packet.
[in,out] | msg | The message requesting the change. Will be updated with response |
Definition at line 949 of file extra_monitor_support.c.
Reset the counters.
[in,out] | msg | The message requesting the change. Will be updated with response |
Definition at line 985 of file extra_monitor_support.c.
Stop the reinjector.
[in,out] | msg | The message requesting the change. Will be updated with response |
Definition at line 1003 of file extra_monitor_support.c.
Clear the queue of messages to reinject.
Definition at line 1021 of file extra_monitor_support.c.
Clear the queue of messages to reinject.
[in,out] | msg | The message requesting the change. Will be updated with response |
Definition at line 1037 of file extra_monitor_support.c.
handles the commands for the reinjector code.
[in,out] | msg | The message with the command. Will be updated with response. |
Definition at line 1049 of file extra_monitor_support.c.
SARK level timer interrupt setup.
Definition at line 1098 of file extra_monitor_support.c.
Store this chip's p2p address for future use.
Definition at line 1112 of file extra_monitor_support.c.
sets up SARK and router to have a interrupt when a packet is dropped
Definition at line 1118 of file extra_monitor_support.c.
Clears all (non-SARK/SCAMP) entries from the router.
Definition at line 1147 of file extra_monitor_support.c.
Resets the state due to reaching the end of a data stream.
Definition at line 1165 of file extra_monitor_support.c.
Sets the next location to write data at.
[in] | data | The address to write at |
Definition at line 1178 of file extra_monitor_support.c.
Writes a word in a stream and advances the write pointer.
[in] | data | The word to write |
Definition at line 1190 of file extra_monitor_support.c.
Process a multicast packet with payload.
Shared between the reinjection and data in code paths. Calls one of:
Definition at line 1211 of file extra_monitor_support.c.
|
static |
Writes router entries to the router.
[in] | sdram_address | the sdram address where the router entries reside |
[in] | n_entries | how many router entries to read in |
Definition at line 1242 of file extra_monitor_support.c.
reads in routers entries and places in application sdram location
Definition at line 1285 of file extra_monitor_support.c.
|
static |
Sets up system routes on router.
Required by the data in speed up functionality.
[in] | items | The collection of system routes to load. |
Definition at line 1311 of file extra_monitor_support.c.
Sets up application routes on router.
Required by data in speed up functionality.
Definition at line 1331 of file extra_monitor_support.c.
The handler for all control messages coming in for data in speed up functionality.
[in,out] | msg | the SDP message (without SCP header); will be updated with response |
Definition at line 1349 of file extra_monitor_support.c.
Sends a fixed route packet with payload.
[in] | key | The "key" (first word) of the packet. |
[in] | data | The "data" (second word) of the packet. |
Whether the comms controller can accept another packet
Definition at line 1393 of file extra_monitor_support.c.
|
static |
takes a DMA'ed block and transmits its contents as fixed route packets to the packet gatherer.
[in] | current_dma_pointer | the DMA pointer for the 2 buffers |
[in] | n_elements_to_send | the number of multicast packets to send |
[in] | first_packet_key | the first key to transmit with. |
[in] | second_packet_key | the second key to transmit with; all subsequent packets use the default key. |
Definition at line 1426 of file extra_monitor_support.c.
|
inlinestatic |
Initiate a DMA read, copying from SDRAM into DTCM.
This is a basic operation. It does not include any safeguards.
[in] | dma_tag | A label for what is being read. Should be one of the values in dma_tags_for_data_speed_up |
[in] | source | Where in SDRAM to read from. |
[in] | destination | Where in DTCM to write to. |
[in] | n_words | The number of words to transfer. Can be up to 32k words. |
Definition at line 1454 of file extra_monitor_support.c.
sets off a DMA reading a block of SDRAM in preparation for sending to the packet gatherer
[in] | dma_tag | the DMA tag associated with this read. transmission or retransmission |
[in] | offset | where in the data array to start writing to |
[in] | items_to_read | the number of word items to read |
Definition at line 1473 of file extra_monitor_support.c.
Sends the end flag to the packet gatherer.
Definition at line 1493 of file extra_monitor_support.c.
DMA complete callback for reading for original transmission.
Uses a pair of buffers in DTCM so data can be read in from SDRAM while the previous is being transferred over the network.
Callback associated with DMA_TAG_READ_FOR_TRANSMISSION
Definition at line 1503 of file extra_monitor_support.c.
|
static |
Basic write sequence numbers to SDRAM that need retransmitting.
[in] | data | data to write into SDRAM |
[in] | length | length of data |
[in] | start_offset | where in the data to start writing in from. |
Definition at line 1559 of file extra_monitor_support.c.
Store sequence numbers into SDRAM.
Acts as a memory management front end to data_out_write_missing_seq_nums_into_sdram()
[in] | data | the message data to read into SDRAM |
[in] | length | how much data to read |
[in] | first | if first packet about missing sequence numbers. If so there is different behaviour |
Definition at line 1583 of file extra_monitor_support.c.
sets off a DMA for retransmission stuff
Definition at line 1635 of file extra_monitor_support.c.
reads in missing sequence numbers and sets off the reading of SDRAM for the equivalent data
Callback associated with DMA_TAG_READ_FOR_RETRANSMISSION
Definition at line 1650 of file extra_monitor_support.c.
DMA complete callback for have read missing sequence number data.
Callback associated with DMA_TAG_RETRANSMISSION_READING
Definition at line 1697 of file extra_monitor_support.c.
DMA complete callback for have read missing sequence number data.
Definition at line 1720 of file extra_monitor_support.c.
|
static |
the handler for all messages coming in for data speed up functionality.
[in] | msg | the SDP message (without SCP header) |
Definition at line 1729 of file extra_monitor_support.c.
The handler for all DMAs complete.
Depending on the dma_tag used with data_out_start_dma_read(), calls one of:
Definition at line 1866 of file extra_monitor_support.c.
the handler for DMA errors
Definition at line 1897 of file extra_monitor_support.c.
the handler for DMA timeouts (hopefully unlikely...)
Definition at line 1908 of file extra_monitor_support.c.
Sets up data and callbacks required by the reinjection system.
Definition at line 1985 of file extra_monitor_support.c.
Sets up data and callbacks required by the data speed up system.
Definition at line 2010 of file extra_monitor_support.c.
Sets up data and callback required by the data in speed up system.
Definition at line 2062 of file extra_monitor_support.c.
Set up where we collect provenance.
Definition at line 2087 of file extra_monitor_support.c.
main entry point
Definition at line 2098 of file extra_monitor_support.c.
|
static |
The content of the communications controller SAR register.
Specifically, the P2P source identifier.
Definition at line 364 of file extra_monitor_support.c.
|
static |
dumped packet queue
Definition at line 367 of file extra_monitor_support.c.
|
static |
Count of all packets dropped by router.
Definition at line 371 of file extra_monitor_support.c.
|
static |
Count of packets dumped because the router was itself overloaded.
Definition at line 374 of file extra_monitor_support.c.
|
static |
Count of packets lost because we ran out of queue space.
Definition at line 377 of file extra_monitor_support.c.
|
static |
Count of all packets reinjected.
Definition at line 380 of file extra_monitor_support.c.
|
static |
Estimated count of packets dropped by router because a destination link is busy.
Definition at line 384 of file extra_monitor_support.c.
|
static |
Estimated count of packets dropped by router because a destination core (local) is busy.
Definition at line 388 of file extra_monitor_support.c.
|
static |
Which links and processors packets were dumped from (cumulative bit field)
Definition at line 391 of file extra_monitor_support.c.
|
static |
Flag: whether to reinject multicast packets.
Definition at line 396 of file extra_monitor_support.c.
|
static |
Flag: whether to reinject point-to-point packets.
Definition at line 399 of file extra_monitor_support.c.
|
static |
Flag: whether to reinject nearest neighbour packets.
Definition at line 402 of file extra_monitor_support.c.
|
static |
Flag: whether to reinject fixed route packets.
Definition at line 405 of file extra_monitor_support.c.
Whether we are running the reinjector.
Definition at line 408 of file extra_monitor_support.c.
|
static |
Where we save a copy of the application code's router table while the system router table entries are loaded.
Definition at line 417 of file extra_monitor_support.c.
|
static |
This packet contains the address of the start of a stream.
Definition at line 420 of file extra_monitor_support.c.
|
static |
This packet contains a word of data in the stream.
Definition at line 423 of file extra_monitor_support.c.
|
static |
This packet is the end of a stream.
Definition at line 426 of file extra_monitor_support.c.
Where we will write the next received word. NULL
if not in a stream.
Definition at line 429 of file extra_monitor_support.c.
Where we wrote the first word in the stream. NULL
if not in a stream.
Definition at line 432 of file extra_monitor_support.c.
|
static |
The size of the data_in_saved_application_router_table.
Definition at line 435 of file extra_monitor_support.c.
Do we have the system router table loaded?
Definition at line 438 of file extra_monitor_support.c.
|
static |
The DTCM buffers holding data to transmit. DMA targets.
Definition at line 447 of file extra_monitor_support.c.
|
static |
Which data_out_data_to_transmit buffer is the target of the current DMA transfer.
Definition at line 451 of file extra_monitor_support.c.
|
static |
Index (by words) into the block of SDRAM being read.
Definition at line 454 of file extra_monitor_support.c.
|
static |
Size of the current DMA transfer.
Definition at line 457 of file extra_monitor_support.c.
|
static |
The current transaction identifier, identifying the stream of items being moved.
Also written to the user1 SARK register
Definition at line 463 of file extra_monitor_support.c.
Whether we are about the first transmission in a stream.
Definition at line 466 of file extra_monitor_support.c.
Whether we have reached the end of a stream.
Definition at line 469 of file extra_monitor_support.c.
|
static |
The size of payload DMA'd into the send buffer.
Definition at line 472 of file extra_monitor_support.c.
|
static |
The number of missing packets that the host wants us to resend.
Definition at line 477 of file extra_monitor_support.c.
|
static |
The number of sequence numbers of missing packets that we've accumulated.
Definition at line 480 of file extra_monitor_support.c.
|
static |
The number of words that remain to be read from SDRAM.
Definition at line 483 of file extra_monitor_support.c.
Buffer in SDRAM where the sequence numbers of missing packets are stored.
Definition at line 486 of file extra_monitor_support.c.
|
static |
The maximum sequence number that can be in a transmission stream.
Definition at line 489 of file extra_monitor_support.c.
|
static |
DTCM buffer of sequence numbers to be retransmitted.
Gets filled from data_out_missing_seq_num_sdram_address by DMA
Definition at line 496 of file extra_monitor_support.c.
|
static |
Used to track where we are in the retransmissions.
Definition at line 499 of file extra_monitor_support.c.
|
static |
The current sequence number for the chunk being being DMA'd in.
Definition at line 502 of file extra_monitor_support.c.
|
static |
Index into data_out_retransmit_seq_nums used to track where we are in a chunk of sequence numbers to retransmit.
Definition at line 506 of file extra_monitor_support.c.
|
static |
The tag of the current DMA.
Definition at line 509 of file extra_monitor_support.c.
Whether we're transmitting or retransmitting.
Definition at line 512 of file extra_monitor_support.c.
The location in SDRAM where data is being read out from.
Definition at line 515 of file extra_monitor_support.c.
|
static |
The SpiNNaker packet key for a piece of data.
Definition at line 518 of file extra_monitor_support.c.
|
static |
The SpiNNaker packet key for the start of a sequence.
Definition at line 521 of file extra_monitor_support.c.
|
static |
The SpiNNaker packet key for the first piece of data of some data.
Definition at line 524 of file extra_monitor_support.c.
|
static |
The SpiNNaker packet key for the transaction ID.
Definition at line 527 of file extra_monitor_support.c.
|
static |
The SpiNNaker packet key for the end of a stream.
Definition at line 530 of file extra_monitor_support.c.
Whether the data out streaming has been asked to stop.
Definition at line 533 of file extra_monitor_support.c.
|
static |
Where are we (as a P2P address)?
Used for error reporting.
Definition at line 545 of file extra_monitor_support.c.
|
static |
Where we collect provenance in SDRAM.
Definition at line 551 of file extra_monitor_support.c.
|
static |
The DSE regions structure.
Definition at line 554 of file extra_monitor_support.c.