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_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)) |
---|
29 | test.error(toString(_("nb_bank must be a multiple of size_queue.\n"))); |
---|
30 | |
---|
31 | if (not is_multiple(_nb_bank, _nb_inst_issue)) |
---|
32 | test.error(toString(_("nb_inst_issue must be a multiple of nb_bank.\n"))); |
---|
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 | bool type_valid [_nb_type]; |
---|
41 | |
---|
42 | for (uint32_t i=0; i<_nb_type; i++) |
---|
43 | type_valid [i] = false; |
---|
44 | |
---|
45 | type_valid [TYPE_ALU ] = true; |
---|
46 | type_valid [TYPE_SHIFT ] = true; |
---|
47 | type_valid [TYPE_MOVE ] = true; |
---|
48 | type_valid [TYPE_TEST ] = true; |
---|
49 | type_valid [TYPE_MUL ] = true; |
---|
50 | type_valid [TYPE_DIV ] = true; |
---|
51 | type_valid [TYPE_EXTEND ] = true; |
---|
52 | type_valid [TYPE_FIND ] = true; |
---|
53 | type_valid [TYPE_SPECIAL] = true; |
---|
54 | type_valid [TYPE_CUSTOM ] = true; |
---|
55 | type_valid [TYPE_BRANCH ] = true; |
---|
56 | type_valid [TYPE_MEMORY ] = true; |
---|
57 | |
---|
58 | for (uint32_t i=0; i<_nb_rename_unit; i++) |
---|
59 | { |
---|
60 | bool type_present [_nb_type]; |
---|
61 | |
---|
62 | for (uint32_t j=0; j<_nb_type; j++) |
---|
63 | type_present [j] = not type_valid [j]; |
---|
64 | |
---|
65 | bool find = false; |
---|
66 | for (uint32_t j=0; j<_nb_inst_issue; j++) |
---|
67 | if (_table_routing [i][j]) |
---|
68 | { |
---|
69 | find = true; |
---|
70 | |
---|
71 | for (uint32_t k=0; k<_nb_type; k++) |
---|
72 | type_present [k] |= _table_issue_type [j][k]; |
---|
73 | } |
---|
74 | |
---|
75 | if (not find) |
---|
76 | test.error(toString(_("Rename_unit [%d] is not connected with a issue slot.\n"),i)); |
---|
77 | else |
---|
78 | for (uint32_t j=0; j<_nb_type; j++) |
---|
79 | if (not type_present [j]) |
---|
80 | test.error(toString(_("Rename_unit [%d] can't issue instruction's type \"%s\".\n"),i,toString_type(j).c_str())); |
---|
81 | } |
---|
82 | |
---|
83 | if ((_priority != PRIORITY_ROUND_ROBIN)) |
---|
84 | test.error(toString(_("Unsupported priority scheme (Coming Soon). Supported scheme are : %s.\n"),toString(PRIORITY_ROUND_ROBIN).c_str())); |
---|
85 | |
---|
86 | if ((_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY)) |
---|
87 | test.error(toString(_("Unsupported load_balancing scheme (Coming Soon). Supported scheme are : %s.\n"),toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY).c_str())); |
---|
88 | |
---|
89 | log_end(Issue_queue,FUNCTION); |
---|
90 | |
---|
91 | return test; |
---|
92 | }; |
---|
93 | |
---|
94 | }; // end namespace issue_queue |
---|
95 | }; // end namespace ooo_engine |
---|
96 | }; // end namespace multi_ooo_engine |
---|
97 | }; // end namespace core |
---|
98 | |
---|
99 | }; // end namespace behavioural |
---|
100 | }; // end namespace morpheo |
---|