Ignore:
Timestamp:
Sep 24, 2014, 3:48:50 PM (10 years ago)
Author:
devigne
Message:

RWT commit : Cosmetic (Remove trailing whitespace)

Location:
branches/RWT/modules/vci_mem_cache
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/RWT/modules/vci_mem_cache

  • branches/RWT/modules/vci_mem_cache/caba/source/include

  • branches/RWT/modules/vci_mem_cache/caba/source/include/update_tab.h

    r767 r814  
    88
    99////////////////////////////////////////////////////////////////////////
    10 //                  An update tab entry   
     10//                  An update tab entry
    1111////////////////////////////////////////////////////////////////////////
    1212class UpdateTabEntry {
     
    1717  public:
    1818
    19   bool      valid;      // It is a valid pending transaction
    20   bool      update;     // It is an update transaction
    21   bool      brdcast;    // It is a broadcast invalidate
    22   bool      rsp;        // Response to the initiator required
    23   bool      ack;        // Acknowledge to the CONFIG FSM required
    24   size_t        srcid;      // The srcid of the initiator which wrote the data
    25   size_t        trdid;      // The trdid of the initiator which wrote the data
    26   size_t        pktid;      // The pktid of the initiator which wrote the data
    27   addr_t        nline;      // The identifier of the cache line
    28   size_t        count;      // The number of acknowledge responses to receive
     19  bool   valid;   // It is a valid pending transaction
     20  bool   update;  // It is an update transaction
     21  bool   brdcast; // It is a broadcast invalidate
     22  bool   rsp;     // Response to the initiator required
     23  bool   ack;     // Acknowledge to the CONFIG FSM required
     24  size_t srcid;   // The srcid of the initiator which wrote the data
     25  size_t trdid;   // The trdid of the initiator which wrote the data
     26  size_t pktid;   // The pktid of the initiator which wrote the data
     27  addr_t nline;   // The identifier of the cache line
     28  size_t count;   // The number of acknowledge responses to receive
    2929
    3030  UpdateTabEntry()
    3131  {
    32     valid       = false;
     32    valid   = false;
    3333    update  = false;
    3434    brdcast = false;
    3535    rsp     = false;
    3636    ack     = false;
    37     srcid       = 0;
    38     trdid       = 0;
    39     pktid       = 0;
    40     nline       = 0;
    41     count       = 0;
    42   }
    43 
    44   UpdateTabEntry(bool   i_valid, 
     37    srcid   = 0;
     38    trdid   = 0;
     39    pktid   = 0;
     40    nline   = 0;
     41    count   = 0;
     42  }
     43
     44  UpdateTabEntry(bool   i_valid,
    4545                 bool   i_update,
    4646                 bool   i_brdcast,
    4747                 bool   i_rsp,
    4848                 bool   i_ack,
    49                  size_t i_srcid, 
    50                  size_t i_trdid, 
    51                  size_t i_pktid, 
     49                 size_t i_srcid,
     50                 size_t i_trdid,
     51                 size_t i_pktid,
    5252                 addr_t i_nline,
    53                  size_t i_count) 
    54   {
    55     valid       = i_valid;
    56     update      = i_update;
     53                 size_t i_count)
     54  {
     55    valid   = i_valid;
     56    update  = i_update;
    5757    brdcast = i_brdcast;
    5858    rsp     = i_rsp;
    5959    ack     = i_ack;
    60     srcid       = i_srcid;
    61     trdid       = i_trdid;
    62     pktid       = i_pktid;
    63     nline       = i_nline;
    64     count       = i_count;
     60    srcid   = i_srcid;
     61    trdid   = i_trdid;
     62    pktid   = i_pktid;
     63    nline   = i_nline;
     64    count   = i_count;
    6565  }
    6666
     
    8080
    8181  ////////////////////////////////////////////////////
    82   // The init() function initializes the entry 
     82  // The init() function initializes the entry
    8383  ///////////////////////////////////////////////////
    8484  void init()
    8585  {
    86     valid  = false;
    87     update = false;
    88     brdcast= false;
    89     rsp    = false;
    90     ack    = false;
    91     srcid  = 0;
    92     trdid  = 0;
    93     pktid  = 0;
    94     nline  = 0;
    95     count  = 0;
     86    valid   = false;
     87    update  = false;
     88    brdcast = false;
     89    rsp     = false;
     90    ack     = false;
     91    srcid   = 0;
     92    trdid   = 0;
     93    pktid   = 0;
     94    nline   = 0;
     95    count   = 0;
    9696  }
    9797
     
    116116
    117117  ////////////////////////////////////////////////////////////////////
    118   // The print() function prints the entry 
     118  // The print() function prints the entry
    119119  ////////////////////////////////////////////////////////////////////
    120120  void print()
    121121  {
    122     std::cout << " val = " << std::dec << valid 
    123               << " / updt = " << update 
     122    std::cout << " val = " << std::dec << valid
     123              << " / updt = " << update
    124124              << " / bc = " << brdcast
    125               << " / rsp = " << rsp 
    126               << " / ack = " << ack   
     125              << " / rsp = " << rsp
     126              << " / ack = " << ack
    127127              << " / count = " << count
    128               << " / srcid = " << std::hex << srcid 
    129               << " / trdid = " << trdid   
     128              << " / srcid = " << std::hex << srcid
     129              << " / trdid = " << trdid
    130130              << " / pktid = " << pktid
    131131              << " / nline = " << nline  << std::endl;
     
    134134
    135135////////////////////////////////////////////////////////////////////////
    136 //                        The update tab             
     136//                        The update tab
    137137////////////////////////////////////////////////////////////////////////
    138138class UpdateTab{
     
    159159
    160160  ////////////////////////////////////////////////////////////////////
    161   // The size() function returns the size of the tab 
     161  // The size() function returns the size of the tab
    162162  ////////////////////////////////////////////////////////////////////
    163163  const size_t size()
     
    167167
    168168  ////////////////////////////////////////////////////////////////////
    169   // The print() function diplays the tab content 
     169  // The print() function diplays the tab content
    170170  ////////////////////////////////////////////////////////////////////
    171171  void print()
    172172  {
    173173    std::cout << "UPDATE TABLE Content" << std::endl;
    174     for(size_t i=0; i<size_tab; i++) 
     174    for(size_t i=0; i<size_tab; i++)
    175175    {
    176176      std::cout << "[" << std::dec << i << "] ";
     
    181181
    182182  /////////////////////////////////////////////////////////////////////
    183   // The init() function initializes the tab 
     183  // The init() function initializes the tab
    184184  /////////////////////////////////////////////////////////////////////
    185185  void init()
     
    189189
    190190  /////////////////////////////////////////////////////////////////////
    191   // The reads() function reads an entry 
     191  // The reads() function reads an entry
    192192  // Arguments :
    193193  // - entry : the entry to read
     
    211211  // This function returns true if the write successed (an entry was empty).
    212212  ///////////////////////////////////////////////////////////////////////////
    213   bool set(const bool   update,
     213  bool set(const bool   update,
    214214           const bool   brdcast,
    215215           const bool   rsp,
     
    222222           size_t       &index)
    223223  {
    224     for ( size_t i=0 ; i<size_tab ; i++ ) 
    225     {
    226       if( !tab[i].valid ) 
     224    for ( size_t i=0 ; i<size_tab ; i++ )
     225    {
     226      if( !tab[i].valid )
    227227      {
    228         tab[i].valid            = true;
    229         tab[i].update           = update;
    230         tab[i].brdcast      = brdcast;
    231         tab[i].rsp          = rsp;
    232         tab[i].ack          = ack;
    233         tab[i].srcid            = (size_t) srcid;
    234         tab[i].trdid            = (size_t) trdid;
    235         tab[i].pktid            = (size_t) pktid;
    236         tab[i].nline            = (addr_t) nline;
    237         tab[i].count            = (size_t) count;
    238         index                       = i;
     228        tab[i].valid   = true;
     229        tab[i].update  = update;
     230        tab[i].brdcast = brdcast;
     231        tab[i].rsp     = rsp;
     232        tab[i].ack     = ack;
     233        tab[i].srcid   = (size_t) srcid;
     234        tab[i].trdid   = (size_t) trdid;
     235        tab[i].pktid   = (size_t) pktid;
     236        tab[i].nline   = (addr_t) nline;
     237        tab[i].count   = (size_t) count;
     238        index          = i;
    239239        return true;
    240240      }
     
    251251  /////////////////////////////////////////////////////////////////////
    252252  bool decrement( const size_t index,
    253                   size_t &counter ) 
     253                  size_t &counter )
    254254  {
    255255    assert((index<size_tab) && "Bad Update Tab Entry");
    256     if ( tab[index].valid ) 
     256    if ( tab[index].valid )
    257257    {
    258258      tab[index].count--;
    259259      counter = tab[index].count;
    260260      return true;
    261     } 
    262     else 
     261    }
     262    else
    263263    {
    264264      return false;
     
    298298  {
    299299    assert(index<size_tab && "Bad Update Tab Entry");
    300     return tab[index].rsp;     
     300    return tab[index].rsp;
    301301  }
    302302
     
    309309  {
    310310    assert(index<size_tab && "Bad Update Tab Entry");
    311     return tab[index].ack;     
     311    return tab[index].ack;
    312312  }
    313313
     
    320320  {
    321321    assert(index<size_tab && "Bad Update Tab Entry");
    322     return tab[index].brdcast; 
     322    return tab[index].brdcast;
    323323  }
    324324
     
    331331  {
    332332    assert(index<size_tab && "Bad Update Tab Entry");
    333     return tab[index].update;   
     333    return tab[index].update;
    334334  }
    335335
     
    342342  {
    343343    assert(index<size_tab && "Bad Update Tab Entry");
    344     return tab[index].srcid;   
     344    return tab[index].srcid;
    345345  }
    346346
     
    353353  {
    354354    assert(index<size_tab && "Bad Update Tab Entry");
    355     return tab[index].trdid;   
     355    return tab[index].trdid;
    356356  }
    357357
     
    364364  {
    365365    assert(index<size_tab && "Bad Update Tab Entry");
    366     return tab[index].pktid;   
     366    return tab[index].pktid;
    367367  }
    368368
     
    403403  // - nline : the line number of the entry in the directory
    404404  /////////////////////////////////////////////////////////////////////
    405   bool read_nline(const addr_t nline,size_t &index) 
     405  bool read_nline(const addr_t nline,size_t &index)
    406406  {
    407407    size_t i ;
     
    422422  // Arguments :
    423423  // - index : the index of the entry
    424   /////////////////////////////////////////////////////////////////////       
     424  /////////////////////////////////////////////////////////////////////
    425425  void clear(const size_t index)
    426426  {
    427427    assert(index<size_tab && "Bad Update Tab Entry");
    428428    tab[index].valid=false;
    429     return;     
     429    return;
    430430  }
    431431
Note: See TracChangeset for help on using the changeset viewer.