[88] | 1 | /* |
---|
| 2 | * $Id: Parameters_msg_error.cpp 109 2009-02-16 20:28:31Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/include/Types.h" |
---|
| 9 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Parameters.h" |
---|
| 10 | #include <sstream> |
---|
| 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
| 14 | namespace core { |
---|
| 15 | namespace multi_ooo_engine { |
---|
| 16 | namespace ooo_engine { |
---|
| 17 | namespace issue_queue { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Issue_queue::msg_error" |
---|
| 22 | Parameters_test Parameters::msg_error(void) |
---|
| 23 | { |
---|
| 24 | log_begin(Issue_queue,FUNCTION); |
---|
| 25 | |
---|
| 26 | Parameters_test test ("Issue_queue"); |
---|
| 27 | |
---|
| 28 | if (not is_multiple(_size_queue, _nb_bank)) |
---|
[108] | 29 | test.error(toString(_("nb_bank (%d) must be a multiple of size_queue (%d).\n"),_nb_bank,_size_queue)); |
---|
[88] | 30 | |
---|
| 31 | if (not is_multiple(_nb_bank, _nb_inst_issue)) |
---|
[108] | 32 | test.error(toString(_("nb_inst_issue (%d) must be a multiple of nb_bank (%d) .\n"),_nb_inst_issue,_nb_bank)); |
---|
[88] | 33 | |
---|
| 34 | if (_nb_rename_unit_select > _nb_rename_unit) |
---|
| 35 | test.error(toString(_("nb_rename_unit_select must be <= nb_rename_unit.\n"))); |
---|
| 36 | |
---|
| 37 | if (_size_bank == 1) |
---|
| 38 | test.warning(_("For better performance, the bank's size (size_queue/nb_bank) must be > 1.\n")); |
---|
| 39 | |
---|
| 40 | for (uint32_t i=0; i<_nb_rename_unit; i++) |
---|
| 41 | { |
---|
| 42 | bool type_present [_nb_type]; |
---|
| 43 | |
---|
| 44 | for (uint32_t j=0; j<_nb_type; j++) |
---|
[109] | 45 | type_present [j] = not is_type_valid(j); |
---|
[88] | 46 | |
---|
| 47 | bool find = false; |
---|
| 48 | for (uint32_t j=0; j<_nb_inst_issue; j++) |
---|
| 49 | if (_table_routing [i][j]) |
---|
| 50 | { |
---|
| 51 | find = true; |
---|
| 52 | |
---|
| 53 | for (uint32_t k=0; k<_nb_type; k++) |
---|
| 54 | type_present [k] |= _table_issue_type [j][k]; |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | if (not find) |
---|
| 58 | test.error(toString(_("Rename_unit [%d] is not connected with a issue slot.\n"),i)); |
---|
| 59 | else |
---|
| 60 | for (uint32_t j=0; j<_nb_type; j++) |
---|
[109] | 61 | if (not type_present [j] and not is_type_optionnal(j)) |
---|
[97] | 62 | test.error(toString(_("Rename_unit [%d] can't issue instruction's type \"%s\".\n"),i,toString(j).c_str())); |
---|
[88] | 63 | } |
---|
| 64 | |
---|
| 65 | if ((_priority != PRIORITY_ROUND_ROBIN)) |
---|
| 66 | test.error(toString(_("Unsupported priority scheme (Coming Soon). Supported scheme are : %s.\n"),toString(PRIORITY_ROUND_ROBIN).c_str())); |
---|
| 67 | |
---|
| 68 | if ((_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY)) |
---|
| 69 | test.error(toString(_("Unsupported load_balancing scheme (Coming Soon). Supported scheme are : %s.\n"),toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY).c_str())); |
---|
| 70 | |
---|
| 71 | log_end(Issue_queue,FUNCTION); |
---|
| 72 | |
---|
| 73 | return test; |
---|
| 74 | }; |
---|
| 75 | |
---|
| 76 | }; // end namespace issue_queue |
---|
| 77 | }; // end namespace ooo_engine |
---|
| 78 | }; // end namespace multi_ooo_engine |
---|
| 79 | }; // end namespace core |
---|
| 80 | |
---|
| 81 | }; // end namespace behavioural |
---|
| 82 | }; // end namespace morpheo |
---|