- Timestamp:
- Jul 17, 2013, 9:24:48 AM (11 years ago)
- Location:
- branches/v5/modules/vci_mem_cache
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/v5/modules/vci_mem_cache
-
Property
svn:mergeinfo
set to
/trunk/modules/vci_mem_cache merged eligible
-
Property
svn:mergeinfo
set to
-
branches/v5/modules/vci_mem_cache/caba/source/include/mem_cache_directory.h
r307 r440 40 40 //////////////////////////////////////////////////////////////////////// 41 41 class Owner{ 42 typedef uint32_t size_t;43 42 44 43 public: … … 92 91 93 92 typedef uint32_t tag_t; 94 typedef uint32_t size_t;95 93 96 94 public: … … 165 163 void print() 166 164 { 167 std::cout << "Valid = " << valid << " ; IS COUNT = " << is_cnt << " ; Dirty = " << dirty << " ; Lock = " 168 << lock 165 std::cout << "Valid = " << valid 166 << " ; IS COUNT = " << is_cnt 167 << " ; Dirty = " << dirty 168 << " ; Lock = " << lock 169 169 << " ; Tag = " << std::hex << tag << std::dec 170 170 << " ; Count = " << count … … 187 187 typedef uint32_t data_t; 188 188 typedef uint32_t tag_t; 189 typedef uint32_t size_t;190 189 191 190 private: … … 275 274 276 275 ///////////////////////////////////////////////////////////////////// 276 // The inval function invalidate an entry defined by the set and 277 // way arguments. 278 ///////////////////////////////////////////////////////////////////// 279 void inval( const size_t &set, const size_t &way ) 280 { 281 m_dir_tab[set][way].init(); 282 } 283 284 ///////////////////////////////////////////////////////////////////// 277 285 // The read_neutral() function reads a directory entry, without 278 286 // changing the LRU … … 321 329 // update LRU bits 322 330 bool all_recent = true; 323 for ( size_t i=0 ; i<m_ways ; i++ ) { 324 if ( i != way ) all_recent = m_lru_tab[set][i].recent && all_recent; 325 } 326 if ( all_recent ) { 327 for( size_t i=0 ; i<m_ways ; i++ ) m_lru_tab[set][i].recent = false; 328 } else { 329 m_lru_tab[set][way].recent = true; 331 for ( size_t i=0 ; i<m_ways ; i++ ) 332 { 333 if ( i != way ) all_recent = m_lru_tab[set][i].recent && all_recent; 334 } 335 if ( all_recent ) 336 { 337 for( size_t i=0 ; i<m_ways ; i++ ) m_lru_tab[set][i].recent = false; 338 } 339 else 340 { 341 m_lru_tab[set][way].recent = true; 330 342 } 331 343 } // end write() … … 408 420 /////////////////////////////////////////////////////////////////////// 409 421 class HeapEntry{ 410 typedef uint32_t size_t;411 422 412 423 public: … … 472 483 //////////////////////////////////////////////////////////////////////// 473 484 class HeapDirectory{ 474 typedef uint32_t size_t;475 485 476 486 private:
Note: See TracChangeset
for help on using the changeset viewer.