Ignore:
Timestamp:
Sep 14, 2015, 9:42:16 AM (9 years ago)
Author:
cfuguet
Message:

reconf: dspin_router

  • improve the code readability of the dspin_router model.
  • update the unitary tests of the dspin_router to support the local gateway hardware barrier, and the memory cache scratchpad mode.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/top.cpp

    r998 r1016  
    4444}
    4545
    46 static inline uint32_t configRouter(int bypass_mode,
    47                                     int reallocation_dir,
     46static inline uint32_t configRouter(int reallocation_dir,
     47                                    int recovery_mode,
    4848                                    int blackhole_pos)
    4949{
    50     return (bypass_mode << 7) | (reallocation_dir << 4) | blackhole_pos;
     50    return ((reallocation_dir & 0x7) << 5) |
     51           ((recovery_mode    & 0x1) << 4) |
     52           (blackhole_pos     & 0xF);
    5153}
    5254
     
    295297
    296298    /* initialize the configuration signals */
    297     sConfigNONE.write(configRouter(0, REQ_NOP, BH_NONE));
    298     sConfigN.write(configRouter(1, REQ_SOUTH, BH_N));
    299     sConfigNE.write(configRouter(1, REQ_WEST, BH_NE));
    300     sConfigE.write(configRouter(1, REQ_WEST, BH_E));
    301     sConfigSE.write(configRouter(1, REQ_WEST, BH_SE));
    302     sConfigS.write(configRouter(1, REQ_NORTH, BH_S));
    303     sConfigSW.write(configRouter(1, REQ_EAST, BH_SW));
    304     sConfigW.write(configRouter(1, REQ_EAST, BH_W));
    305     sConfigNW.write(configRouter(1, REQ_EAST, BH_NW));
     299    sConfigNONE.write(configRouter(0, 0, NORMAL));
     300
     301    // requests to the deactivated segment are dropped
     302    sConfigN.write(configRouter(REQ_SOUTH, 1, N_OF_X));
     303    sConfigNE.write(configRouter(REQ_WEST, 1, NE_OF_X));
     304    sConfigE.write(configRouter(REQ_WEST, 1, E_OF_X));
     305    sConfigSE.write(configRouter(REQ_WEST, 1, SE_OF_X));
     306    sConfigS.write(configRouter(REQ_NORTH, 1, S_OF_X));
     307    sConfigSW.write(configRouter(REQ_EAST, 1, SW_OF_X));
     308    sConfigW.write(configRouter(REQ_EAST, 1, W_OF_X));
     309    sConfigNW.write(configRouter(REQ_EAST, 1, NW_OF_X));
    306310
    307311    /* initialize mesh boundary signals */
Note: See TracChangeset for help on using the changeset viewer.