/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/include/Register_translation_unit.h"

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_ooo_engine {
namespace ooo_engine {
namespace rename_unit {
namespace register_translation_unit {


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

    if (_usage & USE_SYSTEMC)
      {
	delete    in_CLOCK ;
	delete    in_NRESET;

	delete []  in_RENAME_VAL               ;
	delete [] out_RENAME_ACK               ;
	if (_param->_have_port_front_end_id)
	delete []  in_RENAME_FRONT_END_ID      ;
	if (_param->_have_port_context_id)
	delete []  in_RENAME_CONTEXT_ID        ;
	delete []  in_RENAME_READ_RA           ;
	delete []  in_RENAME_NUM_REG_RA_LOG    ;
	delete []  in_RENAME_READ_RB           ;
	delete []  in_RENAME_NUM_REG_RB_LOG    ;
	delete []  in_RENAME_READ_RC           ;
	delete []  in_RENAME_NUM_REG_RC_LOG    ;
	delete []  in_RENAME_WRITE_RD          ;
	delete []  in_RENAME_NUM_REG_RD_LOG    ;
	delete []  in_RENAME_WRITE_RE          ;
	delete []  in_RENAME_NUM_REG_RE_LOG    ;

	delete [] out_INSERT_VAL               ;
	delete []  in_INSERT_ACK               ;
	if (_param->_have_port_front_end_id)
	delete [] out_INSERT_FRONT_END_ID      ;
	if (_param->_have_port_context_id)
	delete [] out_INSERT_CONTEXT_ID        ;
	delete [] out_INSERT_READ_RA           ;
	delete [] out_INSERT_NUM_REG_RA_LOG    ;
	delete [] out_INSERT_NUM_REG_RA_PHY    ;
	delete [] out_INSERT_READ_RB           ;
	delete [] out_INSERT_NUM_REG_RB_LOG    ;
	delete [] out_INSERT_NUM_REG_RB_PHY    ;
	delete [] out_INSERT_READ_RC           ;
	delete [] out_INSERT_NUM_REG_RC_LOG    ;
	delete [] out_INSERT_NUM_REG_RC_PHY    ;
	delete [] out_INSERT_WRITE_RD          ;
	delete [] out_INSERT_NUM_REG_RD_LOG    ;
	delete [] out_INSERT_NUM_REG_RD_PHY_OLD;
	delete [] out_INSERT_NUM_REG_RD_PHY_NEW;
	delete [] out_INSERT_WRITE_RE          ;
	delete [] out_INSERT_NUM_REG_RE_LOG    ;
	delete [] out_INSERT_NUM_REG_RE_PHY_OLD;
	delete [] out_INSERT_NUM_REG_RE_PHY_NEW;

	delete []  in_RETIRE_VAL               ;
	delete [] out_RETIRE_ACK               ;
	if (_param->_have_port_front_end_id)
	delete []  in_RETIRE_FRONT_END_ID      ;
	if (_param->_have_port_context_id)
	delete []  in_RETIRE_CONTEXT_ID        ;
	delete []  in_RETIRE_EVENT_STATE       ;
	delete []  in_RETIRE_READ_RA           ;
	delete []  in_RETIRE_NUM_REG_RA_PHY    ;
	delete []  in_RETIRE_READ_RB           ;
	delete []  in_RETIRE_NUM_REG_RB_PHY    ;
	delete []  in_RETIRE_READ_RC           ;
	delete []  in_RETIRE_NUM_REG_RC_PHY    ;
	delete []  in_RETIRE_WRITE_RD          ;
	delete []  in_RETIRE_NUM_REG_RD_LOG    ;
	delete []  in_RETIRE_NUM_REG_RD_PHY_OLD;
	delete []  in_RETIRE_NUM_REG_RD_PHY_NEW;
	delete []  in_RETIRE_WRITE_RE          ;
	delete []  in_RETIRE_NUM_REG_RE_LOG    ;
	delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
	delete []  in_RETIRE_NUM_REG_RE_PHY_NEW;
      }
    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    

    delete _component_dependency_checking_unit         ;
    delete _component_free_list_unit                   ;
    delete _component_register_address_translation_unit;
    delete _component_stat_list_unit                   ;
    delete _component_register_translation_unit_glue   ;

    delete _component;

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

}; // end namespace register_translation_unit
}; // end namespace rename_unit
}; // end namespace ooo_engine
}; // end namespace multi_ooo_engine
}; // end namespace core

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