Changeset 142 for trunk/modules/vci_mem_cache_v4/caba
- Timestamp:
- Mar 17, 2011, 2:32:38 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_mem_cache_v4/caba/source/include/mem_cache_directory_v4.h
r140 r142 8 8 9 9 #define L1_MULTI_CACHE 1 10 //#define RANDOM_EVICTION 10 11 11 12 namespace soclib { namespace caba { … … 189 190 size_t m_words; 190 191 size_t m_width; 192 uint32_t lfsr; 191 193 192 194 // the directory & lru tables … … 205 207 m_words = words; 206 208 m_width = address_width; 209 lfsr = -1; 207 210 208 211 m_dir_tab = new DirectoryEntry*[sets]; … … 324 327 } 325 328 } 329 330 #ifdef RANDOM_EVICTION 331 lfsr = (lfsr >> 1) ^ ((-(lfsr & 1)) & 0xd0000001); 332 way = lfsr % m_ways; 333 return DirectoryEntry(m_dir_tab[set][way]); 334 #endif 335 326 336 for(size_t i=0; i<m_ways; i++){ 327 337 if(!(m_lru_tab[set][i].recent) && !(m_dir_tab[set][i].lock)){
Note: See TracChangeset
for help on using the changeset viewer.