#ifdef SYSTEMC
/*
 * $Id: Meta_Predictor_Glue_deallocation.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_front_end {
namespace front_end {
namespace prediction_unit {
namespace direction {

namespace meta_predictor {
namespace meta_predictor_glue {


  void Meta_Predictor_Glue::deallocation (void)
  {
    log_printf(FUNC,Meta_Predictor_Glue,"deallocation","Begin");

    delete     in_CLOCK;
    delete     in_NRESET;

    if (_param._have_meta_predictor)
    {
    delete []   in_PREDICT_PREDICTOR_0_ACK;
    delete []   in_PREDICT_PREDICTOR_1_ACK;
    }			           
    delete []   in_PREDICT_PREDICTOR_2_ACK;
    delete []  out_PREDICT_ACK            ;
    if (_param._have_meta_predictor)
    {
    if (_param._predictor_0_have_bht)
    delete []   in_PREDICT_PREDICTOR_0_BHT_HISTORY;
    if (_param._predictor_0_have_pht)
    delete []   in_PREDICT_PREDICTOR_0_PHT_HISTORY;
    if (_param._predictor_1_have_bht)
    delete []   in_PREDICT_PREDICTOR_1_BHT_HISTORY;
    if (_param._predictor_1_have_pht)
    delete []   in_PREDICT_PREDICTOR_1_PHT_HISTORY ;
    }
    if (_param._predictor_2_have_bht)
    delete []   in_PREDICT_PREDICTOR_2_BHT_HISTORY ;
    if (_param._predictor_2_have_pht)
    delete []   in_PREDICT_PREDICTOR_2_PHT_HISTORY ;
    delete []  out_PREDICT_HISTORY                 ;
    delete []  out_PREDICT_DIRECTION               ;

    if (_param._have_meta_predictor)
    {
    delete []   in_BRANCH_COMPLETE_VAL                     ;
    delete []  out_BRANCH_COMPLETE_PREDICTOR_2_VAL         ;

    delete []   in_BRANCH_COMPLETE_PREDICTOR_0_ACK         ;
    delete []   in_BRANCH_COMPLETE_PREDICTOR_1_ACK         ;
    }			           
    delete []   in_BRANCH_COMPLETE_PREDICTOR_2_ACK         ;
    delete []  out_BRANCH_COMPLETE_ACK                     ;
    if (_param._have_meta_predictor)
    {
    if (_param._predictor_0_have_bht)
    delete []  out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY ;
    if (_param._predictor_0_have_pht)
    delete []  out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY ;
    if (_param._predictor_1_have_bht)
    delete []  out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY ;
    if (_param._predictor_1_have_pht)
    delete []  out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY ;
    }
    if (_param._predictor_2_have_bht)
    delete []  out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY ;
    if (_param._predictor_2_have_pht)
    delete []  out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY ;
    delete []   in_BRANCH_COMPLETE_HISTORY                 ;
    if (_param._have_meta_predictor)
      {
    delete []   in_BRANCH_COMPLETE_DIRECTION               ;
    delete []  out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   ;
      }
    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
    delete _component;

    log_printf(FUNC,Meta_Predictor_Glue,"deallocation","End");
  };

}; // end namespace meta_predictor_glue
}; // end namespace meta_predictor

}; // end namespace core
}; // end namespace multi_front_end
}; // end namespace front_end
}; // end namespace prediction_unit
}; // end namespace direction


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