[78] | 1 | /* |
---|
| 2 | * $Id: Parameters_msg_error.cpp 82 2008-05-01 16:48:45Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/include/Types.h" |
---|
| 9 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/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 rename_unit { |
---|
| 18 | namespace register_translation_unit { |
---|
| 19 | namespace stat_list_unit { |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | #undef FUNCTION |
---|
| 23 | #define FUNCTION "Stat_List_unit::msg_error" |
---|
[82] | 24 | Parameters_test Parameters::msg_error(void) |
---|
[78] | 25 | { |
---|
| 26 | log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin"); |
---|
| 27 | |
---|
[82] | 28 | Parameters_test test("Stat_List_unit"); |
---|
[78] | 29 | |
---|
| 30 | if (not is_multiple(_nb_bank, _nb_reg_free)) |
---|
[82] | 31 | test.error(_("nb_bank must be a multiple of nb_reg_free.\n")); |
---|
[78] | 32 | |
---|
| 33 | if (_nb_general_register < _nb_gpr_use_init) |
---|
[82] | 34 | test.error(toString(_("the number of physical general register is insuffisant. (you need less %d registers.\n"),_nb_gpr_use_init)); |
---|
[78] | 35 | |
---|
| 36 | if (_nb_special_register < _nb_spr_use_init) |
---|
[82] | 37 | test.error(toString(_("the number of physical special register is insuffisant. (you need less %d registers.\n"),_nb_spr_use_init)); |
---|
[78] | 38 | |
---|
| 39 | if (not is_power2(_nb_general_register)) |
---|
[82] | 40 | test.error(_("the number of physical general register must be a power of 2.\n")); |
---|
[78] | 41 | |
---|
| 42 | if (not is_power2(_nb_special_register)) |
---|
[82] | 43 | test.error(_("the number of physical special register must be a power of 2.\n")); |
---|
[78] | 44 | |
---|
| 45 | if (not is_power2(_nb_bank)) |
---|
[82] | 46 | test.error(_("the number of bank must be a power of 2.\n")); |
---|
[78] | 47 | |
---|
[82] | 48 | return test; |
---|
[78] | 49 | |
---|
| 50 | log_printf(FUNC,Stat_List_unit,FUNCTION,"End"); |
---|
| 51 | }; |
---|
| 52 | |
---|
| 53 | }; // end namespace stat_list_unit |
---|
| 54 | }; // end namespace register_translation_unit |
---|
| 55 | }; // end namespace rename_unit |
---|
| 56 | }; // end namespace ooo_engine |
---|
| 57 | }; // end namespace multi_ooo_engine |
---|
| 58 | }; // end namespace core |
---|
| 59 | |
---|
| 60 | }; // end namespace behavioural |
---|
| 61 | }; // end namespace morpheo |
---|