source: trunk/IPs/systemC/Environment/Cache/src/Cache_OneLevel_access.cpp @ 114

Last change on this file since 114 was 114, checked in by rosiere, 15 years ago

1) Fix bug with previous commit
2) Add test libc
3) Change Dhrystone

  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#include "../include/Cache_OneLevel.h"
2
3namespace environment {
4namespace cache {
5namespace cache_onelevel {
6 
7  // Return hit (true)
8  // uncache is to stocke the address on the cache
9  type_rsp_cache_t Cache_OneLevel::access (uint32_t num_port, 
10                                           uint32_t address, 
11                                           uint32_t trdid, 
12                                           type_req_cache_t type, 
13                                           direction_req_cache_t dir)
14  {
15//     std::cout << "<Cache_Onelevel.access>" << std::endl
16//            << " * num_port   : " << num_port << std::endl
17//            << " * address    : " << std::hex << address  << std::dec << std::endl
18//            << " * trdid      : " << trdid    << std::endl
19//            << " * type       : " << type     << std::endl
20//            << " * direction  : " << dir      << std::endl;
21
22 // no difference with the simple read cached (have no add a prefetch cache)
23    switch (type)
24      {
25      case UNCACHED        : return access_uncached        (num_port,address,trdid    ); break;
26      case INVALIDATE      : return access_invalidate      (num_port,address,trdid    ); break;
27      case FLUSH           : return access_flush           (num_port,address,trdid    ); break;
28      case PREFETCH        : return access_prefetch        (num_port,address,trdid    ); break;
29      case LOCK            : return access_lock            (num_port,address,trdid    ); break;
30      case SYNCHRONIZATION : return access_synchronization (num_port,address,trdid    ); break;
31      case CACHED          : return access_cached          (num_port,address,trdid,dir); break;
32      default              : _cerr("<Cache_Onelevel.access> unknow type\n"); exit(1); break;
33      }
34  }
35
36};
37};
38};
Note: See TracBrowser for help on using the repository browser.