- Timestamp:
- May 29, 2015, 5:51:08 PM (10 years ago)
- File:
-
- 1 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 }
Note: See TracChangeset
for help on using the changeset viewer.