Last change
on this file since 87 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:
778 bytes
|
Line | |
---|
1 | #include "../include/Cache_OneLevel.h" |
---|
2 | |
---|
3 | namespace environment { |
---|
4 | namespace cache { |
---|
5 | namespace cache_onelevel { |
---|
6 | |
---|
7 | uint32_t Cache_OneLevel::hit_cache (uint32_t trdid, Address address) |
---|
8 | { |
---|
9 | uint32_t num_associativity; |
---|
10 | for (num_associativity = 0; num_associativity < param->associativity; num_associativity ++) |
---|
11 | // Hit if : |
---|
12 | // * in the line |
---|
13 | // * in a way associative |
---|
14 | // -> there are the same tag |
---|
15 | // the same trdid |
---|
16 | // is valid |
---|
17 | if ( (tag [address.familly][num_associativity].address == address.tag) && |
---|
18 | (tag [address.familly][num_associativity].valid == true ) && |
---|
19 | (tag [address.familly][num_associativity].trdid == trdid ) ) |
---|
20 | break; |
---|
21 | |
---|
22 | return num_associativity; |
---|
23 | } |
---|
24 | |
---|
25 | }; |
---|
26 | }; |
---|
27 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.