[81] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/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 prediction_unit { |
---|
| 17 | namespace prediction_unit_glue { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Prediction_unit_Glue::print" |
---|
| 22 | std::string Parameters::print (uint32_t depth) |
---|
| 23 | { |
---|
| 24 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); |
---|
| 25 | |
---|
| 26 | XML xml ("prediction_unit_glue"); |
---|
| 27 | |
---|
| 28 | xml.balise_open("prediction_unit_glue"); |
---|
[82] | 29 | xml.singleton_begin("nb_context "); xml.attribut("value",toString(_nb_context )); xml.singleton_end(); |
---|
| 30 | xml.singleton_begin("nb_decod_unit "); xml.attribut("value",toString(_nb_decod_unit )); xml.singleton_end(); |
---|
| 31 | // xml.singleton_begin("nb_ooo_engine "); xml.attribut("value",toString(_nb_ooo_engine )); xml.singleton_end(); |
---|
[88] | 32 | // xml.singleton_begin("size_address "); xml.attribut("value",toString(_size_address )); xml.singleton_end(); |
---|
[82] | 33 | xml.singleton_begin("nb_inst_branch_predict"); xml.attribut("value",toString(_nb_inst_branch_predict)); xml.singleton_end(); |
---|
| 34 | xml.singleton_begin("nb_inst_branch_decod "); xml.attribut("value",toString(_nb_inst_branch_decod )); xml.singleton_end(); |
---|
| 35 | xml.singleton_begin("nb_inst_branch_update "); xml.attribut("value",toString(_nb_inst_branch_update )); xml.singleton_end(); |
---|
| 36 | |
---|
| 37 | // xml.singleton_begin("nb_inst_decod "); xml.attribut("value",toString(_nb_inst_decod )); xml.singleton_end(); |
---|
| 38 | // xml.singleton_begin("nb_inst_update "); xml.attribut("value",toString(_nb_inst_update )); xml.singleton_end(); |
---|
[81] | 39 | for (uint32_t i=0;i<_nb_context; i++) |
---|
| 40 | { |
---|
| 41 | xml. balise_open_begin("component"); |
---|
| 42 | xml. attribut("type","context"); |
---|
| 43 | xml. attribut("id" ,toString(i)); |
---|
| 44 | xml. balise_open_end(); |
---|
[88] | 45 | xml. singleton_begin("nb_instruction "); xml.attribut("value",toString(_nb_instruction [i])); xml.singleton_end(); |
---|
| 46 | // xml. singleton_begin("size_depth "); xml.attribut("value",toString(_size_depth [i])); xml.singleton_end(); |
---|
[81] | 47 | xml. balise_close(); |
---|
| 48 | } |
---|
[82] | 49 | for (uint32_t i=0;i<_nb_decod_unit; i++) |
---|
| 50 | { |
---|
| 51 | xml. balise_open_begin("component"); |
---|
| 52 | xml. attribut("type","decod_unit"); |
---|
| 53 | xml. attribut("id" ,toString(i)); |
---|
| 54 | xml. balise_open_end(); |
---|
[88] | 55 | xml. singleton_begin("nb_inst_decod "); xml.attribut("value",toString(_nb_inst_decod [i])); xml.singleton_end(); |
---|
[82] | 56 | xml. balise_close(); |
---|
| 57 | } |
---|
| 58 | // for (uint32_t i=0;i<_nb_ooo_engine; i++) |
---|
| 59 | // { |
---|
| 60 | // xml. balise_open_begin("component"); |
---|
| 61 | // xml. attribut("type","ooo_engine"); |
---|
| 62 | // xml. attribut("id" ,toString(i)); |
---|
| 63 | // xml. balise_open_end(); |
---|
[88] | 64 | // xml. singleton_begin("nb_inst_update "); xml.attribut("value",toString(_nb_inst_update [i])); xml.singleton_end(); |
---|
[82] | 65 | // xml. balise_close(); |
---|
| 66 | // } |
---|
| 67 | |
---|
[81] | 68 | xml.balise_close(); |
---|
| 69 | |
---|
| 70 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End"); |
---|
| 71 | |
---|
| 72 | return xml.get_body(depth); |
---|
| 73 | }; |
---|
| 74 | |
---|
| 75 | #undef FUNCTION |
---|
| 76 | #define FUNCTION "Prediction_unit_Glue::operator<<" |
---|
| 77 | std::ostream& operator<< (std::ostream& output_stream , |
---|
[88] | 78 | morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Parameters & x) |
---|
[81] | 79 | { |
---|
| 80 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); |
---|
| 81 | |
---|
| 82 | output_stream << x.print(0); |
---|
| 83 | |
---|
| 84 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End"); |
---|
| 85 | |
---|
| 86 | return output_stream; |
---|
| 87 | }; |
---|
| 88 | |
---|
| 89 | }; // end namespace prediction_unit_glue |
---|
| 90 | }; // end namespace prediction_unit |
---|
| 91 | }; // end namespace front_end |
---|
| 92 | }; // end namespace multi_front_end |
---|
| 93 | }; // end namespace core |
---|
| 94 | |
---|
| 95 | }; // end namespace behavioural |
---|
| 96 | }; // end namespace morpheo |
---|