Ignore:
Timestamp:
Jun 26, 2009, 10:43:23 AM (15 years ago)
Author:
rosiere
Message:

1) Correct bug in link two signal
2) Fix error detected with valgrind
3) modif distexe script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_transition.cpp

    r123 r128  
    1717  void Victim_Pseudo_LRU::transition (void)
    1818  {
    19     for (uint32_t i=0; i<_param->_nb_access; i++)
     19
     20    if (PORT_READ(in_NRESET) == 0)
    2021      {
    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;
     22        for (uint32_t i=0; i<_param->_size_table; ++i)
     23          reg_TABLE[i]->reset();
     24      }
     25    else
     26      {
     27        for (uint32_t i=0; i<_param->_nb_access; i++)
     28          {
     29            if (PORT_READ (in_ACCESS_VAL[i]) and internal_ACCESS_ACK)
     30              {
     31                Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0;
     32                Tentity_t  entity  = 0;
     33               
     34                if (PORT_READ(in_ACCESS_HIT [i]))
     35                  {
     36                    // Hit  : don't need a victim
     37// #ifdef STATISTICS
     38//                  _stat_nb_update ++;
     39// #endif
     40                    entity = PORT_READ(in_ACCESS_ENTITY[i]);
     41                  }
     42                else
     43                  {
     44                    // Miss : need victim
     45// #ifdef STATISTICS
     46//                  _stat_nb_access ++;
     47// #endif
     48                    entity = internal_ACCESS_VICTIM[i];
     49                  }
     50               
     51#ifdef DEBUG_TEST
     52                if (address >= _param->_size_table)
     53                  throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address, _param->_size_table));
     54#endif
     55                reg_TABLE[address]->update(entity);
     56              }
     57          }//end for i
     58      }
    2559
    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    
    4760#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    4861    end_cycle ();
Note: See TracChangeset for help on using the changeset viewer.