source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_transition.cpp @ 123

Last change on this file since 123 was 123, checked in by rosiere, 15 years ago

1) Fix performance
2) add auto generation to SPECINT2000
3) add reset in genMoore and genMealy

  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Victim_Pseudo_LRU_transition.cpp 123 2009-06-08 20:43:30Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace generic {
14namespace victim {
15namespace victim_pseudo_lru {
16
17  void Victim_Pseudo_LRU::transition (void)
18  {
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  = 0;
25
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              }
42
43            reg_TABLE[address]->update(entity);
44          }
45      }//end for i
46   
47#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
48    end_cycle ();
49#endif
50  };
51
52}; // end namespace victim_pseudo_lru
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.