Ignore:
Timestamp:
Jul 12, 2013, 12:16:30 PM (11 years ago)
Author:
alain
Message:

Introducing a preliminary configuration interface in vci_mem_cache.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_mem_cache/caba/source/include/mem_cache_directory.h

    r385 r434  
    274274
    275275    /////////////////////////////////////////////////////////////////////
     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    /////////////////////////////////////////////////////////////////////
    276285    // The read_neutral() function reads a directory entry, without
    277286    // changing the LRU
     
    320329      // update LRU bits
    321330      bool all_recent = true;
    322       for ( size_t i=0 ; i<m_ways ; i++ ) {
    323         if ( i != way ) all_recent = m_lru_tab[set][i].recent && all_recent;
    324       }
    325       if ( all_recent ) {
    326         for( size_t i=0 ; i<m_ways ; i++ ) m_lru_tab[set][i].recent = false;
    327       } else {
    328         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;
    329342      }
    330343    } // end write()
Note: See TracChangeset for help on using the changeset viewer.