Changeset 499 for trunk/modules/vci_mem_cache/caba/source/include
- Timestamp:
- Aug 27, 2013, 6:21:19 PM (11 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/mem_cache_directory.h
r489 r499 225 225 226 226 #define L2 soclib::common::uint32_log2 227 const size_t set = (size_t)(address >> (L2(m_words) + 2)) & (m_sets - 1);228 const tag_t tag = (tag_t)(address >> (L2(m_sets) + L2(m_words) + 2));227 const size_t set = (size_t)(address >> (L2(m_words) + 2)) & (m_sets - 1); 228 const tag_t tag = (tag_t)(address >> (L2(m_sets) + L2(m_words) + 2)); 229 229 #undef L2 230 230 231 bool hit = false; 232 for ( size_t i=0 ; i<m_ways ; i++ ) { 233 bool equal = ( m_dir_tab[set][i].tag == tag ); 234 bool valid = m_dir_tab[set][i].valid; 235 hit = equal && valid; 236 if ( hit ) { 237 way = i; 238 break; 231 bool hit = false; 232 for ( size_t i=0 ; i<m_ways ; i++ ) 233 { 234 bool equal = ( m_dir_tab[set][i].tag == tag ); 235 bool valid = m_dir_tab[set][i].valid; 236 hit = equal && valid; 237 if ( hit ) 238 { 239 way = i; 240 break; 241 } 242 } 243 if ( hit ) 244 { 245 m_lru_tab[set][way].recent = true; 246 return DirectoryEntry(m_dir_tab[set][way]); 239 247 } 240 } 241 if ( hit ) { 242 m_lru_tab[set][way].recent = true; 243 return DirectoryEntry(m_dir_tab[set][way]); 244 } else { 245 return DirectoryEntry(); 246 } 248 else 249 { 250 return DirectoryEntry(); 251 } 247 252 } // end read() 248 253 -
trunk/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h
r489 r499 609 609 sc_signal<size_t> r_config_to_ixr_cmd_index; // TRT index 610 610 611 612 611 // Buffer between CONFIG fsm and TGT_RSP fsm (send a done response to L1 cache) 613 612 sc_signal<bool> r_config_to_tgt_rsp_req; // valid request
Note: See TracChangeset
for help on using the changeset viewer.