source: trunk/IPs/systemC/Environment/Cache/src/Cache_OneLevel_hit_cache.cpp @ 80

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

Oups, Environnement is french :P

File size: 778 bytes
Line 
1#include "../include/Cache_OneLevel.h"
2
3namespace environment {
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.