[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/Dcache_Access/include/Parameters.h" |
---|
| 9 | #include "Behavioural/include/XML.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace dcache_access { |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | #undef FUNCTION |
---|
| 18 | #define FUNCTION "Dcache_Access::print" |
---|
| 19 | std::string Parameters::print (uint32_t depth) |
---|
| 20 | { |
---|
| 21 | log_begin(Dcache_Access,FUNCTION); |
---|
| 22 | |
---|
| 23 | XML xml ("dcache_access"); |
---|
| 24 | |
---|
| 25 | xml.balise_open("dcache_access"); |
---|
| 26 | xml.singleton_begin("nb_execute_loop "); xml.attribut("value",toString(_nb_execute_loop )); xml.singleton_end(); |
---|
| 27 | xml.singleton_begin("nb_dcache_port "); xml.attribut("value",toString(_nb_dcache_port )); xml.singleton_end(); |
---|
| 28 | xml.singleton_begin("size_address "); xml.attribut("value",toString(_size_address )); xml.singleton_end(); |
---|
| 29 | xml.singleton_begin("size_data "); xml.attribut("value",toString(_size_data )); xml.singleton_end(); |
---|
| 30 | xml.singleton_begin("priority "); xml.attribut("value",toString(_priority )); xml.singleton_end(); |
---|
| 31 | xml.singleton_begin("load_balancing "); xml.attribut("value",toString(_load_balancing )); xml.singleton_end(); |
---|
| 32 | |
---|
| 33 | for (uint32_t i=0;i<_nb_execute_loop; i++) |
---|
| 34 | { |
---|
| 35 | xml. balise_open_begin("component"); |
---|
| 36 | xml. attribut("type","execute_loop"); |
---|
| 37 | xml. attribut("id" ,toString(i)); |
---|
| 38 | xml. balise_open_end(); |
---|
| 39 | xml.singleton_begin("nb_load_store_unit "); xml.attribut("value",toString(_nb_load_store_unit [i])); xml.singleton_end(); |
---|
| 40 | |
---|
| 41 | for (uint32_t j=0; j<_nb_load_store_unit [i]; ++j) |
---|
| 42 | { |
---|
| 43 | xml. balise_open_begin("component"); |
---|
| 44 | xml. attribut("type","load_store_unit"); |
---|
| 45 | xml. attribut("id" ,toString(j)); |
---|
| 46 | xml. balise_open_end(); |
---|
| 47 | xml.singleton_begin("nb_cache_access "); xml.attribut("value",toString(_nb_cache_access [i][j])); xml.singleton_end(); |
---|
| 48 | xml.singleton_begin("size_thread_id "); xml.attribut("value",toString(_size_thread_id [i][j])); xml.singleton_end(); |
---|
| 49 | xml.singleton_begin("size_packet_id "); xml.attribut("value",toString(_size_packet_id [i][j])); xml.singleton_end(); |
---|
| 50 | |
---|
| 51 | for (uint32_t k=0; k<_nb_cache_access [i][j]; ++k) |
---|
| 52 | { |
---|
| 53 | xml. balise_open_begin("component"); |
---|
| 54 | xml. attribut("type","cache_access"); |
---|
| 55 | xml. attribut("id" ,toString(k)); |
---|
| 56 | xml. balise_open_end(); |
---|
| 57 | xml.singleton_begin("table_routing "); xml.attribut("value",toString(_table_routing [i][j][k])); xml.singleton_end(); |
---|
| 58 | |
---|
| 59 | xml. balise_close(); |
---|
| 60 | } |
---|
| 61 | xml. balise_close(); |
---|
| 62 | } |
---|
| 63 | xml. balise_close(); |
---|
| 64 | } |
---|
| 65 | |
---|
| 66 | xml.balise_close(); |
---|
| 67 | |
---|
| 68 | log_end(Dcache_Access,FUNCTION); |
---|
| 69 | |
---|
| 70 | return xml.get_body(depth); |
---|
| 71 | }; |
---|
| 72 | |
---|
| 73 | #undef FUNCTION |
---|
| 74 | #define FUNCTION "Dcache_Access::operator<<" |
---|
| 75 | std::ostream& operator<< (std::ostream& output_stream , |
---|
| 76 | morpheo::behavioural::core::dcache_access::Parameters & x) |
---|
| 77 | { |
---|
| 78 | log_begin(Dcache_Access,FUNCTION); |
---|
| 79 | |
---|
| 80 | output_stream << x.print(0); |
---|
| 81 | |
---|
| 82 | log_end(Dcache_Access,FUNCTION); |
---|
| 83 | |
---|
| 84 | return output_stream; |
---|
| 85 | }; |
---|
| 86 | |
---|
| 87 | }; // end namespace dcache_access |
---|
| 88 | }; // end namespace core |
---|
| 89 | |
---|
| 90 | }; // end namespace behavioural |
---|
| 91 | }; // end namespace morpheo |
---|