Last change
on this file since 100 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:
1.2 KB
|
Rev | Line | |
---|
[10] | 1 | #ifdef SYSTEMC |
---|
| 2 | /* |
---|
| 3 | * $Id: Victim_Pseudo_LRU_transition.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
[15] | 9 | #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h" |
---|
[10] | 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace generic { |
---|
| 14 | namespace victim { |
---|
[15] | 15 | namespace victim_pseudo_lru { |
---|
[10] | 16 | |
---|
[15] | 17 | void Victim_Pseudo_LRU::transition (void) |
---|
[10] | 18 | { |
---|
[78] | 19 | for (uint32_t i=0; i<_param->_nb_access; i++) |
---|
[10] | 20 | { |
---|
[78] | 21 | if (PORT_READ (in_ACCESS_VAL[i]) and internal_ACCESS_ACK) |
---|
[10] | 22 | { |
---|
[78] | 23 | Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0; |
---|
| 24 | Tentity_t entity; |
---|
[10] | 25 | |
---|
[78] | 26 | if (PORT_READ(in_ACCESS_HIT [i])) |
---|
| 27 | { |
---|
| 28 | // Hit : don't need a victim |
---|
| 29 | // #ifdef STATISTICS |
---|
| 30 | // _stat_nb_update ++; |
---|
| 31 | // #endif |
---|
| 32 | entity = PORT_READ(in_ACCESS_ENTITY[i]); |
---|
| 33 | } |
---|
[10] | 34 | else |
---|
[78] | 35 | { |
---|
| 36 | // Miss : need victim |
---|
| 37 | // #ifdef STATISTICS |
---|
| 38 | // _stat_nb_access ++; |
---|
| 39 | // #endif |
---|
| 40 | entity = internal_ACCESS_VICTIM[i]; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | reg_TABLE[address]->update(entity); |
---|
[10] | 44 | } |
---|
| 45 | }//end for i |
---|
| 46 | |
---|
[75] | 47 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 48 | end_cycle (); |
---|
[10] | 49 | #endif |
---|
| 50 | }; |
---|
| 51 | |
---|
[15] | 52 | }; // end namespace victim_pseudo_lru |
---|
[10] | 53 | }; // end namespace victim |
---|
| 54 | }; // end namespace generic |
---|
| 55 | |
---|
| 56 | }; // end namespace behavioural |
---|
| 57 | }; // end namespace morpheo |
---|
| 58 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.