[2] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h" |
---|
| 9 | #include <sstream> |
---|
| 10 | using namespace std; |
---|
| 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
| 14 | namespace stage_1_ifetch { |
---|
| 15 | namespace predictor { |
---|
| 16 | namespace meta_predictor { |
---|
| 17 | namespace two_level_branch_predictor { |
---|
| 18 | namespace pattern_history_table { |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | string Parameters::print (uint32_t depth) |
---|
| 22 | { |
---|
| 23 | log_printf(FUNC,Pattern_History_Table,"print","Begin"); |
---|
| 24 | |
---|
| 25 | string tab = string(depth,'\t'); |
---|
| 26 | ostringstream msg; |
---|
| 27 | msg << tab << "<pattern_history_table>" << endl |
---|
| 28 | << tab << "\t<size_counter value=\"" << _size_counter << "\" />" << endl |
---|
| 29 | << tab << "\t<nb_counter value=\"" << _nb_counter << "\" />" << endl |
---|
| 30 | << tab << "\t<nb_prediction value=\"" << _nb_prediction << "\" />" << endl |
---|
| 31 | << tab << "\t<nb_branch_complete value=\"" << _nb_branch_complete << "\" />" << endl; |
---|
| 32 | msg << _param_counter ->print(depth+1); |
---|
| 33 | msg << _param_registerfile->print(depth+1); |
---|
| 34 | msg << tab << "</pattern_history_table>" << endl; |
---|
| 35 | |
---|
| 36 | log_printf(FUNC,Pattern_History_Table,"print","End"); |
---|
| 37 | |
---|
| 38 | return msg.str(); |
---|
| 39 | }; |
---|
| 40 | |
---|
| 41 | ostream& operator<< (ostream& output_stream , |
---|
| 42 | morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters & x) |
---|
| 43 | { |
---|
| 44 | output_stream << x.print(0); |
---|
| 45 | |
---|
| 46 | return output_stream; |
---|
| 47 | }; |
---|
| 48 | |
---|
| 49 | }; // end namespace pattern_history_table |
---|
| 50 | }; // end namespace two_level_branch_predictor |
---|
| 51 | }; // end namespace meta_predictor |
---|
| 52 | }; // end namespace predictor |
---|
| 53 | }; // end namespace stage_1_ifetch |
---|
| 54 | |
---|
| 55 | }; // end namespace behavioural |
---|
| 56 | }; // end namespace morpheo |
---|