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

#include "Behavioural/Generic/Select/Pseudo_LRU/include/Pseudo_LRU.h"

namespace morpheo                    {
namespace behavioural {
namespace generic {
namespace select {
namespace pseudo_lru {

  void Pseudo_LRU::deallocation (void)
  {
    delete in_CLOCK;

    // -----[ Interface access ]-------------------------------------------
    for (uint32_t i=0; i<_param._nb_access; i++)
      {
	delete  in_ACCESS_VAL     [i];
	delete out_ACCESS_ACK     [i];
	if (_param._size_table>1)
 	delete  in_ACCESS_ADDRESS [i];
	delete out_ACCESS_ENTITY  [i];
      }

    delete  in_ACCESS_VAL    ;
    delete out_ACCESS_ACK    ;
    if (_param._size_table>1)
    delete  in_ACCESS_ADDRESS;
    delete out_ACCESS_ENTITY ;
    
    // -----[ Interface update ]-------------------------------------------
    for (uint32_t i=0; i<_param._nb_update; i++)
      {
 	delete  in_UPDATE_VAL     [i];
	delete out_UPDATE_ACK     [i];
	if (_param._size_table>1)
 	delete  in_UPDATE_ADDRESS [i];
	delete  in_UPDATE_ENTITY  [i];
      }
    delete  in_UPDATE_VAL    ;
    delete out_UPDATE_ACK    ;
    if (_param._size_table>1)
    delete  in_UPDATE_ADDRESS;
    delete  in_UPDATE_ENTITY ;

    // -----[ Register ]---------------------------------------------------
    for (uint32_t i=0; i<_param._size_table; i++)
      {
 	delete reg_TABLE [i];
      }
    delete reg_TABLE;

    // -----[ Internal ]---------------------------------------------------
    delete internal_ACCESS_ENTITY;
  };

}; // end namespace pseudo_lru
}; // end namespace select
}; // end namespace generic
}; // end namespace behavioural
}; // end namespace morpheo              
#endif
