[88] | 1 | /* |
---|
| 2 | * $Id: main.cpp 115 2009-04-20 21:29:17Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/SelfTest/include/test.h" |
---|
| 9 | #include "Common/include/Max.h" |
---|
| 10 | |
---|
| 11 | #define NB_PARAMS 20 |
---|
| 12 | |
---|
| 13 | void usage (int argc, char * argv[]) |
---|
| 14 | { |
---|
| 15 | err (_("<Usage> %s name_instance list_params.\n"),argv[0]); |
---|
| 16 | err (_("list_params is :\n")); |
---|
[111] | 17 | err (_(" * size_general_data (uint32_t )\n")); |
---|
| 18 | err (_(" * size_special_data (uint32_t )\n")); |
---|
| 19 | //morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void), |
---|
| 20 | |
---|
| 21 | err (_(" * nb_thread (uint32_t )\n")); |
---|
| 22 | err (_(" * size_ifetch_queue [nb_thread] (uint32_t )\n")); |
---|
| 23 | err (_(" * nb_inst_fetch [nb_thread] (uint32_t )\n")); |
---|
| 24 | //err (_(" * implement_group [nb_thread][NB_GROUP] (bool )\n")); |
---|
| 25 | err (_(" * ras_size_queue [nb_thread] (uint32_t )\n")); |
---|
| 26 | err (_(" * upt_size_queue [nb_thread] (uint32_t )\n")); |
---|
| 27 | err (_(" * ufpt_size_queue [nb_thread] (uint32_t )\n")); |
---|
| 28 | |
---|
| 29 | err (_(" * nb_decod_bloc (uint32_t )\n")); |
---|
| 30 | err (_(" * size_decod_queue [nb_decod_bloc] (uint32_t )\n")); |
---|
| 31 | err (_(" * decod_queue_scheme [nb_decod_bloc] (Tdecod_queue_scheme_t)\n")); |
---|
| 32 | err (_(" * nb_inst_decod [nb_decod_bloc] (uint32_t )\n")); |
---|
| 33 | err (_(" * nb_context_select [nb_decod_bloc] (uint32_t )\n")); |
---|
| 34 | err (_(" * context_select_priority [nb_decod_bloc] (Tpriority_t )\n")); |
---|
| 35 | err (_(" * context_select_load_balancing [nb_decod_bloc] (Tload_balancing_t )\n")); |
---|
| 36 | |
---|
| 37 | err (_(" * nb_rename_bloc (uint32_t )\n")); |
---|
| 38 | err (_(" * nb_inst_insert [nb_rename_bloc] (uint32_t )\n")); |
---|
| 39 | err (_(" * nb_inst_retire [nb_rename_bloc] (uint32_t )\n")); |
---|
| 40 | err (_(" * rename_select_priority [nb_rename_bloc] (Tpriority_t )\n")); |
---|
| 41 | err (_(" * rename_select_load_balancing [nb_rename_bloc] (Tload_balancing_t )\n")); |
---|
| 42 | err (_(" * rename_select_nb_front_end_select [nb_rename_bloc] (uint32_t )\n")); |
---|
| 43 | err (_(" * nb_general_register [nb_rename_bloc] (uint32_t )\n")); |
---|
| 44 | err (_(" * nb_special_register [nb_rename_bloc] (uint32_t )\n")); |
---|
| 45 | err (_(" * nb_reg_free [nb_rename_bloc] (uint32_t )\n")); |
---|
| 46 | err (_(" * nb_rename_unit_bank [nb_rename_bloc] (uint32_t )\n")); |
---|
[112] | 47 | // err (_(" * size_read_counter [nb_rename_bloc] (uint32_t )\n")); |
---|
[111] | 48 | |
---|
| 49 | err (_(" * nb_read_bloc (uint32_t )\n")); |
---|
| 50 | err (_(" * size_read_queue [nb_read_bloc] (uint32_t )\n")); |
---|
| 51 | err (_(" * size_reservation_station [nb_read_bloc] (uint32_t )\n")); |
---|
| 52 | err (_(" * nb_inst_retire_reservation_station [nb_read_bloc] (uint32_t )\n")); |
---|
| 53 | |
---|
| 54 | err (_(" * nb_write_bloc (uint32_t )\n")); |
---|
| 55 | err (_(" * size_write_queue [nb_write_bloc] (uint32_t )\n")); |
---|
| 56 | err (_(" * size_execute_queue [nb_write_bloc] (uint32_t )\n")); |
---|
| 57 | err (_(" * nb_bypass_write [nb_write_bloc] (uint32_t )\n")); |
---|
[115] | 58 | err (_(" * write_queue_scheme [nb_write_bloc] (Twrite_queue_scheme_t)\n")); |
---|
[111] | 59 | |
---|
| 60 | err (_(" * nb_load_store_unit (uint32_t )\n")); |
---|
| 61 | err (_(" * size_store_queue [nb_load_store_unit] (uint32_t )\n")); |
---|
| 62 | err (_(" * size_load_queue [nb_load_store_unit] (uint32_t )\n")); |
---|
| 63 | err (_(" * size_speculative_access_queue [nb_load_store_unit] (uint32_t )\n")); |
---|
| 64 | err (_(" * nb_port_check [nb_load_store_unit] (uint32_t )\n")); |
---|
| 65 | err (_(" * speculative_load [nb_load_store_unit] (Tspeculative_load )\n")); |
---|
| 66 | err (_(" * nb_bypass_memory [nb_load_store_unit] (uint32_t )\n")); |
---|
| 67 | err (_(" * nb_cache_port [nb_load_store_unit] (uint32_t )\n")); |
---|
| 68 | err (_(" * nb_inst_memory [nb_load_store_unit] (uint32_t )\n")); |
---|
| 69 | |
---|
| 70 | err (_(" * nb_functionnal_unit (uint32_t )\n")); |
---|
| 71 | err (_(" * nb_inst_functionnal_unit [nb_functionnal_unit] (uint32_t )\n")); |
---|
| 72 | //err (_(" * timing [nb_functionnal_unit][nb_type][nb_operation] (execute_timing_t )\n")); |
---|
| 73 | |
---|
| 74 | err (_(" * nb_icache_port (uint32_t )\n")); |
---|
| 75 | err (_(" * icache_port_priority (Tpriority_t )\n")); |
---|
| 76 | err (_(" * icache_port_load_balancing (Tload_balancing_t )\n")); |
---|
| 77 | |
---|
| 78 | err (_(" * nb_dcache_port (uint32_t )\n")); |
---|
| 79 | err (_(" * dcache_port_priority (Tpriority_t )\n")); |
---|
| 80 | err (_(" * dcache_port_load_balancing (Tload_balancing_t )\n")); |
---|
| 81 | |
---|
| 82 | err (_(" * nb_front_end (uint32_t )\n")); |
---|
| 83 | err (_(" * nb_context [nb_front_end] (uint32_t )\n")); |
---|
| 84 | err (_(" * nb_decod_unit [nb_front_end] (uint32_t )\n")); |
---|
| 85 | err (_(" * nb_inst_branch_predict [nb_front_end] (uint32_t )\n")); |
---|
| 86 | err (_(" * nb_inst_branch_decod [nb_front_end] (uint32_t )\n")); |
---|
| 87 | err (_(" * nb_inst_branch_update [nb_front_end] (uint32_t )\n")); |
---|
| 88 | err (_(" * btb_size_queue [nb_front_end] (uint32_t )\n")); |
---|
| 89 | err (_(" * btb_associativity [nb_front_end] (uint32_t )\n")); |
---|
| 90 | err (_(" * btb_size_counter [nb_front_end] (uint32_t )\n")); |
---|
| 91 | err (_(" * btb_victim_scheme [nb_front_end] (Tvictim_t )\n")); |
---|
| 92 | err (_(" * dir_predictor_scheme [nb_front_end] (Tpredictor_t )\n")); |
---|
| 93 | err (_(" * dir_have_bht [nb_front_end][3] (bool )\n")); |
---|
| 94 | err (_(" * dir_bht_size_shifter [nb_front_end][3] (uint32_t )\n")); |
---|
| 95 | err (_(" * dir_bht_nb_shifter [nb_front_end][3] (uint32_t )\n")); |
---|
| 96 | err (_(" * dir_have_pht [nb_front_end][3] (bool )\n")); |
---|
| 97 | err (_(" * dir_pht_size_counter [nb_front_end][3] (uint32_t )\n")); |
---|
| 98 | err (_(" * dir_pht_nb_counter [nb_front_end][3] (uint32_t )\n")); |
---|
| 99 | err (_(" * dir_pht_size_address_share [nb_front_end][3] (uint32_t )\n")); |
---|
| 100 | |
---|
| 101 | err (_(" * nb_ooo_engine (uint32_t )\n")); |
---|
| 102 | err (_(" * nb_rename_unit [nb_ooo_engine] (uint32_t )\n")); |
---|
| 103 | err (_(" * nb_inst_issue [nb_ooo_engine] (uint32_t )\n")); |
---|
| 104 | err (_(" * nb_inst_reexecute [nb_ooo_engine] (uint32_t )\n")); |
---|
| 105 | err (_(" * nb_inst_commit [nb_ooo_engine] (uint32_t )\n")); |
---|
| 106 | err (_(" * nb_inst_branch_complete [nb_ooo_engine] (uint32_t )\n")); |
---|
| 107 | err (_(" * nb_rename_unit_select [nb_ooo_engine] (uint32_t )\n")); |
---|
| 108 | err (_(" * nb_execute_loop_select [nb_ooo_engine] (uint32_t )\n")); |
---|
| 109 | err (_(" * size_re_order_buffer [nb_ooo_engine] (uint32_t )\n")); |
---|
| 110 | err (_(" * nb_re_order_buffer_bank [nb_ooo_engine] (uint32_t )\n")); |
---|
| 111 | err (_(" * commit_priority [nb_ooo_engine] (Tpriority_t )\n")); |
---|
| 112 | err (_(" * commit_load_balancing [nb_ooo_engine] (Tload_balancing_t )\n")); |
---|
| 113 | err (_(" * size_issue_queue [nb_ooo_engine] (uint32_t )\n")); |
---|
| 114 | err (_(" * issue_queue_scheme [nb_ooo_engine] (Tissue_queue_scheme_t)\n")); |
---|
| 115 | err (_(" * nb_issue_queue_bank [nb_ooo_engine] (uint32_t )\n")); |
---|
| 116 | err (_(" * issue_priority [nb_ooo_engine] (Tpriority_t )\n")); |
---|
| 117 | err (_(" * issue_load_balancing [nb_ooo_engine] (Tload_balancing_t )\n")); |
---|
| 118 | err (_(" * size_reexecute_queue [nb_ooo_engine] (uint32_t )\n")); |
---|
| 119 | err (_(" * reexecute_priority [nb_ooo_engine] (Tpriority_t )\n")); |
---|
| 120 | err (_(" * reexecute_load_balancing [nb_ooo_engine] (Tload_balancing_t )\n")); |
---|
| 121 | |
---|
| 122 | err (_(" * nb_execute_loop (uint32_t )\n")); |
---|
| 123 | err (_(" * nb_read_unit [nb_execute_loop] (uint32_t )\n")); |
---|
| 124 | err (_(" * nb_execute_unit [nb_execute_loop] (uint32_t )\n")); |
---|
| 125 | err (_(" * nb_write_unit [nb_execute_loop] (uint32_t )\n")); |
---|
| 126 | err (_(" * nb_gpr_bank [nb_execute_loop] (uint32_t )\n")); |
---|
| 127 | err (_(" * nb_gpr_port_read_by_bank [nb_execute_loop] (uint32_t )\n")); |
---|
| 128 | err (_(" * nb_gpr_port_write_by_bank [nb_execute_loop] (uint32_t )\n")); |
---|
| 129 | err (_(" * nb_spr_bank [nb_execute_loop] (uint32_t )\n")); |
---|
| 130 | err (_(" * nb_spr_port_read_by_bank [nb_execute_loop] (uint32_t )\n")); |
---|
| 131 | err (_(" * nb_spr_port_write_by_bank [nb_execute_loop] (uint32_t )\n")); |
---|
| 132 | err (_(" * execution_unit_to_write_unit_priority [nb_execute_loop] (Tpriority_t )\n")); |
---|
| 133 | err (_(" * read_unit_to_execution_unit_priority [nb_execute_loop] (Tpriority_t )\n")); |
---|
| 134 | |
---|
| 135 | err (_(" * link_context_with_thread [nb_thread] (pair_dual )\n")); |
---|
| 136 | err (_(" * link_decod_unit_with_decod_bloc [nb_decod_bloc] (pair_dual )\n")); |
---|
| 137 | err (_(" * link_rename_unit_with_rename_bloc [nb_rename_bloc] (pair_dual )\n")); |
---|
| 138 | err (_(" * link_read_unit_with_read_bloc [nb_read_bloc] (pair_dual )\n")); |
---|
| 139 | err (_(" * link_write_unit_with_write_bloc [nb_write_bloc] (pair_dual )\n")); |
---|
| 140 | err (_(" * link_execute_unit_with_functionnal_unit [nb_functionnal_unit] (pair_dual )\n")); |
---|
| 141 | err (_(" * link_execute_unit_with_load_store_unit [nb_load_store_unit] (pair_dual )\n")); |
---|
| 142 | err (_(" * link_decod_bloc_with_thread [nb_thread] (uint32_t )\n")); |
---|
| 143 | err (_(" * link_rename_bloc_with_front_end [nb_front_end] (uint32_t )\n")); |
---|
| 144 | err (_(" * table_dispatch [nb_ooo_engine][nb_inst_issue][nb_read_bloc] (bool )\n")); |
---|
| 145 | err (_(" * link_read_bloc_and_load_store_unit [nb_read_bloc][nb_load_store_unit] (bool )\n")); |
---|
| 146 | err (_(" * link_read_bloc_and_functionnal_unit [nb_read_bloc][nb_functionnal_unit] (bool )\n")); |
---|
| 147 | err (_(" * link_write_bloc_and_load_store_unit [nb_write_bloc][nb_load_store_unit] (bool )\n")); |
---|
| 148 | err (_(" * link_write_bloc_and_functionnal_unit [nb_write_bloc][nb_functionnal_unit] (bool )\n")); |
---|
| 149 | err (_(" * link_load_store_unit_with_thread [nb_thread] (uint32_t )\n")); |
---|
| 150 | err (_(" * link_thread_and_functionnal_unit [nb_thread][nb_functionnal_unit] (bool )\n")); |
---|
| 151 | err (_(" * link_icache_port_with_thread [nb_thread] (uint32_t )\n")); |
---|
| 152 | err (_(" * link_dcache_port_with_load_store_unit [nb_load_store_unit][nb_cache_port] (uint32_t )\n")); |
---|
| 153 | |
---|
| 154 | err (_(" * dispatch_priority (Tpriority_t )\n")); |
---|
| 155 | err (_(" * dispatch_load_balancing (Tload_balancing_t )\n")); |
---|
[88] | 156 | err (_("\n")); |
---|
| 157 | err (_(" - pair_dual : first = x div 1000, second = x mod 1000\n")); |
---|
| 158 | err (_("\n")); |
---|
| 159 | err (_(" - now they have %d\n"),argc); |
---|
| 160 | |
---|
| 161 | exit (1); |
---|
| 162 | } |
---|
| 163 | |
---|
| 164 | #ifndef SYSTEMC |
---|
| 165 | int main (int argc, char * argv[]) |
---|
| 166 | #else |
---|
| 167 | int sc_main (int argc, char * argv[]) |
---|
| 168 | #endif |
---|
| 169 | { |
---|
| 170 | if (argc < static_cast<int>(2+NB_PARAMS)) |
---|
| 171 | usage (argc, argv); |
---|
| 172 | |
---|
| 173 | uint32_t x = 1; |
---|
| 174 | |
---|
| 175 | string name = argv[x++]; |
---|
| 176 | |
---|
| 177 | // Common |
---|
| 178 | uint32_t _size_general_data ; |
---|
| 179 | uint32_t _size_special_data ; |
---|
| 180 | morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void); |
---|
| 181 | |
---|
| 182 | // Thread |
---|
| 183 | uint32_t _nb_thread ; |
---|
| 184 | uint32_t * _size_ifetch_queue ;//[nb_thread] |
---|
| 185 | uint32_t * _nb_inst_fetch ;//[nb_thread] |
---|
| 186 | bool ** _implement_group ;//[nb_thread][NB_GROUP] |
---|
| 187 | uint32_t * _ras_size_queue ;//[nb_thread] |
---|
| 188 | uint32_t * _upt_size_queue ;//[nb_thread] |
---|
[97] | 189 | uint32_t * _ufpt_size_queue ;//[nb_thread] |
---|
[88] | 190 | |
---|
| 191 | // Decod_bloc |
---|
| 192 | uint32_t _nb_decod_bloc ;// |
---|
| 193 | uint32_t * _size_decod_queue ;//[nb_decod_bloc] |
---|
[111] | 194 | multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t |
---|
| 195 | * _decod_queue_scheme ;//[nb_decod_bloc] |
---|
[88] | 196 | uint32_t * _nb_inst_decod ;//[nb_decod_bloc] |
---|
| 197 | uint32_t * _nb_context_select ;//[nb_decod_bloc] |
---|
| 198 | Tpriority_t * _context_select_priority ;//[nb_decod_bloc] |
---|
| 199 | Tload_balancing_t * _context_select_load_balancing ;//[nb_decod_bloc] |
---|
| 200 | |
---|
| 201 | // Rename_bloc |
---|
| 202 | uint32_t _nb_rename_bloc ;// |
---|
| 203 | uint32_t * _nb_inst_insert ;//[nb_rename_bloc] |
---|
| 204 | uint32_t * _nb_inst_retire ;//[nb_rename_bloc] |
---|
| 205 | Tpriority_t * _rename_select_priority ;//[nb_rename_bloc] |
---|
| 206 | Tload_balancing_t * _rename_select_load_balancing ;//[nb_rename_bloc] |
---|
| 207 | uint32_t * _rename_select_nb_front_end_select ;//[nb_rename_bloc] |
---|
| 208 | uint32_t * _nb_general_register ;//[nb_rename_bloc] |
---|
| 209 | uint32_t * _nb_special_register ;//[nb_rename_bloc] |
---|
| 210 | uint32_t * _nb_reg_free ;//[nb_rename_bloc] |
---|
| 211 | uint32_t * _nb_rename_unit_bank ;//[nb_rename_bloc] |
---|
[112] | 212 | // uint32_t * _size_read_counter ;//[nb_rename_bloc] |
---|
[88] | 213 | |
---|
| 214 | // Read bloc |
---|
| 215 | uint32_t _nb_read_bloc ;// |
---|
| 216 | uint32_t * _size_read_queue ;//[nb_read_bloc] |
---|
| 217 | uint32_t * _size_reservation_station ;//[nb_read_bloc] |
---|
| 218 | uint32_t * _nb_inst_retire_reservation_station ;//[nb_read_bloc] |
---|
| 219 | |
---|
| 220 | // Write bloc |
---|
| 221 | uint32_t _nb_write_bloc ;// |
---|
| 222 | uint32_t * _size_write_queue ;//[nb_write_bloc] |
---|
| 223 | uint32_t * _size_execute_queue ;//[nb_write_bloc] |
---|
| 224 | uint32_t * _nb_bypass_write ;//[nb_write_bloc] |
---|
[115] | 225 | core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Twrite_queue_scheme_t * _write_queue_scheme; //[nb_write_bloc] |
---|
[88] | 226 | |
---|
| 227 | // Load_store_unit |
---|
| 228 | uint32_t _nb_load_store_unit ; |
---|
| 229 | uint32_t * _size_store_queue ;//[nb_load_store_unit] |
---|
| 230 | uint32_t * _size_load_queue ;//[nb_load_store_unit] |
---|
| 231 | uint32_t * _size_speculative_access_queue ;//[nb_load_store_unit] |
---|
| 232 | uint32_t * _nb_port_check ;//[nb_load_store_unit] |
---|
| 233 | multi_execute_loop::execute_loop::Tspeculative_load_t |
---|
| 234 | * _speculative_load ;//[nb_load_store_unit] |
---|
| 235 | uint32_t * _nb_bypass_memory ;//[nb_load_store_unit] |
---|
| 236 | uint32_t * _nb_cache_port ;//[nb_load_store_unit] |
---|
| 237 | uint32_t * _nb_inst_memory ;//[nb_load_store_unit] |
---|
| 238 | |
---|
| 239 | // Functionnal_unit |
---|
| 240 | uint32_t _nb_functionnal_unit ; |
---|
| 241 | uint32_t * _nb_inst_functionnal_unit ;//[nb_functionnal_unit] |
---|
| 242 | multi_execute_loop::execute_loop::execute_timing_t |
---|
| 243 | *** _timing ;//[nb_functionnal_unit][nb_type][nb_operation] |
---|
| 244 | |
---|
| 245 | // Icache_Access |
---|
| 246 | uint32_t _nb_icache_port ; |
---|
| 247 | Tpriority_t _icache_port_priority ; |
---|
| 248 | Tload_balancing_t _icache_port_load_balancing ; |
---|
| 249 | |
---|
| 250 | // Dcache_Access |
---|
| 251 | uint32_t _nb_dcache_port ; |
---|
| 252 | Tpriority_t _dcache_port_priority ; |
---|
| 253 | Tload_balancing_t _dcache_port_load_balancing ; |
---|
| 254 | |
---|
| 255 | // Front_end |
---|
| 256 | uint32_t _nb_front_end ; |
---|
| 257 | uint32_t * _nb_context ;//[nb_front_end] |
---|
| 258 | uint32_t * _nb_decod_unit ;//[nb_front_end] |
---|
| 259 | uint32_t * _nb_inst_branch_predict ;//[nb_front_end] |
---|
| 260 | uint32_t * _nb_inst_branch_decod ;//[nb_front_end] |
---|
| 261 | uint32_t * _nb_inst_branch_update ;//[nb_front_end] |
---|
| 262 | uint32_t * _btb_size_queue ;//[nb_front_end] |
---|
| 263 | uint32_t * _btb_associativity ;//[nb_front_end] |
---|
| 264 | uint32_t * _btb_size_counter ;//[nb_front_end] |
---|
| 265 | Tvictim_t * _btb_victim_scheme ;//[nb_front_end] |
---|
| 266 | Tpredictor_t * _dir_predictor_scheme ;//[nb_front_end] |
---|
| 267 | bool ** _dir_have_bht ;//[nb_front_end][3] |
---|
| 268 | uint32_t ** _dir_bht_size_shifter ;//[nb_front_end][3] |
---|
| 269 | uint32_t ** _dir_bht_nb_shifter ;//[nb_front_end][3] |
---|
| 270 | bool ** _dir_have_pht ;//[nb_front_end][3] |
---|
| 271 | uint32_t ** _dir_pht_size_counter ;//[nb_front_end][3] |
---|
| 272 | uint32_t ** _dir_pht_nb_counter ;//[nb_front_end][3] |
---|
| 273 | uint32_t ** _dir_pht_size_address_share ;//[nb_front_end][3] |
---|
| 274 | |
---|
| 275 | // OOO_Engine |
---|
| 276 | uint32_t _nb_ooo_engine ; |
---|
| 277 | uint32_t * _nb_rename_unit ;//[nb_ooo_engine] |
---|
| 278 | uint32_t * _nb_inst_issue ;//[nb_ooo_engine] |
---|
| 279 | uint32_t * _nb_inst_reexecute ;//[nb_ooo_engine] |
---|
| 280 | uint32_t * _nb_inst_commit ;//[nb_ooo_engine] |
---|
| 281 | uint32_t * _nb_inst_branch_complete ;//[nb_ooo_engine] |
---|
| 282 | uint32_t * _nb_rename_unit_select ;//[nb_ooo_engine] |
---|
| 283 | uint32_t * _nb_execute_loop_select ;//[nb_ooo_engine] |
---|
| 284 | uint32_t * _size_re_order_buffer ;//[nb_ooo_engine] |
---|
| 285 | uint32_t * _nb_re_order_buffer_bank ;//[nb_ooo_engine] |
---|
| 286 | Tpriority_t * _commit_priority ;//[nb_ooo_engine] |
---|
| 287 | Tload_balancing_t * _commit_load_balancing ;//[nb_ooo_engine] |
---|
| 288 | uint32_t * _size_issue_queue ;//[nb_ooo_engine] |
---|
[111] | 289 | multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t |
---|
| 290 | * _issue_queue_scheme ;//[nb_ooo_engine] |
---|
[88] | 291 | uint32_t * _nb_issue_queue_bank ;//[nb_ooo_engine] |
---|
| 292 | Tpriority_t * _issue_priority ;//[nb_ooo_engine] |
---|
| 293 | Tload_balancing_t * _issue_load_balancing ;//[nb_ooo_engine] |
---|
| 294 | uint32_t * _size_reexecute_queue ;//[nb_ooo_engine] |
---|
| 295 | Tpriority_t * _reexecute_priority ;//[nb_ooo_engine] |
---|
| 296 | Tload_balancing_t * _reexecute_load_balancing ;//[nb_ooo_engine] |
---|
| 297 | |
---|
| 298 | // Execute_loop |
---|
| 299 | uint32_t _nb_execute_loop ; |
---|
| 300 | uint32_t * _nb_read_unit ;//[nb_execute_loop] |
---|
| 301 | uint32_t * _nb_execute_unit ;//[nb_execute_loop] |
---|
| 302 | uint32_t * _nb_write_unit ;//[nb_execute_loop] |
---|
| 303 | uint32_t * _nb_gpr_bank ;//[nb_execute_loop] |
---|
| 304 | uint32_t * _nb_gpr_port_read_by_bank ;//[nb_execute_loop] |
---|
| 305 | uint32_t * _nb_gpr_port_write_by_bank ;//[nb_execute_loop] |
---|
| 306 | uint32_t * _nb_spr_bank ;//[nb_execute_loop] |
---|
| 307 | uint32_t * _nb_spr_port_read_by_bank ;//[nb_execute_loop] |
---|
| 308 | uint32_t * _nb_spr_port_write_by_bank ;//[nb_execute_loop] |
---|
| 309 | Tpriority_t * _execution_unit_to_write_unit_priority ;//[nb_execute_loop] |
---|
| 310 | Tpriority_t * _read_unit_to_execution_unit_priority ;//[nb_execute_loop] |
---|
| 311 | |
---|
| 312 | // Link |
---|
| 313 | pair_dual * _link_context_with_thread ;//[nb_thread] |
---|
| 314 | pair_dual * _link_decod_unit_with_decod_bloc ;//[nb_decod_bloc] |
---|
| 315 | pair_dual * _link_rename_unit_with_rename_bloc ;//[nb_rename_bloc] |
---|
| 316 | pair_dual * _link_read_unit_with_read_bloc ;//[nb_read_bloc] |
---|
| 317 | pair_dual * _link_write_unit_with_write_bloc ;//[nb_write_bloc] |
---|
| 318 | pair_dual * _link_execute_unit_with_functionnal_unit ;//[nb_functionnal_unit] |
---|
| 319 | pair_dual * _link_execute_unit_with_load_store_unit ;//[nb_load_store_unit] |
---|
| 320 | uint32_t * _link_decod_bloc_with_thread ;//[nb_thread] |
---|
| 321 | uint32_t * _link_rename_bloc_with_front_end ;//[nb_front_end] |
---|
| 322 | bool *** _table_dispatch ;//[nb_ooo_engine][nb_inst_issue][nb_read_bloc] |
---|
| 323 | bool ** _link_read_bloc_and_load_store_unit ;//[nb_read_bloc][nb_load_store_unit] |
---|
| 324 | bool ** _link_read_bloc_and_functionnal_unit ;//[nb_read_bloc][nb_functionnal_unit] |
---|
| 325 | bool ** _link_write_bloc_and_load_store_unit ;//[nb_write_bloc][nb_load_store_unit] |
---|
| 326 | bool ** _link_write_bloc_and_functionnal_unit ;//[nb_write_bloc][nb_functionnal_unit] |
---|
| 327 | uint32_t * _link_load_store_unit_with_thread ;//[nb_thread] |
---|
| 328 | bool ** _link_thread_and_functionnal_unit ;//[nb_thread][nb_functionnal_unit] |
---|
| 329 | uint32_t * _link_icache_port_with_thread ;//[nb_thread] |
---|
| 330 | uint32_t ** _link_dcache_port_with_load_store_unit ;//[nb_load_store_unit][nb_cache_port] |
---|
| 331 | |
---|
| 332 | Tpriority_t _dispatch_priority ; |
---|
| 333 | Tload_balancing_t _dispatch_load_balancing ; |
---|
| 334 | |
---|
| 335 | printf("Core parameters :\n"); |
---|
| 336 | |
---|
| 337 | // Common |
---|
| 338 | printf(" * Common\n"); |
---|
| 339 | SELFTEST0(_size_general_data ,uint32_t ,argv,x); |
---|
| 340 | SELFTEST0(_size_special_data ,uint32_t ,argv,x); |
---|
| 341 | _get_custom_information = &(morpheo::behavioural::custom::default_get_custom_information); |
---|
| 342 | |
---|
| 343 | //Thread |
---|
| 344 | printf(" * Thread\n"); |
---|
| 345 | SELFTEST0(_nb_thread ,uint32_t ,argv,x); |
---|
| 346 | |
---|
[97] | 347 | if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread)) |
---|
[88] | 348 | usage (argc, argv); |
---|
| 349 | |
---|
| 350 | SELFTEST1(_size_ifetch_queue ,uint32_t ,argv,x,_nb_thread); |
---|
| 351 | SELFTEST1(_nb_inst_fetch ,uint32_t ,argv,x,_nb_thread); |
---|
| 352 | ALLOC2 (_implement_group ,bool ,_nb_thread,NB_GROUP); |
---|
| 353 | for (uint32_t i=0; i<_nb_thread; ++i) |
---|
| 354 | for (uint32_t j=0; j<NB_GROUP; ++j) |
---|
| 355 | _implement_group[i][j] = true; |
---|
| 356 | SELFTEST1(_ras_size_queue ,uint32_t ,argv,x,_nb_thread); |
---|
| 357 | SELFTEST1(_upt_size_queue ,uint32_t ,argv,x,_nb_thread); |
---|
[97] | 358 | SELFTEST1(_ufpt_size_queue ,uint32_t ,argv,x,_nb_thread); |
---|
[88] | 359 | |
---|
| 360 | // Decod bloc |
---|
| 361 | printf(" * Decod bloc\n"); |
---|
| 362 | SELFTEST0(_nb_decod_bloc ,uint32_t ,argv,x); |
---|
| 363 | |
---|
[111] | 364 | if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc)) |
---|
[88] | 365 | usage (argc, argv); |
---|
| 366 | |
---|
| 367 | SELFTEST1(_size_decod_queue ,uint32_t ,argv,x,_nb_decod_bloc); |
---|
[111] | 368 | SELFTEST1(_decod_queue_scheme ,multi_front_end::front_end::decod_unit::decod_queue::Tdecod_queue_scheme_t,argv,x,_nb_decod_bloc); |
---|
[88] | 369 | SELFTEST1(_nb_inst_decod ,uint32_t ,argv,x,_nb_decod_bloc); |
---|
| 370 | SELFTEST1(_nb_context_select ,uint32_t ,argv,x,_nb_decod_bloc); |
---|
| 371 | SELFTEST1(_context_select_priority ,Tpriority_t ,argv,x,_nb_decod_bloc); |
---|
| 372 | SELFTEST1(_context_select_load_balancing ,Tload_balancing_t ,argv,x,_nb_decod_bloc); |
---|
| 373 | |
---|
| 374 | // Rename bloc |
---|
| 375 | printf(" * Rename bloc\n"); |
---|
| 376 | SELFTEST0(_nb_rename_bloc ,uint32_t ,argv,x); |
---|
| 377 | |
---|
[112] | 378 | if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+9*_nb_rename_bloc)) |
---|
[88] | 379 | usage (argc, argv); |
---|
| 380 | |
---|
| 381 | SELFTEST1(_nb_inst_insert ,uint32_t ,argv,x,_nb_rename_bloc); |
---|
| 382 | SELFTEST1(_nb_inst_retire ,uint32_t ,argv,x,_nb_rename_bloc); |
---|
| 383 | SELFTEST1(_rename_select_priority ,Tpriority_t ,argv,x,_nb_rename_bloc); |
---|
| 384 | SELFTEST1(_rename_select_load_balancing ,Tload_balancing_t ,argv,x,_nb_rename_bloc); |
---|
| 385 | SELFTEST1(_rename_select_nb_front_end_select ,uint32_t ,argv,x,_nb_rename_bloc); |
---|
| 386 | SELFTEST1(_nb_general_register ,uint32_t ,argv,x,_nb_rename_bloc); |
---|
| 387 | SELFTEST1(_nb_special_register ,uint32_t ,argv,x,_nb_rename_bloc); |
---|
| 388 | SELFTEST1(_nb_reg_free ,uint32_t ,argv,x,_nb_rename_bloc); |
---|
| 389 | SELFTEST1(_nb_rename_unit_bank ,uint32_t ,argv,x,_nb_rename_bloc); |
---|
[112] | 390 | // SELFTEST1(_size_read_counter ,uint32_t ,argv,x,_nb_rename_bloc); |
---|
[88] | 391 | |
---|
| 392 | // Read bloc |
---|
| 393 | printf(" * Read bloc\n"); |
---|
| 394 | SELFTEST0(_nb_read_bloc ,uint32_t ,argv,x); |
---|
| 395 | |
---|
[112] | 396 | if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+9*_nb_rename_bloc+3*_nb_read_bloc)) |
---|
[88] | 397 | usage (argc, argv); |
---|
| 398 | |
---|
| 399 | SELFTEST1(_size_read_queue ,uint32_t ,argv,x,_nb_read_bloc); |
---|
| 400 | SELFTEST1(_size_reservation_station ,uint32_t ,argv,x,_nb_read_bloc); |
---|
| 401 | SELFTEST1(_nb_inst_retire_reservation_station ,uint32_t ,argv,x,_nb_read_bloc); |
---|
| 402 | |
---|
| 403 | // Write bloc |
---|
| 404 | printf(" * Write bloc\n"); |
---|
| 405 | SELFTEST0(_nb_write_bloc ,uint32_t ,argv,x); |
---|
| 406 | |
---|
[115] | 407 | if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+9*_nb_rename_bloc+3*_nb_read_bloc+4*_nb_write_bloc)) |
---|
[88] | 408 | usage (argc, argv); |
---|
| 409 | |
---|
| 410 | SELFTEST1(_size_write_queue ,uint32_t ,argv,x,_nb_write_bloc); |
---|
| 411 | SELFTEST1(_size_execute_queue ,uint32_t ,argv,x,_nb_write_bloc); |
---|
| 412 | SELFTEST1(_nb_bypass_write ,uint32_t ,argv,x,_nb_write_bloc); |
---|
[115] | 413 | SELFTEST1(_write_queue_scheme,core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Twrite_queue_scheme_t,argv,x,_nb_write_bloc); |
---|
[88] | 414 | |
---|
| 415 | // Load store unit |
---|
| 416 | printf(" * Load store unit\n"); |
---|
| 417 | SELFTEST0(_nb_load_store_unit ,uint32_t ,argv,x); |
---|
| 418 | |
---|
[115] | 419 | if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+9*_nb_rename_bloc+3*_nb_read_bloc+4*_nb_write_bloc+8*_nb_load_store_unit)) |
---|
[88] | 420 | usage (argc, argv); |
---|
| 421 | |
---|
| 422 | SELFTEST1(_size_store_queue ,uint32_t ,argv,x,_nb_load_store_unit); |
---|
| 423 | SELFTEST1(_size_load_queue ,uint32_t ,argv,x,_nb_load_store_unit); |
---|
| 424 | SELFTEST1(_size_speculative_access_queue ,uint32_t ,argv,x,_nb_load_store_unit); |
---|
| 425 | SELFTEST1(_nb_port_check ,uint32_t ,argv,x,_nb_load_store_unit); |
---|
| 426 | SELFTEST1(_speculative_load ,multi_execute_loop::execute_loop::Tspeculative_load_t |
---|
| 427 | ,argv,x,_nb_load_store_unit); |
---|
| 428 | SELFTEST1(_nb_bypass_memory ,uint32_t ,argv,x,_nb_load_store_unit); |
---|
| 429 | SELFTEST1(_nb_cache_port ,uint32_t ,argv,x,_nb_load_store_unit); |
---|
| 430 | SELFTEST1(_nb_inst_memory ,uint32_t ,argv,x,_nb_load_store_unit); |
---|
| 431 | |
---|
| 432 | // Functionnal_unit |
---|
| 433 | printf(" * Functional unit\n"); |
---|
| 434 | SELFTEST0(_nb_functionnal_unit ,uint32_t ,argv,x); |
---|
| 435 | |
---|
[115] | 436 | if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+9*_nb_rename_bloc+3*_nb_read_bloc+4*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit)) |
---|
[88] | 437 | usage (argc, argv); |
---|
| 438 | |
---|
| 439 | SELFTEST1(_nb_inst_functionnal_unit ,uint32_t ,argv,x,_nb_functionnal_unit); |
---|
| 440 | ALLOC3 (_timing ,multi_execute_loop::execute_loop::execute_timing_t,_nb_functionnal_unit,MAX_TYPE,MAX_OPERATION); |
---|
| 441 | |
---|
| 442 | for (uint32_t i=0; i< _nb_functionnal_unit; i++) |
---|
| 443 | for (uint32_t j=0; j< MAX_TYPE; j++) |
---|
| 444 | if ((j == TYPE_ALU ) | |
---|
| 445 | (j == TYPE_SHIFT ) | |
---|
| 446 | (j == TYPE_MOVE ) | |
---|
| 447 | (j == TYPE_TEST ) | |
---|
| 448 | (j == TYPE_MUL ) | |
---|
| 449 | (j == TYPE_DIV ) | |
---|
| 450 | (j == TYPE_EXTEND ) | |
---|
| 451 | (j == TYPE_FIND ) | |
---|
| 452 | (j == TYPE_SPECIAL) | |
---|
| 453 | (j == TYPE_CUSTOM ) | |
---|
| 454 | (j == TYPE_BRANCH ) // | |
---|
| 455 | // (j == TYPE_MEMORY ) |
---|
| 456 | ) |
---|
| 457 | for (uint32_t k=0; k< MAX_OPERATION; k++) |
---|
| 458 | _timing [i][j][k]._delay = _timing [i][j][k]._latence = 1; |
---|
| 459 | |
---|
| 460 | // Icache_Access |
---|
| 461 | printf(" * Icache access\n"); |
---|
| 462 | |
---|
| 463 | SELFTEST0(_nb_icache_port ,uint32_t ,argv,x); |
---|
| 464 | SELFTEST0(_icache_port_priority ,Tpriority_t ,argv,x); |
---|
| 465 | SELFTEST0(_icache_port_load_balancing ,Tload_balancing_t ,argv,x); |
---|
| 466 | |
---|
| 467 | // Dcache_Access |
---|
| 468 | printf(" * Dcache access\n"); |
---|
| 469 | |
---|
| 470 | SELFTEST0(_nb_dcache_port ,uint32_t ,argv,x); |
---|
| 471 | SELFTEST0(_dcache_port_priority ,Tpriority_t ,argv,x); |
---|
| 472 | SELFTEST0(_dcache_port_load_balancing ,Tload_balancing_t ,argv,x); |
---|
| 473 | |
---|
| 474 | // Front_end |
---|
| 475 | printf(" * Front end\n"); |
---|
| 476 | |
---|
| 477 | SELFTEST0(_nb_front_end ,uint32_t ,argv,x); |
---|
| 478 | |
---|
[115] | 479 | if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+9*_nb_rename_bloc+3*_nb_read_bloc+4*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit+31*_nb_front_end)) |
---|
[88] | 480 | usage (argc, argv); |
---|
| 481 | |
---|
| 482 | SELFTEST1(_nb_context ,uint32_t ,argv,x,_nb_front_end); |
---|
| 483 | SELFTEST1(_nb_decod_unit ,uint32_t ,argv,x,_nb_front_end); |
---|
| 484 | SELFTEST1(_nb_inst_branch_predict ,uint32_t ,argv,x,_nb_front_end); |
---|
| 485 | SELFTEST1(_nb_inst_branch_decod ,uint32_t ,argv,x,_nb_front_end); |
---|
| 486 | SELFTEST1(_nb_inst_branch_update ,uint32_t ,argv,x,_nb_front_end); |
---|
| 487 | SELFTEST1(_btb_size_queue ,uint32_t ,argv,x,_nb_front_end); |
---|
| 488 | SELFTEST1(_btb_associativity ,uint32_t ,argv,x,_nb_front_end); |
---|
| 489 | SELFTEST1(_btb_size_counter ,uint32_t ,argv,x,_nb_front_end); |
---|
| 490 | SELFTEST1(_btb_victim_scheme ,Tvictim_t ,argv,x,_nb_front_end); |
---|
| 491 | SELFTEST1(_dir_predictor_scheme ,Tpredictor_t ,argv,x,_nb_front_end); |
---|
| 492 | |
---|
| 493 | SELFTEST2(_dir_have_bht ,bool ,argv,x,_nb_front_end,3); |
---|
| 494 | SELFTEST2(_dir_bht_size_shifter ,uint32_t ,argv,x,_nb_front_end,3); |
---|
| 495 | SELFTEST2(_dir_bht_nb_shifter ,uint32_t ,argv,x,_nb_front_end,3); |
---|
| 496 | SELFTEST2(_dir_have_pht ,bool ,argv,x,_nb_front_end,3); |
---|
| 497 | SELFTEST2(_dir_pht_size_counter ,uint32_t ,argv,x,_nb_front_end,3); |
---|
| 498 | SELFTEST2(_dir_pht_nb_counter ,uint32_t ,argv,x,_nb_front_end,3); |
---|
| 499 | SELFTEST2(_dir_pht_size_address_share ,uint32_t ,argv,x,_nb_front_end,3); |
---|
| 500 | |
---|
| 501 | // OOO_Engine |
---|
| 502 | printf(" * OOO Engine\n"); |
---|
| 503 | |
---|
| 504 | SELFTEST0(_nb_ooo_engine ,uint32_t ,argv,x); |
---|
| 505 | |
---|
[115] | 506 | if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+9*_nb_rename_bloc+3*_nb_read_bloc+4*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit+31*_nb_front_end+19*_nb_ooo_engine)) |
---|
[88] | 507 | usage (argc, argv); |
---|
| 508 | |
---|
| 509 | SELFTEST1(_nb_rename_unit ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
| 510 | SELFTEST1(_nb_inst_issue ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
| 511 | SELFTEST1(_nb_inst_reexecute ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
| 512 | SELFTEST1(_nb_inst_commit ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
| 513 | SELFTEST1(_nb_inst_branch_complete ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
| 514 | SELFTEST1(_nb_rename_unit_select ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
| 515 | SELFTEST1(_nb_execute_loop_select ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
| 516 | SELFTEST1(_size_re_order_buffer ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
| 517 | SELFTEST1(_nb_re_order_buffer_bank ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
| 518 | SELFTEST1(_commit_priority ,Tpriority_t ,argv,x,_nb_ooo_engine); |
---|
| 519 | SELFTEST1(_commit_load_balancing ,Tload_balancing_t ,argv,x,_nb_ooo_engine); |
---|
| 520 | SELFTEST1(_size_issue_queue ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
[111] | 521 | SELFTEST1(_issue_queue_scheme ,multi_ooo_engine::ooo_engine::issue_queue::Tissue_queue_scheme_t,argv,x,_nb_ooo_engine); |
---|
[88] | 522 | SELFTEST1(_nb_issue_queue_bank ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
| 523 | SELFTEST1(_issue_priority ,Tpriority_t ,argv,x,_nb_ooo_engine); |
---|
| 524 | SELFTEST1(_issue_load_balancing ,Tload_balancing_t ,argv,x,_nb_ooo_engine); |
---|
| 525 | SELFTEST1(_size_reexecute_queue ,uint32_t ,argv,x,_nb_ooo_engine); |
---|
| 526 | SELFTEST1(_reexecute_priority ,Tpriority_t ,argv,x,_nb_ooo_engine); |
---|
| 527 | SELFTEST1(_reexecute_load_balancing ,Tload_balancing_t ,argv,x,_nb_ooo_engine); |
---|
| 528 | |
---|
| 529 | //Execute_loop |
---|
| 530 | printf(" * Execute Loop\n"); |
---|
| 531 | |
---|
| 532 | SELFTEST0(_nb_execute_loop ,uint32_t ,argv,x); |
---|
| 533 | |
---|
[115] | 534 | if (argc < static_cast<int>(2+NB_PARAMS+5*_nb_thread+6*_nb_decod_bloc+9*_nb_rename_bloc+3*_nb_read_bloc+4*_nb_write_bloc+8*_nb_load_store_unit+1*_nb_functionnal_unit+31*_nb_front_end+19*_nb_ooo_engine+11*_nb_execute_loop)) |
---|
[88] | 535 | usage (argc, argv); |
---|
| 536 | |
---|
| 537 | SELFTEST1(_nb_read_unit ,uint32_t ,argv,x,_nb_execute_loop); |
---|
| 538 | SELFTEST1(_nb_execute_unit ,uint32_t ,argv,x,_nb_execute_loop); |
---|
| 539 | SELFTEST1(_nb_write_unit ,uint32_t ,argv,x,_nb_execute_loop); |
---|
| 540 | SELFTEST1(_nb_gpr_bank ,uint32_t ,argv,x,_nb_execute_loop); |
---|
| 541 | SELFTEST1(_nb_gpr_port_read_by_bank ,uint32_t ,argv,x,_nb_execute_loop); |
---|
| 542 | SELFTEST1(_nb_gpr_port_write_by_bank ,uint32_t ,argv,x,_nb_execute_loop); |
---|
| 543 | SELFTEST1(_nb_spr_bank ,uint32_t ,argv,x,_nb_execute_loop); |
---|
| 544 | SELFTEST1(_nb_spr_port_read_by_bank ,uint32_t ,argv,x,_nb_execute_loop); |
---|
| 545 | SELFTEST1(_nb_spr_port_write_by_bank ,uint32_t ,argv,x,_nb_execute_loop); |
---|
| 546 | SELFTEST1(_execution_unit_to_write_unit_priority ,Tpriority_t ,argv,x,_nb_execute_loop); |
---|
| 547 | SELFTEST1(_read_unit_to_execution_unit_priority ,Tpriority_t ,argv,x,_nb_execute_loop); |
---|
| 548 | |
---|
| 549 | // Link |
---|
| 550 | printf(" * Link\n"); |
---|
| 551 | |
---|
[115] | 552 | if (argc < static_cast<int>(2+NB_PARAMS+6*_nb_thread+6*_nb_decod_bloc+10*_nb_rename_bloc+4*_nb_read_bloc+5*_nb_write_bloc+9*_nb_load_store_unit+2*_nb_functionnal_unit+31*_nb_front_end+19*_nb_ooo_engine+11*_nb_execute_loop)) |
---|
[88] | 553 | usage (argc, argv); |
---|
| 554 | |
---|
| 555 | ALLOC1 (_link_context_with_thread ,pair_dual ,_nb_thread); |
---|
| 556 | ALLOC1 (_link_decod_unit_with_decod_bloc ,pair_dual ,_nb_decod_bloc); |
---|
| 557 | ALLOC1 (_link_rename_unit_with_rename_bloc ,pair_dual ,_nb_rename_bloc); |
---|
| 558 | ALLOC1 (_link_read_unit_with_read_bloc ,pair_dual ,_nb_read_bloc); |
---|
| 559 | ALLOC1 (_link_write_unit_with_write_bloc ,pair_dual ,_nb_write_bloc); |
---|
| 560 | ALLOC1 (_link_execute_unit_with_functionnal_unit ,pair_dual ,_nb_functionnal_unit); |
---|
| 561 | ALLOC1 (_link_execute_unit_with_load_store_unit ,pair_dual ,_nb_load_store_unit); |
---|
| 562 | |
---|
| 563 | for (uint32_t i=0; i<_nb_thread; ++i) |
---|
| 564 | { |
---|
| 565 | uint32_t tmp=fromString<uint32_t>(argv[x++]); |
---|
| 566 | _link_context_with_thread [i] = pair_dual(tmp/1000,tmp%1000); |
---|
| 567 | } |
---|
| 568 | for (uint32_t i=0; i<_nb_decod_bloc; ++i) |
---|
| 569 | { |
---|
| 570 | uint32_t tmp=fromString<uint32_t>(argv[x++]); |
---|
| 571 | _link_decod_unit_with_decod_bloc [i] = pair_dual(tmp/1000,tmp%1000); |
---|
| 572 | } |
---|
| 573 | for (uint32_t i=0; i<_nb_rename_bloc; ++i) |
---|
| 574 | { |
---|
| 575 | uint32_t tmp=fromString<uint32_t>(argv[x++]); |
---|
| 576 | _link_rename_unit_with_rename_bloc [i] = pair_dual(tmp/1000,tmp%1000); |
---|
| 577 | } |
---|
| 578 | for (uint32_t i=0; i<_nb_read_bloc; ++i) |
---|
| 579 | { |
---|
| 580 | uint32_t tmp=fromString<uint32_t>(argv[x++]); |
---|
| 581 | _link_read_unit_with_read_bloc [i] = pair_dual(tmp/1000,tmp%1000); |
---|
| 582 | } |
---|
| 583 | for (uint32_t i=0; i<_nb_write_bloc; ++i) |
---|
| 584 | { |
---|
| 585 | uint32_t tmp=fromString<uint32_t>(argv[x++]); |
---|
| 586 | _link_write_unit_with_write_bloc [i] = pair_dual(tmp/1000,tmp%1000); |
---|
| 587 | } |
---|
| 588 | for (uint32_t i=0; i<_nb_functionnal_unit; ++i) |
---|
| 589 | { |
---|
| 590 | uint32_t tmp=fromString<uint32_t>(argv[x++]); |
---|
| 591 | _link_execute_unit_with_functionnal_unit [i] = pair_dual(tmp/1000,tmp%1000); |
---|
| 592 | } |
---|
| 593 | for (uint32_t i=0; i<_nb_load_store_unit; ++i) |
---|
| 594 | { |
---|
| 595 | uint32_t tmp=fromString<uint32_t>(argv[x++]); |
---|
| 596 | _link_execute_unit_with_load_store_unit [i] = pair_dual(tmp/1000,tmp%1000); |
---|
| 597 | } |
---|
| 598 | |
---|
| 599 | uint32_t _sum_inst_issue = 0; |
---|
| 600 | for (uint32_t i=0; i<_nb_ooo_engine;++i) |
---|
| 601 | _sum_inst_issue += _nb_inst_issue[i]; |
---|
| 602 | uint32_t _sum_cache_port = 0; |
---|
| 603 | for (uint32_t i=0; i<_nb_load_store_unit;++i) |
---|
| 604 | _sum_cache_port += _nb_cache_port[i]; |
---|
| 605 | |
---|
[115] | 606 | if (argc != static_cast<int>(2+NB_PARAMS+6*_nb_thread+6*_nb_decod_bloc+10*_nb_rename_bloc+4*_nb_read_bloc+5*_nb_write_bloc+9*_nb_load_store_unit+2*_nb_functionnal_unit+31*_nb_front_end+19*_nb_ooo_engine+11*_nb_execute_loop+ |
---|
[88] | 607 | 3*_nb_thread+_nb_front_end+_sum_inst_issue*_nb_read_bloc+_nb_load_store_unit*(_nb_read_bloc+_nb_write_bloc+_nb_thread)+_nb_functionnal_unit*(_nb_read_bloc+_nb_write_bloc)+_sum_cache_port)) |
---|
| 608 | usage (argc, argv); |
---|
| 609 | |
---|
| 610 | SELFTEST1(_link_decod_bloc_with_thread ,uint32_t ,argv,x,_nb_thread); |
---|
| 611 | SELFTEST1(_link_rename_bloc_with_front_end ,uint32_t ,argv,x,_nb_front_end); |
---|
| 612 | SELFTEST3(_table_dispatch ,bool ,argv,x,_nb_ooo_engine,_nb_inst_issue[it1],_nb_read_bloc); |
---|
| 613 | SELFTEST2(_link_read_bloc_and_load_store_unit ,bool ,argv,x,_nb_read_bloc,_nb_load_store_unit); |
---|
| 614 | SELFTEST2(_link_read_bloc_and_functionnal_unit ,bool ,argv,x,_nb_read_bloc,_nb_functionnal_unit); |
---|
| 615 | SELFTEST2(_link_write_bloc_and_load_store_unit ,bool ,argv,x,_nb_write_bloc,_nb_load_store_unit); |
---|
| 616 | SELFTEST2(_link_write_bloc_and_functionnal_unit ,bool ,argv,x,_nb_write_bloc,_nb_functionnal_unit); |
---|
| 617 | SELFTEST1(_link_load_store_unit_with_thread ,uint32_t ,argv,x,_nb_thread); |
---|
| 618 | SELFTEST2(_link_thread_and_functionnal_unit ,bool ,argv,x,_nb_thread,_nb_functionnal_unit); |
---|
| 619 | SELFTEST1(_link_icache_port_with_thread ,uint32_t ,argv,x,_nb_thread); |
---|
| 620 | SELFTEST2(_link_dcache_port_with_load_store_unit ,uint32_t ,argv,x,_nb_load_store_unit,_nb_cache_port[it1]); |
---|
| 621 | SELFTEST0(_dispatch_priority ,Tpriority_t ,argv,x); |
---|
| 622 | SELFTEST0(_dispatch_load_balancing ,Tload_balancing_t ,argv,x); |
---|
| 623 | |
---|
| 624 | printf(" * End parameters\n"); |
---|
| 625 | printf("--------------------------------\n"); |
---|
| 626 | |
---|
| 627 | int _return = EXIT_SUCCESS; |
---|
| 628 | try |
---|
| 629 | { |
---|
| 630 | morpheo::behavioural::core::Parameters * param = new morpheo::behavioural::core::Parameters |
---|
| 631 | ( |
---|
| 632 | _size_general_data , |
---|
| 633 | _size_special_data , |
---|
| 634 | _get_custom_information , |
---|
| 635 | |
---|
| 636 | _nb_thread , |
---|
| 637 | _size_ifetch_queue , |
---|
| 638 | _nb_inst_fetch , |
---|
| 639 | _implement_group , |
---|
| 640 | _ras_size_queue , |
---|
| 641 | _upt_size_queue , |
---|
[97] | 642 | _ufpt_size_queue , |
---|
[88] | 643 | |
---|
| 644 | _nb_decod_bloc , |
---|
| 645 | _size_decod_queue , |
---|
[111] | 646 | _decod_queue_scheme , |
---|
[88] | 647 | _nb_inst_decod , |
---|
| 648 | _nb_context_select , |
---|
| 649 | _context_select_priority , |
---|
| 650 | _context_select_load_balancing , |
---|
| 651 | |
---|
| 652 | _nb_rename_bloc , |
---|
| 653 | _nb_inst_insert , |
---|
| 654 | _nb_inst_retire , |
---|
| 655 | _rename_select_priority , |
---|
| 656 | _rename_select_load_balancing , |
---|
| 657 | _rename_select_nb_front_end_select , |
---|
| 658 | _nb_general_register , |
---|
| 659 | _nb_special_register , |
---|
| 660 | _nb_reg_free , |
---|
| 661 | _nb_rename_unit_bank , |
---|
[112] | 662 | // _size_read_counter , |
---|
[88] | 663 | |
---|
| 664 | _nb_read_bloc , |
---|
| 665 | _size_read_queue , |
---|
| 666 | _size_reservation_station , |
---|
| 667 | _nb_inst_retire_reservation_station , |
---|
| 668 | |
---|
| 669 | _nb_write_bloc , |
---|
| 670 | _size_write_queue , |
---|
| 671 | _size_execute_queue , |
---|
| 672 | _nb_bypass_write , |
---|
[115] | 673 | _write_queue_scheme , |
---|
[88] | 674 | |
---|
| 675 | _nb_load_store_unit , |
---|
| 676 | _size_store_queue , |
---|
| 677 | _size_load_queue , |
---|
| 678 | _size_speculative_access_queue , |
---|
| 679 | _nb_port_check , |
---|
| 680 | _speculative_load , |
---|
| 681 | _nb_bypass_memory , |
---|
| 682 | _nb_cache_port , |
---|
| 683 | _nb_inst_memory , |
---|
| 684 | |
---|
| 685 | _nb_functionnal_unit , |
---|
| 686 | _nb_inst_functionnal_unit , |
---|
| 687 | _timing , |
---|
| 688 | |
---|
| 689 | _nb_icache_port , |
---|
| 690 | _icache_port_priority , |
---|
| 691 | _icache_port_load_balancing , |
---|
| 692 | |
---|
| 693 | _nb_dcache_port , |
---|
| 694 | _dcache_port_priority , |
---|
| 695 | _dcache_port_load_balancing , |
---|
| 696 | |
---|
| 697 | _nb_front_end , |
---|
| 698 | _nb_context , |
---|
| 699 | _nb_decod_unit , |
---|
| 700 | _nb_inst_branch_predict , |
---|
| 701 | _nb_inst_branch_decod , |
---|
| 702 | _nb_inst_branch_update , |
---|
| 703 | _btb_size_queue , |
---|
| 704 | _btb_associativity , |
---|
| 705 | _btb_size_counter , |
---|
| 706 | _btb_victim_scheme , |
---|
| 707 | _dir_predictor_scheme , |
---|
| 708 | _dir_have_bht , |
---|
| 709 | _dir_bht_size_shifter , |
---|
| 710 | _dir_bht_nb_shifter , |
---|
| 711 | _dir_have_pht , |
---|
| 712 | _dir_pht_size_counter , |
---|
| 713 | _dir_pht_nb_counter , |
---|
| 714 | _dir_pht_size_address_share , |
---|
| 715 | |
---|
| 716 | _nb_ooo_engine , |
---|
| 717 | _nb_rename_unit , |
---|
| 718 | _nb_inst_issue , |
---|
| 719 | _nb_inst_reexecute , |
---|
| 720 | _nb_inst_commit , |
---|
| 721 | _nb_inst_branch_complete , |
---|
| 722 | _nb_rename_unit_select , |
---|
| 723 | _nb_execute_loop_select , |
---|
| 724 | _size_re_order_buffer , |
---|
| 725 | _nb_re_order_buffer_bank , |
---|
| 726 | _commit_priority , |
---|
| 727 | _commit_load_balancing , |
---|
| 728 | _size_issue_queue , |
---|
[111] | 729 | _issue_queue_scheme , |
---|
[88] | 730 | _nb_issue_queue_bank , |
---|
| 731 | _issue_priority , |
---|
| 732 | _issue_load_balancing , |
---|
| 733 | _size_reexecute_queue , |
---|
| 734 | _reexecute_priority , |
---|
| 735 | _reexecute_load_balancing , |
---|
| 736 | |
---|
| 737 | _nb_execute_loop , |
---|
| 738 | _nb_read_unit , |
---|
| 739 | _nb_execute_unit , |
---|
| 740 | _nb_write_unit , |
---|
| 741 | _nb_gpr_bank , |
---|
| 742 | _nb_gpr_port_read_by_bank , |
---|
| 743 | _nb_gpr_port_write_by_bank , |
---|
| 744 | _nb_spr_bank , |
---|
| 745 | _nb_spr_port_read_by_bank , |
---|
| 746 | _nb_spr_port_write_by_bank , |
---|
| 747 | _execution_unit_to_write_unit_priority , |
---|
| 748 | _read_unit_to_execution_unit_priority , |
---|
| 749 | |
---|
| 750 | _link_context_with_thread , |
---|
| 751 | _link_decod_unit_with_decod_bloc , |
---|
| 752 | _link_rename_unit_with_rename_bloc , |
---|
| 753 | _link_read_unit_with_read_bloc , |
---|
| 754 | _link_write_unit_with_write_bloc , |
---|
| 755 | _link_execute_unit_with_functionnal_unit , |
---|
| 756 | _link_execute_unit_with_load_store_unit , |
---|
| 757 | _link_decod_bloc_with_thread , |
---|
| 758 | _link_rename_bloc_with_front_end , |
---|
| 759 | _table_dispatch , |
---|
| 760 | _link_read_bloc_and_load_store_unit , |
---|
| 761 | _link_read_bloc_and_functionnal_unit , |
---|
| 762 | _link_write_bloc_and_load_store_unit , |
---|
| 763 | _link_write_bloc_and_functionnal_unit , |
---|
| 764 | _link_load_store_unit_with_thread , |
---|
| 765 | _link_thread_and_functionnal_unit , |
---|
| 766 | _link_icache_port_with_thread , |
---|
| 767 | _link_dcache_port_with_load_store_unit , |
---|
| 768 | |
---|
| 769 | _dispatch_priority , |
---|
| 770 | _dispatch_load_balancing |
---|
| 771 | ); |
---|
| 772 | |
---|
| 773 | test (name,param); |
---|
| 774 | } |
---|
| 775 | catch (morpheo::ErrorMorpheo & error) |
---|
| 776 | { |
---|
| 777 | msg (_("<%s> :\n%s"),name.c_str(), error.what ()); |
---|
| 778 | _return = EXIT_FAILURE; |
---|
| 779 | } |
---|
| 780 | |
---|
| 781 | try |
---|
| 782 | { |
---|
| 783 | if (_return == EXIT_SUCCESS) |
---|
| 784 | TEST_OK("Core : no error"); |
---|
| 785 | else |
---|
| 786 | TEST_KO("Core : a lot of error"); |
---|
| 787 | } |
---|
| 788 | catch (morpheo::ErrorMorpheo & error) |
---|
| 789 | { |
---|
| 790 | // msg (_("<%s> :\n%s"),name.c_str(), error.what ()); |
---|
| 791 | _return = EXIT_FAILURE; |
---|
| 792 | } |
---|
| 793 | |
---|
| 794 | return (_return); |
---|
| 795 | } |
---|