Changeset 578


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)

Location:
trunk/modules/dspin_router_tsar/caba/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/dspin_router_tsar/caba/source/include/dspin_router_tsar.h

    r549 r578  
    2828
    2929////////////////////////////////////////////////////////////////////////////////
    30 // This component implements a variant of the standard (SocLib)  DSPIN router:
     30// This component implements a variant of the standard (SocLib) DSPIN router:
    3131// The routing function has been modified to handle the special case of
    3232// cluster_iob0 (containing component IOB0) and cluster_iob1 (containing
     
    9595                const size_t   in_fifo_depth,  // input fifo depth
    9696                const size_t   out_fifo_depth, // output fifo depth
    97                 const size_t   cluster_iob0,   // cluster containing IOB0
    98                 const size_t   cluster_iob1,   // cluster containing IOB0
    99                 const size_t   l_width,        // local field width in first flit
    100                 const size_t   iob_local_id ); // IOB local index
     97                const bool     is_iob0,        // cluster containing IOB0
     98                const bool     is_iob1,        // cluster containing IOB0
     99                const bool     is_rsp,         // only response router is modified
     100                const size_t   l_width);       // local srcid width
    101101    private:
    102102
     
    132132    bool                        m_is_iob0;
    133133    bool                        m_is_iob1;
    134     size_t                      m_iob_local_id;
     134    bool                        m_is_rsp;
    135135
    136136    // methods
  • 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.