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

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

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


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

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

 	delete []  in_EXECUTE_UNIT_OUT_VAL;
        delete [] out_EXECUTE_UNIT_OUT_ACK;
	if (_param->_have_port_context_id)
        delete []  in_EXECUTE_UNIT_OUT_CONTEXT_ID   ;
        if (_param->_have_port_front_end_id)
	delete []  in_EXECUTE_UNIT_OUT_FRONT_END_ID ;
        if (_param->_have_port_ooo_engine_id)
	delete []  in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID;
        if (_param->_have_port_packet_id)
	delete []  in_EXECUTE_UNIT_OUT_PACKET_ID    ;
      //delete []  in_EXECUTE_UNIT_OUT_OPERATION    ;
	delete []  in_EXECUTE_UNIT_OUT_TYPE         ;
        delete []  in_EXECUTE_UNIT_OUT_WRITE_RD     ;
        delete []  in_EXECUTE_UNIT_OUT_NUM_REG_RD   ;
        delete []  in_EXECUTE_UNIT_OUT_DATA_RD      ;
        delete []  in_EXECUTE_UNIT_OUT_WRITE_RE     ;
        delete []  in_EXECUTE_UNIT_OUT_NUM_REG_RE   ;
        delete []  in_EXECUTE_UNIT_OUT_DATA_RE      ;
        delete []  in_EXECUTE_UNIT_OUT_EXCEPTION    ;
        delete []  in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ;
        delete []  in_EXECUTE_UNIT_OUT_ADDRESS      ;

        delete [] out_WRITE_UNIT_IN_VAL;
        delete []  in_WRITE_UNIT_IN_ACK;
        if (_param->_have_port_context_id)
	delete [] out_WRITE_UNIT_IN_CONTEXT_ID   ;
        if (_param->_have_port_front_end_id)
	delete [] out_WRITE_UNIT_IN_FRONT_END_ID ;
        if (_param->_have_port_ooo_engine_id)
	delete [] out_WRITE_UNIT_IN_OOO_ENGINE_ID;
        if (_param->_have_port_packet_id)
	delete [] out_WRITE_UNIT_IN_PACKET_ID    ;
      //delete [] out_WRITE_UNIT_IN_OPERATION    ;
	delete [] out_WRITE_UNIT_IN_TYPE         ;
        delete [] out_WRITE_UNIT_IN_WRITE_RD     ;
        delete [] out_WRITE_UNIT_IN_NUM_REG_RD   ;
        delete [] out_WRITE_UNIT_IN_DATA_RD      ;
        delete [] out_WRITE_UNIT_IN_WRITE_RE     ;
        delete [] out_WRITE_UNIT_IN_NUM_REG_RE   ;
        delete [] out_WRITE_UNIT_IN_DATA_RE      ;
        delete [] out_WRITE_UNIT_IN_EXCEPTION    ;
        delete [] out_WRITE_UNIT_IN_NO_SEQUENCE  ;
        delete [] out_WRITE_UNIT_IN_ADDRESS      ;
      }
    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    

    delete [] _destination;
    delete    _component;

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

}; // end namespace execution_unit_to_write_unit
}; // end namespace network
}; // end namespace execute_loop
}; // end namespace multi_execute_loop
}; // end namespace core
}; // end namespace behavioural
}; // end namespace morpheo              
