1 | #include "../include/Cache_OneLevel.h" |
---|
2 | |
---|
3 | namespace environment { |
---|
4 | namespace cache { |
---|
5 | namespace 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 | }; |
---|