Last change
on this file since 82 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:
820 bytes
|
Line | |
---|
1 | #include "../include/Cache_Access.h" |
---|
2 | |
---|
3 | namespace environment { |
---|
4 | |
---|
5 | Cache_Access ireq_type2cache_type (morpheo::behavioural::Ticache_type_t ireq_type, bool uncached) |
---|
6 | { |
---|
7 | cache::type_req_cache_t type ; |
---|
8 | cache::direction_req_cache_t direction; |
---|
9 | |
---|
10 | switch (ireq_type) |
---|
11 | { |
---|
12 | case ICACHE_TYPE_LOAD : {direction=cache::READ ; type=cache::CACHED ; break;} |
---|
13 | case ICACHE_TYPE_INVALIDATE : {direction=cache::NONE ; type=cache::INVALIDATE; break;} |
---|
14 | case ICACHE_TYPE_PREFETCH : {direction=cache::NONE ; type=cache::PREFETCH ; break;} |
---|
15 | case ICACHE_TYPE_LOCK : |
---|
16 | default : {std::cerr << "<ireq_type2cache_type> Unkown type (" << ireq_type << ")" << std::endl; exit(1);} |
---|
17 | } |
---|
18 | |
---|
19 | return Cache_Access (type,direction, 4); // instruction = 32 bits = 4 bytes |
---|
20 | } |
---|
21 | |
---|
22 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.