SpiNNFrontEndCommon 7.1.1
Common support code for user-facing front end systems.
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions | Variables
extra_monitor_support.c File Reference

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 voiddse_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 voidsdram_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_tget_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_tdata_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_tprov
 Where we collect provenance in SDRAM.
 
static data_specification_metadata_tdse_regions
 The DSE regions structure.
 

Detailed Description

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).

Note
This application does not use spin1_api as it needs low-level access to interrupts.

Definition in file extra_monitor_support.c.


Data Structure Documentation

◆ dumped_packet_t

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)

◆ sdp_data_out_t

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.

◆ router_entry_t

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)

◆ data_in_data_items_t

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.

◆ reinjector_status_response_packet_t

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.

◆ reinject_config_t

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.
Warning
The sense is inverted; 0 means inject, and 1 means don't
uint point_to_point_flag Whether we are reinjecting point-to-point packets.
Warning
The sense is inverted; 0 means inject, and 1 means don't
uint fixed_route_flag Whether we are reinjecting fixed route packets.
Warning
The sense is inverted; 0 means inject, and 1 means don't
uint nearest_neighbour_flag Whether we are reinjecting nearest neighbour packets.
Warning
The sense is inverted; 0 means inject, and 1 means don't
uint reinjection_base_mc_key

◆ data_speed_out_config_t

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.

◆ extra_monitor_provenance_t

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.

Macro Definition Documentation

◆ DMA_BURST_SIZE

#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.

◆ N_DMA_BUFFERS

#define N_DMA_BUFFERS   2

the number of DMA buffers to build

Definition at line 58 of file extra_monitor_support.c.

◆ END_FLAG_SIZE

#define END_FLAG_SIZE   4

flag size for saying ended, in bytes

Definition at line 65 of file extra_monitor_support.c.

◆ END_FLAG

#define END_FLAG   0xFFFFFFFF

flag for saying stuff has ended

Definition at line 67 of file extra_monitor_support.c.

◆ SDP_TIMEOUT

#define SDP_TIMEOUT   1000

timeout for trying to end SDP packet

Definition at line 99 of file extra_monitor_support.c.

◆ LENGTH_OF_SDP_HEADER

#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.

◆ N_ROUTER_ENTRIES

#define N_ROUTER_ENTRIES   1024

max router entries

Definition at line 109 of file extra_monitor_support.c.

◆ INVALID_ROUTER_ENTRY_KEY

#define INVALID_ROUTER_ENTRY_KEY   0xFFFFFFFF

hardcoded invalud router entry state for key

Definition at line 112 of file extra_monitor_support.c.

◆ INVALID_ROUTER_ENTRY_MASK

#define INVALID_ROUTER_ENTRY_MASK   0x00000000

hardcoded invalid router entry state for mask

Definition at line 115 of file extra_monitor_support.c.

◆ INVALID_ROUTER_ENTRY_ROUTE

#define INVALID_ROUTER_ENTRY_ROUTE   0xFF000000

hardcoded invalid router entry state for route

Definition at line 118 of file extra_monitor_support.c.

◆ APP_ID_MASK_FROM_FREE

#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.

◆ APP_ID_OFFSET_FROM_FREE

#define APP_ID_OFFSET_FROM_FREE   24

offset for getting app id from free

Definition at line 124 of file extra_monitor_support.c.

◆ N_BASIC_SYSTEM_ROUTER_ENTRIES

#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.

◆ N_USABLE_ROUTER_ENTRIES

#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.

◆ TDMA_WAIT_PERIOD

#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.

◆ ROUTER_INITIAL_TIMEOUT

#define ROUTER_INITIAL_TIMEOUT   0x4f

The initial timeout of the router.

Definition at line 140 of file extra_monitor_support.c.

◆ TICK_PERIOD

#define TICK_PERIOD   10

Amount to call the timer callback.

Definition at line 143 of file extra_monitor_support.c.

◆ PKT_QUEUE_SIZE

#define PKT_QUEUE_SIZE   4096

dumped packet queue length

Definition at line 146 of file extra_monitor_support.c.

◆ ROUTER_TIMEOUT_MAX

#define ROUTER_TIMEOUT_MAX   0xFF

Maximum router timeout value.

Definition at line 149 of file extra_monitor_support.c.

Enumeration Type Documentation

◆ anonymous enum

Sizes of things to do with data speed up out message sizes.

Enumerator
SEQUENCE_NUMBER_SIZE 

Size of the sequence number, in words.

TRANSACTION_ID_SIZE 

Size of the transaction ID, in words.

SDP_PAYLOAD_WORDS 

Effective size of the SDP packet payload, in words of actual content.

SDP_PAYLOAD_BYTES 

Effective size of the SDP packet payload, in bytes of actual content.

Definition at line 70 of file extra_monitor_support.c.

◆ data_out_sdp_commands

SDP flags.

Enumerator
SDP_CMD_START_SENDING_DATA 

send data command ID in SDP

SDP_CMD_START_OF_MISSING_SDP_PACKETS 

start missing SDP sequence numbers in SDP (this includes number of SDP packets expected)

SDP_CMD_MORE_MISSING_SDP_PACKETS 

other missing SDP sequence numbers in SDP

SDP_CMD_CLEAR 

stop sending now!

Definition at line 86 of file extra_monitor_support.c.

◆ anonymous enum

VIC slot definitions.

Enumerator
CPU_SLOT 

CPU VIC slot (WDOG and SDP; message from SCAMP for SARK)

CC_SLOT 

Communications controller VIC slot.

TIMER_SLOT 

Timer VIC slot.

DMA_SLOT 

DMA completed VIC slot.

DMA_ERROR_SLOT 

DMA error VIC slot.

DMA_TIMEOUT_SLOT 

DMA timeout VIC slot.

MC_PAYLOAD_SLOT 

Multicast-with-payload message arrived VIC slot.

Definition at line 156 of file extra_monitor_support.c.

◆ dma_tags_for_data_speed_up

SDP tags used by the SDRAM reader component.

Enumerator
DMA_TAG_READ_FOR_TRANSMISSION 

DMA complete tag for original transmission, this isn't used yet, but needed for full protocol

DMA_TAG_READ_FOR_RETRANSMISSION 

DMA complete tag for retransmission of data sequence numbers.

DMA_TAG_RETRANSMISSION_READING 

DMA complete tag for the reading from SDRAM of data to be retransmitted.

DMA_TAG_FOR_WRITING_MISSING_SEQ_NUMS 

DMA complete tag for writing the missing SEQ numbers to SDRAM.

Definition at line 193 of file extra_monitor_support.c.

◆ missing_seq_num_data_positions

position in message for missing sequence numbers

Definition at line 241 of file extra_monitor_support.c.

◆ functionality_to_port_num_map

values for SDP port numbers that this core will respond to

Definition at line 297 of file extra_monitor_support.c.

◆ data_spec_regions

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.

◆ speed_up_in_command

Commands for supporting Data In routing.

Enumerator
SDP_COMMAND_FOR_SAVING_APPLICATION_MC_ROUTING 

read in application multicast routes

SDP_COMMAND_FOR_LOADING_APPLICATION_MC_ROUTES 

load application multicast routes

SDP_COMMAND_FOR_LOADING_SYSTEM_MC_ROUTES 

load system multicast routes

Definition at line 316 of file extra_monitor_support.c.

◆ callback_priorities

values for the priority for each callback

Definition at line 352 of file extra_monitor_support.c.

Function Documentation

◆ dse_block()

static void * dse_block ( uint  index)
inlinestatic

Get the DSG region with the given index.

Does not validate the DSG header!

Parameters
[in]indexThe index into the region table.
Returns
The address of the region

Definition at line 562 of file extra_monitor_support.c.

◆ publish_transaction_id()

static void publish_transaction_id ( int  transaction_id)
static

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.

Parameters
[in]transaction_idThe value to store

Definition at line 572 of file extra_monitor_support.c.

◆ sdram_alloc()

static void * sdram_alloc ( uint  size)
inlinestatic

allocate a block of SDRAM (to be freed with sdram_free())

Parameters
[in]sizethe size of the block
Returns
a pointer to the block, or NULL if allocation failed

Definition at line 579 of file extra_monitor_support.c.

◆ sdram_free()

static void sdram_free ( void data)
inlinestatic

free a block of SDRAM allocated with sdram_alloc()

Parameters
[in]datathe block to free

Definition at line 586 of file extra_monitor_support.c.

◆ sdram_max_block_size()

static uint sdram_max_block_size ( void  )
inlinestatic

the maximum SDRAM block size

Returns
The maximum size of heap memory block that may be allocated in SDRAM

Definition at line 593 of file extra_monitor_support.c.

◆ get_message_from_mailbox()

static sdp_msg_t * get_message_from_mailbox ( void  )
inlinestatic

How to get an SDP message out of the mailbox correctly.

Returns
The retrieved message, or NULL if message buffer allocation failed.

Definition at line 600 of file extra_monitor_support.c.

◆ vic_interrupt_done()

static void vic_interrupt_done ( void  )
inlinestatic

Marks the end of an interrupt handler from the VIC's perspective.

Definition at line 612 of file extra_monitor_support.c.

◆ set_vic_callback()

static void set_vic_callback ( uint8_t  slot,
uint  type,
vic_interrupt_handler_t  callback 
)
inlinestatic

Install an interrupt handler.

Parameters
[in]slotWhere to install the handler (controls priority).
[in]typeWhat we are handling.
[in]callbackThe interrupt handler to install.

Definition at line 620 of file extra_monitor_support.c.

◆ reinjection_enable_comms_interrupt()

static void reinjection_enable_comms_interrupt ( void  )
inlinestatic

Enable the interrupt when the Communications Controller can accept another packet.

Definition at line 635 of file extra_monitor_support.c.

◆ reinjection_disable_comms_interrupt()

static void reinjection_disable_comms_interrupt ( void  )
inlinestatic

Disable the interrupt when the Communications Controller can accept another packet.

Definition at line 643 of file extra_monitor_support.c.

◆ reinjection_can_send_now()

static bool reinjection_can_send_now ( void  )
inlinestatic

Whether the comms hardware can accept packet now.

Returns
True if the router output stage is empty.

Definition at line 651 of file extra_monitor_support.c.

◆ reinjection_timer_callback()

static void reinjection_timer_callback ( void  )
static

the plugin callback for the timer

Definition at line 656 of file extra_monitor_support.c.

◆ reinjection_reinject_packet()

static void reinjection_reinject_packet ( const dumped_packet_t pkt)
inlinestatic

Does the actual reinjection of a packet.

Parameters
[in]pktThe packet to reinject.

Definition at line 684 of file extra_monitor_support.c.

◆ reinjection_ready_to_send_callback()

static void reinjection_ready_to_send_callback ( void  )
static

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.

◆ reinjection_dropped_packet_callback()

static void reinjection_dropped_packet_callback ( void  )
static

the callback plugin for handling dropped packets

Definition at line 748 of file extra_monitor_support.c.

◆ reinjection_read_packet_types()

static void reinjection_read_packet_types ( const reinject_config_t config)
static

reads a DSG memory region to set packet types for reinjection

Parameters
[in]configwhere to read the reinjection packet types from

Definition at line 823 of file extra_monitor_support.c.

◆ reinjection_set_wait1_timeout()

static void reinjection_set_wait1_timeout ( uint  payload)
inlinestatic

Set the wait1 router timeout.

Parameters
[in]payloadThe encoded value to set. Must be in legal range.

Definition at line 864 of file extra_monitor_support.c.

◆ reinjection_set_wait2_timeout()

static void reinjection_set_wait2_timeout ( uint  payload)
inlinestatic

Set the wait2 router timeout.

Parameters
[in]payloadThe encoded value to set. Must be in legal range.

Definition at line 871 of file extra_monitor_support.c.

◆ reinjection_set_timeout_sdp()

static int reinjection_set_timeout_sdp ( sdp_msg_t msg)
inlinestatic

Set the router wait1 timeout.

Delegates to reinjection_set_timeout()

Parameters
[in,out]msgThe message requesting the change. Will be updated with response
Returns
The payload size of the response message.

Definition at line 883 of file extra_monitor_support.c.

◆ reinjection_set_emergency_timeout_sdp()

static int reinjection_set_emergency_timeout_sdp ( sdp_msg_t msg)
inlinestatic

Set the router wait2 timeout.

Delegates to reinjection_set_emergency_timeout()

Parameters
[in,out]msgThe message requesting the change. Will be updated with response
Returns
The payload size of the response message.

Definition at line 907 of file extra_monitor_support.c.

◆ reinjection_set_packet_types()

static int reinjection_set_packet_types ( sdp_msg_t msg)
inlinestatic

Set the re-injection options.

Parameters
[in,out]msgThe message requesting the change. Will be updated with response
Returns
The payload size of the response message.

Definition at line 928 of file extra_monitor_support.c.

◆ reinjection_get_status()

static int reinjection_get_status ( sdp_msg_t msg)
inlinestatic

Get the status and put it in the packet.

Parameters
[in,out]msgThe message requesting the change. Will be updated with response
Returns
The payload size of the response message.

Definition at line 949 of file extra_monitor_support.c.

◆ reinjection_reset_counters()

static int reinjection_reset_counters ( sdp_msg_t msg)
inlinestatic

Reset the counters.

Parameters
[in,out]msgThe message requesting the change. Will be updated with response
Returns
The payload size of the response message.

Definition at line 985 of file extra_monitor_support.c.

◆ reinjection_exit()

static int reinjection_exit ( sdp_msg_t msg)
inlinestatic

Stop the reinjector.

Parameters
[in,out]msgThe message requesting the change. Will be updated with response
Returns
The payload size of the response message.

Definition at line 1003 of file extra_monitor_support.c.

◆ reinjection_clear()

static void reinjection_clear ( void  )
static

Clear the queue of messages to reinject.

Definition at line 1021 of file extra_monitor_support.c.

◆ reinjection_clear_message()

static int reinjection_clear_message ( sdp_msg_t msg)
inlinestatic

Clear the queue of messages to reinject.

Parameters
[in,out]msgThe message requesting the change. Will be updated with response
Returns
The payload size of the response message.

Definition at line 1037 of file extra_monitor_support.c.

◆ reinjection_sdp_command()

static uint reinjection_sdp_command ( sdp_msg_t msg)
static

handles the commands for the reinjector code.

Parameters
[in,out]msgThe message with the command. Will be updated with response.
Returns
the length of extra data put into the message for return

Definition at line 1049 of file extra_monitor_support.c.

◆ reinjection_configure_timer()

static void reinjection_configure_timer ( void  )
static

SARK level timer interrupt setup.

Definition at line 1098 of file extra_monitor_support.c.

◆ reinjection_configure_comms_controller()

static void reinjection_configure_comms_controller ( void  )
static

Store this chip's p2p address for future use.

Definition at line 1112 of file extra_monitor_support.c.

◆ reinjection_configure_router()

static void reinjection_configure_router ( void  )
static

sets up SARK and router to have a interrupt when a packet is dropped

Definition at line 1118 of file extra_monitor_support.c.

◆ data_in_clear_router()

static void data_in_clear_router ( void  )
static

Clears all (non-SARK/SCAMP) entries from the router.

Definition at line 1147 of file extra_monitor_support.c.

◆ data_in_process_boundary()

static void data_in_process_boundary ( void  )
inlinestatic

Resets the state due to reaching the end of a data stream.

Definition at line 1165 of file extra_monitor_support.c.

◆ data_in_process_address()

static void data_in_process_address ( uint  data)
inlinestatic

Sets the next location to write data at.

Parameters
[in]dataThe address to write at

Definition at line 1178 of file extra_monitor_support.c.

◆ data_in_process_data()

static void data_in_process_data ( uint  data)
inlinestatic

Writes a word in a stream and advances the write pointer.

Parameters
[in]dataThe word to write

Definition at line 1190 of file extra_monitor_support.c.

◆ process_mc_payload_packet()

static void process_mc_payload_packet ( void  )
static

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.

◆ data_in_load_router()

static void data_in_load_router ( router_entry_t sdram_address,
uint  n_entries 
)
static

Writes router entries to the router.

Parameters
[in]sdram_addressthe sdram address where the router entries reside
[in]n_entrieshow many router entries to read in

Definition at line 1242 of file extra_monitor_support.c.

◆ data_in_save_router()

static void data_in_save_router ( void  )
static

reads in routers entries and places in application sdram location

Definition at line 1285 of file extra_monitor_support.c.

◆ data_in_speed_up_load_in_system_tables()

static void data_in_speed_up_load_in_system_tables ( data_in_data_items_t items)
static

Sets up system routes on router.

Required by the data in speed up functionality.

Parameters
[in]itemsThe collection of system routes to load.

Definition at line 1311 of file extra_monitor_support.c.

◆ data_in_speed_up_load_in_application_routes()

static void data_in_speed_up_load_in_application_routes ( void  )
static

Sets up application routes on router.

Required by data in speed up functionality.

Definition at line 1331 of file extra_monitor_support.c.

◆ data_in_speed_up_command()

static uint data_in_speed_up_command ( sdp_msg_t msg)
static

The handler for all control messages coming in for data in speed up functionality.

Parameters
[in,out]msgthe SDP message (without SCP header); will be updated with response
Returns
complete code if successful

Definition at line 1349 of file extra_monitor_support.c.

◆ send_fixed_route_packet()

static void send_fixed_route_packet ( uint32_t  key,
uint32_t  data 
)
inlinestatic

Sends a fixed route packet with payload.

Parameters
[in]keyThe "key" (first word) of the packet.
[in]dataThe "data" (second word) of the packet.

Whether the comms controller can accept another packet

Definition at line 1393 of file extra_monitor_support.c.

◆ data_out_send_data_block()

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 
)
static

takes a DMA'ed block and transmits its contents as fixed route packets to the packet gatherer.

Parameters
[in]current_dma_pointerthe DMA pointer for the 2 buffers
[in]n_elements_to_sendthe number of multicast packets to send
[in]first_packet_keythe first key to transmit with.
[in]second_packet_keythe second key to transmit with; all subsequent packets use the default key.

Definition at line 1426 of file extra_monitor_support.c.

◆ data_out_start_dma_read()

static void data_out_start_dma_read ( uint32_t  dma_tag,
void source,
void destination,
uint  n_words 
)
inlinestatic

Initiate a DMA read, copying from SDRAM into DTCM.

This is a basic operation. It does not include any safeguards.

Parameters
[in]dma_tagA label for what is being read. Should be one of the values in dma_tags_for_data_speed_up
[in]sourceWhere in SDRAM to read from.
[in]destinationWhere in DTCM to write to.
[in]n_wordsThe number of words to transfer. Can be up to 32k words.

Definition at line 1454 of file extra_monitor_support.c.

◆ data_out_read()

static void data_out_read ( uint32_t  dma_tag,
uint32_t  offset,
uint32_t  items_to_read 
)
static

sets off a DMA reading a block of SDRAM in preparation for sending to the packet gatherer

Parameters
[in]dma_tagthe DMA tag associated with this read. transmission or retransmission
[in]offsetwhere in the data array to start writing to
[in]items_to_readthe number of word items to read

Definition at line 1473 of file extra_monitor_support.c.

◆ data_out_send_end_flag()

static void data_out_send_end_flag ( void  )
static

Sends the end flag to the packet gatherer.

Definition at line 1493 of file extra_monitor_support.c.

◆ data_out_dma_complete_reading_for_original_transmission()

static void data_out_dma_complete_reading_for_original_transmission ( void  )
static

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.

◆ data_out_write_missing_seq_nums_into_sdram()

static void data_out_write_missing_seq_nums_into_sdram ( uint32_t  data[],
uint  length,
uint32_t  start_offset 
)
static

Basic write sequence numbers to SDRAM that need retransmitting.

Parameters
[in]datadata to write into SDRAM
[in]lengthlength of data
[in]start_offsetwhere in the data to start writing in from.

Definition at line 1559 of file extra_monitor_support.c.

◆ data_out_store_missing_seq_nums()

static void data_out_store_missing_seq_nums ( uint32_t  data[],
uint  length,
bool  first 
)
static

Store sequence numbers into SDRAM.

Acts as a memory management front end to data_out_write_missing_seq_nums_into_sdram()

Parameters
[in]datathe message data to read into SDRAM
[in]lengthhow much data to read
[in]firstif first packet about missing sequence numbers. If so there is different behaviour

Definition at line 1583 of file extra_monitor_support.c.

◆ data_out_retransmission_dma_read()

static void data_out_retransmission_dma_read ( void  )
static

sets off a DMA for retransmission stuff

Definition at line 1635 of file extra_monitor_support.c.

◆ data_out_dma_complete_read_missing_seqeuence_nums()

static void data_out_dma_complete_read_missing_seqeuence_nums ( void  )
static

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.

◆ data_out_dma_complete_reading_retransmission_data()

static void data_out_dma_complete_reading_retransmission_data ( void  )
static

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.

◆ data_out_dma_complete_writing_missing_seq_to_sdram()

static void data_out_dma_complete_writing_missing_seq_to_sdram ( void  )
static

DMA complete callback for have read missing sequence number data.

Definition at line 1720 of file extra_monitor_support.c.

◆ data_out_speed_up_command()

static void data_out_speed_up_command ( sdp_msg_pure_data msg)
static

the handler for all messages coming in for data speed up functionality.

Parameters
[in]msgthe SDP message (without SCP header)

Definition at line 1729 of file extra_monitor_support.c.

◆ data_out_dma_complete()

static void data_out_dma_complete ( void  )
static

◆ data_out_dma_error()

static void data_out_dma_error ( void  )
static

the handler for DMA errors

Definition at line 1897 of file extra_monitor_support.c.

◆ data_out_dma_timeout()

static void data_out_dma_timeout ( void  )
static

the handler for DMA timeouts (hopefully unlikely...)

Definition at line 1908 of file extra_monitor_support.c.

◆ reinjection_initialise()

static void reinjection_initialise ( void  )
static

Sets up data and callbacks required by the reinjection system.

Definition at line 1985 of file extra_monitor_support.c.

◆ data_out_initialise()

static void data_out_initialise ( void  )
static

Sets up data and callbacks required by the data speed up system.

Definition at line 2010 of file extra_monitor_support.c.

◆ data_in_initialise()

static void data_in_initialise ( void  )
static

Sets up data and callback required by the data in speed up system.

Definition at line 2062 of file extra_monitor_support.c.

◆ provenance_initialise()

static void provenance_initialise ( void  )
static

Set up where we collect provenance.

Definition at line 2087 of file extra_monitor_support.c.

◆ c_main()

void c_main ( void  )

main entry point

Definition at line 2098 of file extra_monitor_support.c.

Variable Documentation

◆ reinject_p2p_source_id

uint reinject_p2p_source_id
static

The content of the communications controller SAR register.

Specifically, the P2P source identifier.

Definition at line 364 of file extra_monitor_support.c.

◆ reinject_pkt_queue

pkt_queue_t reinject_pkt_queue
static

dumped packet queue

Definition at line 367 of file extra_monitor_support.c.

◆ reinject_n_dropped_packets

uint reinject_n_dropped_packets
static

Count of all packets dropped by router.

Definition at line 371 of file extra_monitor_support.c.

◆ reinject_n_missed_dropped_packets

uint reinject_n_missed_dropped_packets
static

Count of packets dumped because the router was itself overloaded.

Definition at line 374 of file extra_monitor_support.c.

◆ reinject_n_dropped_packet_overflows

uint reinject_n_dropped_packet_overflows
static

Count of packets lost because we ran out of queue space.

Definition at line 377 of file extra_monitor_support.c.

◆ reinject_n_reinjected_packets

uint reinject_n_reinjected_packets
static

Count of all packets reinjected.

Definition at line 380 of file extra_monitor_support.c.

◆ reinject_n_link_dumped_packets

uint reinject_n_link_dumped_packets
static

Estimated count of packets dropped by router because a destination link is busy.

Definition at line 384 of file extra_monitor_support.c.

◆ reinject_n_processor_dumped_packets

uint reinject_n_processor_dumped_packets
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.

◆ reinject_link_proc_bits

uint reinject_link_proc_bits
static

Which links and processors packets were dumped from (cumulative bit field)

Definition at line 391 of file extra_monitor_support.c.

◆ reinject_mc

bool reinject_mc
static

Flag: whether to reinject multicast packets.

Definition at line 396 of file extra_monitor_support.c.

◆ reinject_pp

bool reinject_pp
static

Flag: whether to reinject point-to-point packets.

Definition at line 399 of file extra_monitor_support.c.

◆ reinject_nn

bool reinject_nn
static

Flag: whether to reinject nearest neighbour packets.

Definition at line 402 of file extra_monitor_support.c.

◆ reinject_fr

bool reinject_fr
static

Flag: whether to reinject fixed route packets.

Definition at line 405 of file extra_monitor_support.c.

◆ reinject_run

bool reinject_run = true
static

Whether we are running the reinjector.

Definition at line 408 of file extra_monitor_support.c.

◆ data_in_saved_application_router_table

router_entry_t* data_in_saved_application_router_table = NULL
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.

◆ data_in_address_key

uint data_in_address_key = 0
static

This packet contains the address of the start of a stream.

Definition at line 420 of file extra_monitor_support.c.

◆ data_in_data_key

uint data_in_data_key = 0
static

This packet contains a word of data in the stream.

Definition at line 423 of file extra_monitor_support.c.

◆ data_in_boundary_key

uint data_in_boundary_key = 0
static

This packet is the end of a stream.

Definition at line 426 of file extra_monitor_support.c.

◆ data_in_write_address

address_t data_in_write_address = NULL
static

Where we will write the next received word. NULL if not in a stream.

Definition at line 429 of file extra_monitor_support.c.

◆ data_in_first_write_address

address_t data_in_first_write_address = NULL
static

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.

◆ data_in_application_table_n_valid_entries

int data_in_application_table_n_valid_entries = 0
static

The size of the data_in_saved_application_router_table.

Definition at line 435 of file extra_monitor_support.c.

◆ data_in_last_table_load_was_system

bool data_in_last_table_load_was_system = false
static

Do we have the system router table loaded?

Definition at line 438 of file extra_monitor_support.c.

◆ data_out_data_to_transmit

uint32_t data_out_data_to_transmit[N_DMA_BUFFERS][ITEMS_PER_DATA_PACKET]
static

The DTCM buffers holding data to transmit. DMA targets.

Definition at line 447 of file extra_monitor_support.c.

◆ data_out_transmit_dma_pointer

uint32_t data_out_transmit_dma_pointer = 0
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.

◆ data_out_position_in_store

uint32_t data_out_position_in_store = 0
static

Index (by words) into the block of SDRAM being read.

Definition at line 454 of file extra_monitor_support.c.

◆ data_out_num_items_read

uint32_t data_out_num_items_read = 0
static

Size of the current DMA transfer.

Definition at line 457 of file extra_monitor_support.c.

◆ data_out_transaction_id

uint32_t data_out_transaction_id = 0
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.

◆ data_out_first_transmission

bool data_out_first_transmission = true
static

Whether we are about the first transmission in a stream.

Definition at line 466 of file extra_monitor_support.c.

◆ data_out_has_finished

bool data_out_has_finished = false
static

Whether we have reached the end of a stream.

Definition at line 469 of file extra_monitor_support.c.

◆ data_out_retransmitted_seq_num_items_read

uint32_t data_out_retransmitted_seq_num_items_read = 0
static

The size of payload DMA'd into the send buffer.

Definition at line 472 of file extra_monitor_support.c.

◆ data_out_n_missing_seq_packets

uint32_t data_out_n_missing_seq_packets = 0
static

The number of missing packets that the host wants us to resend.

Definition at line 477 of file extra_monitor_support.c.

◆ data_out_n_missing_seq_nums_in_sdram

uint32_t data_out_n_missing_seq_nums_in_sdram = 0
static

The number of sequence numbers of missing packets that we've accumulated.

Definition at line 480 of file extra_monitor_support.c.

◆ data_out_n_elements_to_read_from_sdram

uint32_t data_out_n_elements_to_read_from_sdram = 0
static

The number of words that remain to be read from SDRAM.

Definition at line 483 of file extra_monitor_support.c.

◆ data_out_missing_seq_num_sdram_address

address_t data_out_missing_seq_num_sdram_address = NULL
static

Buffer in SDRAM where the sequence numbers of missing packets are stored.

Definition at line 486 of file extra_monitor_support.c.

◆ data_out_max_seq_num

uint32_t data_out_max_seq_num = 0
static

The maximum sequence number that can be in a transmission stream.

Definition at line 489 of file extra_monitor_support.c.

◆ data_out_retransmit_seq_nums

uint32_t data_out_retransmit_seq_nums[ITEMS_PER_DATA_PACKET]
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.

◆ data_out_position_for_retransmission

uint32_t data_out_position_for_retransmission = 0
static

Used to track where we are in the retransmissions.

Definition at line 499 of file extra_monitor_support.c.

◆ data_out_missing_seq_num_being_processed

uint32_t data_out_missing_seq_num_being_processed = 0
static

The current sequence number for the chunk being being DMA'd in.

Definition at line 502 of file extra_monitor_support.c.

◆ data_out_read_data_position

uint32_t data_out_read_data_position = 0
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.

◆ data_out_dma_port_last_used

uint32_t data_out_dma_port_last_used = 0
static

The tag of the current DMA.

Definition at line 509 of file extra_monitor_support.c.

◆ data_out_in_retransmission_mode

bool data_out_in_retransmission_mode = false
static

Whether we're transmitting or retransmitting.

Definition at line 512 of file extra_monitor_support.c.

◆ data_out_store_address

address_t data_out_store_address = NULL
static

The location in SDRAM where data is being read out from.

Definition at line 515 of file extra_monitor_support.c.

◆ data_out_basic_data_key

uint32_t data_out_basic_data_key = 0
static

The SpiNNaker packet key for a piece of data.

Definition at line 518 of file extra_monitor_support.c.

◆ data_out_new_sequence_key

uint32_t data_out_new_sequence_key = 0
static

The SpiNNaker packet key for the start of a sequence.

Definition at line 521 of file extra_monitor_support.c.

◆ data_out_first_data_key

uint32_t data_out_first_data_key = 0
static

The SpiNNaker packet key for the first piece of data of some data.

Definition at line 524 of file extra_monitor_support.c.

◆ data_out_transaction_id_key

uint32_t data_out_transaction_id_key = 0
static

The SpiNNaker packet key for the transaction ID.

Definition at line 527 of file extra_monitor_support.c.

◆ data_out_end_flag_key

uint32_t data_out_end_flag_key = 0
static

The SpiNNaker packet key for the end of a stream.

Definition at line 530 of file extra_monitor_support.c.

◆ data_out_stop

bool data_out_stop = false
static

Whether the data out streaming has been asked to stop.

Definition at line 533 of file extra_monitor_support.c.

◆ my_addr

ushort my_addr
static

Where are we (as a P2P address)?

Used for error reporting.

Definition at line 545 of file extra_monitor_support.c.

◆ prov

Where we collect provenance in SDRAM.

Definition at line 551 of file extra_monitor_support.c.

◆ dse_regions

data_specification_metadata_t* dse_regions
static

The DSE regions structure.

Definition at line 554 of file extra_monitor_support.c.