/*
 * $Id: Victim_deallocation.cpp 88 2008-12-10 18:31:39Z rosiere $
 *
 * [ Description ]
 * 
 */

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

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


#undef  FUNCTION
#define FUNCTION "Victim::deallocation"
  void Victim::deallocation (void)
  {
    log_printf(FUNC,Victim,FUNCTION,"Begin");

    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
    switch (_param->_victim_scheme)
      {
//    case VICTIM_RANDOM      : delete _component_victim_random     ; break;
//    case VICTIM_ROUND_ROBIN : delete _component_victim_round_robin; break;
//    case VICTIM_NLU         : delete _component_victim_nlu        ; break;
      case VICTIM_PSEUDO_LRU  : delete _component_victim_pseudo_lru ; break;
//    case VICTIM_LRU         : delete _component_victim_lru        ; break;
//    case VICTIM_FIFO        : delete _component_victim_fifo       ; break;
      default : break;
      }
    
    if (usage_is_set(_usage,USE_SYSTEMC))
      {
	delete    in_CLOCK ;
	delete    in_NRESET;

	delete []  in_ACCESS_VAL    ;
	delete [] out_ACCESS_ACK    ;
	if (_param->_have_port_address)
	delete []  in_ACCESS_ADDRESS;
	delete []  in_ACCESS_HIT    ;
	delete []  in_ACCESS_ENTITY ;
	delete [] out_ACCESS_VICTIM ;
      }


    log_printf(FUNC,Victim,FUNCTION,"End");
  };

}; // end namespace victim
}; // end namespace generic

}; // end namespace behavioural
}; // end namespace morpheo              
