Changeset 771 for branches


Ignore:
Timestamp:
Aug 26, 2014, 4:40:29 PM (10 years ago)
Author:
meunier
Message:

RWT Branch:

  • Renamed module caba:generic_cache_tsar to caba:generic_cache_tsar_rwt
  • Renamed module caba:dspin_dhccp_param to caba:dspin_rwt_param
  • cosmetic in generic_cache.h
Location:
branches/RWT
Files:
8 edited
2 moved

Legend:

Unmodified
Added
Removed
  • branches/RWT/communication/dspin_dhccp_param/caba/metadata/dspin_rwt_param.sd

    r768 r771  
    1 Module('caba:dspin_dhccp_param',
    2            classname = 'soclib::caba::DspinDhccpParam',
    3            header_files = ['../source/include/dspin_dhccp_param.h',]
     1Module('caba:dspin_rwt_param',
     2           classname = 'soclib::caba::DspinRwtParam',
     3           header_files = ['../source/include/dspin_rwt_param.h',]
    44)
  • branches/RWT/communication/dspin_dhccp_param/caba/source/include/dspin_rwt_param.h

    r768 r771  
    2727
    2828
    29 #ifndef DSPIN_DHCCP_PARAMS_H
    30 #define DSPIN_DHCCP_PARAMS_H
     29#ifndef DSPIN_RWT_PARAMS_H
     30#define DSPIN_RWT_PARAMS_H
    3131
    3232#include <inttypes.h>
     
    141141    case z: x |= ((y & z##_MASK) << z##_SHIFT);break
    142142
    143 class DspinDhccpParam
     143class DspinRwtParam
    144144{
    145145  public:
     
    405405        SET_FIELD(flit,value,BROADCAST_NLINE);
    406406
    407         default: assert(false && "Incorrect DHCCP DSPIN field");
     407        default: assert(false && "Incorrect RWT DSPIN field");
    408408      }
    409409    }
  • branches/RWT/lib/generic_cache_tsar/include/generic_cache.h

    r767 r771  
    8686//////////////////////////
    8787{
    88     typedef uint32_t    data_t;
    89     typedef uint32_t    be_t;
    90 
    91     data_t              *r_data ;
    92     addr_t               *r_tag ;
    93     int                 *r_state;
    94     bool                *r_lru ;
    95 
    96     size_t              m_ways;
    97     size_t              m_sets;
    98     size_t              m_words;
    99 
    100     const soclib::common::AddressMaskingTable<addr_t>  m_x ;
    101     const soclib::common::AddressMaskingTable<addr_t>  m_y ;
    102     const soclib::common::AddressMaskingTable<addr_t>  m_z ;
     88    typedef uint32_t data_t;
     89    typedef uint32_t be_t;
     90
     91    data_t           *r_data ;
     92    addr_t           *r_tag ;
     93    int              *r_state;
     94    bool             *r_lru ;
     95
     96    size_t           m_ways;   
     97    size_t           m_sets;   
     98    size_t           m_words;
     99
     100    const soclib::common::AddressMaskingTable<addr_t> m_x ;
     101    const soclib::common::AddressMaskingTable<addr_t> m_y ;
     102    const soclib::common::AddressMaskingTable<addr_t> m_z ;
    103103
    104104    //////////////////////////////////////////////////////////////
     
    134134        cache_lru(way, set) = true;
    135135
    136             for (way2 = 0; way2 < m_ways; way2++ )
     136            for (way2 = 0; way2 < m_ways; way2++)
    137137        {
    138138                if (cache_lru(way2, set) == false) return;
    139139            }
    140140            // all lines are new -> they all become old
    141             for (way2 = 0; way2 < m_ways; way2++ )
     141            for (way2 = 0; way2 < m_ways; way2++)
    142142        {
    143143                cache_lru(way2, set) = false;
     
    146146
    147147    ////////////////////////////////
    148     inline data_t be2mask( be_t be )
     148    inline data_t be2mask(be_t be)
    149149    {
    150150        data_t mask = 0;
     
    159159
    160160    //////////////////////////////////////////
    161     GenericCache(   const std::string  &name,
    162                     size_t              nways,
    163                     size_t              nsets,
    164                     size_t              nwords)
     161    GenericCache(const std::string &name,
     162                    size_t            nways,
     163                    size_t            nsets,
     164                    size_t            nwords)
    165165        : m_ways(nways),
    166166          m_sets(nsets),
     
    186186
    187187#ifdef GENERIC_CACHE_DEBUG
    188 std::cout << "constructing " << name << std::endl
     188        std::cout << "constructing " << name << std::endl
    189189          << "- nways  = " << nways << std::endl
    190190          << "- nsets  = " << nsets << std::endl
     
    196196#endif
    197197
    198         r_data    = new data_t[nways*nsets*nwords];
    199         r_tag     = new addr_t[nways*nsets];
    200         r_state   = new int[nways*nsets];
    201         r_lru     = new bool[nways*nsets];
     198        r_data  = new data_t[nways*nsets*nwords];
     199        r_tag   = new addr_t[nways*nsets];
     200        r_state = new int[nways*nsets];
     201        r_lru   = new bool[nways*nsets];
    202202    }
    203203
     
    212212
    213213    ////////////////////
    214     inline void reset( )
     214    inline void reset()
    215215    {
    216216        std::memset(r_data, 0, sizeof(*r_data)*m_ways*m_sets*m_words);
     
    230230    // Both data & directory are accessed.
    231231    /////////////////////////////////////////////////////////////////////
    232     inline bool read( addr_t    ad,
    233                       data_t*   dt)
    234     {
    235         const addr_t      tag  = m_z[ad];
    236         const size_t      set  = m_y[ad];
    237         const size_t      word = m_x[ad];
    238 
    239         for ( size_t way = 0; way < m_ways; way++ )
    240         {
    241             if ( (tag == cache_tag(way, set)) 
    242                    && ( (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) or (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC)) )
     232    inline bool read(addr_t  ad,
     233                     data_t* dt)
     234    {
     235        const addr_t tag  = m_z[ad];
     236        const size_t set  = m_y[ad];
     237        const size_t word = m_x[ad];
     238
     239        for (size_t way = 0; way < m_ways; way++)
     240        {
     241            if ((tag == cache_tag(way, set)) 
     242                   && ((cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) or (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC)) )
    243243            {
    244244                *dt = cache_data(way, set, word);
     
    256256    // The selected way, set and word index are returned in case of hit.
    257257    /////////////////////////////////////////////////////////////////////
    258     inline bool read( addr_t    ad,
    259                       data_t*   dt,
    260                       size_t*  selway,
    261                       size_t*  selset,
    262                       size_t*  selword)
    263     {
    264         const addr_t      tag  = m_z[ad];
    265         const size_t      set  = m_y[ad];
    266         const size_t      word = m_x[ad];
    267 
    268         for ( size_t way = 0; way < m_ways; way++ )
    269         {
    270             if ( (tag == cache_tag(way, set)) and
    271                  ( (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)or (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC)))
     258    inline bool read(addr_t ad,
     259                     data_t* dt,
     260                     size_t* selway,
     261                     size_t* selset,
     262                     size_t* selword)
     263    {
     264        const addr_t tag  = m_z[ad];
     265        const size_t set  = m_y[ad];
     266        const size_t word = m_x[ad];
     267
     268        for (size_t way = 0; way < m_ways; way++)
     269        {
     270            if ((tag == cache_tag(way, set)) and
     271                 ((cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)or (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC)))
    272272            {
    273273                *selway  = way;
     
    292292    // returned in the other arguments.
    293293    ////////////////////////////////////////////////////////////////////
    294     inline void read( addr_t    ad,
    295                       data_t*  dt,
    296                       size_t*  selway,
    297                       size_t*  selset,
    298                       size_t*  selword,
    299                       int*      state )
    300     {
    301         const addr_t      tag  = m_z[ad];
    302         const size_t      set  = m_y[ad];
    303         const size_t      word = m_x[ad];
     294    inline void read(addr_t  ad,
     295                     data_t* dt,
     296                     size_t* selway,
     297                     size_t* selset,
     298                     size_t* selword,
     299                     int*    state)
     300    {
     301        const addr_t tag  = m_z[ad];
     302        const size_t set  = m_y[ad];
     303        const size_t word = m_x[ad];
    304304
    305305        // default return values
     
    310310        *dt      = 0;
    311311
    312         for ( size_t way = 0; way < m_ways; way++ )
    313         {
    314             if ( tag == cache_tag(way, set) )  // matching tag
    315             {
    316 
    317                 if ( cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC )
     312        for (size_t way = 0; way < m_ways; way++)
     313        {
     314            if (tag == cache_tag(way, set))  // matching tag
     315            {
     316
     317                if (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)
    318318                {
    319319                    *state   = CACHE_SLOT_STATE_VALID_CC;
     
    324324                    cache_set_lru(way, set);
    325325                }
    326                 else if ( cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC )
     326                else if (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC)
    327327                {
    328328                    *state   = CACHE_SLOT_STATE_VALID_NCC;
     
    333333                    cache_set_lru(way, set);
    334334                }
    335                 else if ( cache_state(way, set) == CACHE_SLOT_STATE_ZOMBI )
     335                else if (cache_state(way, set) == CACHE_SLOT_STATE_ZOMBI)
    336336                {
    337337                    *state   = CACHE_SLOT_STATE_ZOMBI;
     
    350350    // The selected way, set and word index are returned in case of hit.
    351351    /////////////////////////////////////////////////////////////////////
    352     inline bool read_neutral( addr_t    ad,
    353                                       data_t*   dt,
    354                                           size_t*  selway,
    355                                           size_t*  selset,
    356                                           size_t*  selword)
    357     {
    358         const addr_t      tag  = m_z[ad];
    359         const size_t      set  = m_y[ad];
    360         const size_t      word = m_x[ad];
    361 
    362         for ( size_t way = 0; way < m_ways; way++ )
    363         {
    364             if ( (tag == cache_tag(way, set)) 
    365                    && ( (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) or (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC) ) )
     352    inline bool read_neutral(addr_t  ad,
     353                             data_t* dt,
     354                             size_t* selway,
     355                             size_t* selset,
     356                             size_t* selword)
     357    {
     358        const addr_t tag  = m_z[ad];
     359        const size_t set  = m_y[ad];
     360        const size_t word = m_x[ad];
     361
     362        for (size_t way = 0; way < m_ways; way++)
     363        {
     364            if ((tag == cache_tag(way, set)) 
     365                   && ((cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) or (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC) ))
    366366            {
    367367                *selway  = way;
     
    384384    // This function is used by the cc_vcache to get a 64 bits page table entry.
    385385    /////////////////////////////////////////////////////////////////////////////
    386     inline bool read( addr_t    ad,
    387                       data_t*   dt,
    388                       data_t*   dt_next,
    389                       size_t*   selway,
    390                       size_t*   selset,
    391                       size_t*   selword)
    392     {
    393         const addr_t      tag  = m_z[ad];
    394         const size_t      set  = m_y[ad];
    395         const size_t      word = m_x[ad];
    396 
    397         for ( size_t way = 0; way < m_ways; way++ )
    398         {
    399             if ( (tag == cache_tag(way, set))   
    400                    &&( (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) ) )
    401             {
    402                 *dt      = cache_data(way, set, word);
    403                 if ( word+1 < m_words)
    404                 {
    405                     *dt_next = cache_data(way, set, word+1);
     386    inline bool read( addr_t  ad,
     387                      data_t* dt,
     388                      data_t* dt_next,
     389                      size_t* selway,
     390                      size_t* selset,
     391                      size_t* selword)
     392    {
     393        const addr_t tag  = m_z[ad];
     394        const size_t set  = m_y[ad];
     395        const size_t word = m_x[ad];
     396
     397        for (size_t way = 0; way < m_ways; way++)
     398        {
     399            if ((tag == cache_tag(way, set))   
     400                   &&( (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)))
     401            {
     402                *dt = cache_data(way, set, word);
     403                if (word + 1 < m_words)
     404                {
     405                    *dt_next = cache_data(way, set, word + 1);
    406406                }
    407407                *selway  = way;
     
    425425    // returned in the other arguments.
    426426    ////////////////////////////////////////////////////////////////////
    427     inline void read( addr_t    ad,
    428                       data_t*  dt,
    429                       data_t*  dt_next,
    430                       size_t*  selway,
    431                       size_t*  selset,
    432                       size_t*  selword,
    433                       int*      state )
    434     {
    435         const addr_t      tag  = m_z[ad];
    436         const size_t      set  = m_y[ad];
    437         const size_t      word = m_x[ad];
     427    inline void read(addr_t  ad,
     428                     data_t* dt,
     429                     data_t* dt_next,
     430                     size_t* selway,
     431                     size_t* selset,
     432                     size_t* selword,
     433                     int*    state)
     434    {
     435        const addr_t tag  = m_z[ad];
     436        const size_t set  = m_y[ad];
     437        const size_t word = m_x[ad];
    438438
    439439        // default return values
     
    444444        *dt      = 0;
    445445
    446         for ( size_t way = 0; way < m_ways; way++ )
    447         {
    448             if ( tag == cache_tag(way, set) )  // matching tag
    449             {
    450 
    451                 if ( cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC )
     446        for (size_t way = 0; way < m_ways; way++)
     447        {
     448            if (tag == cache_tag(way, set))  // matching tag
     449            {
     450
     451                if (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)
    452452                {
    453453                    *state   = CACHE_SLOT_STATE_VALID_CC;
     
    456456                    *selword = word;
    457457                    *dt      = cache_data(way, set, word);
    458                     if ( word+1 < m_words)
     458                    if (word + 1 < m_words)
    459459                    {
    460460                        *dt_next = cache_data(way, set, word+1);
     
    463463                }
    464464
    465                 else if ( cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC )
     465                else if (cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC)
    466466                {
    467467                    *state   = CACHE_SLOT_STATE_VALID_NCC;
     
    470470                    *selword = word;
    471471                    *dt      = cache_data(way, set, word);
    472                     if ( word+1 < m_words)
     472                    if (word + 1 < m_words)
    473473                    {
    474                         *dt_next = cache_data(way, set, word+1);
     474                        *dt_next = cache_data(way, set, word + 1);
    475475                    }
    476476                    cache_set_lru(way, set);
    477477                }
    478478
    479                 else if ( cache_state(way, set) == CACHE_SLOT_STATE_ZOMBI )
     479                else if (cache_state(way, set) == CACHE_SLOT_STATE_ZOMBI)
    480480                {
    481481                    *state   = CACHE_SLOT_STATE_ZOMBI;
     
    496496    // while we write in the data part with a different address in the same cycle.
    497497    ///////////////////////////////////////////////////////////////////////////////
    498     inline bool hit(  addr_t    ad,
    499                       size_t*   selway,
    500                       size_t*   selset,
    501                       size_t*  selword)
    502     {
    503         const addr_t      tag  = m_z[ad];
    504         const size_t      set  = m_y[ad];
    505         const size_t      word = m_x[ad];
    506 
    507         for ( size_t way = 0; way < m_ways; way++ )
    508         {
    509             if ( (tag == cache_tag(way, set))
    510                    && ( (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)or(cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC) ) )
     498    inline bool hit(addr_t  ad,
     499                    size_t* selway,
     500                    size_t* selset,
     501                    size_t* selword)
     502    {
     503        const addr_t tag  = m_z[ad];
     504        const size_t set  = m_y[ad];
     505        const size_t word = m_x[ad];
     506
     507        for (size_t way = 0; way < m_ways; way++)
     508        {
     509            if ((tag == cache_tag(way, set))
     510                   && ((cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC)or(cache_state(way, set) == CACHE_SLOT_STATE_VALID_NCC)))
    511511            {
    512512                *selway  = way;
     
    531531    // while we write in the data part with a different address in the same cycle.
    532532    ///////////////////////////////////////////////////////////////////////////////
    533     inline void read_dir(  addr_t       ad,
    534                            int*     state,
    535                            size_t*      way,
    536                            size_t*      set,
    537                            size_t* word)
    538     {
    539         const addr_t      ad_tag  = m_z[ad];
    540         const size_t      ad_set  = m_y[ad];
    541         const size_t      ad_word = m_x[ad];
    542         for ( size_t _way = 0; _way < m_ways; _way++ )
    543         {
    544             if ( (ad_tag == cache_tag(_way, ad_set) ) and
    545                  (cache_state(_way, ad_set) != CACHE_SLOT_STATE_EMPTY) )
     533    inline void read_dir(addr_t  ad,
     534                         int*    state,
     535                         size_t* way,
     536                         size_t* set,
     537                         size_t* word)
     538    {
     539        const addr_t ad_tag  = m_z[ad];
     540        const size_t ad_set  = m_y[ad];
     541        const size_t ad_word = m_x[ad];
     542        for (size_t _way = 0; _way < m_ways; _way++)
     543        {
     544            if ((ad_tag == cache_tag(_way, ad_set)) and
     545                (cache_state(_way, ad_set) != CACHE_SLOT_STATE_EMPTY))
    546546            {
    547547                *state = cache_state(_way, ad_set);
     
    562562    // Returns the access status and the tag value in the state and tag argument.
    563563    ///////////////////////////////////////////////////////////////////////////////
    564     inline void read_dir(  size_t       way,
    565                            size_t       set,
    566                            addr_t*  tag,
    567                            int*     state )
     564    inline void read_dir(size_t  way,
     565                         size_t  set,
     566                         addr_t* tag,
     567                         int*    state)
    568568    {
    569569        *state = cache_state(way, set);
     
    581581    // It does not use the directory and cannot miss.
    582582    //////////////////////////////////////////////////////////////////
    583     inline void write(size_t    way,
    584                       size_t    set,
    585                       size_t    word,
    586                       data_t    data)
     583    inline void write(size_t way,
     584                      size_t set,
     585                      size_t word,
     586                      data_t data)
    587587    {
    588588        cache_data(way, set, word) = data;
     
    594594    // It does not use the directory and cannot miss.
    595595    ////////////////////////////////////////////////////////////////////////////
    596     inline void write(size_t    way,
    597                       size_t    set,
    598                       size_t    word,
    599                       data_t    data,
    600                       be_t          be)
     596    inline void write(size_t way,
     597                      size_t set,
     598                      size_t word,
     599                      data_t data,
     600                      be_t   be)
    601601    {
    602602        data_t mask = be2mask(be);
     
    610610    // It returns true if the line was valid, and returns the line index.
    611611    //////////////////////////////////////////////////////////////////////////
    612     inline bool inval(size_t    way,
    613                       size_t    set,
    614                       addr_t*   nline)
    615     {
    616         if( (cache_state(way,set) == CACHE_SLOT_STATE_VALID_CC) or  (cache_state(way,set) == CACHE_SLOT_STATE_VALID_NCC))
     612    inline bool inval(size_t  way,
     613                      size_t  set,
     614                      addr_t* nline)
     615    {
     616        if ((cache_state(way,set) == CACHE_SLOT_STATE_VALID_CC) or  (cache_state(way,set) == CACHE_SLOT_STATE_VALID_NCC))
    617617        {
    618618            cache_state(way,set) = CACHE_SLOT_STATE_EMPTY;
     
    631631    // and a Boolean indicating that a cleanup is requested.
    632632    //////////////////////////////////////////////////////////////////////////////////
    633     inline bool victim_select(addr_t    ad,
    634                               addr_t*   victim,
    635                               size_t*   way,
    636                               size_t*   set)
    637     {
    638         bool   found   = false;
    639         bool   cleanup = false;
     633    inline bool victim_select(addr_t  ad,
     634                              addr_t* victim,
     635                              size_t* way,
     636                              size_t* set)
     637    {
     638        bool found   = false;
     639        bool cleanup = false;
    640640
    641641        *set = m_y[ad];
     
    643643
    644644        // Search first empty slot
    645         for ( size_t _way = 0 ; _way < m_ways && !found ; _way++ )
    646         {
    647             if( ( cache_state(_way, *set) != CACHE_SLOT_STATE_VALID_CC ) and ( cache_state(_way, *set) != CACHE_SLOT_STATE_VALID_NCC ))  // empty
     645        for (size_t _way = 0 ; _way < m_ways && !found ; _way++)
     646        {
     647            if ((cache_state(_way, *set) != CACHE_SLOT_STATE_VALID_CC) and (cache_state(_way, *set) != CACHE_SLOT_STATE_VALID_NCC ))  // empty
    648648            {
    649649                found   = true;
     
    654654
    655655        // If no empty slot, search first  old slot (lru == false)
    656         if ( !found )
     656        if (!found)
    657657        {
    658             for ( size_t _way = 0 ; _way < m_ways && !found ; _way++ )
    659             {
    660                 if ( not cache_lru(_way, *set) )
     658            for (size_t _way = 0 ; _way < m_ways && !found ; _way++)
     659            {
     660                if (not cache_lru(_way, *set))
    661661                {
    662662                    found   = true;
     
    668668
    669669        assert(found && "all ways can't be new at the same time");
    670         *victim = (addr_t)((cache_tag(*way,*set) * m_sets) + *set);
     670        *victim = (addr_t) ((cache_tag(*way,*set) * m_sets) + *set);
    671671        return cleanup;
    672672    }
     
    681681    // and two Boolean indicating success and a required cleanup.
    682682    //////////////////////////////////////////////////////////////////////////////////
    683     inline void read_select(addr_t       ad,
    684                             addr_t*   victim,
    685                             size_t*   way,
    686                             size_t*   set,
    687                             bool*     found,
    688                             bool*     cleanup )
     683    inline void read_select(addr_t ad,
     684                            addr_t* victim,
     685                            size_t* way,
     686                            size_t* set,
     687                            bool*   found,
     688                            bool*   cleanup)
    689689    {
    690690        size_t _set = m_y[ad];
     
    693693
    694694        // Search first empty slot
    695         for ( size_t _way = 0 ; _way < m_ways && !(*found) ; _way++ )
    696         {
    697             if ( cache_state(_way, _set) == CACHE_SLOT_STATE_EMPTY )
     695        for (size_t _way = 0 ; _way < m_ways && !(*found) ; _way++)
     696        {
     697            if (cache_state(_way, _set) == CACHE_SLOT_STATE_EMPTY)
    698698            {
    699699                *found   = true;
     
    704704            }
    705705        }
    706         //////////////////////////////////////////////////////////////
    707         /*for ( size_t _way = 0 ; _way < m_ways && !(*found) ; _way++ )
    708         {
    709             if ( not cache_lru(_way, _set) and
    710                  (cache_state(_way, _set) != CACHE_SLOT_STATE_ZOMBI) and
    711                  (cache_state(_way, _set) == CACHE_SLOT_STATE_VALID_NCC) )
    712             {
    713                 *found   = true;
    714                 *cleanup = true;
    715                 *way     = _way;
    716                 *set     = m_y[ad];
    717                 *victim  = (addr_t)((cache_tag(*way,_set) * m_sets) + _set);
    718                 return;
    719             }
    720         }*/
     706       
    721707        // Search first not zombi old slot
    722         for ( size_t _way = 0 ; _way < m_ways && !(*found) ; _way++ )
    723         {
    724             if ( not cache_lru(_way, _set) and
    725                  (cache_state(_way, _set) != CACHE_SLOT_STATE_ZOMBI) )
     708        for (size_t _way = 0 ; _way < m_ways && !(*found) ; _way++)
     709        {
     710            if (not cache_lru(_way, _set) and
     711                 (cache_state(_way, _set) != CACHE_SLOT_STATE_ZOMBI))
    726712            {
    727713                *found   = true;
     
    734720        }
    735721        // Search first not zombi slot
    736         for ( size_t _way = 0 ; _way < m_ways && !(*found) ; _way++ )
    737         {
    738             if ( cache_state(_way, _set) != CACHE_SLOT_STATE_ZOMBI)
     722        for (size_t _way = 0 ; _way < m_ways && !(*found) ; _way++)
     723        {
     724            if (cache_state(_way, _set) != CACHE_SLOT_STATE_ZOMBI)
    739725            {
    740726                *found   = true;
     
    756742    // identified by the way & set.
    757743    //////////////////////////////////////////////////////////////////
    758     inline void victim_update_tag( addr_t       ad,
    759                                    size_t       way,
    760                                    size_t       set )
     744    inline void victim_update_tag(addr_t ad,
     745                                  size_t way,
     746                                  size_t set)
    761747    {
    762748        addr_t  tag     = m_z[ad];
     
    771757    // identified by the way & set, when using the ZOMBI state.
    772758    //////////////////////////////////////////////////////////////////
    773     inline void write_dir( addr_t       ad,
    774                            size_t       way,
    775                            size_t       set,
    776                            int      state)
    777     {
    778         addr_t  tag    = m_z[ad];
     759    inline void write_dir(addr_t ad,
     760                          size_t way,
     761                          size_t set,
     762                          int    state)
     763    {
     764        addr_t tag = m_z[ad];
    779765
    780766        assert( ( (state == CACHE_SLOT_STATE_VALID_CC) or
     
    793779        cache_state(way, set) = state;
    794780
    795         if ( (state == CACHE_SLOT_STATE_VALID_CC) or (state == CACHE_SLOT_STATE_VALID_NCC) ) cache_set_lru(way, set);
     781        if ((state == CACHE_SLOT_STATE_VALID_CC) or (state == CACHE_SLOT_STATE_VALID_NCC)) cache_set_lru(way, set);
    796782    }
    797783
     
    801787    // It does not affect the tag
    802788    //////////////////////////////////////////////////////////////////
    803     inline void write_dir( size_t       way,
    804                            size_t       set,
    805                            int      state)
     789    inline void write_dir(size_t way,
     790                          size_t set,
     791                          int    state)
    806792    {
    807793        assert( ( (state == CACHE_SLOT_STATE_VALID_CC) or
     
    827813    // Both DATA and DIRECTORY are written
    828814    ///////////////////////////////////////////////////////////////////
    829     inline void update(addr_t   ad,
    830                        size_t   way,
    831                        size_t   set,
    832                        data_t*  buf)
     815    inline void update(addr_t  ad,
     816                       size_t  way,
     817                       size_t  set,
     818                       data_t* buf)
    833819    {
    834820        addr_t tag = m_z[ad];
     
    837823        cache_state(way, set) = CACHE_SLOT_STATE_VALID_CC;
    838824        cache_set_lru(way, set);
    839         for ( size_t word = 0 ; word < m_words ; word++ )
     825        for (size_t word = 0 ; word < m_words ; word++)
    840826        {
    841827            cache_data(way, set, word) = buf[word] ;
     
    846832    void fileTrace(FILE* file)
    847833    {
    848         for( size_t nway = 0 ; nway < m_ways ; nway++)
    849         {
    850             for( size_t nset = 0 ; nset < m_sets ; nset++)
     834        for (size_t nway = 0 ; nway < m_ways ; nway++)
     835        {
     836            for (size_t nset = 0 ; nset < m_sets ; nset++)
    851837            {
    852838                fprintf(file, "%d / ", (int)cache_state(nway, nset));
     
    854840                fprintf(file, "set %d / ", (int)nset);
    855841                fprintf(file, "@ = %08zX / ",
    856                         ((cache_tag(nway, nset)*m_sets+nset)*m_words*4));
    857                 for( size_t nword = m_words ; nword > 0 ; nword--)
    858                 {
    859                     unsigned int data = cache_data(nway, nset, nword-1);
    860                     fprintf(file, "%08X ", data );
     842                        ((cache_tag(nway, nset) * m_sets + nset) * m_words * 4));
     843                for (size_t nword = m_words ; nword > 0 ; nword--)
     844                {
     845                    unsigned int data = cache_data(nway, nset, nword - 1);
     846                    fprintf(file, "%08X ", data);
    861847                }
    862848                fprintf(file, "\n");
     
    868854    inline void printTrace()
    869855    {
    870         for ( size_t way = 0; way < m_ways ; way++ )
    871         {
    872             for ( size_t set = 0 ; set < m_sets ; set++ )
     856        for (size_t way = 0; way < m_ways ; way++)
     857        {
     858            for (size_t set = 0 ; set < m_sets ; set++)
    873859            {
    874860                addr_t addr = (((addr_t)cache_tag(way,set))*m_words*m_sets+m_words*set)*4;
     
    878864                          << std::hex << " | @ " << addr;
    879865
    880                 for ( size_t word = 0 ; word < m_words ; word++ )
     866                for (size_t word = 0 ; word < m_words ; word++)
    881867                {
    882868                    std::cout << " | " << cache_data(way,set,word) ;
     
    886872        }
    887873    }
    888 
    889     ///////////////////////////////////////////////////////////////////////////
    890     // This function is deprecated as it is difficult to implement in 1 cycle.
    891     ///////////////////////////////////////////////////////////////////////////
    892     __attribute__((deprecated))
    893     inline bool inval(addr_t    ad)
    894     {
    895         bool              hit = false;
    896         const addr_t      tag = m_z[ad];
    897         const size_t      set = m_y[ad];
    898 
    899         for ( size_t way = 0 ; way < m_ways && !hit ; way++ )
    900         {
    901             if ( (tag == cache_tag(way, set)) and
    902                  (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) )
    903             {
    904                 hit                   = true;
    905                 cache_state(way, set) = CACHE_SLOT_STATE_EMPTY;
    906                 cache_lru(way, set)   = false;
    907             }
    908         }
    909         return hit;
    910     }
    911 
    912     ////////////////////////////////////////////////////////////////////////////////
    913     // This function is deprecated as it is difficult to implement in 1 cycle.
    914     ////////////////////////////////////////////////////////////////////////////////
    915     __attribute__((deprecated))
    916     inline bool inval( addr_t   ad,
    917                        size_t*  selway,
    918                        size_t*  selset )
    919     {
    920         bool            hit = false;
    921         const addr_t    tag = m_z[ad];
    922         const size_t    set = m_y[ad];
    923 
    924         for ( size_t way = 0 ; way < m_ways && !hit ; way++ )
    925         {
    926             if ( (tag == cache_tag(way, set)) and
    927                  (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) )
    928             {
    929                 hit                   = true;
    930                 cache_state(way, set) = CACHE_SLOT_STATE_EMPTY;
    931                 cache_lru(way, set)   = false;
    932                 *selway             = way;
    933                 *selset             = set;
    934             }
    935         }
    936         return hit;
    937     }
    938 
    939     ////////////////////////////////////////////////////////////////////////////////
    940     // This function is deprecated as the directory must be a dual port RAM...
    941     ////////////////////////////////////////////////////////////////////////////////
    942     __attribute__((deprecated))
    943     inline bool update( addr_t  ad,
    944                         data_t* buf,
    945                         addr_t* victim )
    946     {
    947         size_t set, way;
    948         bool   cleanup = victim_select(ad, victim, &way, &set);
    949         victim_update_tag (ad, way, set);
    950 
    951         for ( size_t word = 0 ; word < m_words ; word++ ) {
    952             cache_data(way, set, word) = buf[word] ;
    953         }
    954 
    955         return cleanup;
    956     }
    957 
    958     ////////////////////////////////////////////////////////////////////////////
    959     // this function is deprecated, as it is difficult to implement in 1 cycle.
    960     ////////////////////////////////////////////////////////////////////////////
    961     __attribute__((deprecated))
    962     inline bool write(addr_t    ad,
    963                       data_t    dt)
    964     {
    965         const addr_t      tag  = m_z[ad];
    966         const size_t      set  = m_y[ad];
    967         const size_t      word = m_x[ad];
    968 
    969         for ( size_t way = 0; way < m_ways; way++ )
    970         {
    971             if ( (tag == cache_tag(way, set)) and
    972                  (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) )
    973             {
    974                 cache_data(way, set, word) = dt;
    975                 cache_set_lru(way, set);
    976                 return true;
    977             }
    978         }
    979         return false;
    980     }
    981 
    982     ////////////////////////////////////////////////////////////////////////////
    983     // this function is deprecated, as it is difficult to implement in 1 cycle.
    984     ////////////////////////////////////////////////////////////////////////////
    985     __attribute__((deprecated))
    986     inline bool write(addr_t    ad,
    987                       data_t    dt,
    988                       be_t      be)
    989     {
    990         const addr_t      tag  = m_z[ad];
    991         const size_t      set  = m_y[ad];
    992         const size_t      word = m_x[ad];
    993 
    994         for ( size_t way = 0; way < m_ways; way++ )
    995         {
    996             if ( (tag == cache_tag(way, set)) and
    997                  (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) )
    998             {
    999                 data_t mask = be2mask(be);
    1000                 data_t prev = cache_data(way, set, word);
    1001                 cache_data(way, set, word) = (mask & dt) | (~mask & prev);
    1002                 cache_set_lru(way, set);
    1003                 return true;
    1004             }
    1005         }
    1006         return false;
    1007     }
    1008    
    1009     /////////////////////////////////////////////////////////////////////////////
    1010     // this function is deprecated, as it is difficult to implement in 1 cycle.
    1011     /////////////////////////////////////////////////////////////////////////////
    1012     __attribute__((deprecated))
    1013     inline bool write(addr_t    ad,
    1014                       data_t    dt,
    1015                       size_t*   nway)
    1016     {
    1017         const addr_t      tag  = m_z[ad];
    1018         const size_t      set  = m_y[ad];
    1019         const size_t      word = m_x[ad];
    1020 
    1021         for ( size_t way = 0; way < m_ways; way++ )
    1022         {
    1023             if ( (tag == cache_tag(way, set)) and
    1024                  (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) )
    1025             {
    1026                 cache_data(way, set, word) = dt;
    1027                 cache_set_lru(way, set);
    1028                 *nway = way;
    1029                 return true;
    1030             }
    1031         }
    1032         return false;
    1033     }
    1034 
    1035     /////////////////////////////////////////////////////////////////////////////
    1036     // this function is deprecated, as it is difficult to implement in 1 cycle.
    1037     /////////////////////////////////////////////////////////////////////////////
    1038     __attribute__((deprecated))
    1039     inline bool write(addr_t    ad,
    1040                       data_t    dt,
    1041                       size_t*   nway,
    1042                       be_t      be)
    1043     {
    1044         const addr_t      tag  = m_z[ad];
    1045         const size_t      set  = m_y[ad];
    1046         const size_t      word = m_x[ad];
    1047 
    1048         for ( size_t way = 0; way < m_ways; way++ )
    1049         {
    1050             if ( (tag == cache_tag(way, set)) and
    1051                  (cache_state(way, set) == CACHE_SLOT_STATE_VALID_CC) )
    1052             {
    1053                 data_t mask = be2mask(be);
    1054                 data_t prev = cache_data(way, set, word);
    1055                 cache_data(way, set, word) = (mask & dt) | (~mask & prev);
    1056                 cache_set_lru(way, set);
    1057                 *nway = way;
    1058                 return true;
    1059             }
    1060         }
    1061         return false;
    1062     }
    1063    
     874   
    1064875};
    1065876
  • branches/RWT/lib/generic_cache_tsar/metadata/generic_cache.sd

    r297 r771  
    44__version__ = "$Revision: 917 $"
    55
    6 Module('caba:generic_cache_tsar',
    7         classname = 'soclib::GenericCache',
    8         header_files = ['../include/generic_cache.h',],
    9            tmpl_parameters = [
    10         parameter.Type('addr_t'),
    11         ],
    12         uses = [Uses('common:mapping_table'),
    13                         Uses('common:address_masking_table',
    14                                  data_t = parameter.Reference('addr_t')),],
     6Module('caba:generic_cache_tsar_rwt',
     7    classname = 'soclib::GenericCache',
     8    header_files = ['../include/generic_cache.h',],
     9    tmpl_parameters = [
     10        parameter.Type('addr_t'),
     11    ],
     12    uses = [
     13         Uses('common:mapping_table'),
     14         Uses('common:address_masking_table',
     15              data_t = parameter.Reference('addr_t')),
     16    ],
    1517)
  • branches/RWT/modules/vci_cc_vcache_wrapper/caba/metadata/vci_cc_vcache_wrapper.sd

    r468 r771  
    33
    44Module('caba:vci_cc_vcache_wrapper',
    5             classname = 'soclib::caba::VciCcVCacheWrapper',
     5        classname = 'soclib::caba::VciCcVCacheWrapper',
    66
    7             tmpl_parameters = [
     7        tmpl_parameters = [
    88            parameter.Module('vci_param', default = 'caba:vci_param'),
    99            parameter.Int('dspin_in_width'),
    1010            parameter.Int('dspin_out_width'),
    11                 parameter.Module('iss_t')
     11            parameter.Module('iss_t')
    1212        ],
    1313
    14             header_files = [ '../source/include/vci_cc_vcache_wrapper.h' ],
     14        header_files = [ '../source/include/vci_cc_vcache_wrapper.h' ],
    1515
    16             implementation_files = [ '../source/src/vci_cc_vcache_wrapper.cpp' ],
     16        implementation_files = [ '../source/src/vci_cc_vcache_wrapper.cpp' ],
    1717
    18             uses = [
     18        uses = [
    1919            Uses('caba:base_module'),
    2020            Uses('common:mapping_table'),
    21                 Uses('common:iss2'),
    22                 Uses('caba:multi_write_buffer'),
    23                 Uses('caba:generic_fifo'),
    24                 Uses('caba:generic_cache_tsar',
     21            Uses('common:iss2'),
     22            Uses('caba:multi_write_buffer'),
     23            Uses('caba:generic_fifo'),
     24            Uses('caba:generic_cache_tsar_rwt',
    2525                addr_t = parameter.StringExt('sc_dt::sc_uint<%d> ',
    2626                parameter.Reference('addr_size'))),
     
    3232                parameter.Reference('addr_size'))
    3333            ),
    34                         Uses('caba:dspin_dhccp_param'),
     34            Uses('caba:dspin_rwt_param'),
    3535        ],
    3636
    37             ports = [
     37        ports = [
    3838            Port('caba:vci_initiator', 'p_vci'),
    3939            Port('caba:dspin_input', 'p_dspin_m2p',
     
    4343            Port('caba:dspin_input', 'p_dspin_clack',
    4444                  dspin_data_size = parameter.Reference('dspin_in_width')),
    45                 Port('caba:bit_in','p_irq', parameter.Constant('n_irq')),
    46                 Port('caba:bit_in', 'p_resetn', auto = 'resetn'),
    47                 Port('caba:clock_in', 'p_clk', auto = 'clock')
     45            Port('caba:bit_in','p_irq', parameter.Constant('n_irq')),
     46            Port('caba:bit_in', 'p_resetn', auto = 'resetn'),
     47            Port('caba:clock_in', 'p_clk', auto = 'clock')
    4848        ],
    4949
    50             instance_parameters = [
     50        instance_parameters = [
    5151            parameter.Int('proc_id'),
    52                 parameter.Module('mt', 'common:mapping_table'),
    53                 parameter.Module('mc', 'common:mapping_table'),
    54                 parameter.IntTab('initiator_rw_index'),
    55                 parameter.IntTab('initiator_c_index'),
    56                 parameter.IntTab('target_index'),
    57             parameter.Int('itlb_ways'),
    58             parameter.Int('itlb_sets'),
    59             parameter.Int('dtlb_ways'),
    60             parameter.Int('dtlb_sets'),
    61             parameter.Int('icache_ways'),
    62             parameter.Int('icache_sets'),
    63             parameter.Int('icache_words'),
    64             parameter.Int('dcache_ways'),
    65             parameter.Int('dcache_sets'),
    66             parameter.Int('dcache_words'),
    67             parameter.Int('wbuf_nlines'),
    68             parameter.Int('wbuf_nwords'),
    69             parameter.Int('max_frozen_cycles')
     52            parameter.Module('mt', 'common:mapping_table'),
     53            parameter.Module('mc', 'common:mapping_table'),
     54            parameter.IntTab('initiator_rw_index'),
     55            parameter.IntTab('initiator_c_index'),
     56            parameter.IntTab('target_index'),
     57            parameter.Int('itlb_ways'),
     58            parameter.Int('itlb_sets'),
     59            parameter.Int('dtlb_ways'),
     60            parameter.Int('dtlb_sets'),
     61            parameter.Int('icache_ways'),
     62            parameter.Int('icache_sets'),
     63            parameter.Int('icache_words'),
     64            parameter.Int('dcache_ways'),
     65            parameter.Int('dcache_sets'),
     66            parameter.Int('dcache_words'),
     67            parameter.Int('wbuf_nlines'),
     68            parameter.Int('wbuf_nwords'),
     69            parameter.Int('max_frozen_cycles')
    7070        ],
    7171)
  • branches/RWT/modules/vci_cc_vcache_wrapper/caba/source/include/vci_cc_vcache_wrapper.h

    r767 r771  
    3535#include <inttypes.h>
    3636#include <systemc>
     37
    3738#include "caba_base_module.h"
    3839#include "multi_write_buffer.h"
     
    4243#include "vci_initiator.h"
    4344#include "dspin_interface.h"
    44 #include "dspin_dhccp_param.h"
     45#include "dspin_rwt_param.h"
    4546#include "mapping_table.h"
    4647#include "static_assert.h"
  • branches/RWT/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp

    r767 r771  
    42894289
    42904290        uint32_t rdata;
    4291         size_t   way;
    4292         size_t   set;
     4291        size_t   way = 0; // To avoid gcc warning
     4292        size_t   set = 0; // To avoid gcc warning
    42934293        size_t   word;
    42944294        r_dcache.read_neutral(r_dcache_xtn_data_addr.read(),
     
    53795379
    53805380        uint32_t rdata;
    5381         size_t   way;
    5382         size_t   set;
     5381        size_t   way = 0; // to avoid gcc warning
     5382        size_t   set = 0; // to avoid gcc warning
    53835383        size_t   word;
    53845384        r_dcache.read_neutral(r_dcache_cc_inval_addr.read(),
     
    53995399                r_dcache_cc_inval_data_cpt = 0;
    54005400                r_dcache_fsm          = r_dcache_fsm_cc_save.read();
    5401                 r_dcache.write_dir( way,
    5402                                     set,
    5403                                     CACHE_SLOT_STATE_ZOMBI );
     5401                r_dcache.write_dir(way,
     5402                                   set,
     5403                                   CACHE_SLOT_STATE_ZOMBI );
    54045404            }
    54055405        }
     
    62076207                uint64_t receive_data = p_dspin_m2p.data.read();
    62086208                // initialize coherence packet type
    6209                 uint64_t receive_type = DspinDhccpParam::dspin_get(receive_data,
    6210                                             DspinDhccpParam::M2P_TYPE);
     6209                uint64_t receive_type = DspinRwtParam::dspin_get(receive_data,
     6210                                            DspinRwtParam::M2P_TYPE);
    62116211                // test for a broadcast
    6212                 if (DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::M2P_BC))
     6212                if (DspinRwtParam::dspin_get(receive_data,DspinRwtParam::M2P_BC))
    62136213                {
    62146214                    r_cc_receive_fsm = CC_RECEIVE_BRDCAST_HEADER;
    62156215                }
    62166216                // test for a multi updt
    6217                 else if (receive_type == DspinDhccpParam::TYPE_MULTI_UPDT_DATA)
     6217                else if (receive_type == DspinRwtParam::TYPE_MULTI_UPDT_DATA)
    62186218                {
    62196219                    r_cc_receive_fsm = CC_RECEIVE_DATA_UPDT_HEADER;
    62206220                }
    6221                 else if (receive_type == DspinDhccpParam::TYPE_MULTI_UPDT_INST)
     6221                else if (receive_type == DspinRwtParam::TYPE_MULTI_UPDT_INST)
    62226222                {
    62236223                    r_cc_receive_fsm = CC_RECEIVE_INS_UPDT_HEADER;
    62246224                }
    62256225                // test for a multi inval
    6226                 else if (receive_type == DspinDhccpParam::TYPE_MULTI_INVAL_DATA)
     6226                else if (receive_type == DspinRwtParam::TYPE_MULTI_INVAL_DATA)
    62276227                {
    62286228                    r_cc_receive_fsm = CC_RECEIVE_DATA_INVAL_HEADER;
     
    62576257                // request dcache to handle the BROADCAST
    62586258                r_cc_receive_dcache_req = true;
    6259                 r_cc_receive_dcache_nline  = DspinDhccpParam::dspin_get(receive_data,
    6260                                              DspinDhccpParam::BROADCAST_NLINE);
     6259                r_cc_receive_dcache_nline  = DspinRwtParam::dspin_get(receive_data,
     6260                                             DspinRwtParam::BROADCAST_NLINE);
    62616261                r_cc_receive_dcache_type = CC_TYPE_INVAL;
    62626262                // request icache to handle the BROADCAST
    62636263                r_cc_receive_icache_req = true;
    6264                 r_cc_receive_icache_nline  = DspinDhccpParam::dspin_get(receive_data,
    6265                                              DspinDhccpParam::BROADCAST_NLINE);
     6264                r_cc_receive_icache_nline  = DspinRwtParam::dspin_get(receive_data,
     6265                                             DspinRwtParam::BROADCAST_NLINE);
    62666266                r_cc_receive_icache_type = CC_TYPE_INVAL;
    62676267                // get back to idle state
     
    62796279            // sample updt tab index in the HEADER, then skip to second flit
    62806280            r_cc_receive_fsm = CC_RECEIVE_DATA_INVAL_NLINE;
    6281             r_cc_receive_dcache_inval_is_config = DspinDhccpParam::dspin_get(receive_data,
    6282                                                   DspinDhccpParam::MULTI_INVAL_IS_CONFIG);
     6281            r_cc_receive_dcache_inval_is_config = DspinRwtParam::dspin_get(receive_data,
     6282                                                  DspinRwtParam::MULTI_INVAL_IS_CONFIG);
    62836283            break;
    62846284        }
     
    63016301                // request dcache to handle the INVAL
    63026302                r_cc_receive_dcache_req = true;
    6303                 r_cc_receive_dcache_nline = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_INVAL_NLINE);
     6303                r_cc_receive_dcache_nline = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_INVAL_NLINE);
    63046304                r_cc_receive_dcache_type = CC_TYPE_INVAL;
    63056305                // get back to idle state
     
    63206320                // request icache to handle the INVAL
    63216321                r_cc_receive_icache_req = true;
    6322                 r_cc_receive_icache_nline = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_INVAL_NLINE);
     6322                r_cc_receive_icache_nline = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_INVAL_NLINE);
    63236323                r_cc_receive_icache_type = CC_TYPE_INVAL;
    63246324                // get back to idle state
     
    63376337            if (not r_cc_receive_dcache_req.read())
    63386338            {
    6339                 r_cc_receive_dcache_updt_tab_idx  = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_UPDT_INDEX);
     6339                r_cc_receive_dcache_updt_tab_idx  = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_UPDT_INDEX);
    63406340                r_cc_receive_fsm = CC_RECEIVE_DATA_UPDT_NLINE;
    63416341                break;
     
    63526352            if (not r_cc_receive_icache_req.read())
    63536353            {
    6354                 r_cc_receive_icache_updt_tab_idx  = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_UPDT_INDEX);
     6354                r_cc_receive_icache_updt_tab_idx  = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_UPDT_INDEX);
    63556355                r_cc_receive_fsm = CC_RECEIVE_INS_UPDT_NLINE;
    63566356                break;
     
    63706370            {
    63716371                r_cc_receive_dcache_req = true;
    6372                 r_cc_receive_dcache_nline  = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_NLINE);
    6373                 r_cc_receive_word_idx  = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_WORD_INDEX);
     6372                r_cc_receive_dcache_nline  = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_NLINE);
     6373                r_cc_receive_word_idx  = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_WORD_INDEX);
    63746374                r_cc_receive_dcache_type = CC_TYPE_UPDT;
    63756375                // get back to idle state
     
    63906390            {
    63916391                r_cc_receive_icache_req = true;
    6392                 r_cc_receive_icache_nline  = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_NLINE);
    6393                 r_cc_receive_word_idx  = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_WORD_INDEX);
     6392                r_cc_receive_icache_nline  = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_NLINE);
     6393                r_cc_receive_word_idx  = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_WORD_INDEX);
    63946394                r_cc_receive_icache_type = CC_TYPE_UPDT;
    63956395                // get back to idle state
     
    64076407                uint64_t receive_data = p_dspin_m2p.data.read();
    64086408                bool     receive_eop  = p_dspin_m2p.eop.read();
    6409                 cc_receive_updt_fifo_be   = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_BE);
    6410                 cc_receive_updt_fifo_data = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_DATA);
     6409                cc_receive_updt_fifo_be   = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_BE);
     6410                cc_receive_updt_fifo_data = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_DATA);
    64116411                cc_receive_updt_fifo_eop  = receive_eop;
    64126412                cc_receive_updt_fifo_put  = true;
     
    64236423                uint64_t receive_data = p_dspin_m2p.data.read();
    64246424                bool     receive_eop  = p_dspin_m2p.eop.read();
    6425                 cc_receive_updt_fifo_be   = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_BE);
    6426                 cc_receive_updt_fifo_data = DspinDhccpParam::dspin_get(receive_data,DspinDhccpParam::MULTI_UPDT_DATA);
     6425                cc_receive_updt_fifo_be   = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_BE);
     6426                cc_receive_updt_fifo_data = DspinRwtParam::dspin_get(receive_data,DspinRwtParam::MULTI_UPDT_DATA);
    64276427                cc_receive_updt_fifo_eop  = receive_eop;
    64286428                cc_receive_updt_fifo_put  = true;
     
    64366436    ///////////////// DSPIN CLACK interface ///////////////
    64376437   
    6438     uint64_t clack_type = DspinDhccpParam::dspin_get(r_dspin_clack_flit.read(),
    6439                                                      DspinDhccpParam::CLACK_TYPE);
    6440 
    6441     size_t clack_way  = DspinDhccpParam::dspin_get(r_dspin_clack_flit.read(),
    6442                                                    DspinDhccpParam::CLACK_WAY);
    6443 
    6444     size_t clack_set  = DspinDhccpParam::dspin_get(r_dspin_clack_flit.read(),
    6445                                                    DspinDhccpParam::CLACK_SET);
     6438    uint64_t clack_type = DspinRwtParam::dspin_get(r_dspin_clack_flit.read(),
     6439                                                     DspinRwtParam::CLACK_TYPE);
     6440
     6441    size_t clack_way  = DspinRwtParam::dspin_get(r_dspin_clack_flit.read(),
     6442                                                   DspinRwtParam::CLACK_WAY);
     6443
     6444    size_t clack_set  = DspinRwtParam::dspin_get(r_dspin_clack_flit.read(),
     6445                                                   DspinRwtParam::CLACK_SET);
    64466446
    64476447    bool dspin_clack_get      = false;
    6448     bool dcache_clack_request = (clack_type == DspinDhccpParam::TYPE_CLACK_DATA);
    6449     bool icache_clack_request = (clack_type == DspinDhccpParam::TYPE_CLACK_INST);
     6448    bool dcache_clack_request = (clack_type == DspinRwtParam::TYPE_CLACK_DATA);
     6449    bool icache_clack_request = (clack_type == DspinRwtParam::TYPE_CLACK_INST);
    64506450
    64516451    if (r_dspin_clack_req.read())
     
    67016701        {
    67026702            // initialize dspin send data
    6703             DspinDhccpParam::dspin_set(dspin_send_data,
     6703            DspinRwtParam::dspin_set(dspin_send_data,
    67046704                                       m_cc_global_id,
    6705                                        DspinDhccpParam::CLEANUP_SRCID);
    6706             DspinDhccpParam::dspin_set(dspin_send_data,
     6705                                       DspinRwtParam::CLEANUP_SRCID);
     6706            DspinRwtParam::dspin_set(dspin_send_data,
    67076707                                       0,
    6708                                        DspinDhccpParam::P2M_BC);
     6708                                       DspinRwtParam::P2M_BC);
    67096709
    67106710            if(r_cc_send_last_client.read() == 0) // dcache active request
     
    67126712                uint64_t dest = (uint64_t) r_dcache_cc_send_nline.read()
    67136713                                >> (m_nline_width - m_x_width - m_y_width)
    6714                                 << (DspinDhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);
    6715                 DspinDhccpParam::dspin_set(dspin_send_data,
     6714                                << (DspinRwtParam::GLOBALID_WIDTH - m_x_width - m_y_width);
     6715                DspinRwtParam::dspin_set(dspin_send_data,
    67166716                                           dest,
    6717                                            DspinDhccpParam::CLEANUP_DEST);
    6718 
    6719                 DspinDhccpParam::dspin_set(dspin_send_data,
     6717                                           DspinRwtParam::CLEANUP_DEST);
     6718
     6719                DspinRwtParam::dspin_set(dspin_send_data,
    67206720                                           (r_dcache_cc_send_nline.read() & 0x300000000ULL)>>32,
    6721                                            DspinDhccpParam::CLEANUP_NLINE_MSB);
    6722 
    6723                 DspinDhccpParam::dspin_set(dspin_send_data,
     6721                                           DspinRwtParam::CLEANUP_NLINE_MSB);
     6722
     6723                DspinRwtParam::dspin_set(dspin_send_data,
    67246724                                           r_dcache_cc_send_way.read(),
    6725                                            DspinDhccpParam::CLEANUP_WAY_INDEX);
    6726 
    6727                 DspinDhccpParam::dspin_set(dspin_send_data,
    6728                                            DspinDhccpParam::TYPE_CLEANUP_DATA,
    6729                                            DspinDhccpParam::P2M_TYPE);
    6730 
    6731                 DspinDhccpParam::dspin_set(dspin_send_data,
     6725                                           DspinRwtParam::CLEANUP_WAY_INDEX);
     6726
     6727                DspinRwtParam::dspin_set(dspin_send_data,
     6728                                           DspinRwtParam::TYPE_CLEANUP_DATA,
     6729                                           DspinRwtParam::P2M_TYPE);
     6730
     6731                DspinRwtParam::dspin_set(dspin_send_data,
    67326732                                           (r_dcache_cc_cleanup_line_ncc.read() and (r_cc_send_last_client.read() == 0)),
    6733                                            DspinDhccpParam::CLEANUP_NCC);
     6733                                           DspinRwtParam::CLEANUP_NCC);
    67346734            }
    67356735            else                                // icache active request
     
    67376737                uint64_t dest = (uint64_t) r_icache_cc_send_nline.read()
    67386738                                >> (m_nline_width - m_x_width - m_y_width)
    6739                                 << (DspinDhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);
    6740 
    6741                 DspinDhccpParam::dspin_set(dspin_send_data,
     6739                                << (DspinRwtParam::GLOBALID_WIDTH - m_x_width - m_y_width);
     6740
     6741                DspinRwtParam::dspin_set(dspin_send_data,
    67426742                                           dest,
    6743                                            DspinDhccpParam::CLEANUP_DEST);
    6744 
    6745                 DspinDhccpParam::dspin_set(dspin_send_data,
     6743                                           DspinRwtParam::CLEANUP_DEST);
     6744
     6745                DspinRwtParam::dspin_set(dspin_send_data,
    67466746                                           (r_icache_cc_send_nline.read() & 0x300000000ULL)>>32,
    6747                                            DspinDhccpParam::CLEANUP_NLINE_MSB);
    6748 
    6749                 DspinDhccpParam::dspin_set(dspin_send_data,
     6747                                           DspinRwtParam::CLEANUP_NLINE_MSB);
     6748
     6749                DspinRwtParam::dspin_set(dspin_send_data,
    67506750                                           r_icache_cc_send_way.read(),
    6751                                            DspinDhccpParam::CLEANUP_WAY_INDEX);
    6752 
    6753                 DspinDhccpParam::dspin_set(dspin_send_data,
    6754                                            DspinDhccpParam::TYPE_CLEANUP_INST,
    6755                                            DspinDhccpParam::P2M_TYPE);
    6756 
    6757                 DspinDhccpParam::dspin_set(dspin_send_data,
     6751                                           DspinRwtParam::CLEANUP_WAY_INDEX);
     6752
     6753                DspinRwtParam::dspin_set(dspin_send_data,
     6754                                           DspinRwtParam::TYPE_CLEANUP_INST,
     6755                                           DspinRwtParam::P2M_TYPE);
     6756
     6757                DspinRwtParam::dspin_set(dspin_send_data,
    67586758                                           0,
    6759                                            DspinDhccpParam::CLEANUP_NCC);
     6759                                           DspinRwtParam::CLEANUP_NCC);
    67606760
    67616761
     
    67736773            if(r_cc_send_last_client.read() == 0) // dcache active request
    67746774            {
    6775                 DspinDhccpParam::dspin_set(dspin_send_data,
     6775                DspinRwtParam::dspin_set(dspin_send_data,
    67766776                                           r_dcache_cc_send_nline.read() & 0xFFFFFFFFULL,
    6777                                            DspinDhccpParam::CLEANUP_NLINE_LSB);
     6777                                           DspinRwtParam::CLEANUP_NLINE_LSB);
    67786778            }
    67796779            else                                  // icache active request
    67806780            {
    6781                 DspinDhccpParam::dspin_set(dspin_send_data,
     6781                DspinRwtParam::dspin_set(dspin_send_data,
    67826782                                           r_icache_cc_send_nline.read() & 0xFFFFFFFFULL,
    6783                                            DspinDhccpParam::CLEANUP_NLINE_LSB);
     6783                                           DspinRwtParam::CLEANUP_NLINE_LSB);
    67846784            }
    67856785            // send flit
     
    67936793        {
    67946794
    6795             DspinDhccpParam::dspin_set(dspin_send_data,
     6795            DspinRwtParam::dspin_set(dspin_send_data,
    67966796                                       r_cc_send_data_fifo.read(),
    6797                                        DspinDhccpParam::CLEANUP_DATA_UPDT);
     6797                                       DspinRwtParam::CLEANUP_DATA_UPDT);
    67986798           
    67996799            p_dspin_p2m.data = dspin_send_data;
     
    68066806        {
    68076807            // initialize dspin send data
    6808             DspinDhccpParam::dspin_set(dspin_send_data,
     6808            DspinRwtParam::dspin_set(dspin_send_data,
    68096809                                       0,
    6810                                        DspinDhccpParam::P2M_BC);
    6811             DspinDhccpParam::dspin_set(dspin_send_data,
    6812                                        DspinDhccpParam::TYPE_MULTI_ACK,
    6813                                        DspinDhccpParam::P2M_TYPE);
     6810                                       DspinRwtParam::P2M_BC);
     6811            DspinRwtParam::dspin_set(dspin_send_data,
     6812                                       DspinRwtParam::TYPE_MULTI_ACK,
     6813                                       DspinRwtParam::P2M_TYPE);
    68146814
    68156815            if(r_cc_send_last_client.read() == 0) // dcache active request
     
    68176817                uint64_t dest = (uint64_t) r_dcache_cc_send_nline.read()
    68186818                                >> (m_nline_width - m_x_width - m_y_width)
    6819                                 << (DspinDhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);
     6819                                << (DspinRwtParam::GLOBALID_WIDTH - m_x_width - m_y_width);
    68206820 
    6821                 DspinDhccpParam::dspin_set(dspin_send_data,
     6821                DspinRwtParam::dspin_set(dspin_send_data,
    68226822                                           dest,
    6823                                            DspinDhccpParam::MULTI_ACK_DEST);
    6824 
    6825                 DspinDhccpParam::dspin_set(dspin_send_data,
     6823                                           DspinRwtParam::MULTI_ACK_DEST);
     6824
     6825                DspinRwtParam::dspin_set(dspin_send_data,
    68266826                                           r_dcache_cc_send_updt_tab_idx.read(),
    6827                                            DspinDhccpParam::MULTI_ACK_UPDT_INDEX);
     6827                                           DspinRwtParam::MULTI_ACK_UPDT_INDEX);
    68286828            }
    68296829            else                                    // icache active request
     
    68316831                uint64_t dest = (uint64_t) r_icache_cc_send_nline.read()
    68326832                                >> (m_nline_width - m_x_width - m_y_width)
    6833                                 << (DspinDhccpParam::GLOBALID_WIDTH - m_x_width - m_y_width);
     6833                                << (DspinRwtParam::GLOBALID_WIDTH - m_x_width - m_y_width);
    68346834 
    68356835
    6836                 DspinDhccpParam::dspin_set(dspin_send_data,
     6836                DspinRwtParam::dspin_set(dspin_send_data,
    68376837                                           dest,
    6838                                            DspinDhccpParam::MULTI_ACK_DEST);
    6839 
    6840                 DspinDhccpParam::dspin_set(dspin_send_data,
     6838                                           DspinRwtParam::MULTI_ACK_DEST);
     6839
     6840                DspinRwtParam::dspin_set(dspin_send_data,
    68416841                                           r_icache_cc_send_updt_tab_idx.read(),
    6842                                            DspinDhccpParam::MULTI_ACK_UPDT_INDEX);
     6842                                           DspinRwtParam::MULTI_ACK_UPDT_INDEX);
    68436843            }
    68446844            // send flit
     
    69386938
    69396939
    6940     int clack_type = DspinDhccpParam::dspin_get(r_dspin_clack_flit.read(),
    6941                                                 DspinDhccpParam::CLACK_TYPE);
     6940    int clack_type = DspinRwtParam::dspin_get(r_dspin_clack_flit.read(),
     6941                                                DspinRwtParam::CLACK_TYPE);
    69426942
    69436943    bool dspin_clack_get      = false;
    6944     bool dcache_clack_request = (clack_type == DspinDhccpParam::TYPE_CLACK_DATA);
    6945     bool icache_clack_request = (clack_type == DspinDhccpParam::TYPE_CLACK_INST);
     6944    bool dcache_clack_request = (clack_type == DspinRwtParam::TYPE_CLACK_DATA);
     6945    bool icache_clack_request = (clack_type == DspinRwtParam::TYPE_CLACK_INST);
    69466946
    69476947    if (r_dspin_clack_req.read())
  • branches/RWT/modules/vci_mem_cache/caba/metadata/vci_mem_cache.sd

    r468 r771  
    4040            Uses('caba:generic_fifo'),
    4141            Uses('caba:generic_llsc_global_table'),
    42             Uses('caba:dspin_dhccp_param')
     42            Uses('caba:dspin_rwt_param')
    4343        ],
    4444
  • branches/RWT/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h

    r767 r771  
    5151#include "update_tab.h"
    5252#include "dspin_interface.h"
    53 #include "dspin_dhccp_param.h"
     53#include "dspin_rwt_param.h"
    5454
    5555#define TRT_ENTRIES      4      // Number of entries in TRT
  • branches/RWT/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp

    r767 r771  
    20292029                    {
    20302030                        uint64_t flit = m_cc_receive_to_multi_ack_fifo.read();
    2031                         updt_index    = DspinDhccpParam::dspin_get(flit,
    2032                                 DspinDhccpParam::MULTI_ACK_UPDT_INDEX);
     2031                        updt_index    = DspinRwtParam::dspin_get(flit,
     2032                                DspinRwtParam::MULTI_ACK_UPDT_INDEX);
    20332033
    20342034                        cc_receive_to_multi_ack_fifo_get = true;
     
    56615661
    56625662                    uint32_t srcid =
    5663                         DspinDhccpParam::dspin_get(
     5663                        DspinRwtParam::dspin_get(
    56645664                                flit,
    5665                                 DspinDhccpParam::CLEANUP_SRCID);
     5665                                DspinRwtParam::CLEANUP_SRCID);
    56665666
    56675667                    uint8_t type =
    5668                         DspinDhccpParam::dspin_get(
     5668                        DspinRwtParam::dspin_get(
    56695669                                flit,
    5670                                 DspinDhccpParam::P2M_TYPE);
     5670                                DspinRwtParam::P2M_TYPE);
    56715671
    56725672                    r_cleanup_way_index =
    5673                         DspinDhccpParam::dspin_get(
     5673                        DspinRwtParam::dspin_get(
    56745674                                flit,
    5675                                 DspinDhccpParam::CLEANUP_WAY_INDEX);
     5675                                DspinRwtParam::CLEANUP_WAY_INDEX);
    56765676
    56775677                    r_cleanup_nline =
    5678                         DspinDhccpParam::dspin_get(
     5678                        DspinRwtParam::dspin_get(
    56795679                                flit,
    5680                                 DspinDhccpParam::CLEANUP_NLINE_MSB) << 32;
    5681 
    5682                     r_cleanup_inst  = (type == DspinDhccpParam::TYPE_CLEANUP_INST);
     5680                                DspinRwtParam::CLEANUP_NLINE_MSB) << 32;
     5681
     5682                    r_cleanup_inst  = (type == DspinRwtParam::TYPE_CLEANUP_INST);
    56835683                    r_cleanup_srcid = srcid;
    56845684                    r_cleanup_ncc =
    5685                         DspinDhccpParam::dspin_get(
     5685                        DspinRwtParam::dspin_get(
    56865686                                flit,
    5687                                 DspinDhccpParam::CLEANUP_NCC);
     5687                                DspinRwtParam::CLEANUP_NCC);
    56885688                    r_cleanup_contains_data = false;
    56895689
     
    57105710                            << " CLEANUP_IDLE> Cleanup request:" << std::hex
    57115711                            << " / owner_id = "   << srcid
    5712                             << " / owner_ins = "  << (type == DspinDhccpParam::TYPE_CLEANUP_INST)
    5713                             << " / ncc = " << DspinDhccpParam::dspin_get(
     5712                            << " / owner_ins = "  << (type == DspinRwtParam::TYPE_CLEANUP_INST)
     5713                            << " / ncc = " << DspinRwtParam::dspin_get(
    57145714                                    flit,
    5715                                     DspinDhccpParam::CLEANUP_NCC)
     5715                                    DspinRwtParam::CLEANUP_NCC)
    57165716                            << std::endl;
    57175717                    }
     
    57285728
    57295729                    addr_t nline = r_cleanup_nline.read() |
    5730                         DspinDhccpParam::dspin_get(flit, DspinDhccpParam::CLEANUP_NLINE_LSB);
     5730                        DspinRwtParam::dspin_get(flit, DspinRwtParam::CLEANUP_NLINE_LSB);
    57315731
    57325732                    bool eop =
    5733                         DspinDhccpParam::dspin_get(flit, DspinDhccpParam::P2M_EOP) == 0x1;
     5733                        DspinRwtParam::dspin_get(flit, DspinRwtParam::P2M_EOP) == 0x1;
    57345734
    57355735                    if (! eop)
     
    57685768
    57695769                        uint32_t data =
    5770                             DspinDhccpParam::dspin_get (flit, DspinDhccpParam::CLEANUP_DATA_UPDT);
     5770                            DspinRwtParam::dspin_get (flit, DspinRwtParam::CLEANUP_DATA_UPDT);
    57715771
    57725772                        r_cleanup_data[r_cleanup_data_index] = data;
     
    81708170
    81718171                    uint8_t type =
    8172                         DspinDhccpParam::dspin_get(
     8172                        DspinRwtParam::dspin_get(
    81738173                                p_dspin_p2m.data.read(),
    8174                                 DspinDhccpParam::P2M_TYPE);
    8175 
    8176                     if((type == DspinDhccpParam::TYPE_CLEANUP_DATA) or
    8177                             (type == DspinDhccpParam::TYPE_CLEANUP_INST))
     8174                                DspinRwtParam::P2M_TYPE);
     8175
     8176                    if((type == DspinRwtParam::TYPE_CLEANUP_DATA) or
     8177                            (type == DspinRwtParam::TYPE_CLEANUP_INST))
    81788178                    {
    81798179                        r_cc_receive_fsm = CC_RECEIVE_CLEANUP;
     
    81818181                    }
    81828182
    8183                     if(type == DspinDhccpParam::TYPE_MULTI_ACK)
     8183                    if(type == DspinRwtParam::TYPE_MULTI_ACK)
    81848184                    {
    81858185                        r_cc_receive_fsm = CC_RECEIVE_MULTI_ACK;
     
    1026110261                    if(m_config_to_cc_send_inst_fifo.read())
    1026210262                    {
    10263                         multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_INST;
     10263                        multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_INST;
    1026410264                    }
    1026510265                    else
    1026610266                    {
    10267                         multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_DATA;
     10267                        multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_DATA;
    1026810268                    }
    1026910269
    1027010270                    uint64_t flit = 0;
    1027110271                    uint64_t dest = m_config_to_cc_send_srcid_fifo.read() <<
    10272                         (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S);
    10273 
    10274                     DspinDhccpParam::dspin_set( flit,
     10272                        (DspinRwtParam::SRCID_WIDTH - vci_param_int::S);
     10273
     10274                    DspinRwtParam::dspin_set( flit,
    1027510275                            dest,
    10276                             DspinDhccpParam::MULTI_INVAL_DEST);
     10276                            DspinRwtParam::MULTI_INVAL_DEST);
    1027710277
    1027810278                    // MODIFIED FOR CONFIG INVAL (solution 1 bit in flit multi_inval)
    10279                     DspinDhccpParam::dspin_set( flit,
     10279                    DspinRwtParam::dspin_set( flit,
    1028010280                            1,
    10281                             DspinDhccpParam::MULTI_INVAL_IS_CONFIG);
    10282 
    10283                     DspinDhccpParam::dspin_set( flit,
     10281                            DspinRwtParam::MULTI_INVAL_IS_CONFIG);
     10282
     10283                    DspinRwtParam::dspin_set( flit,
    1028410284                            r_config_to_cc_send_trdid.read(),
    10285                             DspinDhccpParam::MULTI_INVAL_UPDT_INDEX);
    10286 
    10287                     DspinDhccpParam::dspin_set( flit,
     10285                            DspinRwtParam::MULTI_INVAL_UPDT_INDEX);
     10286
     10287                    DspinRwtParam::dspin_set( flit,
    1028810288                            multi_inval_type,
    10289                             DspinDhccpParam::M2P_TYPE);
     10289                            DspinRwtParam::M2P_TYPE);
    1029010290                    p_dspin_m2p.write = true;
    1029110291                    p_dspin_m2p.data  = flit;
     
    1029610296                {
    1029710297                    uint64_t flit = 0;
    10298                     DspinDhccpParam::dspin_set( flit,
     10298                    DspinRwtParam::dspin_set( flit,
    1029910299                            r_config_to_cc_send_nline.read(),
    10300                             DspinDhccpParam::MULTI_INVAL_NLINE);
     10300                            DspinRwtParam::MULTI_INVAL_NLINE);
    1030110301                    p_dspin_m2p.eop   = true;
    1030210302                    p_dspin_m2p.write = true;
     
    1031210312                    if(m_xram_rsp_to_cc_send_inst_fifo.read())
    1031310313                    {
    10314                         multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_INST;
     10314                        multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_INST;
    1031510315                    }
    1031610316                    else
    1031710317                    {
    10318                         multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_DATA;
     10318                        multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_DATA;
    1031910319                    }
    1032010320
    1032110321                    uint64_t flit = 0;
    1032210322                    uint64_t dest = m_xram_rsp_to_cc_send_srcid_fifo.read() <<
    10323                         (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S);
    10324 
    10325                     DspinDhccpParam::dspin_set( flit,
     10323                        (DspinRwtParam::SRCID_WIDTH - vci_param_int::S);
     10324
     10325                    DspinRwtParam::dspin_set( flit,
    1032610326                            dest,
    10327                             DspinDhccpParam::MULTI_INVAL_DEST);
    10328 
    10329                     DspinDhccpParam::dspin_set( flit,
     10327                            DspinRwtParam::MULTI_INVAL_DEST);
     10328
     10329                    DspinRwtParam::dspin_set( flit,
    1033010330                            r_xram_rsp_to_cc_send_trdid.read(),
    10331                             DspinDhccpParam::MULTI_INVAL_UPDT_INDEX);
    10332 
    10333                     DspinDhccpParam::dspin_set( flit,
     10331                            DspinRwtParam::MULTI_INVAL_UPDT_INDEX);
     10332
     10333                    DspinRwtParam::dspin_set( flit,
    1033410334                            multi_inval_type,
    10335                             DspinDhccpParam::M2P_TYPE);
     10335                            DspinRwtParam::M2P_TYPE);
    1033610336                    p_dspin_m2p.write = true;
    1033710337                    p_dspin_m2p.data  = flit;
     
    1034410344                    uint64_t flit = 0;
    1034510345
    10346                     DspinDhccpParam::dspin_set( flit,
     10346                    DspinRwtParam::dspin_set( flit,
    1034710347                            r_xram_rsp_to_cc_send_nline.read(),
    10348                             DspinDhccpParam::MULTI_INVAL_NLINE);
     10348                            DspinRwtParam::MULTI_INVAL_NLINE);
    1034910349                    p_dspin_m2p.eop   = true;
    1035010350                    p_dspin_m2p.write = true;
     
    1035810358                    uint64_t flit = 0;
    1035910359
    10360                     DspinDhccpParam::dspin_set( flit,
     10360                    DspinRwtParam::dspin_set( flit,
    1036110361                            m_broadcast_boundaries,
    10362                             DspinDhccpParam::BROADCAST_BOX);
     10362                            DspinRwtParam::BROADCAST_BOX);
    1036310363                   
    10364                     DspinDhccpParam::dspin_set( flit,
     10364                    DspinRwtParam::dspin_set( flit,
    1036510365                            1,
    10366                             DspinDhccpParam::MULTI_INVAL_IS_CONFIG);
    10367 
    10368                     DspinDhccpParam::dspin_set( flit,
     10366                            DspinRwtParam::MULTI_INVAL_IS_CONFIG);
     10367
     10368                    DspinRwtParam::dspin_set( flit,
    1036910369                            1ULL,
    10370                             DspinDhccpParam::M2P_BC);
     10370                            DspinRwtParam::M2P_BC);
    1037110371                    p_dspin_m2p.write = true;
    1037210372                    p_dspin_m2p.data  = flit;
     
    1038010380                    uint64_t flit = 0;
    1038110381
    10382                     DspinDhccpParam::dspin_set( flit,
     10382                    DspinRwtParam::dspin_set( flit,
    1038310383                            m_broadcast_boundaries,
    10384                             DspinDhccpParam::BROADCAST_BOX);
    10385 
    10386                     DspinDhccpParam::dspin_set( flit,
     10384                            DspinRwtParam::BROADCAST_BOX);
     10385
     10386                    DspinRwtParam::dspin_set( flit,
    1038710387                            1ULL,
    10388                             DspinDhccpParam::M2P_BC);
     10388                            DspinRwtParam::M2P_BC);
    1038910389                    p_dspin_m2p.write = true;
    1039010390                    p_dspin_m2p.data  = flit;
     
    1039510395                {
    1039610396                    uint64_t flit = 0;
    10397                     DspinDhccpParam::dspin_set( flit,
     10397                    DspinRwtParam::dspin_set( flit,
    1039810398                            r_xram_rsp_to_cc_send_nline.read(),
    10399                             DspinDhccpParam::BROADCAST_NLINE);
     10399                            DspinRwtParam::BROADCAST_NLINE);
    1040010400                    p_dspin_m2p.write = true;
    1040110401                    p_dspin_m2p.eop   = true;
     
    1040710407                {
    1040810408                    uint64_t flit = 0;
    10409                     DspinDhccpParam::dspin_set( flit,
     10409                    DspinRwtParam::dspin_set( flit,
    1041010410                            r_config_to_cc_send_nline.read(),
    10411                             DspinDhccpParam::BROADCAST_NLINE);
     10411                            DspinRwtParam::BROADCAST_NLINE);
    1041210412                    p_dspin_m2p.write = true;
    1041310413                    p_dspin_m2p.eop   = true;
     
    1042110421                    uint64_t flit = 0;
    1042210422
    10423                     uint8_t multi_inval_type;
    10424                     if (r_read_to_cc_send_inst.read())
    10425                     {
    10426                         multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_INST;
    10427                     }
    10428                     else
    10429                     {
    10430                         multi_inval_type = DspinDhccpParam::TYPE_MULTI_INVAL_DATA;
    10431                     }
    10432 
    10433                     DspinDhccpParam::dspin_set(
     10423                    //uint8_t multi_inval_type;
     10424                    //if (r_read_to_cc_send_inst.read())
     10425                    //{
     10426                    //    multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_INST;
     10427                    //}
     10428                    //else
     10429                    //{
     10430                    //    multi_inval_type = DspinRwtParam::TYPE_MULTI_INVAL_DATA;
     10431                    //}
     10432
     10433                    DspinRwtParam::dspin_set(
    1043410434                            flit,
    1043510435                            r_read_to_cc_send_dest.read(),
    10436                             DspinDhccpParam::MULTI_INVAL_DEST);
    10437 
    10438                     DspinDhccpParam::dspin_set(
     10436                            DspinRwtParam::MULTI_INVAL_DEST);
     10437
     10438                    DspinRwtParam::dspin_set(
    1043910439                            flit,
    10440                             DspinDhccpParam::TYPE_MULTI_INVAL_DATA,
    10441                             DspinDhccpParam::M2P_TYPE);
     10440                            DspinRwtParam::TYPE_MULTI_INVAL_DATA,
     10441                            DspinRwtParam::M2P_TYPE);
    1044210442
    1044310443                    p_dspin_m2p.write = true;
     
    1045310453                    uint64_t flit = 0;
    1045410454
    10455                     DspinDhccpParam::dspin_set(
     10455                    DspinRwtParam::dspin_set(
    1045610456                            flit,
    1045710457                            r_read_to_cc_send_nline.read(),
    10458                             DspinDhccpParam::MULTI_INVAL_NLINE);
     10458                            DspinRwtParam::MULTI_INVAL_NLINE);
    1045910459
    1046010460
     
    1047110471                    uint64_t flit = 0;
    1047210472
    10473                     DspinDhccpParam::dspin_set(
     10473                    DspinRwtParam::dspin_set(
    1047410474                            flit,
    1047510475                            r_write_to_cc_send_dest.read(),
    10476                             DspinDhccpParam::MULTI_INVAL_DEST);
    10477 
    10478                     DspinDhccpParam::dspin_set(
     10476                            DspinRwtParam::MULTI_INVAL_DEST);
     10477
     10478                    DspinRwtParam::dspin_set(
    1047910479                            flit,
    10480                             DspinDhccpParam::TYPE_MULTI_INVAL_DATA,
    10481                             DspinDhccpParam::M2P_TYPE);
     10480                            DspinRwtParam::TYPE_MULTI_INVAL_DATA,
     10481                            DspinRwtParam::M2P_TYPE);
    1048210482
    1048310483                    p_dspin_m2p.write = true;
     
    1049210492                    uint64_t flit = 0;
    1049310493
    10494                     DspinDhccpParam::dspin_set(
     10494                    DspinRwtParam::dspin_set(
    1049510495                            flit,
    1049610496                            r_write_to_cc_send_nline.read(),
    10497                             DspinDhccpParam::MULTI_INVAL_NLINE);
     10497                            DspinRwtParam::MULTI_INVAL_NLINE);
    1049810498
    1049910499
     
    1051010510                {
    1051110511                    uint64_t flit = 0;
    10512                     DspinDhccpParam::dspin_set( flit,
     10512                    DspinRwtParam::dspin_set( flit,
    1051310513                            r_write_to_cc_send_nline.read(),
    10514                             DspinDhccpParam::BROADCAST_NLINE);
     10514                            DspinRwtParam::BROADCAST_NLINE);
    1051510515                    p_dspin_m2p.write = true;
    1051610516                    p_dspin_m2p.eop   = true;
     
    1052210522                {
    1052310523                    uint64_t flit = 0;
    10524                     DspinDhccpParam::dspin_set( flit,
     10524                    DspinRwtParam::dspin_set( flit,
    1052510525                            r_cas_to_cc_send_nline.read(),
    10526                             DspinDhccpParam::BROADCAST_NLINE);
     10526                            DspinRwtParam::BROADCAST_NLINE);
    1052710527                    p_dspin_m2p.write = true;
    1052810528                    p_dspin_m2p.eop   = true;
     
    1053810538                    if(m_write_to_cc_send_inst_fifo.read())
    1053910539                    {
    10540                         multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_INST;
     10540                        multi_updt_type = DspinRwtParam::TYPE_MULTI_UPDT_INST;
    1054110541                    }
    1054210542                    else
    1054310543                    {
    10544                         multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_DATA;
     10544                        multi_updt_type = DspinRwtParam::TYPE_MULTI_UPDT_DATA;
    1054510545                    }
    1054610546
     
    1054810548                    uint64_t dest =
    1054910549                        m_write_to_cc_send_srcid_fifo.read() <<
    10550                         (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S);
    10551 
    10552                     DspinDhccpParam::dspin_set(
     10550                        (DspinRwtParam::SRCID_WIDTH - vci_param_int::S);
     10551
     10552                    DspinRwtParam::dspin_set(
    1055310553                            flit,
    1055410554                            dest,
    10555                             DspinDhccpParam::MULTI_UPDT_DEST);
    10556 
    10557                     DspinDhccpParam::dspin_set(
     10555                            DspinRwtParam::MULTI_UPDT_DEST);
     10556
     10557                    DspinRwtParam::dspin_set(
    1055810558                            flit,
    1055910559                            r_write_to_cc_send_trdid.read(),
    10560                             DspinDhccpParam::MULTI_UPDT_UPDT_INDEX);
    10561 
    10562                     DspinDhccpParam::dspin_set(
     10560                            DspinRwtParam::MULTI_UPDT_UPDT_INDEX);
     10561
     10562                    DspinRwtParam::dspin_set(
    1056310563                            flit,
    1056410564                            multi_updt_type,
    10565                             DspinDhccpParam::M2P_TYPE);
     10565                            DspinRwtParam::M2P_TYPE);
    1056610566
    1056710567                    p_dspin_m2p.write = true;
     
    1057510575                    uint64_t flit = 0;
    1057610576
    10577                     DspinDhccpParam::dspin_set(
     10577                    DspinRwtParam::dspin_set(
    1057810578                            flit,
    1057910579                            r_write_to_cc_send_index.read(),
    10580                             DspinDhccpParam::MULTI_UPDT_WORD_INDEX);
    10581 
    10582                     DspinDhccpParam::dspin_set(
     10580                            DspinRwtParam::MULTI_UPDT_WORD_INDEX);
     10581
     10582                    DspinRwtParam::dspin_set(
    1058310583                            flit,
    1058410584                            r_write_to_cc_send_nline.read(),
    10585                             DspinDhccpParam::MULTI_UPDT_NLINE);
     10585                            DspinRwtParam::MULTI_UPDT_NLINE);
    1058610586
    1058710587                    p_dspin_m2p.write = true;
     
    1060210602                    uint64_t flit = 0;
    1060310603
    10604                     DspinDhccpParam::dspin_set(
     10604                    DspinRwtParam::dspin_set(
    1060510605                            flit,
    1060610606                            multi_updt_be,
    10607                             DspinDhccpParam::MULTI_UPDT_BE);
    10608 
    10609                     DspinDhccpParam::dspin_set(
     10607                            DspinRwtParam::MULTI_UPDT_BE);
     10608
     10609                    DspinRwtParam::dspin_set(
    1061010610                            flit,
    1061110611                            multi_updt_data,
    10612                             DspinDhccpParam::MULTI_UPDT_DATA);
     10612                            DspinRwtParam::MULTI_UPDT_DATA);
    1061310613
    1061410614                    p_dspin_m2p.write = true;
     
    1062610626                    if(m_cas_to_cc_send_inst_fifo.read())
    1062710627                    {
    10628                         multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_INST;
     10628                        multi_updt_type = DspinRwtParam::TYPE_MULTI_UPDT_INST;
    1062910629                    }
    1063010630                    else
    1063110631                    {
    10632                         multi_updt_type = DspinDhccpParam::TYPE_MULTI_UPDT_DATA;
     10632                        multi_updt_type = DspinRwtParam::TYPE_MULTI_UPDT_DATA;
    1063310633                    }
    1063410634
     
    1063610636                    uint64_t dest =
    1063710637                        m_cas_to_cc_send_srcid_fifo.read() <<
    10638                         (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S);
    10639 
    10640                     DspinDhccpParam::dspin_set(
     10638                        (DspinRwtParam::SRCID_WIDTH - vci_param_int::S);
     10639
     10640                    DspinRwtParam::dspin_set(
    1064110641                            flit,
    1064210642                            dest,
    10643                             DspinDhccpParam::MULTI_UPDT_DEST);
    10644 
    10645                     DspinDhccpParam::dspin_set(
     10643                            DspinRwtParam::MULTI_UPDT_DEST);
     10644
     10645                    DspinRwtParam::dspin_set(
    1064610646                            flit,
    1064710647                            r_cas_to_cc_send_trdid.read(),
    10648                             DspinDhccpParam::MULTI_UPDT_UPDT_INDEX);
    10649 
    10650                     DspinDhccpParam::dspin_set(
     10648                            DspinRwtParam::MULTI_UPDT_UPDT_INDEX);
     10649
     10650                    DspinRwtParam::dspin_set(
    1065110651                            flit,
    1065210652                            multi_updt_type,
    10653                             DspinDhccpParam::M2P_TYPE);
     10653                            DspinRwtParam::M2P_TYPE);
    1065410654
    1065510655                    p_dspin_m2p.write = true;
     
    1066310663                    uint64_t flit = 0;
    1066410664
    10665                     DspinDhccpParam::dspin_set(
     10665                    DspinRwtParam::dspin_set(
    1066610666                            flit,
    1066710667                            r_cas_to_cc_send_index.read(),
    10668                             DspinDhccpParam::MULTI_UPDT_WORD_INDEX);
    10669 
    10670                     DspinDhccpParam::dspin_set(
     10668                            DspinRwtParam::MULTI_UPDT_WORD_INDEX);
     10669
     10670                    DspinRwtParam::dspin_set(
    1067110671                            flit,
    1067210672                            r_cas_to_cc_send_nline.read(),
    10673                             DspinDhccpParam::MULTI_UPDT_NLINE);
     10673                            DspinRwtParam::MULTI_UPDT_NLINE);
    1067410674
    1067510675                    p_dspin_m2p.write = true;
     
    1068310683                    uint64_t flit = 0;
    1068410684
    10685                     DspinDhccpParam::dspin_set(
     10685                    DspinRwtParam::dspin_set(
    1068610686                            flit,
    1068710687                            0xF,
    10688                             DspinDhccpParam::MULTI_UPDT_BE);
    10689 
    10690                     DspinDhccpParam::dspin_set(
     10688                            DspinRwtParam::MULTI_UPDT_BE);
     10689
     10690                    DspinRwtParam::dspin_set(
    1069110691                            flit,
    1069210692                            r_cas_to_cc_send_wdata.read(),
    10693                             DspinDhccpParam::MULTI_UPDT_DATA);
     10693                            DspinRwtParam::MULTI_UPDT_DATA);
    1069410694
    1069510695                    p_dspin_m2p.write = true;
     
    1070410704                    uint64_t flit = 0;
    1070510705
    10706                     DspinDhccpParam::dspin_set(
     10706                    DspinRwtParam::dspin_set(
    1070710707                            flit,
    1070810708                            0xF,
    10709                             DspinDhccpParam::MULTI_UPDT_BE);
    10710 
    10711                     DspinDhccpParam::dspin_set(
     10709                            DspinRwtParam::MULTI_UPDT_BE);
     10710
     10711                    DspinRwtParam::dspin_set(
    1071210712                            flit,
    1071310713                            r_cas_to_cc_send_wdata_high.read(),
    10714                             DspinDhccpParam::MULTI_UPDT_DATA);
     10714                            DspinRwtParam::MULTI_UPDT_DATA);
    1071510715
    1071610716                    p_dspin_m2p.write = true;
     
    1073110731            if(r_cleanup_inst.read())
    1073210732            {
    10733                 cleanup_ack_type = DspinDhccpParam::TYPE_CLACK_INST;
     10733                cleanup_ack_type = DspinRwtParam::TYPE_CLACK_INST;
    1073410734            }
    1073510735            else
    1073610736            {
    10737                 cleanup_ack_type = DspinDhccpParam::TYPE_CLACK_DATA;
     10737                cleanup_ack_type = DspinRwtParam::TYPE_CLACK_DATA;
    1073810738            }
    1073910739
    1074010740            uint64_t flit = 0;
    1074110741            uint64_t dest = r_cleanup_srcid.read() <<
    10742                 (DspinDhccpParam::SRCID_WIDTH - vci_param_int::S);
    10743 
    10744             DspinDhccpParam::dspin_set(
     10742                (DspinRwtParam::SRCID_WIDTH - vci_param_int::S);
     10743
     10744            DspinRwtParam::dspin_set(
    1074510745                    flit,
    1074610746                    dest,
    10747                     DspinDhccpParam::CLACK_DEST);
    10748 
    10749             DspinDhccpParam::dspin_set(
     10747                    DspinRwtParam::CLACK_DEST);
     10748
     10749            DspinRwtParam::dspin_set(
    1075010750                    flit,
    1075110751                    r_cleanup_nline.read() & 0xFFFF,
    10752                     DspinDhccpParam::CLACK_SET);
    10753 
    10754             DspinDhccpParam::dspin_set(
     10752                    DspinRwtParam::CLACK_SET);
     10753
     10754            DspinRwtParam::dspin_set(
    1075510755                    flit,
    1075610756                    r_cleanup_way_index.read(),
    10757                     DspinDhccpParam::CLACK_WAY);
    10758 
    10759             DspinDhccpParam::dspin_set(
     10757                    DspinRwtParam::CLACK_WAY);
     10758
     10759            DspinRwtParam::dspin_set(
    1076010760                    flit,
    1076110761                    cleanup_ack_type,
    10762                     DspinDhccpParam::CLACK_TYPE);
     10762                    DspinRwtParam::CLACK_TYPE);
    1076310763
    1076410764            p_dspin_clack.eop   = true;
Note: See TracChangeset for help on using the changeset viewer.