#ifdef SYSTEMC
/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h"

namespace morpheo {
namespace behavioural {
namespace generic {
namespace victim {
namespace victim_pseudo_lru {

  void Victim_Pseudo_LRU::genMealy_access (void)
  {
    for (uint32_t i=0; i<_param._nb_access; i++)
      {
	if (PORT_READ (in_ACCESS_VAL[i]) == 1)
	  {
	    Taddress_t address;

	    if (_param._size_table>1)
	      address = PORT_READ     (in_ACCESS_ADDRESS[i]);
	    else
	      address = 0;
	    
	    internal_ACCESS_ENTITY[i] = reg_TABLE[address]->access();
	  }
	else
	  {
	    internal_ACCESS_ENTITY[i] = 0;
	  }

	PORT_WRITE(out_ACCESS_ENTITY[i], internal_ACCESS_ENTITY[i]);
      }//end for i
  };

}; // end namespace victim_pseudo_lru
}; // end namespace victim
}; // end namespace generic
}; // end namespace behavioural
}; // end namespace morpheo              
#endif
