Changeset 549 for trunk/modules/vci_mem_cache/caba/source/include
- Timestamp:
- Oct 17, 2013, 8:50:46 PM (12 years ago)
- Location:
- trunk/modules/vci_mem_cache/caba/source/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h
r535 r549 516 516 517 517 void print_stats(bool activity_counters, bool stats); 518 void print_trace( );518 void print_trace( size_t detailed = 0 ); 519 519 void cache_monitor(addr_t addr); 520 520 void start_monitor(addr_t addr, addr_t length); -
trunk/modules/vci_mem_cache/caba/source/include/xram_transaction.h
r489 r549 29 29 bool proc_read; // read request from processor 30 30 size_t read_length; // length of the read (for the response) 31 size_t word_index; // index of the first read word (for theresponse)31 size_t word_index; // index of the first read word (for response) 32 32 std::vector<data_t> wdata; // write buffer (one cache line) 33 33 std::vector<be_t> wdata_be; // be for each data in the write buffer … … 48 48 ///////////////////////////////////////////////////////////////////// 49 49 // The alloc() function initializes the vectors of an entry 50 // Its arguments are : 51 // - n_words : number of words per line in the cache 50 // The "n_words" argument is the number of words in a cache line. 52 51 ///////////////////////////////////////////////////////////////////// 53 52 void alloc(size_t n_words) … … 64 63 //////////////////////////////////////////////////////////////////// 65 64 // The copy() function copies an existing entry 66 // Its arguments are :67 // - source : the transaction tab entry to copy68 65 //////////////////////////////////////////////////////////////////// 69 66 void copy(const TransactionTabEntry &source) … … 86 83 87 84 //////////////////////////////////////////////////////////////////// 88 // The print() function prints the entry 89 //////////////////////////////////////////////////////////////////// 90 void print() 91 { 92 std::cout << "------- TRT entry -------" << std::endl; 93 std::cout << "valid = " << valid << std::endl; 94 std::cout << "xram_read = " << xram_read << std::endl; 95 std::cout << "nline = " << std::hex << nline << std::endl; 96 std::cout << "srcid = " << srcid << std::endl; 97 std::cout << "trdid = " << trdid << std::endl; 98 std::cout << "pktid = " << pktid << std::endl; 99 std::cout << "proc_read = " << proc_read << std::endl; 100 std::cout << "read_length = " << read_length << std::endl; 101 std::cout << "word_index = " << word_index << std::endl; 102 for(size_t i=0; i<wdata_be.size() ; i++) 103 { 104 std::cout << "wdata_be[" << std::dec << i << "] = " 105 << std::hex << wdata_be[i] << std::endl; 106 } 107 for(size_t i=0; i<wdata.size() ; i++) 108 { 109 std::cout << "wdata[" << std::dec << i << "] = " 110 << std::hex << wdata[i] << std::endl; 111 } 112 std::cout << "rerror = " << rerror << std::endl; 113 std::cout << "ll_key = " << ll_key << std::endl; 114 std::cout << "config = " << config << std::endl; 115 std::cout << std::endl; 85 // The print() function prints the entry identified by "index". 86 //////////////////////////////////////////////////////////////////// 87 void print( size_t index, size_t mode ) 88 { 89 std::cout << " TRT[" << std::dec << index << "] " 90 << " valid = " << valid 91 << " / error = " << rerror 92 << " / get = " << xram_read 93 << " / config = " << config << std::hex 94 << " / address = " << nline*4*wdata.size() 95 << " / srcid = " << srcid << std::endl; 96 if ( mode ) 97 { 98 std::cout << " trdid = " << trdid 99 << " / pktid = " << pktid << std::dec 100 << " / proc_read = " << proc_read 101 << " / read_length = " << read_length 102 << " / word_index = " << word_index << std::hex 103 << " / ll_key = " << ll_key << std::endl; 104 std::cout << " wdata = "; 105 for(size_t i=0; i<wdata.size() ; i++) 106 { 107 std::cout << std::hex << wdata[i] << " / "; 108 } 109 std::cout << std::endl; 110 } 116 111 } 117 112 … … 228 223 } 229 224 ///////////////////////////////////////////////////////////////////// 230 // The print() function prints a transaction tab entry 231 // Arguments : 232 // - index : the index of the entry to print 233 ///////////////////////////////////////////////////////////////////// 234 void print(const size_t index) 235 { 236 assert( (index < size_tab) and 237 "MEMC ERROR: The selected entry is out of range in TRT write_data_mask()"); 238 239 tab[index].print(); 240 return; 225 // The print() function prints TRT content. 226 // Detailed content if detailed argument is non zero. 227 ///////////////////////////////////////////////////////////////////// 228 void print( size_t detailed = 0 ) 229 { 230 std::cout << " < TRT content in " << tab_name << " >" << std::endl; 231 for ( size_t id = 0 ; id < size_tab ; id++ ) 232 { 233 tab[id].print( id , detailed ); 234 } 241 235 } 242 236 /////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.