#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_branch_target_buffer_branch_target_buffer_register_Parameters_h
#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_branch_target_buffer_branch_target_buffer_register_Parameters_h

/*
 * $Id: Parameters.h 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Common/include/Debug.h"
#include "Behavioural/include/Parameters.h"
#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Types.h"

namespace morpheo {
namespace behavioural {
namespace core {
namespace multi_front_end {
namespace front_end {
namespace prediction_unit {
namespace branch_target_buffer {
namespace branch_target_buffer_register {

#define PERCENT_ACCURATE_LIMIT 25

  class Parameters : public morpheo::behavioural::Parameters
  {
    //-----[ fields ]------------------------------------------------------------
  public : uint32_t   _nb_context     ;
  public : uint32_t * _nb_instruction ;
  public : uint32_t   _size_buffer    ;
  public : uint32_t   _associativity  ;
  public : uint32_t   _size_address   ;
  public : uint32_t   _size_counter   ;
  public : uint32_t   _nb_inst_predict;
  public : uint32_t   _nb_inst_decod  ;
  public : uint32_t   _nb_inst_update ;

  public : uint32_t   _size_bank      ;
  public : uint32_t   _size_context_id;
  public : uint32_t   _size_victim    ;

  public : bool       _have_port_context_id;
  public : bool       _have_port_victim    ;

  public : Tcounter_t _accurate_max          ;
  public : Tcounter_t _accurate_limit        ;
  public : Tcounter_t _first_accurate_if_hit ;
  public : Tcounter_t _first_accurate_if_miss;


  public : Tgeneral_data_t _mask_offset ;
  public : Tgeneral_data_t _shift_offset;
  public : Tgeneral_data_t _mask_bank ;
  public : Tgeneral_data_t _shift_bank;
  public : Tgeneral_data_t _shift_tag ;

    //-----[ methods ]-----------------------------------------------------------
  public : Parameters  (uint32_t   nb_context     ,
			uint32_t * nb_instruction ,
			uint32_t   size_buffer    ,
			uint32_t   associativity  ,
			uint32_t   size_address   ,
			uint32_t   size_counter   ,
			uint32_t   nb_inst_predict,
			uint32_t   nb_inst_decod  ,
			uint32_t   nb_inst_update );
//   public : Parameters  (Parameters & param) ;
  public : ~Parameters () ;

  public :        Parameters_test msg_error  (void);

  public :        std::string     print      (uint32_t depth);
  public : friend std::ostream&   operator<< (std::ostream& output_stream,
					    morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_register::Parameters & x);
  };

}; // end namespace branch_target_buffer_register
}; // end namespace branch_target_buffer
}; // end namespace prediction_unit
}; // end namespace front_end
}; // end namespace multi_front_end
}; // end namespace core

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

#endif
