source: trunk/IPs/systemC/Environment/Cache/src/Cache_OneLevel_hit_access_port.cpp @ 117

Last change on this file since 117 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
  • Property svn:keywords set to Id
File size: 771 bytes
Line 
1#include "../include/Cache_OneLevel.h"
2
3namespace environment {
4namespace cache {
5namespace cache_onelevel {
6
7  // return the number of param->associativity if hit
8  // return nb_accosiativity if miss
9  uint32_t Cache_OneLevel::hit_access_port (uint32_t trdid, Address address)
10  {
11    uint32_t it_num_port = 0;
12   
13    // scan all port - test if have a transaction
14    for (it_num_port = 0; it_num_port < param->nb_port; it_num_port ++)
15      if ( (access_port[it_num_port].valid           == true           ) &&
16           (access_port[it_num_port].trdid           == trdid          ) &&
17           (access_port[it_num_port].address.tag     == address.tag    ) &&
18           (access_port[it_num_port].address.familly == address.familly))
19        break;
20   
21    return it_num_port;
22  }
23
24};
25};
26};
Note: See TracBrowser for help on using the repository browser.