Ignore:
Timestamp:
Jan 7, 2012, 7:17:34 PM (12 years ago)
Author:
alain
Message:

mproving the debug mechanisms

File:
1 edited

Legend:

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

    r138 r184  
    1414
    1515class TransactionTabEntry {
    16   typedef uint32_t size_t;
    17   typedef uint32_t data_t;
    18   typedef sc_dt::sc_uint<40> addr_t;
    19   typedef uint32_t be_t;
     16  typedef uint32_t              size_t;
     17  typedef uint32_t              data_t;
     18  typedef sc_dt::sc_uint<40>    addr_t;
     19  typedef uint32_t              be_t;
    2020
    2121 public:
    22   bool                valid;                // entry valid
    23   bool                xram_read;            // read request to XRAM
    24   addr_t              nline;                // index (zy) of the requested line
    25   size_t              srcid;                // processor requesting the transaction
    26   size_t              trdid;                // processor requesting the transaction
    27   size_t              pktid;                // processor requesting the transaction
    28   bool                proc_read;            // read request from processor
    29   size_t                  read_length;      // length of the read (for the response)
    30   size_t              word_index;       // index of the first read word (for the response)
    31   std::vector<data_t> wdata;        // write buffer (one cache line)
    32   std::vector<be_t>   wdata_be;         // be for each data in the write buffer
    33   bool            rerror;           // error returned by xram
     22  bool                      valid;          // entry valid
     23  bool                      xram_read;      // read request to XRAM
     24  addr_t                    nline;          // index (zy) of the requested line
     25  size_t                    srcid;          // processor requesting the transaction
     26  size_t                    trdid;          // processor requesting the transaction
     27  size_t                    pktid;          // processor requesting the transaction
     28  bool                      proc_read;      // read request from processor
     29  size_t                    read_length;    // length of the read (for the response)
     30  size_t                    word_index;         // index of the first read word (for the response)
     31  std::vector<data_t>   wdata;          // write buffer (one cache line)
     32  std::vector<be_t>     wdata_be;       // be for each data in the write buffer
     33  bool                  rerror;         // error returned by xram
    3434
    3535  /////////////////////////////////////////////////////////////////////
     
    3939  {
    4040    valid               = false;
     41    rerror      = false;
    4142  }
    4243
     
    5051    wdata_be.reserve( (int)n_words );
    5152    wdata.reserve( (int)n_words );
    52     for(size_t i=0; i<n_words; i++){
    53       wdata_be.push_back(false);
     53    for(size_t i=0; i<n_words; i++)
     54    {
     55      wdata_be.push_back(0);
    5456      wdata.push_back(0);
    5557    }
     
    352354    tab[index].read_length          = read_length;
    353355    tab[index].word_index           = word_index;
    354     for(size_t i=0; i<tab[index].wdata.size(); i++) {
     356    for(size_t i=0; i<tab[index].wdata.size(); i++)
     357    {
    355358      tab[index].wdata_be[i]    = data_be[i];
    356359      tab[index].wdata[i]       = data[i];
     
    361364  // The write_rsp() function writes a word of the response to an
    362365  // XRAM read transaction.
    363   // The data is only written when the corresponding BE field is Ox0.
     366  // The BE field in TRT is taken into account.
    364367  // Arguments :
    365368  // - index : the index of the transaction in the transaction tab
    366369  // - word_index : the index of the data in the line
    367370  // - data : the data to write
     371  // - error : invalid data
    368372  /////////////////////////////////////////////////////////////////////
    369373  void write_rsp(const size_t index,
     
    396400            && "The selected entry is out of range in erase() Transaction Tab");
    397401    tab[index].valid    = false;
     402    tab[index].rerror   = false;
    398403  }
    399404}; // end class TransactionTab
Note: See TracChangeset for help on using the changeset viewer.