Last change
on this file since 140 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:
771 bytes
|
Rev | Line | |
---|
[78] | 1 | #include "../include/Cache_OneLevel.h" |
---|
| 2 | |
---|
[80] | 3 | namespace environment { |
---|
[78] | 4 | namespace cache { |
---|
| 5 | namespace cache_onelevel { |
---|
| 6 | |
---|
| 7 | // return the number of param->associativity if hit |
---|
| 8 | // return nb_accosiativity if miss |
---|
| 9 | uint32_t Cache_OneLevel::hit_access_port (uint32_t trdid, Address address) |
---|
| 10 | { |
---|
| 11 | uint32_t it_num_port = 0; |
---|
| 12 | |
---|
| 13 | // scan all port - test if have a transaction |
---|
| 14 | for (it_num_port = 0; it_num_port < param->nb_port; it_num_port ++) |
---|
| 15 | if ( (access_port[it_num_port].valid == true ) && |
---|
| 16 | (access_port[it_num_port].trdid == trdid ) && |
---|
| 17 | (access_port[it_num_port].address.tag == address.tag ) && |
---|
| 18 | (access_port[it_num_port].address.familly == address.familly)) |
---|
| 19 | break; |
---|
| 20 | |
---|
| 21 | return it_num_port; |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | }; |
---|
| 25 | }; |
---|
| 26 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.