Last change
on this file since 139 was
101,
checked in by rosiere, 16 years ago
|
1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)
|
-
Property svn:keywords set to
Id
|
File size:
877 bytes
|
Rev | Line | |
---|
[81] | 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;} |
---|
[101] | 15 | case ICACHE_TYPE_LOCK : {direction=cache::NONE ; type=cache::LOCK ; break;} |
---|
[81] | 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.