/*
 * $Id: Execution_unit_to_Write_unit_deallocation.cpp 112 2009-03-18 22:36:26Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Execution_unit_to_Write_unit.h"
#include "Behavioural/include/Allocation.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_is_set(_usage,USE_SYSTEMC))
      {
	delete     in_CLOCK ;
	delete     in_NRESET;

        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_VAL          , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],1);
        DELETE2_SIGNAL(out_EXECUTE_UNIT_OUT_ACK          , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],1);
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_CONTEXT_ID   , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_context_id      );
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_FRONT_END_ID , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_front_end_id    );
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID, _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_ooo_engine_id   );
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_PACKET_ID    , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_rob_ptr         );
     // DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_OPERATION    , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_operation       );
     // DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_TYPE         , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_type            );
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_WRITE_RD     , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],1                             );
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_NUM_REG_RD   , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_general_register);
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_DATA_RD      , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_general_data    );
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_WRITE_RE     , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],1                             );
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_NUM_REG_RE   , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_special_register);
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_DATA_RE      , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_special_data    );
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_EXCEPTION    , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_exception       );
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_NO_SEQUENCE  , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],1                             );
        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_ADDRESS      , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_general_data    );

        DELETE1_SIGNAL(out_WRITE_UNIT_IN_VAL          , _param->_nb_write_unit,1);
        DELETE1_SIGNAL( in_WRITE_UNIT_IN_ACK          , _param->_nb_write_unit,1);
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_CONTEXT_ID   , _param->_nb_write_unit,_param->_size_context_id      );
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_FRONT_END_ID , _param->_nb_write_unit,_param->_size_front_end_id    );
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_OOO_ENGINE_ID, _param->_nb_write_unit,_param->_size_ooo_engine_id   );
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_PACKET_ID    , _param->_nb_write_unit,_param->_size_rob_ptr         );
     // DELETE1_SIGNAL(out_WRITE_UNIT_IN_OPERATION    , _param->_nb_write_unit,_param->_size_operation       );
     // DELETE1_SIGNAL(out_WRITE_UNIT_IN_TYPE         , _param->_nb_write_unit,_param->_size_type            );
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_WRITE_RD     , _param->_nb_write_unit,1                             );
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_NUM_REG_RD   , _param->_nb_write_unit,_param->_size_general_register);
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_DATA_RD      , _param->_nb_write_unit,_param->_size_general_data    );
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_WRITE_RE     , _param->_nb_write_unit,1                             );
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_NUM_REG_RE   , _param->_nb_write_unit,_param->_size_special_register);
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_DATA_RE      , _param->_nb_write_unit,_param->_size_special_data    );
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_EXCEPTION    , _param->_nb_write_unit,_param->_size_exception       );
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_NO_SEQUENCE  , _param->_nb_write_unit,1                             );
        DELETE1_SIGNAL(out_WRITE_UNIT_IN_ADDRESS      , _param->_nb_write_unit,_param->_size_general_data    );
      
        DELETE3(_destination,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1],_param->_nb_thread);
      }

    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    

    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              
