1 | /* |
---|
2 | * $Id: Parameters_print.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Parameters.h" |
---|
9 | #include "Behavioural/include/XML.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_ooo_engine { |
---|
15 | namespace ooo_engine { |
---|
16 | namespace commit_unit { |
---|
17 | |
---|
18 | |
---|
19 | #undef FUNCTION |
---|
20 | #define FUNCTION "Commit_unit::print" |
---|
21 | std::string Parameters::print (uint32_t depth) |
---|
22 | { |
---|
23 | log_begin(Commit_unit,FUNCTION); |
---|
24 | |
---|
25 | std::string str = ""; |
---|
26 | |
---|
27 | str += toString(MSG_INFORMATION)+" * nb_front_end : "+toString<uint32_t >(_nb_front_end )+"\n"; |
---|
28 | for (uint32_t i=0; i<_nb_front_end; ++i) |
---|
29 | str += toString(MSG_INFORMATION)+" * nb_context ["+toString(i)+"] : "+toString<uint32_t >(_nb_context [i])+"\n";//[nb_front_end] |
---|
30 | str += toString(MSG_INFORMATION)+" * nb_rename_unit : "+toString<uint32_t >(_nb_rename_unit )+"\n"; |
---|
31 | str += toString(MSG_INFORMATION)+" * size_queue : "+toString<uint32_t >(_size_queue )+"\n"; |
---|
32 | str += toString(MSG_INFORMATION)+" * nb_bank : "+toString<uint32_t >(_nb_bank )+"\n"; |
---|
33 | for (uint32_t i=0; i<_nb_rename_unit; ++i) |
---|
34 | str += toString(MSG_INFORMATION)+" * nb_inst_insert ["+toString(i)+"] : "+toString<uint32_t >(_nb_inst_insert[i])+"\n";//[nb_rename_unit] |
---|
35 | for (uint32_t i=0; i<_nb_rename_unit; ++i) |
---|
36 | str += toString(MSG_INFORMATION)+" * nb_inst_retire ["+toString(i)+"] : "+toString<uint32_t >(_nb_inst_retire[i])+"\n";//[nb_rename_unit] |
---|
37 | str += toString(MSG_INFORMATION)+" * nb_inst_commit : "+toString<uint32_t >(_nb_inst_commit )+"\n"; |
---|
38 | str += toString(MSG_INFORMATION)+" * nb_inst_reexecute : "+toString<uint32_t >(_nb_inst_reexecute )+"\n"; |
---|
39 | str += toString(MSG_INFORMATION)+" * nb_inst_branch_complete : "+toString<uint32_t >(_nb_inst_branch_complete)+"\n"; |
---|
40 | for (uint32_t i=0; i<_nb_front_end; ++i) |
---|
41 | for (uint32_t j=0; j<_nb_context[i]; ++j) |
---|
42 | str += toString(MSG_INFORMATION)+" * nb_branch_speculated ["+toString(i)+"]["+toString(j)+"] : "+toString<uint32_t >(_nb_branch_speculated[i][j])+"\n";//[nb_front_end][nb_context] |
---|
43 | str += toString(MSG_INFORMATION)+" * size_general_data : "+toString<uint32_t >(_size_general_data )+"\n"; |
---|
44 | str += toString(MSG_INFORMATION)+" * size_store_queue_ptr : "+toString<uint32_t >(_size_store_queue_ptr )+"\n"; |
---|
45 | str += toString(MSG_INFORMATION)+" * size_load_queue_ptr : "+toString<uint32_t >(_size_load_queue_ptr )+"\n"; |
---|
46 | str += toString(MSG_INFORMATION)+" * size_general_register : "+toString<uint32_t >(_size_general_register )+"\n"; |
---|
47 | str += toString(MSG_INFORMATION)+" * size_special_register : "+toString<uint32_t >(_size_special_register )+"\n"; |
---|
48 | str += toString(MSG_INFORMATION)+" * priority : "+toString<Tpriority_t >(_priority )+"\n"; |
---|
49 | str += toString(MSG_INFORMATION)+" * load_balancing : "+toString<Tload_balancing_t>(_load_balancing )+"\n"; |
---|
50 | str += toString(MSG_INFORMATION)+" * nb_rename_unit_select : "+toString<uint32_t >(_nb_rename_unit_select )+"\n"; |
---|
51 | str += toString(MSG_INFORMATION)+" * nb_bank_access_commit : "+toString<uint32_t >(_nb_bank_access_commit )+"\n"; |
---|
52 | str += toString(MSG_INFORMATION)+" * retire_ooo : "+toString<retire_ooo_t >(_retire_ooo )+"\n"; |
---|
53 | |
---|
54 | /* |
---|
55 | XML xml ("commit_unit"); |
---|
56 | |
---|
57 | xml.balise_open("commit_unit"); |
---|
58 | xml.singleton_begin("nb_front_end "); xml.attribut("value",toString(_nb_front_end )); xml.singleton_end(); |
---|
59 | xml.singleton_begin("nb_rename_unit "); xml.attribut("value",toString(_nb_rename_unit )); xml.singleton_end(); |
---|
60 | xml.singleton_begin("size_queue "); xml.attribut("value",toString(_size_queue )); xml.singleton_end(); |
---|
61 | xml.singleton_begin("nb_bank "); xml.attribut("value",toString(_nb_bank )); xml.singleton_end(); |
---|
62 | xml.singleton_begin("nb_inst_reexecute "); xml.attribut("value",toString(_nb_inst_reexecute )); xml.singleton_end(); |
---|
63 | xml.singleton_begin("nb_inst_branch_complete"); xml.attribut("value",toString(_nb_inst_branch_complete)); xml.singleton_end(); |
---|
64 | xml.singleton_begin("nb_inst_commit "); xml.attribut("value",toString(_nb_inst_commit )); xml.singleton_end(); |
---|
65 | xml.singleton_begin("size_general_data "); xml.attribut("value",toString(_size_general_data )); xml.singleton_end(); |
---|
66 | xml.singleton_begin("size_store_queue_ptr "); xml.attribut("value",toString(_size_store_queue_ptr )); xml.singleton_end(); |
---|
67 | xml.singleton_begin("size_load_queue_ptr "); xml.attribut("value",toString(_size_load_queue_ptr )); xml.singleton_end(); |
---|
68 | xml.singleton_begin("size_general_register "); xml.attribut("value",toString(_size_general_register )); xml.singleton_end(); |
---|
69 | xml.singleton_begin("size_special_register "); xml.attribut("value",toString(_size_special_register )); xml.singleton_end(); |
---|
70 | xml.singleton_begin("priority "); xml.attribut("value",toString(_priority )); xml.singleton_end(); |
---|
71 | xml.singleton_begin("load_balancing "); xml.attribut("value",toString(_load_balancing )); xml.singleton_end(); |
---|
72 | xml.singleton_begin("nb_rename_unit_select "); xml.attribut("value",toString(_nb_rename_unit_select )); xml.singleton_end(); |
---|
73 | |
---|
74 | for (uint32_t i=0;i<_nb_front_end; i++) |
---|
75 | { |
---|
76 | xml. balise_open_begin("component"); |
---|
77 | xml. attribut("type","front_end"); |
---|
78 | xml. attribut("id" ,toString(i)); |
---|
79 | xml. balise_open_end(); |
---|
80 | xml.singleton_begin("nb_context "); xml.attribut("value",toString(_nb_context [i])); xml.singleton_end(); |
---|
81 | |
---|
82 | for (uint32_t j=0;j<_nb_context [i]; j++) |
---|
83 | { |
---|
84 | xml. balise_open_begin("component"); |
---|
85 | xml. attribut("type","context"); |
---|
86 | xml. attribut("id" ,toString(j)); |
---|
87 | xml. balise_open_end(); |
---|
88 | xml.singleton_begin("nb_branch_speculated "); xml.attribut("value",toString(_nb_branch_speculated [i][j])); xml.singleton_end(); |
---|
89 | xml. balise_close(); |
---|
90 | } |
---|
91 | |
---|
92 | xml. balise_close(); |
---|
93 | } |
---|
94 | |
---|
95 | for (uint32_t i=0;i<_nb_rename_unit; i++) |
---|
96 | { |
---|
97 | xml. balise_open_begin("component"); |
---|
98 | xml. attribut("type","rename_unit"); |
---|
99 | xml. attribut("id" ,toString(i)); |
---|
100 | xml. balise_open_end(); |
---|
101 | xml.singleton_begin("nb_inst_insert "); xml.attribut("value",toString(_nb_inst_insert [i])); xml.singleton_end(); |
---|
102 | xml.singleton_begin("nb_inst_retire "); xml.attribut("value",toString(_nb_inst_retire [i])); xml.singleton_end(); |
---|
103 | xml. balise_close(); |
---|
104 | } |
---|
105 | |
---|
106 | xml.balise_close(); |
---|
107 | */ |
---|
108 | log_end(Commit_unit,FUNCTION); |
---|
109 | |
---|
110 | |
---|
111 | // return xml.get_body(depth); |
---|
112 | return str; |
---|
113 | }; |
---|
114 | |
---|
115 | #undef FUNCTION |
---|
116 | #define FUNCTION "Commit_unit::operator<<" |
---|
117 | std::ostream& operator<< (std::ostream& output_stream , |
---|
118 | morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::Parameters & x) |
---|
119 | { |
---|
120 | log_begin(Commit_unit,FUNCTION); |
---|
121 | |
---|
122 | output_stream << x.print(0); |
---|
123 | |
---|
124 | log_end(Commit_unit,FUNCTION); |
---|
125 | |
---|
126 | return output_stream; |
---|
127 | }; |
---|
128 | |
---|
129 | }; // end namespace commit_unit |
---|
130 | }; // end namespace ooo_engine |
---|
131 | }; // end namespace multi_ooo_engine |
---|
132 | }; // end namespace core |
---|
133 | |
---|
134 | }; // end namespace behavioural |
---|
135 | }; // end namespace morpheo |
---|