macsim/src/noc/pnconfig.c
// Connect to the neigbour routers.
// All routers must be initalised before.
Connect to the neigbour routers.
All routers must be initalised before.
Connect to the neigbour routers . All routers must be initalised before .
void pnconfig_connect(node_t *me, rank_t x, rank_t y,
    node_t *north, node_t *south, node_t *west, node_t *east)
{
    pnconfig_context_t *r = me->noc_context;
    r->x = x;
    r->y = y;
    r->rank = y*conf_noc_width+x;
    r->north = north->noc_context;
    r->south = south->noc_context;
    r->west = west->noc_context;
    r->east = east->noc_context;
    r->inject_counter_x = (x&1)*conf_inject_period_x;
    r->inject_counter_y = (y&1)*conf_inject_period_y;
}
void pnconfig_connect ( node_t * me , rank_t x , rank_t y , node_t * north , node_t * south , node_t * west , node_t * east ) { pnconfig_context_t * r = me -> noc_context ; r -> x = x ; r -> y = y ; r -> rank = y * conf_noc_width + x ; r -> north = north -> noc_context ; r -> south = south -> noc_context ; r -> west = west -> noc_context ; r -> east = east -> noc_context ; r -> inject_counter_x = ( x & 1 ) * conf_inject_period_x ; r -> inject_counter_y = ( y & 1 ) * conf_inject_period_y ; }
Connect to the neigbour routers.
Connect to the neigbour routers .
// alternate between nodes