Ignore:
Timestamp:
May 29, 2015, 5:51:08 PM (10 years ago)
Author:
cfuguet
Message:

reconf: improve the recovery broadcast replication policy

  • Improve the validation scripts for this replication policy.
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  
    3636    //
    3737    //  - In case of a broacast
    38     //  |  XMIN   |  XMAX   |  YMIN   |  YMAX   |-------------------|BC |
    39     //  |   5     |   5     |   5     |   5     | flit_width - 22   | 1 |
     38    //  |  XMIN   |  XMAX   |  YMIN   |  YMAX   |----------------|SP|BC |
     39    //  |   5     |   5     |   5     |   5     | flit_width - 21| 1| 1 |
    4040    ///////////////////////////////////////////////////////////////////////////
    4141
     
    356356        const size_t ymax = (data >> (flit_width - 20)) & 0x1F;
    357357        const int    bh   = blackhole_position();
     358
    358359        int  sel = REQ_NOP;
    359         bool ew = ((data & 0x2) != 0);
     360        bool special = ((data & 0x2) != 0);
    360361
    361362        switch(source) {
     
    389390            }
    390391            else if ( step == 4 ) {
    391                 if ( (bh == BH_SE) && (ew || (lx == 1)) ) {
     392                if ( (bh == BH_SE) && (!special || (lx == 1))) {
    392393                    sel = REQ_WEST;
    393394                    break;
     
    430431                    break;
    431432                }
    432                 if ( (bh == BH_S) && !ew ) {
     433                if ( (bh == BH_S) && special ) {
    433434                    sel = REQ_NOP;
    434435                    break;
     
    472473        const int bh = blackhole_position();
    473474        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;
    475476        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 */
    476487            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;
    505489                break;
    506490        }
  • branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/broadcast_check.sh

    r996 r997  
    1010        last=0
    1111        failure=0
     12        min=99999999
     13        max=0
    1214}
    1315#   Parse coordinates of routers
     
    3638        }
    3739        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;
    4243                }
    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;
    5046                }
    5147        }
     
    5450#   Validate the file
    5551END {
    56         # an error was too important
    57         if (failure == 1) {
    58                 exit 1
    59         }
    60 
    6152        # it should be only two routers that do not receive the broadcast:
    6253        # the source and the faulty router.
    63         if (zero != 2) {
     54        if (zero > 2) {
     55                print "error: some routers did not received broadcasts\n";
    6456                exit 1;
    6557        }
    6658
    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";
    7074                exit 1;
    7175        }
  • branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/run_broadcast_check.sh

    r996 r997  
    11#!/usr/bin/env sh
    22LOGDIR=logs
    3 COMMON="-X 5 -Y 5 -N 3000"
     3COMMON="-X 5 -Y 5 -N 10000"
    44
    55mkdir -p $LOGDIR
Note: See TracChangeset for help on using the changeset viewer.