Last change
on this file since 78 was
78,
checked in by rosiere, 16 years ago
|
Add :
- Execute_loop (must be test systemC)
- Prediction
- Direction : predifined scheme
- Branch Target Buffer
- iFetch_unit
- ifetch_queue
- pc management
- Decod_unit
- coming soon : support for custom operation
- Rename_unit
- RAT
- Free_list
- Dependence RAW check
- Load store unit pointer
- New Environnement (hierarchy_memory will remove in a next version)
Modif :
- Manage Custom Operation
- All component in execute_loop to use the new statistics management
Not Finish :
- Return Address Stack
- Environnement
|
File size:
1004 bytes
|
Line | |
---|
1 | #include "../include/Cache_MultiLevel.h" |
---|
2 | #include <sstream> |
---|
3 | |
---|
4 | namespace environnement { |
---|
5 | namespace cache { |
---|
6 | namespace cache_multilevel { |
---|
7 | |
---|
8 | Access Cache_MultiLevel::access (uint32_t num_port, uint32_t address, uint32_t trdid, type_req_cache_t type, direction_req_cache_t dir) |
---|
9 | { |
---|
10 | uint32_t time = 0; |
---|
11 | uint32_t last_nb_level = (param->nb_level==0)?0:(param->nb_level-1); |
---|
12 | type_rsp_cache_t hit = MISS; |
---|
13 | |
---|
14 | // Scan all cache level |
---|
15 | for (uint32_t i = 0; i < param->nb_level; i ++) |
---|
16 | { |
---|
17 | hit = hierarchy_cache[i]->access (num_port,address,trdid,type,dir); |
---|
18 | time += hierarchy_cache[i]->latence(num_port); |
---|
19 | |
---|
20 | std::cout << "SETH : " |
---|
21 | << " * i : " << i |
---|
22 | << " * hit : " << hit |
---|
23 | << " * time :" << time << std::endl; |
---|
24 | |
---|
25 | if ( (hit == HIT_CACHE) or |
---|
26 | (hit == HIT_WRITE_BUFFER) or |
---|
27 | (hit == HIT_BYPASS) ) |
---|
28 | { |
---|
29 | last_nb_level = i; |
---|
30 | break; |
---|
31 | } |
---|
32 | } |
---|
33 | |
---|
34 | return Access (num_port,hit,time,last_nb_level); |
---|
35 | } |
---|
36 | |
---|
37 | }; |
---|
38 | }; |
---|
39 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.