- Timestamp:
- Jan 7, 2012, 7:17:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache_v4/caba/source/include/xram_transaction_v4.h
r138 r184 14 14 15 15 class 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; 20 20 21 21 public: 22 bool valid; // entry valid23 bool xram_read; // read request to XRAM24 addr_t nline; // index (zy) of the requested line25 size_t srcid; // processor requesting the transaction26 size_t trdid; // processor requesting the transaction27 size_t pktid; // processor requesting the transaction28 bool proc_read; // read request from processor29 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 buffer33 bool rerror;// error returned by xram22 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 34 34 35 35 ///////////////////////////////////////////////////////////////////// … … 39 39 { 40 40 valid = false; 41 rerror = false; 41 42 } 42 43 … … 50 51 wdata_be.reserve( (int)n_words ); 51 52 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); 54 56 wdata.push_back(0); 55 57 } … … 352 354 tab[index].read_length = read_length; 353 355 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 { 355 358 tab[index].wdata_be[i] = data_be[i]; 356 359 tab[index].wdata[i] = data[i]; … … 361 364 // The write_rsp() function writes a word of the response to an 362 365 // 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. 364 367 // Arguments : 365 368 // - index : the index of the transaction in the transaction tab 366 369 // - word_index : the index of the data in the line 367 370 // - data : the data to write 371 // - error : invalid data 368 372 ///////////////////////////////////////////////////////////////////// 369 373 void write_rsp(const size_t index, … … 396 400 && "The selected entry is out of range in erase() Transaction Tab"); 397 401 tab[index].valid = false; 402 tab[index].rerror = false; 398 403 } 399 404 }; // end class TransactionTab
Note: See TracChangeset
for help on using the changeset viewer.