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

#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/include/Execute_loop_Glue.h"
#include "Behavioural/include/Allocation.h"

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_execute_loop {
namespace execute_loop {
namespace execute_loop_glue {


#undef  FUNCTION
#define FUNCTION "Execute_loop_Glue::deallocation"
  void Execute_loop_Glue::deallocation (void)
  {
    log_begin(Execute_loop_Glue,FUNCTION);

    if (usage_is_set(_usage,USE_SYSTEMC))
      {
	delete    in_CLOCK ;
	delete    in_NRESET;

        DELETE1_SIGNAL( in_GPR_WRITE_WRITE_UNIT_VAL               ,_param->_nb_gpr_write,1);
        DELETE1_SIGNAL(out_GPR_WRITE_WRITE_UNIT_ACK               ,_param->_nb_gpr_write,1);
        DELETE1_SIGNAL( in_GPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     ,_param->_nb_gpr_write,_param->_size_ooo_engine_id);
        DELETE1_SIGNAL( in_GPR_WRITE_WRITE_UNIT_NUM_REG           ,_param->_nb_gpr_write,_param->_size_general_register);
        DELETE1_SIGNAL( in_GPR_WRITE_WRITE_UNIT_DATA              ,_param->_nb_gpr_write,_param->_size_general_data);
        
        DELETE1_SIGNAL(out_GPR_WRITE_REGISTER_FILE_VAL            ,_param->_nb_gpr_write,1);
        DELETE1_SIGNAL( in_GPR_WRITE_REGISTER_FILE_ACK            ,_param->_nb_gpr_write,1);
        DELETE1_SIGNAL(out_GPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ,_param->_nb_gpr_write,_param->_size_ooo_engine_id);
        DELETE1_SIGNAL(out_GPR_WRITE_REGISTER_FILE_NUM_REG        ,_param->_nb_gpr_write,_param->_size_general_register);
        DELETE1_SIGNAL(out_GPR_WRITE_REGISTER_FILE_DATA           ,_param->_nb_gpr_write,_param->_size_general_data);
        
        DELETE1_SIGNAL(out_GPR_WRITE_READ_UNIT_VAL                ,_param->_nb_gpr_write,1);			   
        DELETE1_SIGNAL(out_GPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ,_param->_nb_gpr_write,_param->_size_ooo_engine_id);
        DELETE1_SIGNAL(out_GPR_WRITE_READ_UNIT_NUM_REG            ,_param->_nb_gpr_write,_param->_size_general_register);
        DELETE1_SIGNAL(out_GPR_WRITE_READ_UNIT_DATA               ,_param->_nb_gpr_write,_param->_size_general_data);
        
        DELETE1_SIGNAL( in_SPR_WRITE_WRITE_UNIT_VAL               ,_param->_nb_spr_write,1);
        DELETE1_SIGNAL(out_SPR_WRITE_WRITE_UNIT_ACK               ,_param->_nb_spr_write,1);
        DELETE1_SIGNAL( in_SPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     ,_param->_nb_spr_write,_param->_size_ooo_engine_id);
        DELETE1_SIGNAL( in_SPR_WRITE_WRITE_UNIT_NUM_REG           ,_param->_nb_spr_write,_param->_size_special_register);
        DELETE1_SIGNAL( in_SPR_WRITE_WRITE_UNIT_DATA              ,_param->_nb_spr_write,_param->_size_special_data);
        
        DELETE1_SIGNAL(out_SPR_WRITE_REGISTER_FILE_VAL            ,_param->_nb_spr_write,1);
        DELETE1_SIGNAL( in_SPR_WRITE_REGISTER_FILE_ACK            ,_param->_nb_spr_write,1);
        DELETE1_SIGNAL(out_SPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ,_param->_nb_spr_write,_param->_size_ooo_engine_id);
        DELETE1_SIGNAL(out_SPR_WRITE_REGISTER_FILE_NUM_REG        ,_param->_nb_spr_write,_param->_size_special_register);
        DELETE1_SIGNAL(out_SPR_WRITE_REGISTER_FILE_DATA           ,_param->_nb_spr_write,_param->_size_special_data);
        
        DELETE1_SIGNAL(out_SPR_WRITE_READ_UNIT_VAL                ,_param->_nb_spr_write,1);
        DELETE1_SIGNAL(out_SPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ,_param->_nb_spr_write,_param->_size_ooo_engine_id);
        DELETE1_SIGNAL(out_SPR_WRITE_READ_UNIT_NUM_REG            ,_param->_nb_spr_write,_param->_size_special_register);
        DELETE1_SIGNAL(out_SPR_WRITE_READ_UNIT_DATA               ,_param->_nb_spr_write,_param->_size_special_data);
      }
    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    

    delete _component;

    log_end(Execute_loop_Glue,FUNCTION);
  };

}; // end namespace execute_loop_glue
}; // end namespace execute_loop
}; // end namespace multi_execute_loop
}; // end namespace core

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