Changeset 997 for branches/reconfiguration/modules/dspin_router
- Timestamp:
- May 29, 2015, 5:51:08 PM (10 years ago)
- Location:
- branches/reconfiguration/modules/dspin_router/caba
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/modules/dspin_router/caba/source/src/dspin_router.cpp
r994 r997 36 36 // 37 37 // - In case of a broacast 38 // | XMIN | XMAX | YMIN | YMAX |---------------- ---|BC |39 // | 5 | 5 | 5 | 5 | flit_width - 2 2| 1 |38 // | XMIN | XMAX | YMIN | YMAX |----------------|SP|BC | 39 // | 5 | 5 | 5 | 5 | flit_width - 21| 1| 1 | 40 40 /////////////////////////////////////////////////////////////////////////// 41 41 … … 356 356 const size_t ymax = (data >> (flit_width - 20)) & 0x1F; 357 357 const int bh = blackhole_position(); 358 358 359 int sel = REQ_NOP; 359 bool ew= ((data & 0x2) != 0);360 bool special = ((data & 0x2) != 0); 360 361 361 362 switch(source) { … … 389 390 } 390 391 else if ( step == 4 ) { 391 if ( (bh == BH_SE) && ( ew || (lx == 1))) {392 if ( (bh == BH_SE) && (!special || (lx == 1))) { 392 393 sel = REQ_WEST; 393 394 break; … … 430 431 break; 431 432 } 432 if ( (bh == BH_S) && !ew) {433 if ( (bh == BH_S) && special ) { 433 434 sel = REQ_NOP; 434 435 break; … … 472 473 const int bh = blackhole_position(); 473 474 sc_uint<flit_width> header = r_fifo_in[source].read().data; 474 sc_uint<flit_width> mask= 0x2;475 sc_uint<flit_width> special = 0x2; 475 476 switch (source) { 477 case REQ_NORTH: 478 if ( (bh == BH_NW) || (bh == BH_NE) ) { 479 header |= special; 480 } 481 break; 482 483 /* Make sure that broadcast transactions do not enter the DSPIN 484 * network with the special bit set. This can arrive if an initiator 485 * or a local interconnect uses the broadcast header reserved bits 486 * internally and don't reset them */ 476 487 case REQ_LOCAL: 477 if ( bh != BH_NONE ) { 478 header |= mask; 479 } 480 break; 481 case REQ_EAST: 482 if ( (bh == BH_NE) || (bh == BH_E) ) { 483 header |= mask; 484 } 485 break; 486 case REQ_WEST: 487 if ( (bh == BH_NW) || (bh == BH_W) || (bh == BH_SW) ) { 488 header |= mask; 489 } 490 break; 491 492 /* Make sure that the EW bit is not set when it shouldn't. 493 * This can arrive if an initiator or a local interconnect uses 494 * the broadcast header reserved bits internally and don't reset 495 * them */ 496 case REQ_NORTH: 497 if ( (bh == BH_NW) || (bh == BH_N) || (bh == BH_NE) ) { 498 header &= ~mask; 499 } 500 break; 501 case REQ_SOUTH: 502 if ( (bh == BH_SW) || (bh == BH_S) || (bh == BH_SE) ) { 503 header &= ~mask; 504 } 488 header &= ~special; 505 489 break; 506 490 } -
branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/broadcast_check.sh
r996 r997 10 10 last=0 11 11 failure=0 12 min=99999999 13 max=0 12 14 } 13 15 # Parse coordinates of routers … … 36 38 } 37 39 else { 38 # store the number of received packets of a router that actually 39 # received packets. 40 if (last == 0) { 41 last=$6 40 # store the min and max number of received packets 41 if ($6 < min) { 42 min=$6; 42 43 } 43 # test if the error is too important. The error is defined as 44 # difference between the number of packets received by different 45 # routers. 46 error=last - $6 47 if ((error > 20) || (error < -20)) { 48 failure=1 49 exit; 44 if ($6 > max) { 45 max=$6; 50 46 } 51 47 } … … 54 50 # Validate the file 55 51 END { 56 # an error was too important57 if (failure == 1) {58 exit 159 }60 61 52 # it should be only two routers that do not receive the broadcast: 62 53 # the source and the faulty router. 63 if (zero != 2) { 54 if (zero > 2) { 55 print "error: some routers did not received broadcasts\n"; 64 56 exit 1; 65 57 } 66 58 67 # test if the error is too important 68 error=last - sent 69 if ((error > 20) || (error < -20)) { 59 if (max > sent) { 60 print "error: at least a router received a number of broadcast greater" 61 print "than the number of broadcast sent\n"; 62 exit 1; 63 } 64 65 if (zero == 1) { 66 print "error: the broadcast source received broadcasts\n"; 67 exit 1; 68 } 69 70 error=sent - min 71 if (error > 20) { 72 print "error: the number of broadcast received by a router is inferior " 73 print "to the error threshold\n"; 70 74 exit 1; 71 75 } -
branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run_broadcast_check.sh
r996 r997 1 1 #!/usr/bin/env sh 2 2 LOGDIR=logs 3 COMMON="-X 5 -Y 5 -N 3000"3 COMMON="-X 5 -Y 5 -N 10000" 4 4 5 5 mkdir -p $LOGDIR
Note: See TracChangeset
for help on using the changeset viewer.