/*
 * $Id: Read_unit_to_Execution_unit_deallocation.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/include/Read_unit_to_Execution_unit.h"

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_execute_loop {
namespace execute_loop {
namespace network {
namespace read_unit_to_execution_unit {


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

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

	// ~~~~~[ Interface "read_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	delete [] in_READ_UNIT_OUT_VAL                  ;
	delete []out_READ_UNIT_OUT_ACK                  ;
	if (_param->_have_port_context_id)
	delete [] in_READ_UNIT_OUT_CONTEXT_ID           ;
	if (_param->_have_port_front_end_id)
	delete [] in_READ_UNIT_OUT_FRONT_END_ID         ;
	if (_param->_have_port_ooo_engine_id)
	delete [] in_READ_UNIT_OUT_OOO_ENGINE_ID        ;
	if (_param->_have_port_packet_id)
	delete [] in_READ_UNIT_OUT_PACKET_ID            ;
	delete [] in_READ_UNIT_OUT_OPERATION            ;
	delete [] in_READ_UNIT_OUT_TYPE                 ;
	delete [] in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE;
	if (_param->_have_port_load_queue_ptr)
	delete [] in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ;
	delete [] in_READ_UNIT_OUT_HAS_IMMEDIAT         ;
	delete [] in_READ_UNIT_OUT_IMMEDIAT             ;
	delete [] in_READ_UNIT_OUT_DATA_RA              ;
	delete [] in_READ_UNIT_OUT_DATA_RB              ;
	delete [] in_READ_UNIT_OUT_DATA_RC              ;
	delete [] in_READ_UNIT_OUT_WRITE_RD             ;
	delete [] in_READ_UNIT_OUT_NUM_REG_RD           ;
	delete [] in_READ_UNIT_OUT_WRITE_RE             ;
	delete [] in_READ_UNIT_OUT_NUM_REG_RE           ;

	// ~~~~~[ Interface "execute_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	delete [] out_EXECUTE_UNIT_IN_VAL                  ;
	delete []  in_EXECUTE_UNIT_IN_ACK                  ;
	if (_param->_have_port_context_id)
	delete [] out_EXECUTE_UNIT_IN_CONTEXT_ID           ;
	if (_param->_have_port_front_end_id)
	delete [] out_EXECUTE_UNIT_IN_FRONT_END_ID         ;
	if (_param->_have_port_ooo_engine_id)
	delete [] out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ;
	if (_param->_have_port_packet_id)
	delete [] out_EXECUTE_UNIT_IN_PACKET_ID            ;
	delete [] out_EXECUTE_UNIT_IN_OPERATION            ;
	delete [] out_EXECUTE_UNIT_IN_TYPE                 ;
	delete [] out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ;
	delete [] out_EXECUTE_UNIT_IN_DATA_RC              ;
	delete [] out_EXECUTE_UNIT_IN_WRITE_RD             ;
	delete [] out_EXECUTE_UNIT_IN_WRITE_RE             ;
	delete [] out_EXECUTE_UNIT_IN_NUM_REG_RE           ;
	delete [] out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE;
	if (_param->_have_port_load_queue_ptr)
	delete [] out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ;
	delete [] out_EXECUTE_UNIT_IN_IMMEDIAT             ;
	delete [] out_EXECUTE_UNIT_IN_DATA_RA              ;
	delete [] out_EXECUTE_UNIT_IN_DATA_RB              ;
	delete [] out_EXECUTE_UNIT_IN_NUM_REG_RD           ;
      }
    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    

    delete [] _destination;
    delete    _component;

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

}; // end namespace read_unit_to_execution_unit
}; // end namespace network
}; // end namespace execute_loop
}; // end namespace multi_execute_loop
}; // end namespace core

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