[2] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 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/Pattern_History_Table/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 | namespace pattern_history_table { |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | string Parameters::print (uint32_t depth) |
---|
| 26 | { |
---|
| 27 | log_printf(FUNC,Pattern_History_Table,"print","Begin"); |
---|
| 28 | |
---|
| 29 | string tab = string(depth,'\t'); |
---|
| 30 | ostringstream msg; |
---|
| 31 | msg << tab << "<pattern_history_table>" << endl |
---|
| 32 | << tab << "\t<size_counter value=\"" << _size_counter << "\" />" << endl |
---|
| 33 | << tab << "\t<nb_counter value=\"" << _nb_counter << "\" />" << endl |
---|
| 34 | << tab << "\t<nb_prediction value=\"" << _nb_prediction << "\" />" << endl |
---|
| 35 | << tab << "\t<nb_branch_complete value=\"" << _nb_branch_complete << "\" />" << endl; |
---|
| 36 | msg << _param_counter ->print(depth+1); |
---|
| 37 | msg << _param_registerfile->print(depth+1); |
---|
| 38 | msg << tab << "</pattern_history_table>" << endl; |
---|
| 39 | |
---|
| 40 | log_printf(FUNC,Pattern_History_Table,"print","End"); |
---|
| 41 | |
---|
| 42 | return msg.str(); |
---|
| 43 | }; |
---|
| 44 | |
---|
| 45 | ostream& operator<< (ostream& output_stream , |
---|
[48] | 46 | morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters & x) |
---|
[2] | 47 | { |
---|
| 48 | output_stream << x.print(0); |
---|
| 49 | |
---|
| 50 | return output_stream; |
---|
| 51 | }; |
---|
| 52 | |
---|
| 53 | }; // end namespace pattern_history_table |
---|
| 54 | }; // end namespace two_level_branch_predictor |
---|
| 55 | }; // end namespace meta_predictor |
---|
| 56 | |
---|
[48] | 57 | }; // end namespace core |
---|
| 58 | }; // end namespace multi_front_end |
---|
| 59 | }; // end namespace front_end |
---|
| 60 | }; // end namespace prediction_unit |
---|
| 61 | }; // end namespace direction |
---|
| 62 | |
---|
| 63 | |
---|
[2] | 64 | }; // end namespace behavioural |
---|
| 65 | }; // end namespace morpheo |
---|