- Timestamp:
- Sep 14, 2015, 9:42:16 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/top.cpp
r998 r1016 44 44 } 45 45 46 static inline uint32_t configRouter(int bypass_mode,47 int re allocation_dir,46 static inline uint32_t configRouter(int reallocation_dir, 47 int recovery_mode, 48 48 int blackhole_pos) 49 49 { 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); 51 53 } 52 54 … … 295 297 296 298 /* 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)); 306 310 307 311 /* initialize mesh boundary signals */
Note: See TracChangeset
for help on using the changeset viewer.