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

#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h"
#include "Behavioural/include/XML.h"
using namespace std;

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


  string Parameters::print (uint32_t depth)
  {
    log_printf(FUNC,Meta_Predictor_Glue,"print","Begin");

    XML xml ("meta_predictor_glue");

    xml.balise_open("meta_predictor_glue");

    xml.  singleton_begin("have_meta_predictor               ");               
    xml.    attribut("value",toString(_have_meta_predictor               ));
    xml.  singleton_end();

    xml.  singleton_begin("predictor_0_have_bht              ");        	
    xml.    attribut("value",toString(_predictor_0_have_bht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_0_bht_size_shifter      ");	
    xml.    attribut("value",toString(_predictor_0_bht_size_shifter      ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_0_have_pht              ");              
    xml.    attribut("value",toString(_predictor_0_have_pht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_0_pht_size_counter      ");      
    xml.    attribut("value",toString(_predictor_0_pht_size_counter      ));
    xml.  singleton_end();

    xml.  singleton_begin("predictor_1_have_bht              ");        	
    xml.    attribut("value",toString(_predictor_1_have_bht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_1_bht_size_shifter      ");	
    xml.    attribut("value",toString(_predictor_1_bht_size_shifter      ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_1_have_pht              ");              
    xml.    attribut("value",toString(_predictor_1_have_pht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_1_pht_size_counter      ");      
    xml.    attribut("value",toString(_predictor_1_pht_size_counter      ));
    xml.  singleton_end();
    
    xml.  singleton_begin("predictor_2_have_bht              ");        	
    xml.    attribut("value",toString(_predictor_2_have_bht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_2_bht_size_shifter      ");	
    xml.    attribut("value",toString(_predictor_2_bht_size_shifter      ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_2_have_pht              ");              
    xml.    attribut("value",toString(_predictor_2_have_pht              ));
    xml.  singleton_end();
    xml.  singleton_begin("predictor_2_pht_size_counter      ");      
    xml.    attribut("value",toString(_predictor_2_pht_size_counter      ));
    xml.  singleton_end();
        
    xml.  singleton_begin("nb_prediction                     ");                     
    xml.    attribut("value",toString(_nb_prediction                     ));
    xml.  singleton_end();
    xml.  singleton_begin("nb_branch_complete                ");                
    xml.    attribut("value",toString(_nb_branch_complete                ));
    xml.  singleton_end();

    xml.balise_close();

    log_printf(FUNC,Meta_Predictor_Glue,"print","End");
    
    return xml.get_body(depth);
  };

  ostream& operator<< (ostream& output_stream ,
		       morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::meta_predictor_glue::Parameters & x)
  {
    output_stream << x.print(0);
    
    return output_stream;
  };

}; // end namespace meta_predictor_glue
}; // end namespace meta_predictor
}; // end namespace predictor
}; // end namespace stage_1_ifetch

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