[2] | 1 | /* |
---|
| 2 | * $Id: Parameters_print.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
[48] | 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h" |
---|
[2] | 9 | #include <sstream> |
---|
| 10 | using namespace std; |
---|
| 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
[48] | 14 | namespace core { |
---|
| 15 | namespace multi_front_end { |
---|
| 16 | namespace front_end { |
---|
| 17 | namespace prediction_unit { |
---|
| 18 | namespace direction { |
---|
| 19 | |
---|
[2] | 20 | namespace meta_predictor { |
---|
| 21 | namespace two_level_branch_predictor { |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | string Parameters::print (uint32_t depth) |
---|
| 25 | { |
---|
| 26 | log_printf(FUNC,Two_Level_Branch_Predictor,"print","Begin"); |
---|
| 27 | |
---|
| 28 | string tab = string(depth,'\t'); |
---|
| 29 | ostringstream msg; |
---|
| 30 | msg << tab << "<two_level_branch_predictor>" << endl |
---|
| 31 | << tab << "\t<have bht value=\"" << _have_bht << "\" /> <!-- size bht : " << _bht_size_shifter * _bht_nb_shifter << " bits -->" << endl |
---|
| 32 | << tab << "\t<bht_size_shifter value=\"" << _bht_size_shifter << "\" />" << endl |
---|
| 33 | << tab << "\t<bht_nb_shifter value=\"" << _bht_nb_shifter << "\" />" << endl |
---|
| 34 | << tab << "\t<have pht value=\"" << _have_pht << "\" /> <!-- size pht : " << _pht_size_counter * _pht_nb_counter << " bits -->" << endl |
---|
| 35 | << tab << "\t<pht_size_counter value=\"" << _pht_size_counter << "\" />" << endl |
---|
| 36 | << tab << "\t<pht_nb_counter value=\"" << _pht_nb_counter << "\" />" << endl |
---|
| 37 | << tab << "\t<pht_size_address_share value=\"" << _pht_size_address_share << "\" />" << endl |
---|
| 38 | << tab << "\t<size_address value=\"" << _size_address << "\" />" << endl |
---|
| 39 | << tab << "\t<nb_prediction value=\"" << _nb_prediction << "\" />" << endl |
---|
| 40 | << tab << "\t<nb_branch_complete value=\"" << _nb_branch_complete << "\" />" << endl; |
---|
| 41 | if (_have_bht) |
---|
| 42 | msg << _param_branch_history_table ->print(depth+1); |
---|
| 43 | if (_have_pht) |
---|
| 44 | msg << _param_pattern_history_table->print(depth+1); |
---|
| 45 | msg << _param_two_level_branch_predictor_glue->print(depth+1); |
---|
| 46 | msg << tab << "</two_level_branch_predictor>" << endl; |
---|
| 47 | |
---|
| 48 | log_printf(FUNC,Two_Level_Branch_Predictor,"print","End"); |
---|
| 49 | |
---|
| 50 | return msg.str(); |
---|
| 51 | }; |
---|
| 52 | |
---|
| 53 | ostream& operator<< (ostream& output_stream , |
---|
[48] | 54 | morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters & x) |
---|
[2] | 55 | { |
---|
| 56 | output_stream << x.print(0); |
---|
| 57 | |
---|
| 58 | return output_stream; |
---|
| 59 | }; |
---|
| 60 | |
---|
| 61 | }; // end namespace two_level_branch_predictor |
---|
| 62 | }; // end namespace meta_predictor |
---|
[48] | 63 | |
---|
| 64 | }; // end namespace core |
---|
| 65 | }; // end namespace multi_front_end |
---|
| 66 | }; // end namespace front_end |
---|
| 67 | }; // end namespace prediction_unit |
---|
| 68 | }; // end namespace direction |
---|
| 69 | |
---|
[2] | 70 | }; // end namespace behavioural |
---|
| 71 | }; // end namespace morpheo |
---|