Ignore:
Timestamp:
Nov 22, 2013, 3:01:18 PM (10 years ago)
Author:
alain
Message:

Fixing a bug in the dspin_router_tsar component
(in the modified routing function)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/dspin_router_tsar/caba/source/src/dspin_router_tsar.cpp

    r549 r578  
    3535// between the IOB and MEMC initiators.
    3636// This component contains the following modifications:
    37 // - 4 extra constructor arguments,
     37// - 4 new constructor arguments
    3838// - 6 new member variables
    3939// - a modified routing function
     
    6060                const size_t   in_fifo_depth,  // input fifo depth
    6161                const size_t   out_fifo_depth, // output fifo depth
    62                 const size_t   cluster_iob0,   // cluster containing IOB0
    63                 const size_t   cluster_iob1,   // cluster containing IOB0
    64                 const size_t   l_width,        // local field width in first flit
    65                 const size_t   iob_local_id )  // IOB local index
     62
     63                const bool     is_iob0,        // cluster contains iob0
     64                const bool     is_iob1,        // cluster contains iob1
     65                const bool     is_rsp,         // only response router is modified
     66                const size_t   l_width)        // local field srcid width
    6667        : soclib::caba::BaseModule(name),
    6768
     
    9192      m_l_mask( (0x1 << l_width) - 1 ),
    9293
    93       m_is_iob0( cluster_iob0 == ((x<<y_width) + y) ),
    94       m_is_iob1( cluster_iob1 == ((x<<y_width) + y) ),
    95       m_iob_local_id( iob_local_id )
     94      m_is_iob0( is_iob0 ),
     95      m_is_iob1( is_iob1 ),
     96      m_is_rsp( is_rsp )
    9697
    9798    {
     
    138139        else    // handling IOB0 & IOB1 special cases
    139140        {
    140             if      ((m_is_iob0) and (ldest > 0xA)) return DSPIN_WEST;
    141             else if ((m_is_iob1) and (ldest > 0xA)) return DSPIN_EAST;
    142             else                                    return DSPIN_LOCAL;
     141            if      (m_is_rsp and m_is_iob0 and (ldest > 0xA)) return DSPIN_WEST;
     142            else if (m_is_rsp and m_is_iob1 and (ldest > 0xA)) return DSPIN_EAST;
     143            else                                               return DSPIN_LOCAL;
    143144        }
    144145    } // end route()
Note: See TracChangeset for help on using the changeset viewer.