source: trunk/IPs/systemC/Environnement/Cache/src/Cache_OneLevel_hit_cache.cpp @ 78

Last change on this file since 78 was 78, checked in by rosiere, 16 years ago

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 780 bytes
Line 
1#include "../include/Cache_OneLevel.h"
2
3namespace environnement {
4namespace cache {
5namespace cache_onelevel {
6
7  uint32_t Cache_OneLevel::hit_cache (uint32_t trdid, Address address)
8  {
9    uint32_t num_associativity;
10    for (num_associativity = 0; num_associativity < param->associativity; num_associativity ++)
11      // Hit if :
12      //  * in the line
13      //  * in a way associative
14      //  -> there are the same tag
15      //               the same trdid
16      //               is valid
17      if ( (tag [address.familly][num_associativity].address == address.tag) && 
18           (tag [address.familly][num_associativity].valid   == true       ) &&
19           (tag [address.familly][num_associativity].trdid   == trdid      ) )
20        break;
21   
22    return num_associativity;
23  }
24
25};
26};
27};
Note: See TracBrowser for help on using the repository browser.