[88] | 1 | /* |
---|
| 2 | * $Id: Parameters_print.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Icache_Access/include/Parameters.h" |
---|
| 9 | #include "Behavioural/include/XML.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace icache_access { |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | #undef FUNCTION |
---|
| 18 | #define FUNCTION "Icache_Access::print" |
---|
| 19 | std::string Parameters::print (uint32_t depth) |
---|
| 20 | { |
---|
| 21 | log_begin(Icache_Access,FUNCTION); |
---|
| 22 | |
---|
| 23 | XML xml ("icache_access"); |
---|
| 24 | |
---|
| 25 | xml.balise_open("icache_access"); |
---|
| 26 | xml.singleton_begin("nb_front_end "); xml.attribut("value",toString(_nb_front_end )); xml.singleton_end(); |
---|
| 27 | xml.singleton_begin("nb_icache_port "); xml.attribut("value",toString(_nb_icache_port )); xml.singleton_end(); |
---|
| 28 | xml.singleton_begin("size_address "); xml.attribut("value",toString(_size_address )); xml.singleton_end(); |
---|
| 29 | xml.singleton_begin("priority "); xml.attribut("value",toString(_priority )); xml.singleton_end(); |
---|
| 30 | xml.singleton_begin("load_balancing "); xml.attribut("value",toString(_load_balancing )); xml.singleton_end(); |
---|
| 31 | for (uint32_t i=0;i<_nb_front_end; i++) |
---|
| 32 | { |
---|
| 33 | xml. balise_open_begin("component"); |
---|
| 34 | xml. attribut("type","front_end"); |
---|
| 35 | xml. attribut("id" ,toString(i)); |
---|
| 36 | xml. balise_open_end(); |
---|
| 37 | xml.singleton_begin("nb_context "); xml.attribut("value",toString(_nb_context [i])); xml.singleton_end(); |
---|
| 38 | |
---|
| 39 | for (uint32_t j=0;j<_nb_context [i]; j++) |
---|
| 40 | { |
---|
| 41 | xml. balise_open_begin("component"); |
---|
| 42 | xml. attribut("type","context"); |
---|
| 43 | xml. attribut("id" ,toString(j)); |
---|
| 44 | xml. balise_open_end(); |
---|
| 45 | xml.singleton_begin("nb_instruction "); xml.attribut("value",toString(_nb_instruction [i][j])); xml.singleton_end(); |
---|
| 46 | xml.singleton_begin("size_packet_id "); xml.attribut("value",toString(_size_packet_id [i][j])); xml.singleton_end(); |
---|
| 47 | xml.singleton_begin("table_routing "); xml.attribut("value",toString(_table_routing [i][j])); xml.singleton_end(); |
---|
| 48 | xml. balise_close(); |
---|
| 49 | } |
---|
| 50 | xml. balise_close(); |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | xml.balise_close(); |
---|
| 54 | |
---|
| 55 | log_end(Icache_Access,FUNCTION); |
---|
| 56 | |
---|
| 57 | return xml.get_body(depth); |
---|
| 58 | }; |
---|
| 59 | |
---|
| 60 | #undef FUNCTION |
---|
| 61 | #define FUNCTION "Icache_Access::operator<<" |
---|
| 62 | std::ostream& operator<< (std::ostream& output_stream , |
---|
| 63 | morpheo::behavioural::core::icache_access::Parameters & x) |
---|
| 64 | { |
---|
| 65 | log_begin(Icache_Access,FUNCTION); |
---|
| 66 | |
---|
| 67 | output_stream << x.print(0); |
---|
| 68 | |
---|
| 69 | log_end(Icache_Access,FUNCTION); |
---|
| 70 | |
---|
| 71 | return output_stream; |
---|
| 72 | }; |
---|
| 73 | |
---|
| 74 | }; // end namespace icache_access |
---|
| 75 | }; // end namespace core |
---|
| 76 | |
---|
| 77 | }; // end namespace behavioural |
---|
| 78 | }; // end namespace morpheo |
---|