#undef  FUNCTION
#define FUNCTION "Reservation_station::"

#ifdef SYSTEMC
/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Reservation_station.h"

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_execute_loop {
namespace execute_loop {
namespace multi_read_unit {
namespace read_unit {
namespace reservation_station {


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

    delete     in_CLOCK ;
    delete     in_NRESET;

    delete     in_RESERVATION_STATION_IN_VAL         ;
    delete    out_RESERVATION_STATION_IN_ACK         ;
    delete     in_RESERVATION_STATION_IN_CONTEXT_ID  ;
    delete     in_RESERVATION_STATION_IN_PACKET_ID   ;
    delete     in_RESERVATION_STATION_IN_OPERATION   ;
    delete     in_RESERVATION_STATION_IN_TYPE        ;
    delete     in_RESERVATION_STATION_IN_HAS_IMMEDIAT;
    delete     in_RESERVATION_STATION_IN_IMMEDIAT    ;
//     delete     in_RESERVATION_STATION_IN_READ_RA     ;
    delete     in_RESERVATION_STATION_IN_NUM_REG_RA  ;
    delete     in_RESERVATION_STATION_IN_DATA_RA_VAL ;
    delete     in_RESERVATION_STATION_IN_DATA_RA     ;
//     delete     in_RESERVATION_STATION_IN_READ_RB     ;
    delete     in_RESERVATION_STATION_IN_NUM_REG_RB  ;
    delete     in_RESERVATION_STATION_IN_DATA_RB_VAL ;
    delete     in_RESERVATION_STATION_IN_DATA_RB     ;
//     delete     in_RESERVATION_STATION_IN_READ_RC     ;
    delete     in_RESERVATION_STATION_IN_NUM_REG_RC  ;
    delete     in_RESERVATION_STATION_IN_DATA_RC_VAL ;
    delete     in_RESERVATION_STATION_IN_DATA_RC     ;
    delete     in_RESERVATION_STATION_IN_WRITE_RD    ;
    delete     in_RESERVATION_STATION_IN_NUM_REG_RD  ;
    delete     in_RESERVATION_STATION_IN_WRITE_RE    ;
    delete     in_RESERVATION_STATION_IN_NUM_REG_RE  ;
    
    delete [] out_RESERVATION_STATION_OUT_VAL         ;
    delete []  in_RESERVATION_STATION_OUT_ACK         ;
    delete [] out_RESERVATION_STATION_OUT_CONTEXT_ID  ;
    delete [] out_RESERVATION_STATION_OUT_PACKET_ID   ;
    delete [] out_RESERVATION_STATION_OUT_OPERATION   ;
    delete [] out_RESERVATION_STATION_OUT_TYPE        ;
    delete [] out_RESERVATION_STATION_OUT_HAS_IMMEDIAT;
    delete [] out_RESERVATION_STATION_OUT_IMMEDIAT    ;
    delete [] out_RESERVATION_STATION_OUT_DATA_RA     ;
    delete [] out_RESERVATION_STATION_OUT_DATA_RB     ;
    delete [] out_RESERVATION_STATION_OUT_DATA_RC     ;
    delete [] out_RESERVATION_STATION_OUT_WRITE_RD    ;
    delete [] out_RESERVATION_STATION_OUT_NUM_REG_RD  ;
    delete [] out_RESERVATION_STATION_OUT_WRITE_RE    ;
    delete [] out_RESERVATION_STATION_OUT_NUM_REG_RE  ;
    
    delete []  in_GPR_WRITE_VAL       ;
    delete []  in_GPR_WRITE_CONTEXT_ID;
    delete []  in_GPR_WRITE_NUM_REG   ;
    delete []  in_GPR_WRITE_DATA      ;
    
    delete []  in_SPR_WRITE_VAL       ;
    delete []  in_SPR_WRITE_CONTEXT_ID;
    delete []  in_SPR_WRITE_NUM_REG   ;
    delete []  in_SPR_WRITE_DATA      ;
    
    delete []  in_BYPASS_WRITE_CONTEXT_ID ;
    delete []  in_BYPASS_WRITE_GPR_VAL    ;
    delete []  in_BYPASS_WRITE_GPR_NUM_REG;
    delete []  in_BYPASS_WRITE_GPR_DATA   ;
    delete []  in_BYPASS_WRITE_SPR_VAL    ;
    delete []  in_BYPASS_WRITE_SPR_NUM_REG;
    delete []  in_BYPASS_WRITE_SPR_DATA   ;
    
    delete []  in_BYPASS_MEMORY_VAL       ;
    delete []  in_BYPASS_MEMORY_CONTEXT_ID;
    delete []  in_BYPASS_MEMORY_NUM_REG   ;
    delete []  in_BYPASS_MEMORY_DATA      ;
    
    // ~~~~~[ internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    delete []  internal_RESERVATION_STATION_OUT_VAL;

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

    delete    _component;
    delete    _queue_control;
    delete [] _queue        ;

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

}; // end namespace reservation_station
}; // end namespace read_unit
}; // end namespace multi_read_unit
}; // end namespace execute_loop
}; // end namespace multi_execute_loop
}; // end namespace core

}; // end namespace behavioural
}; // end namespace morpheo              
#endif
