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/Test.h" |
---|
9 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Parameters.h" |
---|
10 | #include <sstream> |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | namespace core { |
---|
15 | namespace multi_execute_loop { |
---|
16 | namespace execute_loop { |
---|
17 | namespace multi_execute_unit { |
---|
18 | namespace execute_unit { |
---|
19 | namespace load_store_unit { |
---|
20 | |
---|
21 | |
---|
22 | #undef FUNCTION |
---|
23 | #define FUNCTION "Load_store_unit::msg_error" |
---|
24 | Parameters_test Parameters::msg_error(void) |
---|
25 | { |
---|
26 | log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); |
---|
27 | |
---|
28 | Parameters_test test("Load_store_unit"); |
---|
29 | |
---|
30 | switch (_speculative_load) |
---|
31 | { |
---|
32 | case SPECULATIVE_LOAD_ACCESS : |
---|
33 | { |
---|
34 | if (not (_nb_bypass_memory == 0)) |
---|
35 | test.error(_("Bypass memory is not supported. Please wait a next revision.\n")); |
---|
36 | |
---|
37 | break; |
---|
38 | } |
---|
39 | case NO_SPECULATIVE_LOAD : |
---|
40 | // case SPECULATIVE_LOAD_BYPASS : |
---|
41 | // case SPECULATIVE_LOAD_COMMIT : |
---|
42 | default : |
---|
43 | { |
---|
44 | if (not (_nb_bypass_memory == 0)) |
---|
45 | test.error(toString(_("In the load scheme '%s', they have none bypass.\n"),toString(_speculative_load).c_str())); |
---|
46 | |
---|
47 | test.error(toString(_("Speculative load scheme '%s' is not supported. Please wait a next revision.\n"),toString(_speculative_load).c_str())); |
---|
48 | break; |
---|
49 | } |
---|
50 | } |
---|
51 | |
---|
52 | if (not (_size_store_queue >= 2)) |
---|
53 | test.error(_("Store queue must have at less two slot.\n")); |
---|
54 | |
---|
55 | if (not (_nb_bypass_memory <= _size_load_queue)) |
---|
56 | test.error(_("Bypass number must be less than load_queue's size.\n")); |
---|
57 | |
---|
58 | if (not is_multiple(_nb_store_queue_bank,_nb_inst_memory)) |
---|
59 | test.error(_("Number of bank of store queue must be a multiple of number input instruction.\n")); |
---|
60 | |
---|
61 | if (not is_multiple(_nb_load_queue_bank,_nb_inst_memory)) |
---|
62 | test.error(_("Number of bank of load queue must be a multiple of number input instruction.\n")); |
---|
63 | |
---|
64 | switch (_speculative_commit_predictor_scheme) |
---|
65 | { |
---|
66 | case PREDICTOR_NEVER_TAKE : |
---|
67 | case PREDICTOR_ALWAYS_TAKE : |
---|
68 | case PREDICTOR_COUNTER : |
---|
69 | { |
---|
70 | break; |
---|
71 | } |
---|
72 | case PREDICTOR_STATIC : |
---|
73 | case PREDICTOR_LAST_TAKE : |
---|
74 | case PREDICTOR_LOCAL : |
---|
75 | case PREDICTOR_GLOBAL : |
---|
76 | case PREDICTOR_META : |
---|
77 | case PREDICTOR_CUSTOM : |
---|
78 | { |
---|
79 | test.error(toString(_("Predictor scheme \"%s\" is unsupported for load scheme.\n"),toString(_speculative_commit_predictor_scheme).c_str())); |
---|
80 | break; |
---|
81 | } |
---|
82 | } |
---|
83 | |
---|
84 | if (_nb_cache_port > 1) |
---|
85 | test.warning(_("nb_cache_port > 1 is unsupported (Coming Soon).\n")); |
---|
86 | |
---|
87 | if (_nb_inst_memory > 1) |
---|
88 | test.warning(_("nb_inst_memory > 1 is unsupported (Coming Soon).\n")); |
---|
89 | |
---|
90 | log_printf(FUNC,Load_store_unit,FUNCTION,"End"); |
---|
91 | |
---|
92 | return test; |
---|
93 | |
---|
94 | }; |
---|
95 | |
---|
96 | }; // end namespace load_store_unit |
---|
97 | }; // end namespace execute_unit |
---|
98 | }; // end namespace multi_execute_unit |
---|
99 | }; // end namespace execute_loop |
---|
100 | }; // end namespace multi_execute_loop |
---|
101 | }; // end namespace core |
---|
102 | |
---|
103 | }; // end namespace behavioural |
---|
104 | }; // end namespace morpheo |
---|