[83] | 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_Front_end/Front_end/Decod_unit/include/Parameters.h" |
---|
| 9 | #include "Behavioural/include/XML.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_front_end { |
---|
| 15 | namespace front_end { |
---|
| 16 | namespace decod_unit { |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "Decod_unit::print" |
---|
| 21 | std::string Parameters::print (uint32_t depth) |
---|
| 22 | { |
---|
| 23 | log_begin(Decod_unit,FUNCTION); |
---|
| 24 | |
---|
| 25 | XML xml ("decod_unit"); |
---|
| 26 | |
---|
| 27 | xml.balise_open("decod_unit"); |
---|
| 28 | xml.singleton_begin("nb_context "); xml.attribut("value",toString(_nb_context )); xml.singleton_end(); |
---|
| 29 | xml.singleton_begin("nb_inst_decod "); xml.attribut("value",toString(_nb_inst_decod )); xml.singleton_end(); |
---|
| 30 | xml.singleton_begin("size_queue "); xml.attribut("value",toString(_size_queue )); xml.singleton_end(); |
---|
| 31 | xml.singleton_begin("size_general_data "); xml.attribut("value",toString(_size_general_data )); xml.singleton_end(); |
---|
| 32 | xml.singleton_begin("nb_context_select "); xml.attribut("value",toString(_nb_context_select )); xml.singleton_end(); |
---|
| 33 | xml.singleton_begin("select_priority "); xml.attribut("value",toString(_select_priority )); xml.singleton_end(); |
---|
| 34 | xml.singleton_begin("select_load_balancing "); xml.attribut("value",toString(_select_load_balancing )); xml.singleton_end(); |
---|
| 35 | |
---|
| 36 | for (uint32_t i=0;i<_nb_context; i++) |
---|
| 37 | { |
---|
| 38 | xml. balise_open_begin("component"); |
---|
| 39 | xml. attribut("type","context"); |
---|
| 40 | xml. attribut("id" ,toString(i)); |
---|
| 41 | xml. balise_open_end(); |
---|
| 42 | xml. singleton_begin("nb_inst_fetch "); xml.attribut("value",toString(_nb_inst_fetch [i])); xml.singleton_end(); |
---|
| 43 | xml. singleton_begin("nb_branch_speculated "); xml.attribut("value",toString(_nb_branch_speculated [i])); xml.singleton_end(); |
---|
[88] | 44 | // xml. singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction[i])); xml.singleton_end(); |
---|
[83] | 45 | xml. balise_close(); |
---|
| 46 | } |
---|
| 47 | xml.balise_close(); |
---|
| 48 | |
---|
| 49 | log_end(Decod_unit,FUNCTION); |
---|
| 50 | |
---|
| 51 | return xml.get_body(depth); |
---|
| 52 | }; |
---|
| 53 | |
---|
| 54 | #undef FUNCTION |
---|
| 55 | #define FUNCTION "Decod_unit::operator<<" |
---|
| 56 | std::ostream& operator<< (std::ostream& output_stream , |
---|
| 57 | morpheo::behavioural::core::multi_front_end::front_end::decod_unit::Parameters & x) |
---|
| 58 | { |
---|
| 59 | log_begin(Decod_unit,FUNCTION); |
---|
| 60 | |
---|
| 61 | output_stream << x.print(0); |
---|
| 62 | |
---|
| 63 | log_end(Decod_unit,FUNCTION); |
---|
| 64 | |
---|
| 65 | return output_stream; |
---|
| 66 | }; |
---|
| 67 | |
---|
| 68 | }; // end namespace decod_unit |
---|
| 69 | }; // end namespace front_end |
---|
| 70 | }; // end namespace multi_front_end |
---|
| 71 | }; // end namespace core |
---|
| 72 | |
---|
| 73 | }; // end namespace behavioural |
---|
| 74 | }; // end namespace morpheo |
---|