[78] | 1 | /* |
---|
| 2 | * $Id: Parameters_msg_error.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/include/Types.h" |
---|
| 9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Parameters.h" |
---|
[87] | 10 | #include "Common/include/Max.h" |
---|
[78] | 11 | #include <sstream> |
---|
| 12 | |
---|
| 13 | namespace morpheo { |
---|
| 14 | namespace behavioural { |
---|
| 15 | namespace core { |
---|
| 16 | namespace multi_front_end { |
---|
| 17 | namespace front_end { |
---|
| 18 | namespace decod_unit { |
---|
| 19 | namespace decod { |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | #undef FUNCTION |
---|
| 23 | #define FUNCTION "Decod::msg_error" |
---|
[82] | 24 | Parameters_test Parameters::msg_error(void) |
---|
[78] | 25 | { |
---|
| 26 | log_printf(FUNC,Decod,FUNCTION,"Begin"); |
---|
[82] | 27 | |
---|
| 28 | Parameters_test test("Decod"); |
---|
[78] | 29 | |
---|
| 30 | if (_nb_inst_decod == 0) |
---|
[82] | 31 | test.error(_("nb_inst_decod must be > 0.\n")); |
---|
[78] | 32 | |
---|
[88] | 33 | // if ((_size_general_data != 32) and |
---|
| 34 | // (_size_general_data != 64)) |
---|
| 35 | // test.error(_("size_general_data must be equal at 32 or 64 bits.\n")); |
---|
[78] | 36 | |
---|
[88] | 37 | // if ((_nb_branch_speculated == 0) or |
---|
| 38 | // (_nb_branch_speculated > _nb_context)) |
---|
| 39 | // test.error(_("nb_branch_speculated must be in [1:nb_context].\n")); |
---|
[78] | 40 | |
---|
| 41 | if ((_nb_context_select == 0) or |
---|
| 42 | (_nb_context_select > _nb_context)) |
---|
[82] | 43 | test.error(_("nb_context_select must be in [1:nb_context].\n")); |
---|
[78] | 44 | |
---|
[87] | 45 | uint32_t sum_inst_fetch = 0; |
---|
| 46 | for (uint32_t i=0; i<_nb_context_select; i++) |
---|
| 47 | sum_inst_fetch += max<uint32_t>(_nb_inst_fetch,_nb_context,i+1); |
---|
| 48 | |
---|
| 49 | if (sum_inst_fetch < _nb_inst_decod) |
---|
[88] | 50 | test.error(_("The sum of the _nb_context_select most nb_inst_fetch must be greater that _nb_inst_decod\n")); |
---|
[87] | 51 | |
---|
[78] | 52 | if ((_priority != PRIORITY_ROUND_ROBIN)) |
---|
[82] | 53 | test.error(toString(_("Unsupported priority scheme. Supported scheme are : %s.\n"),toString(PRIORITY_ROUND_ROBIN).c_str())); |
---|
[78] | 54 | |
---|
| 55 | if ((_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY)) |
---|
[82] | 56 | test.error(toString(_("Unsupported load_balancing scheme. Supported scheme are : %s.\n"),toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY).c_str())); |
---|
[78] | 57 | |
---|
[82] | 58 | return test; |
---|
[78] | 59 | |
---|
| 60 | log_printf(FUNC,Decod,FUNCTION,"End"); |
---|
| 61 | }; |
---|
| 62 | |
---|
| 63 | }; // end namespace decod |
---|
| 64 | }; // end namespace decod_unit |
---|
| 65 | }; // end namespace front_end |
---|
| 66 | }; // end namespace multi_front_end |
---|
| 67 | }; // end namespace core |
---|
| 68 | |
---|
| 69 | }; // end namespace behavioural |
---|
| 70 | }; // end namespace morpheo |
---|