#ifndef morpheo_behavioural_stage_1_ifetch_predictor_meta_predictor_Parameters_h
#define morpheo_behavioural_stage_1_ifetch_predictor_meta_predictor_Parameters_h

/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Common/include/Debug.h"
#include "Behavioural/include/Parameters.h"
#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h"
#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h"
#include <math.h>

namespace morpheo {
namespace behavioural {
namespace stage_1_ifetch {
namespace predictor {
namespace meta_predictor {

  class Parameters : public morpheo::behavioural::Parameters
  {
    //-----[ fields ]------------------------------------------------------------
  public : const bool     _have_meta_predictor               ;

  public : const bool     _predictor_0_have_bht              ;
  public : const uint32_t _predictor_0_bht_size_shifter      ;
  public : const uint32_t _predictor_0_bht_nb_shifter        ;
  public : const bool     _predictor_0_have_pht              ;
  public : const uint32_t _predictor_0_pht_size_counter      ;
  public : const uint32_t _predictor_0_pht_nb_counter        ;
  public : const uint32_t _predictor_0_pht_size_address_share;

  public : const bool     _predictor_1_have_bht              ;
  public : const uint32_t _predictor_1_bht_size_shifter      ;
  public : const uint32_t _predictor_1_bht_nb_shifter        ;
  public : const bool     _predictor_1_have_pht              ;
  public : const uint32_t _predictor_1_pht_size_counter      ;
  public : const uint32_t _predictor_1_pht_nb_counter        ;
  public : const uint32_t _predictor_1_pht_size_address_share;

  public : const bool     _predictor_2_have_bht              ;
  public : const uint32_t _predictor_2_bht_size_shifter      ;
  public : const uint32_t _predictor_2_bht_nb_shifter        ;
  public : const bool     _predictor_2_have_pht              ;
  public : const uint32_t _predictor_2_pht_size_counter      ;
  public : const uint32_t _predictor_2_pht_nb_counter        ;
  public : const uint32_t _predictor_2_pht_size_address_share;

  public : const uint32_t _size_address                      ;
  public : const uint32_t _nb_prediction                     ;
  public : const uint32_t _nb_branch_complete                ;

  public : const uint32_t _size_history                      ;

  public :       morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Parameters * _param_two_level_branch_predictor_0;
  public :       morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Parameters * _param_two_level_branch_predictor_1;
  public :       morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::Parameters * _param_two_level_branch_predictor_2;
  public :       morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::meta_predictor_glue::Parameters        * _param_meta_predictor_glue;

    //-----[ methods ]-----------------------------------------------------------
  public : Parameters  (bool     have_meta_predictor               ,
			
			bool     predictor_0_have_bht              ,
			uint32_t predictor_0_bht_size_shifter      ,
			uint32_t predictor_0_bht_nb_shifter        ,
			bool     predictor_0_have_pht              ,
			uint32_t predictor_0_pht_size_counter      ,
			uint32_t predictor_0_pht_nb_counter        ,
			uint32_t predictor_0_pht_size_address_share,
			
			bool     predictor_1_have_bht              ,
			uint32_t predictor_1_bht_size_shifter      ,
			uint32_t predictor_1_bht_nb_shifter        ,
			bool     predictor_1_have_pht              ,
			uint32_t predictor_1_pht_size_counter      ,
			uint32_t predictor_1_pht_nb_counter        ,
			uint32_t predictor_1_pht_size_address_share,
			
			bool     predictor_2_have_bht              ,
			uint32_t predictor_2_bht_size_shifter      ,
			uint32_t predictor_2_bht_nb_shifter        ,
			bool     predictor_2_have_pht              ,
			uint32_t predictor_2_pht_size_counter      ,
			uint32_t predictor_2_pht_nb_counter        ,
			uint32_t predictor_2_pht_size_address_share,
			
			uint32_t size_address                      ,
			uint32_t nb_prediction                     ,
			uint32_t nb_branch_complete                );
  public : Parameters  (Parameters & param) ;
  public : ~Parameters () ;
    
  public : string msg_error (void);

  public :        string   print      (uint32_t depth);
  public : friend ostream& operator<< (ostream& output_stream,
				       morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::Parameters & x);
  };

}; // end namespace meta_predictor
}; // end namespace predictor
}; // end namespace stage_1_ifetch
}; // end namespace behavioural
}; // end namespace morpheo              

#endif
