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

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

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


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

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

	delete []  in_INSERT_VAL               ;
	delete [] out_INSERT_ACK               ;
	delete []  in_INSERT_READ_RA           ;
	delete []  in_INSERT_NUM_REG_RA_PHY    ;
	delete []  in_INSERT_READ_RB           ;
	delete []  in_INSERT_NUM_REG_RB_PHY    ;
	delete []  in_INSERT_READ_RC           ;
	delete []  in_INSERT_NUM_REG_RC_PHY    ;
	delete []  in_INSERT_WRITE_RD          ;
	delete []  in_INSERT_NUM_REG_RD_PHY_NEW;
	delete []  in_INSERT_WRITE_RE          ;
	delete []  in_INSERT_NUM_REG_RE_PHY_NEW;

	delete []  in_RETIRE_VAL               ;
	delete [] out_RETIRE_ACK               ;
	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_RESTORE_RD_PHY_OLD;
	delete []  in_RETIRE_NUM_REG_RD_PHY_OLD;
	delete []  in_RETIRE_NUM_REG_RD_PHY_NEW;
	delete []  in_RETIRE_WRITE_RE          ;
	delete []  in_RETIRE_RESTORE_RE_PHY_OLD;
	delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
	delete []  in_RETIRE_NUM_REG_RE_PHY_NEW;

	delete [] out_PUSH_GPR_VAL             ;
	delete []  in_PUSH_GPR_ACK             ;

	delete [] out_PUSH_GPR_NUM_REG         ;
	delete [] out_PUSH_SPR_VAL             ;
	delete []  in_PUSH_SPR_ACK             ;
	delete [] out_PUSH_SPR_NUM_REG         ;
    
        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
        delete [] gpr_stat_list;
        delete [] spr_stat_list;
        
        delete [] internal_INSERT_ACK       ;
        delete [] internal_RETIRE_ACK       ;
        delete [] internal_PUSH_GPR_VAL     ;
        delete [] internal_PUSH_GPR_NUM_BANK;
        delete [] internal_PUSH_SPR_VAL     ;
        delete [] internal_PUSH_SPR_NUM_BANK;
      }


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

    delete _component;

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

}; // end namespace stat_list_unit
}; // 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              
