Changeset 78 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_transition.cpp
- Timestamp:
- Mar 27, 2008, 11:04:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_transition.cpp
r75 r78 17 17 void Victim_Pseudo_LRU::transition (void) 18 18 { 19 #ifdef STATISTICS 20 uint32_t _stat_nb_access = 0; 21 uint32_t _stat_nb_update = 0; 22 #endif 19 for (uint32_t i=0; i<_param->_nb_access; i++) 20 { 21 if (PORT_READ (in_ACCESS_VAL[i]) and internal_ACCESS_ACK) 22 { 23 Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0; 24 Tentity_t entity; 23 25 24 for (uint32_t i=0; i<_param._nb_access; i++) 25 { 26 // Access ... (ack is always at 1) 27 if (PORT_READ (in_ACCESS_VAL[i]) == 1) 28 { 29 #ifdef STATISTICS 30 _stat_nb_access ++; 31 #endif 32 Taddress_t address; 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 } 34 else 35 { 36 // Miss : need victim 37 // #ifdef STATISTICS 38 // _stat_nb_access ++; 39 // #endif 40 entity = internal_ACCESS_VICTIM[i]; 41 } 33 42 34 if (_param._size_table>1) 35 address = PORT_READ (in_ACCESS_ADDRESS[i]); 36 else 37 address = 0; 38 39 reg_TABLE[address]->update(internal_ACCESS_ENTITY[i]); 43 reg_TABLE[address]->update(entity); 40 44 } 41 45 }//end for i 42 46 43 for (uint32_t i=0; i<_param._nb_update; i++)44 {45 // Update ... (ack is always at 1)46 if (PORT_READ (in_UPDATE_VAL[i]) == 1)47 {48 #ifdef STATISTICS49 _stat_nb_update ++;50 #endif51 52 Taddress_t address;53 54 if (_param._size_table>1)55 address = PORT_READ (in_UPDATE_ADDRESS[i]);56 else57 address = 0;58 59 reg_TABLE[address]->update(PORT_READ(in_UPDATE_ENTITY[i]));60 }61 }//end for i62 63 47 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 64 48 end_cycle ();
Note: See TracChangeset
for help on using the changeset viewer.