[78] | 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/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 | |
---|
| 17 | |
---|
| 18 | #undef FUNCTION |
---|
| 19 | #define FUNCTION "Execute_loop::print" |
---|
| 20 | std::string Parameters::print (uint32_t depth) |
---|
| 21 | { |
---|
| 22 | log_printf(FUNC,Execute_loop,FUNCTION,"Begin"); |
---|
| 23 | |
---|
| 24 | XML xml ("execute_loop"); |
---|
| 25 | |
---|
| 26 | xml.balise_open("execute_loop"); |
---|
| 27 | xml.singleton_begin("nb_read_unit "); xml.attribut("value",toString(_nb_read_unit )); xml.singleton_end(); |
---|
| 28 | xml.singleton_begin("nb_functionnal_unit "); xml.attribut("value",toString(_nb_functionnal_unit )); xml.singleton_end(); |
---|
| 29 | xml.singleton_begin("nb_load_store_unit "); xml.attribut("value",toString(_nb_load_store_unit )); xml.singleton_end(); |
---|
| 30 | xml.singleton_begin("nb_write_unit "); xml.attribut("value",toString(_nb_write_unit )); xml.singleton_end(); |
---|
| 31 | xml.singleton_begin("nb_context "); xml.attribut("value",toString(_nb_context )); xml.singleton_end(); |
---|
| 32 | xml.singleton_begin("nb_front_end "); xml.attribut("value",toString(_nb_front_end )); xml.singleton_end(); |
---|
| 33 | xml.singleton_begin("nb_ooo_engine "); xml.attribut("value",toString(_nb_ooo_engine )); xml.singleton_end(); |
---|
| 34 | xml.singleton_begin("nb_packet "); xml.attribut("value",toString(_nb_packet )); xml.singleton_end(); |
---|
| 35 | xml.singleton_begin("size_general_data "); xml.attribut("value",toString(_size_general_data )); xml.singleton_end(); |
---|
| 36 | xml.singleton_begin("size_special_data "); xml.attribut("value",toString(_size_special_data )); xml.singleton_end(); |
---|
| 37 | xml.singleton_begin("nb_gpr_bank "); xml.attribut("value",toString(_nb_gpr_bank )); xml.singleton_end(); |
---|
| 38 | xml.singleton_begin("nb_gpr_port_read_by_bank "); xml.attribut("value",toString(_nb_gpr_port_read_by_bank )); xml.singleton_end(); |
---|
| 39 | xml.singleton_begin("nb_gpr_port_write_by_bank "); xml.attribut("value",toString(_nb_gpr_port_write_by_bank )); xml.singleton_end(); |
---|
| 40 | xml.singleton_begin("nb_spr_bank "); xml.attribut("value",toString(_nb_spr_bank )); xml.singleton_end(); |
---|
| 41 | xml.singleton_begin("nb_spr_port_read_by_bank "); xml.attribut("value",toString(_nb_spr_port_read_by_bank )); xml.singleton_end(); |
---|
| 42 | xml.singleton_begin("nb_spr_port_write_by_bank "); xml.attribut("value",toString(_nb_spr_port_write_by_bank )); xml.singleton_end(); |
---|
| 43 | xml.singleton_begin("execution_unit_to_write_unit_priority"); xml.attribut("value",toString(_execution_unit_to_write_unit_priority)); xml.singleton_end(); |
---|
| 44 | xml.singleton_begin("read_unit_to_execution_unit_priority "); xml.attribut("value",toString(_read_unit_to_execution_unit_priority )); xml.singleton_end(); |
---|
| 45 | |
---|
| 46 | for (uint32_t i=0; i<_nb_read_unit; i++) |
---|
| 47 | { |
---|
| 48 | xml.balise_open_begin("component"); |
---|
| 49 | xml. attribut("type","read_unit"); |
---|
| 50 | xml. attribut("id" ,toString(i)); |
---|
| 51 | xml.balise_open_end(); |
---|
| 52 | xml. singleton_begin("size_read_queue "); xml.attribut("value",toString(_size_read_queue [i])); xml.singleton_end(); |
---|
| 53 | xml. singleton_begin("size_reservation_station"); xml.attribut("value",toString(_size_reservation_station [i])); xml.singleton_end(); |
---|
| 54 | xml. singleton_begin("nb_inst_retire "); xml.attribut("value",toString(_nb_inst_retire [i])); xml.singleton_end(); |
---|
| 55 | xml.balise_close(); |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | for (uint32_t i=0; i<_nb_load_store_unit; i++) |
---|
| 59 | { |
---|
| 60 | xml.balise_open_begin("component"); |
---|
| 61 | xml. attribut("type","load_store_unit"); |
---|
| 62 | xml. attribut("id" ,toString(i)); |
---|
| 63 | xml.balise_open_end(); |
---|
| 64 | xml. singleton_begin("size_store_queue "); xml.attribut("value",toString(_size_store_queue [i])); xml.singleton_end(); |
---|
| 65 | xml. singleton_begin("size_load_queue "); xml.attribut("value",toString(_size_load_queue [i])); xml.singleton_end(); |
---|
| 66 | xml. singleton_begin("size_speculative_access_queue"); xml.attribut("value",toString(_size_speculative_access_queue[i])); xml.singleton_end(); |
---|
| 67 | xml. singleton_begin("nb_port_check "); xml.attribut("value",toString(_nb_port_check [i])); xml.singleton_end(); |
---|
| 68 | xml. singleton_begin("speculative_load "); xml.attribut("value",toString(_speculative_load [i])); xml.singleton_end(); |
---|
| 69 | xml. singleton_begin("nb_bypass_memory "); xml.attribut("value",toString(_nb_bypass_memory [i])); xml.singleton_end(); |
---|
| 70 | xml.balise_close(); |
---|
| 71 | } |
---|
| 72 | |
---|
| 73 | for (uint32_t i=0; i<_nb_write_unit; i++) |
---|
| 74 | { |
---|
| 75 | xml.balise_open_begin("component"); |
---|
| 76 | xml. attribut("type","write_unit"); |
---|
| 77 | xml. attribut("id" ,toString(i)); |
---|
| 78 | xml.balise_open_end(); |
---|
| 79 | xml. singleton_begin("size_write_queue "); xml.attribut("value",toString(_size_write_queue [i])); xml.singleton_end(); |
---|
| 80 | xml. singleton_begin("size_execute_queue"); xml.attribut("value",toString(_size_execute_queue [i])); xml.singleton_end(); |
---|
| 81 | xml. singleton_begin("nb_bypass_write "); xml.attribut("value",toString(_nb_bypass_write [i])); xml.singleton_end(); |
---|
| 82 | xml.balise_close(); |
---|
| 83 | } |
---|
| 84 | |
---|
| 85 | for (uint32_t i=0; i<_nb_ooo_engine; i++) |
---|
| 86 | { |
---|
| 87 | xml.balise_open_begin("component"); |
---|
| 88 | xml. attribut("type","ooo_engine"); |
---|
| 89 | xml. attribut("id" ,toString(i)); |
---|
| 90 | xml.balise_open_end(); |
---|
| 91 | xml. singleton_begin("nb_general_register"); xml.attribut("value",toString(_nb_general_register [i])); xml.singleton_end(); |
---|
| 92 | xml. singleton_begin("nb_special_register"); xml.attribut("value",toString(_nb_special_register [i])); xml.singleton_end(); |
---|
| 93 | xml. singleton_begin("nb_inst_insert_rob "); xml.attribut("value",toString(_nb_inst_insert_rob [i])); xml.singleton_end(); |
---|
| 94 | xml. singleton_begin("nb_inst_retire_rob "); xml.attribut("value",toString(_nb_inst_retire_rob [i])); xml.singleton_end(); |
---|
| 95 | xml.balise_close(); |
---|
| 96 | } |
---|
| 97 | |
---|
| 98 | |
---|
| 99 | std::string str = ""; |
---|
| 100 | for (uint32_t i=0; i<_nb_read_unit; i++) |
---|
| 101 | str += _param_read_unit [i]->print(depth+1); |
---|
| 102 | for (uint32_t i=0; i<_nb_functionnal_unit; i++) |
---|
| 103 | str += _param_functionnal_unit [i]->print(depth+1); |
---|
| 104 | for (uint32_t i=0; i<_nb_load_store_unit; i++) |
---|
| 105 | str += _param_load_store_unit [i]->print(depth+1); |
---|
| 106 | for (uint32_t i=0; i<_nb_write_unit; i++) |
---|
| 107 | str += _param_write_unit [i]->print(depth+1); |
---|
| 108 | str += _param_read_unit_to_execution_unit->print(depth+1); |
---|
| 109 | str += _param_execution_unit_to_write_unit->print(depth+1); |
---|
| 110 | str += _param_register_unit->print(depth+1); |
---|
| 111 | |
---|
| 112 | xml.comment("\n"+str); |
---|
| 113 | |
---|
| 114 | xml.balise_close(); |
---|
| 115 | |
---|
| 116 | log_printf(FUNC,Execute_loop,FUNCTION,"End"); |
---|
| 117 | |
---|
| 118 | return xml.get_body(depth); |
---|
| 119 | }; |
---|
| 120 | |
---|
| 121 | #undef FUNCTION |
---|
| 122 | #define FUNCTION "Execute_loop::operator<<" |
---|
| 123 | std::ostream& operator<< (std::ostream& output_stream , |
---|
| 124 | morpheo::behavioural::core::multi_execute_loop::execute_loop::Parameters & x) |
---|
| 125 | { |
---|
| 126 | log_printf(FUNC,Execute_loop,FUNCTION,"Begin"); |
---|
| 127 | |
---|
| 128 | output_stream << x.print(0); |
---|
| 129 | |
---|
| 130 | log_printf(FUNC,Execute_loop,FUNCTION,"End"); |
---|
| 131 | |
---|
| 132 | return output_stream; |
---|
| 133 | }; |
---|
| 134 | |
---|
| 135 | }; // end namespace execute_loop |
---|
| 136 | }; // end namespace multi_execute_loop |
---|
| 137 | }; // end namespace core |
---|
| 138 | |
---|
| 139 | }; // end namespace behavioural |
---|
| 140 | }; // end namespace morpheo |
---|