Ignore:
Timestamp:
Feb 18, 2011, 11:10:07 AM (14 years ago)
Author:
guthmull
Message:

Handle bad accesses cleanly : transmit all accesses to the xram and handle rerror in responses. The simulation is no more stopped and gdb can be used for debug.

Location:
trunk/modules/vci_mem_cache_v4/caba/source/include
Files:
2 edited

Legend:

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

    r116 r138  
    189189        XRAM_RSP_HEAP_ERASE,
    190190        XRAM_RSP_HEAP_LAST,
     191        XRAM_RSP_ERROR_ERASE,
     192        XRAM_RSP_ERROR_RSP,
    191193      };
    192194
     
    393395      sc_signal<int>         r_tgt_cmd_fsm;
    394396
    395       sc_signal<size_t>      r_index;
    396397      size_t nseg;
    397398      size_t ncseg;
     
    634635      sc_signal<size_t>    r_xram_rsp_to_tgt_rsp_word;  // first word index
    635636      sc_signal<size_t>    r_xram_rsp_to_tgt_rsp_length;// length of the response
     637      sc_signal<bool>      r_xram_rsp_to_tgt_rsp_rerror;// send error to requester
    636638
    637639      // Buffer between XRAM_RSP fsm and INIT_CMD fsm (Inval L1 Caches)
  • trunk/modules/vci_mem_cache_v4/caba/source/include/xram_transaction_v4.h

    r2 r138  
    3131  std::vector<data_t> wdata;        // write buffer (one cache line)
    3232  std::vector<be_t>   wdata_be;         // be for each data in the write buffer
     33  bool            rerror;           // error returned by xram
    3334
    3435  /////////////////////////////////////////////////////////////////////
     
    7273    word_index  = source.word_index;
    7374    wdata_be.assign(source.wdata_be.begin(),source.wdata_be.end());
    74     wdata.assign(source.wdata.begin(),source.wdata.end());     
     75    wdata.assign(source.wdata.begin(),source.wdata.end());
     76    rerror      = source.rerror;
    7577  }
    7678
     
    9597    }
    9698    std::cout << std::endl;
     99    std::cout << "rerror      = " << rerror       << std::endl;
    97100  }
    98101
     
    106109      wdata.clear();
    107110      valid=false;
     111      rerror=false;
    108112    }
    109113
     
    120124    wdata_be.assign(source.wdata_be.begin(),source.wdata_be.end());
    121125    wdata.assign(source.wdata.begin(),source.wdata.end());     
     126    rerror      = source.rerror;
    122127  }
    123128
     
    363368  /////////////////////////////////////////////////////////////////////
    364369  void write_rsp(const size_t index,
    365                  const size_t word,
    366                  const data_t data)
     370                 const size_t word,
     371                 const data_t data,
     372                 const bool   rerror)
    367373  {
    368374    assert( (index < size_tab)
     
    377383    data_t mask = be_to_mask(tab[index].wdata_be[word]);
    378384    tab[index].wdata[word] = (tab[index].wdata[word] & mask) | (data & ~mask);
     385    tab[index].rerror |= rerror;
    379386  }
    380387
Note: See TracChangeset for help on using the changeset viewer.