title: Simplescalar cache LRU implementation
body: <p>I'm looking for the LRU code in the cache.c file, but this is the only code I can find: </p>
  
  <pre><code>switch (cp-&gt;policy) {
  
    case LRU:
  
    case FIFO:
  
      repl = cp-&gt;sets[set].way_tail;
      update_way_list(&amp;cp-&gt;sets[set], repl, Head);
      break;
  </code></pre>
  
  <p>It looks like missing LRU code to me, I thought one should put the LRU algorithm right after colon. So If I missed something, can you point me to the right direction or give me some hints?</p>
  
  <p>Thank you very much.</p>