|
SpiNNFrontEndCommon 7.4.2
Common support code for user-facing front end systems.
|
Utilities for a single routing table. More...
Go to the source code of this file.
Data Structures | |
| struct | key_mask_t |
| Holds key and mask. More... | |
| struct | entry_t |
| Holds data for a routing table entry. More... | |
| struct | table_t |
| Holds a routing table description. More... | |
| struct | header_t |
| The header of the routing table information in the input data block. More... | |
Macros | |
| #define | RTR_MC_SET_FAILED 0 |
| flag for if a rtr_mc_set() failure. | |
Functions | |
| entry_t * | routing_table_get_entry (uint32_t entry_id_to_find) |
| Gets a pointer to where this entry is stored. | |
| int | routing_table_get_n_entries (void) |
| Get the number of entries in the routing table. | |
| void | routing_table_remove_from_size (int size_to_remove) |
| updates table stores accordingly. | |
| static void | routing_table_put_entry (const entry_t *entry, int index) |
| Write an entry to a specific index. | |
| static void | routing_table_copy_entry (int new_index, int old_index) |
| Copy an entry from one index to another. | |
| static void | swap_entries (int a, int b) |
| Swap a pair of entries at the given indices. | |
| static uint32_t | key_mask_get_xs (key_mask_t km) |
| Get a mask of the Xs in a key_mask. | |
| static unsigned int | key_mask_count_xs (key_mask_t km) |
| Get a count of the Xs in a key_mask. | |
| static bool | key_mask_intersect (key_mask_t a, key_mask_t b) |
| Determine if two key_masks would match any of the same keys. | |
| static key_mask_t | key_mask_merge (key_mask_t a, key_mask_t b) |
| Generate a new key-mask which is a combination of two other key_masks. | |
| void | print_header (header_t *header) |
| Print the header object for debug purposes. | |
| static void | read_table (header_t *header) |
| Read a new copy of the routing table from SDRAM. | |
| bool | load_routing_table (uint32_t app_id) |
| Load a routing table to the router. | |
Variables | |
| table_t * | table |
| The table being manipulated. | |
Utilities for a single routing table.
Definition in file routing_table.h.
| struct key_mask_t |
Holds key and mask.
Definition at line 25 of file routing_table.h.
| Data Fields | ||
|---|---|---|
| uint32_t | key | Key for the key_mask. |
| uint32_t | mask | Mask for the key_mask. |
| struct entry_t |
Holds data for a routing table entry.
Definition at line 34 of file routing_table.h.
| Data Fields | ||
|---|---|---|
| key_mask_t | key_mask | Key and mask. |
| uint32_t | route | Routing direction. |
| uint32_t | source | Source of packets arriving at this entry. |
| struct table_t |
Holds a routing table description.
Definition at line 46 of file routing_table.h.
| Data Fields | ||
|---|---|---|
| uint32_t | size | Number of entries in the table. |
| entry_t | entries[] | Entries in the table. |
| struct header_t |
The header of the routing table information in the input data block.
This is found looking for a memory block with the right tag.
Definition at line 162 of file routing_table.h.
| Data Fields | ||
|---|---|---|
| uint32_t | app_id |
Application ID to use to load the routing table. This can be left as |
| uint32_t | compress_as_much_as_possible |
flag that uses the available entries of the router table instead of compressing as much as possible. |
| uint32_t | table_size | Initial size of the routing table. |
| entry_t | entries[] | Routing table entries. |
| #define RTR_MC_SET_FAILED 0 |
flag for if a rtr_mc_set() failure.
Definition at line 156 of file routing_table.h.
| entry_t * routing_table_get_entry | ( | uint32_t | entry_id_to_find | ) |
Gets a pointer to where this entry is stored.
Will not check if there is an entry with this id but will RTE if the id is too large
| [in] | entry_id_to_find | Id of entry to find pointer to |
Definition at line 64 of file routing_table.h.
| int routing_table_get_n_entries | ( | void | ) |
Get the number of entries in the routing table.
Definition at line 70 of file routing_table.h.
| void routing_table_remove_from_size | ( | int | size_to_remove | ) |
updates table stores accordingly.
will RTE if this causes the total entries to become negative.
| [in] | size_to_remove | the amount of size to remove from the table sets |
Definition at line 78 of file routing_table.h.
|
inlinestatic |
Write an entry to a specific index.
| [in] | entry | The entry to write |
| [in] | index | Where to write it. |
Definition at line 85 of file routing_table.h.
|
inlinestatic |
Copy an entry from one index to another.
| [in] | new_index | Where to copy to |
| [in] | old_index | Where to copy from |
Definition at line 96 of file routing_table.h.
|
inlinestatic |
Swap a pair of entries at the given indices.
| [in] | a | The first index where an entry is |
| [in] | b | The second index where an entry is |
Definition at line 104 of file routing_table.h.
|
inlinestatic |
Get a mask of the Xs in a key_mask.
| [in] | km | the key mask to get as xs |
Definition at line 122 of file routing_table.h.
|
inlinestatic |
Get a count of the Xs in a key_mask.
| [in] | km | the key mask struct to count |
Definition at line 129 of file routing_table.h.
|
inlinestatic |
Determine if two key_masks would match any of the same keys.
| [in] | a | key mask struct a |
| [in] | b | key mask struct b |
Definition at line 137 of file routing_table.h.
|
inlinestatic |
Generate a new key-mask which is a combination of two other key_masks.
c := a | b
| [in] | a | the first key mask struct |
| [in] | b | the second key mask struct |
Definition at line 146 of file routing_table.h.
| void print_header | ( | header_t * | header | ) |
Print the header object for debug purposes.
| [in] | header | the header to print |
Definition at line 181 of file routing_table.h.
|
static |
Read a new copy of the routing table from SDRAM.
| [in] | header | the header object |
Definition at line 190 of file routing_table.h.
| bool load_routing_table | ( | uint32_t | app_id | ) |
Load a routing table to the router.
| [in] | app_id | the app id for the routing table entries to be loaded under |
Definition at line 209 of file routing_table.h.
| table_t* table |
The table being manipulated.
This is common across all the functions in this file.
Definition at line 57 of file routing_table.h.