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

#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h"

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_front_end {
namespace front_end {
namespace prediction_unit {
namespace direction {
namespace direction_glue {


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

    if (usage_is_set(_usage,USE_SYSTEMC))
      {
	delete    in_CLOCK ;
	delete    in_NRESET;

	delete []  in_PREDICT_VAL                  ;
	delete [] out_PREDICT_ACK                  ;
	delete []  in_PREDICT_ADDRESS_SRC          ;
	delete []  in_PREDICT_STATIC               ;
	delete []  in_PREDICT_LAST_TAKE            ;
	if (_param->_have_port_history)
	delete [] out_PREDICT_HISTORY              ;
	delete [] out_PREDICT_DIRECTION            ;
	if (_param->_have_component_meta_predictor)
	  {
	delete [] out_PREDICT_PREDICTOR_VAL        ;
	delete []  in_PREDICT_PREDICTOR_ACK        ;
	delete [] out_PREDICT_PREDICTOR_ADDRESS_SRC;
	if (_param->_have_port_history)
	delete []  in_PREDICT_PREDICTOR_HISTORY    ;
	delete []  in_PREDICT_PREDICTOR_DIRECTION  ;
	  }
	delete []  in_UPDATE_VAL                ;
	delete [] out_UPDATE_ACK                ;
	delete []  in_UPDATE_ADDRESS            ;
	if (_param->_have_port_history)
	delete []  in_UPDATE_HISTORY            ;
	delete []  in_UPDATE_DIRECTION          ;
	if (_param->_have_component_meta_predictor)
	  {
	delete [] out_UPDATE_PREDICTOR_VAL      ;
	delete []  in_UPDATE_PREDICTOR_ACK      ;
	delete [] out_UPDATE_PREDICTOR_ADDRESS  ;
	if (_param->_have_port_history)
	delete [] out_UPDATE_PREDICTOR_HISTORY  ;
	delete [] out_UPDATE_PREDICTOR_DIRECTION;
	  }
      }
    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    

    delete _component;

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

}; // end namespace direction_glue
}; // end namespace direction
}; // end namespace prediction_unit
}; // end namespace front_end
}; // end namespace multi_front_end
}; // end namespace core

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