[88] | 1 | /* |
---|
| 2 | * $Id: Parameters_msg_error.cpp 138 2010-05-12 17:34:01Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/include/Types.h" |
---|
| 9 | #include "Behavioural/Core/Core_Glue/include/Parameters.h" |
---|
[138] | 10 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Types.h" |
---|
[88] | 11 | #include <sstream> |
---|
| 12 | |
---|
| 13 | namespace morpheo { |
---|
| 14 | namespace behavioural { |
---|
| 15 | namespace core { |
---|
| 16 | namespace core_glue { |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "Core_Glue::msg_error" |
---|
| 21 | Parameters_test Parameters::msg_error(void) |
---|
| 22 | { |
---|
| 23 | log_begin(Core_Glue,FUNCTION); |
---|
| 24 | |
---|
| 25 | Parameters_test test ("Core_Glue"); |
---|
| 26 | |
---|
| 27 | for (uint32_t i=0; i<_nb_ooo_engine; ++i) |
---|
| 28 | for (uint32_t j=0; j<_ooo_engine_nb_front_end[i]; ++j) |
---|
| 29 | if (_translate_ooo_engine_num_front_end [i][j] > _nb_front_end) |
---|
| 30 | test.error(_("Translation in ooo_engine of front_end id is an invalid id.\n")); |
---|
| 31 | |
---|
| 32 | for (uint32_t i=0; i<_nb_ooo_engine; ++i) |
---|
| 33 | for (uint32_t j=0; j<_ooo_engine_nb_execute_loop[i]; ++j) |
---|
| 34 | if (_translate_ooo_engine_num_execute_loop [i][j] > _nb_execute_loop) |
---|
| 35 | test.error(_("Translation in ooo_engine of execute_loop id is an invalid id.\n")); |
---|
| 36 | |
---|
| 37 | for (uint32_t i=0; i<_nb_execute_loop; ++i) |
---|
| 38 | for (uint32_t j=0; j<_execute_loop_nb_ooo_engine[i]; ++j) |
---|
| 39 | if (_translate_execute_loop_num_ooo_engine [i][j] > _nb_ooo_engine) |
---|
| 40 | test.error(_("Translation in execute_loop of ooo_engine id is an invalid id.\n")); |
---|
| 41 | |
---|
| 42 | for (uint32_t i=0; i<_nb_ooo_engine; ++i) |
---|
| 43 | for (uint32_t j=0; j<_ooo_engine_nb_front_end[i]; ++j) |
---|
| 44 | { |
---|
| 45 | uint32_t num_front_end = _translate_ooo_engine_num_front_end [i][j]; |
---|
| 46 | |
---|
| 47 | if (_front_end_nb_inst_branch_complete [num_front_end] != _ooo_engine_nb_inst_branch_complete [i]) |
---|
| 48 | test.error(toString(_("front_end[%d].nb_inst_branch_complete must be equal at ooo_engine[%d].nb_inst_branch_complete.\n"),num_front_end,i)); |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | for (uint32_t i=0; i<_nb_execute_loop; ++i) |
---|
| 52 | for (uint32_t j=0; j<_execute_loop_nb_ooo_engine[i]; ++j) |
---|
| 53 | { |
---|
| 54 | Tcontext_t num_ooo_engine = _translate_execute_loop_num_ooo_engine [i][j]; |
---|
| 55 | for (uint32_t k=0; k<_ooo_engine_nb_execute_loop[num_ooo_engine]; ++k) |
---|
| 56 | if (_translate_ooo_engine_num_execute_loop [num_ooo_engine][k] == i) |
---|
| 57 | if (_nb_inst_execute[num_ooo_engine][k] != _nb_write_unit [i]) |
---|
| 58 | test.error(toString(_("ooo_engine[%d][%d].nb_inst_execute must be equal at execute_loop[%d].nb_write_unit.\n"),num_ooo_engine,k,i)); |
---|
| 59 | } |
---|
[120] | 60 | |
---|
[138] | 61 | { |
---|
| 62 | bool issue_queue_can_ooo [_nb_ooo_engine]; |
---|
| 63 | for (uint32_t i=0; i<_nb_ooo_engine; ++i) |
---|
| 64 | issue_queue_can_ooo [i] = true; |
---|
| 65 | |
---|
| 66 | for (uint32_t i=0; i<_nb_execute_loop; ++i) |
---|
| 67 | for (uint32_t j=0; j<_execute_loop_nb_ooo_engine[i]; ++j) |
---|
| 68 | { |
---|
| 69 | Tcontext_t num_ooo_engine = _translate_execute_loop_num_ooo_engine [i][j]; |
---|
| 70 | |
---|
| 71 | // Test if multiple ooo_engine for this execute loop |
---|
| 72 | if (_execute_loop_nb_ooo_engine[i]>1) |
---|
| 73 | issue_queue_can_ooo [num_ooo_engine] = false; |
---|
| 74 | } |
---|
| 75 | |
---|
| 76 | for (uint32_t i=0; i<_nb_ooo_engine; ++i) |
---|
| 77 | if (not _issue_queue_in_order [i] and // out of order |
---|
| 78 | not issue_queue_can_ooo [i]) |
---|
| 79 | test.error(toString(_("The scheme of Issue queue in ooo_engine [%d] must be \"%s\" because, the execute loop can be access with multiple ooo_engine (deadlock is possible).\n"),i,toString(core::multi_ooo_engine::ooo_engine::issue_queue::ISSUE_QUEUE_SCHEME_IN_ORDER).c_str())); |
---|
| 80 | } |
---|
| 81 | |
---|
[120] | 82 | if (_dispatch_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY) |
---|
| 83 | test.error(toString(_("distpatch load_balancing scheme \"%s\" is not yet supported.\n"),toString(_dispatch_load_balancing).c_str())); |
---|
| 84 | |
---|
[88] | 85 | log_end(Core_Glue,FUNCTION); |
---|
| 86 | |
---|
| 87 | return test; |
---|
| 88 | }; |
---|
| 89 | |
---|
| 90 | }; // end namespace core_glue |
---|
| 91 | }; // end namespace core |
---|
| 92 | |
---|
| 93 | }; // end namespace behavioural |
---|
| 94 | }; // end namespace morpheo |
---|