SpiNNFrontEndCommon 7.3.1
Common support code for user-facing front end systems.
|
SpiNNaker routing table minimisation. More...
#include <stdbool.h>
#include <debug.h>
#include "../common/routing_table.h"
#include "common/minimise.h"
Go to the source code of this file.
Macros | |
#define | MAX_NUM_ROUTES 1023 |
Absolute maximum number of routes that we may produce. | |
Functions | |
static entry_t | merge (const entry_t *entry1, const entry_t *entry2) |
Merges a single pair of route entries. | |
static int | transfer_next (int start_index, int n_items, uint32_t cache) |
static void | cancel_dmas (void) |
Cancel any outstanding DMA transfers. | |
static bool | find_merge_optimised (int left, int index) |
Finds if two routes can be merged. | |
static bool | find_merge (int left, int index) |
Finds if two routes can be merged. | |
static void | compress_by_route (int left, int right) |
Does the actual routing compression. | |
static void | sort_routes (void) |
Implementation of insertion sort for routes based on frequency. | |
static bool | update_frequency (int index) |
Computes route histogram. | |
static uint32_t | find_route_index (uint32_t route) |
void | sort_table (void) |
Implementation of insertion sort for routes based on route information. | |
bool | minimise_run (int target_length, bool *failed_by_malloc, volatile bool *stop_compressing) |
Implementation of minimise() | |
Variables | |
static uint32_t | write_index |
The index of the next place in the compressed table to write a route. | |
static int | remaining_index |
The index of the first route after the ones being compressed in this step. | |
static uint32_t | routes [MAX_NUM_ROUTES] |
Table of routes being produced. | |
static uint32_t | routes_frequency [MAX_NUM_ROUTES] = {0} |
Route frequency histogram. | |
static uint32_t | routes_count |
Count of unique routes (as opposed to routes with just different key_masks). | |
static entry_t | route_cache [2][MAX_NUM_ROUTES] |
Space for caching routes while going through them. | |
SpiNNaker routing table minimisation.
Minimises a routing table loaded into SDRAM and load the minimised table into the router using the specified application ID.
the exit code is stored in the user0 register
The memory address with tag "1" is expected contain the following struct (entry_t is defined in routing_table.h
but is described below).
Definition in file pair_minimize.h.
#define MAX_NUM_ROUTES 1023 |
Absolute maximum number of routes that we may produce.
Definition at line 36 of file pair_minimize.h.
Merges a single pair of route entries.
[in] | entry1 | The first route to merge. |
[in] | entry2 | The second route to merge. |
Definition at line 60 of file pair_minimize.h.
Definition at line 79 of file pair_minimize.h.
Cancel any outstanding DMA transfers.
Definition at line 92 of file pair_minimize.h.
Finds if two routes can be merged.
If they are merged, the entry at the index of left is also replaced with the merged route.
[in] | left | The index of the first route to consider. |
[in] | index | The index of the second route to consider. |
Definition at line 109 of file pair_minimize.h.
Finds if two routes can be merged.
If they are merged, the entry at the index of left is also replaced with the merged route.
[in] | left | The index of the first route to consider. |
[in] | index | The index of the second route to consider. |
Definition at line 182 of file pair_minimize.h.
Does the actual routing compression.
[in] | left | The start of the section of table to compress |
[in] | right | The end of the section of table to compress |
Definition at line 206 of file pair_minimize.h.
Implementation of insertion sort for routes based on frequency.
The routes must be non-overlapping pre-minimisation routes.
Definition at line 229 of file pair_minimize.h.
Computes route histogram.
[in] | index | The index of the cell to update |
Definition at line 252 of file pair_minimize.h.
Definition at line 275 of file pair_minimize.h.
Implementation of insertion sort for routes based on route information.
[in] | table_size | The size of the routing table |
Definition at line 292 of file pair_minimize.h.
Implementation of minimise()
Apply the ordered covering algorithm to a routing table.
[in] | target_length | ignored |
[out] | failed_by_malloc | Never changed but required by api |
[in] | stop_compressing | Variable saying if the compressor should stop and return false; set by interrupt DURING the run of this method! |
Definition at line 378 of file pair_minimize.h.
|
static |
The index of the next place in the compressed table to write a route.
Definition at line 39 of file pair_minimize.h.
|
static |
The index of the first route after the ones being compressed in this step.
Definition at line 42 of file pair_minimize.h.
|
static |
Table of routes being produced.
Definition at line 45 of file pair_minimize.h.
|
static |
Route frequency histogram.
Definition at line 48 of file pair_minimize.h.
|
static |
Count of unique routes (as opposed to routes with just different key_masks).
Definition at line 51 of file pair_minimize.h.
|
static |
Space for caching routes while going through them.
Definition at line 54 of file pair_minimize.h.