22#include "../common/routing_table.h"
24#ifndef __RT_SINGLE_H__
25#define __RT_SINGLE_H__
65#define RTR_MC_SET_FAILED 0
77#define DMA_COMPLETE 0x400
80#define DMA_CHECK_MASK 0x401
118 log_debug(
"compress_as_much_as_possible = %d",
129 log_error(
"failed to allocate memory for routing tables");
156 for (uint32_t i = 0; i <
table->
size; i++) {
158 uint32_t route = entry.
route | (app_id << 24);
162 log_warning(
"failed to set a router table entry at index %d",
178 uint32_t length = n_entries *
sizeof(
entry_t);
SpiNNaker debug header file.
void log_error(const char *message,...)
This function logs errors. Errors usually indicate a serious fault in the program,...
void log_warning(const char *message,...)
This function logs warnings.
void log_debug(const char *message,...)
This function logs debugging messages. This level of message is normally not printed except when the ...
key_mask_t key_mask
Key and mask.
uint32_t mask
Mask for the key_mask.
entry_t entries[]
Entries in the table.
uint32_t size
Number of entries in the table.
uint32_t route
Routing direction.
uint32_t key
Key for the key_mask.
Holds data for a routing table entry.
Holds a routing table description.
uint32_t table_size
Initial size of the routing table.
static bool dma_done(void)
Is there a DMA currently running?
static void read_table(header_t *header)
Read a new copy of the routing table from SDRAM.
#define DMA_COMPLETE
Value of the masked DMA status register when transfer is complete.
static const uint32_t DMA_READ_FLAGS
DMA read flags.
void print_header(header_t *header)
Print the header object for debug purposes.
entry_t entries[]
Routing table entries.
bool routing_table_get_entries(uint32_t start_entry, uint32_t n_entries, entry_t *output)
Gets a pointer to several entries.
#define RTR_MC_SET_FAILED
flag for if a rtr_mc_set() failure.
table_t * table
The table being manipulated.
#define DMA_CHECK_MASK
Mask to apply to the DMA status register to check for completion.
uint32_t compress_as_much_as_possible
int routing_table_get_n_entries(void)
Get the number of entries in the routing table.
bool load_routing_table(uint32_t app_id)
Load a routing table to the router.
entry_t * routing_table_get_entry(uint32_t entry_id_to_find)
Gets a pointer to where this entry is stored.
void routing_table_wait_for_last_transfer(void)
Waits for the last transfer from routing_table_get_entries to complete.
void routing_table_remove_from_size(int size_to_remove)
updates table stores accordingly.
uint rtr_alloc_id(uint size, uint app_id)
uint rtr_mc_set(uint entry, uint key, uint mask, uint route)
void spin1_memcpy(void *dst, void const *src, uint len)