[60] | 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_Execute_loop/Execute_loop/Register_unit/include/Parameters.h" |
---|
| 9 | #include "Behavioural/include/XML.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_execute_loop { |
---|
| 15 | namespace execute_loop { |
---|
| 16 | namespace register_unit { |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "Register_unit::print" |
---|
[75] | 21 | std::string Parameters::print (uint32_t depth) |
---|
[60] | 22 | { |
---|
| 23 | log_printf(FUNC,Register_unit,FUNCTION,"Begin"); |
---|
| 24 | |
---|
| 25 | XML xml ("register_unit"); |
---|
| 26 | |
---|
| 27 | xml.balise_open("register_unit"); |
---|
| 28 | xml. singleton_begin("nb_ooo_engine "); xml.attribut("value",toString(_nb_ooo_engine )); xml.singleton_end(); |
---|
| 29 | xml. singleton_begin("size_general_data "); xml.attribut("value",toString(_size_general_data )); xml.singleton_end(); |
---|
| 30 | xml. singleton_begin("size_special_data "); xml.attribut("value",toString(_size_special_data )); xml.singleton_end(); |
---|
| 31 | xml. singleton_begin("nb_gpr_read "); xml.attribut("value",toString(_nb_gpr_read )); xml.singleton_end(); |
---|
| 32 | xml. singleton_begin("nb_gpr_write "); xml.attribut("value",toString(_nb_gpr_write )); xml.singleton_end(); |
---|
| 33 | xml. singleton_begin("nb_gpr_bank "); xml.attribut("value",toString(_nb_gpr_bank )); xml.singleton_end(); |
---|
| 34 | xml. singleton_begin("nb_gpr_port_read_by_bank "); xml.attribut("value",toString(_nb_gpr_port_read_by_bank )); xml.singleton_end(); |
---|
| 35 | xml. singleton_begin("nb_gpr_port_write_by_bank"); xml.attribut("value",toString(_nb_gpr_port_write_by_bank)); xml.singleton_end(); |
---|
| 36 | xml. singleton_begin("nb_spr_read "); xml.attribut("value",toString(_nb_spr_read )); xml.singleton_end(); |
---|
| 37 | xml. singleton_begin("nb_spr_write "); xml.attribut("value",toString(_nb_spr_write )); xml.singleton_end(); |
---|
| 38 | xml. singleton_begin("nb_spr_bank "); xml.attribut("value",toString(_nb_spr_bank )); xml.singleton_end(); |
---|
| 39 | xml. singleton_begin("nb_spr_port_read_by_bank "); xml.attribut("value",toString(_nb_spr_port_read_by_bank )); xml.singleton_end(); |
---|
| 40 | xml. singleton_begin("nb_spr_port_write_by_bank"); xml.attribut("value",toString(_nb_spr_port_write_by_bank)); xml.singleton_end(); |
---|
| 41 | |
---|
| 42 | xml. balise_open("multi_ooo_engine"); |
---|
| 43 | for (uint32_t i=0; i<_nb_ooo_engine; i++) |
---|
| 44 | { |
---|
| 45 | xml. balise_open_begin("ooo_engine"); |
---|
| 46 | xml. attribut("id", toString(i)); |
---|
| 47 | xml. balise_open_end(); |
---|
| 48 | xml. singleton_begin("nb_general_register"); xml.attribut("value",toString(_nb_general_register [i])); xml.singleton_end(); |
---|
| 49 | xml. singleton_begin("nb_special_register"); xml.attribut("value",toString(_nb_special_register [i])); xml.singleton_end(); |
---|
| 50 | xml. singleton_begin("nb_inst_insert_rob "); xml.attribut("value",toString(_nb_inst_insert_rob [i])); xml.singleton_end(); |
---|
| 51 | xml. singleton_begin("nb_inst_retire_rob "); xml.attribut("value",toString(_nb_inst_retire_rob [i])); xml.singleton_end(); |
---|
| 52 | xml. balise_close(); |
---|
| 53 | } |
---|
| 54 | xml. balise_close(); |
---|
| 55 | |
---|
| 56 | // xml. text (_param_glue->print(depth+1)); |
---|
| 57 | // for (uint32_t i=0; i<_nb_ooo_engine; i++) |
---|
| 58 | // { |
---|
| 59 | // xml. text (_param_gpr [i]->print(depth+1)); |
---|
| 60 | // xml. text (_param_gpr_status [i]->print(depth+1)); |
---|
| 61 | // xml. text (_param_spr [i]->print(depth+1)); |
---|
| 62 | // xml. text (_param_spr_status [i]->print(depth+1)); |
---|
| 63 | // } |
---|
| 64 | |
---|
| 65 | xml.balise_close(); |
---|
| 66 | |
---|
| 67 | log_printf(FUNC,Register_unit,FUNCTION,"End"); |
---|
| 68 | |
---|
| 69 | return xml.get_body(depth); |
---|
| 70 | }; |
---|
| 71 | |
---|
| 72 | #undef FUNCTION |
---|
| 73 | #define FUNCTION "Register_unit::operator<<" |
---|
[75] | 74 | std::ostream& operator<< (std::ostream& output_stream , |
---|
| 75 | morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Parameters & x) |
---|
[60] | 76 | { |
---|
| 77 | log_printf(FUNC,Register_unit,FUNCTION,"Begin"); |
---|
| 78 | |
---|
| 79 | output_stream << x.print(0); |
---|
| 80 | |
---|
| 81 | log_printf(FUNC,Register_unit,FUNCTION,"End"); |
---|
| 82 | |
---|
| 83 | return output_stream; |
---|
| 84 | }; |
---|
| 85 | |
---|
| 86 | }; // end namespace register_unit |
---|
| 87 | }; // end namespace execute_loop |
---|
| 88 | }; // end namespace multi_execute_loop |
---|
| 89 | }; // end namespace core |
---|
| 90 | |
---|
| 91 | }; // end namespace behavioural |
---|
| 92 | }; // end namespace morpheo |
---|