[78] | 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/Prediction_unit/Update_Prediction_Table/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 update_prediction_table { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Update_Prediction_Table::print" |
---|
| 22 | std::string Parameters::print (uint32_t depth) |
---|
| 23 | { |
---|
| 24 | log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin"); |
---|
| 25 | |
---|
| 26 | XML xml ("update_prediction_table"); |
---|
| 27 | |
---|
| 28 | xml.balise_open("update_prediction_table"); |
---|
[81] | 29 | xml.singleton_begin("nb_context "); xml.attribut("value",toString(_nb_context )); xml.singleton_end(); |
---|
[88] | 30 | // xml.singleton_begin("size_address "); xml.attribut("value",toString(_size_address )); xml.singleton_end(); |
---|
[81] | 31 | xml.singleton_begin("nb_inst_predict "); xml.attribut("value",toString(_nb_inst_predict )); xml.singleton_end(); |
---|
| 32 | xml.singleton_begin("nb_inst_decod "); xml.attribut("value",toString(_nb_inst_decod )); xml.singleton_end(); |
---|
| 33 | xml.singleton_begin("nb_inst_branch_complete"); xml.attribut("value",toString(_nb_inst_branch_complete)); xml.singleton_end(); |
---|
| 34 | xml.singleton_begin("nb_inst_update "); xml.attribut("value",toString(_nb_inst_update )); xml.singleton_end(); |
---|
| 35 | xml.singleton_begin("size_history "); xml.attribut("value",toString(_size_history )); xml.singleton_end(); |
---|
| 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(); |
---|
[88] | 42 | xml. singleton_begin("size_upt_queue "); xml.attribut("value",toString(_size_upt_queue [i])); xml.singleton_end(); |
---|
| 43 | xml. singleton_begin("size_ufpt_queue "); xml.attribut("value",toString(_size_ufpt_queue [i])); xml.singleton_end(); |
---|
[81] | 44 | xml. singleton_begin("size_ras_index "); xml.attribut("value",toString(_size_ras_index [i])); xml.singleton_end(); |
---|
| 45 | xml. balise_close(); |
---|
| 46 | } |
---|
[78] | 47 | xml.balise_close(); |
---|
| 48 | |
---|
| 49 | log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); |
---|
| 50 | |
---|
| 51 | return xml.get_body(depth); |
---|
| 52 | }; |
---|
| 53 | |
---|
| 54 | #undef FUNCTION |
---|
| 55 | #define FUNCTION "Update_Prediction_Table::operator<<" |
---|
| 56 | std::ostream& operator<< (std::ostream& output_stream , |
---|
| 57 | morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Parameters & x) |
---|
| 58 | { |
---|
| 59 | log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin"); |
---|
| 60 | |
---|
| 61 | output_stream << x.print(0); |
---|
| 62 | |
---|
| 63 | log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); |
---|
| 64 | |
---|
| 65 | return output_stream; |
---|
| 66 | }; |
---|
| 67 | |
---|
| 68 | }; // end namespace update_prediction_table |
---|
| 69 | }; // end namespace prediction_unit |
---|
| 70 | }; // end namespace front_end |
---|
| 71 | }; // end namespace multi_front_end |
---|
| 72 | }; // end namespace core |
---|
| 73 | |
---|
| 74 | }; // end namespace behavioural |
---|
| 75 | }; // end namespace morpheo |
---|