1 | /* |
---|
2 | * $Id: Parameters_print.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h" |
---|
9 | #include <sstream> |
---|
10 | using namespace std; |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | namespace core { |
---|
15 | namespace multi_front_end { |
---|
16 | namespace front_end { |
---|
17 | namespace prediction_unit { |
---|
18 | namespace direction { |
---|
19 | |
---|
20 | namespace meta_predictor { |
---|
21 | namespace two_level_branch_predictor { |
---|
22 | namespace branch_history_table { |
---|
23 | |
---|
24 | |
---|
25 | string Parameters::print (uint32_t depth) |
---|
26 | { |
---|
27 | string tab = string(depth,'\t'); |
---|
28 | ostringstream msg; |
---|
29 | msg << tab << "<branch_history_table>" << endl |
---|
30 | << tab << "\t<size_shifter value=\"" << _size_shifter << "\" />" << endl |
---|
31 | << tab << "\t<nb_shifter value=\"" << _nb_shifter << "\" />" << endl |
---|
32 | << tab << "\t<nb_prediction value=\"" << _nb_prediction << "\" />" << endl |
---|
33 | << tab << "\t<nb_branch_complete value=\"" << _nb_branch_complete << "\" />" << endl; |
---|
34 | msg << _param_shifter ->print(depth+1); |
---|
35 | msg << _param_registerfile->print(depth+1); |
---|
36 | msg << tab << "</branch_history_table>" << endl; |
---|
37 | |
---|
38 | return msg.str(); |
---|
39 | }; |
---|
40 | |
---|
41 | ostream& operator<< (ostream& output_stream , |
---|
42 | morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table::Parameters & x) |
---|
43 | { |
---|
44 | output_stream << x.print(0); |
---|
45 | |
---|
46 | return output_stream; |
---|
47 | }; |
---|
48 | |
---|
49 | }; // end namespace branch_history_table |
---|
50 | }; // end namespace two_level_branch_predictor |
---|
51 | }; // end namespace meta_predictor |
---|
52 | |
---|
53 | }; // end namespace core |
---|
54 | }; // end namespace multi_front_end |
---|
55 | }; // end namespace front_end |
---|
56 | }; // end namespace prediction_unit |
---|
57 | }; // end namespace direction |
---|
58 | |
---|
59 | |
---|
60 | }; // end namespace behavioural |
---|
61 | }; // end namespace morpheo |
---|