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

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

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


#undef  FUNCTION
#define FUNCTION "Direction::deallocation"
  void Direction::deallocation (void)
  {
    log_printf(FUNC,Direction,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       ;
	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        ;
      }
    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
    delete _component_glue;
    delete _component;

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

}; // 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              
