gem5 v24.0.0.0
Loading...
Searching...
No Matches
messages.cc
Go to the documentation of this file.
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in the
10 * documentation and/or other materials provided with the distribution;
11 * neither the name of the copyright holders nor the names of its
12 * contributors may be used to endorse or promote products derived from
13 * this software without specific prior written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
30
31namespace sc_core
32{
33
34const char SC_ID_NO_BOOL_RETURNED_[] = "operator does not return boolean";
35const char SC_ID_NO_INT_RETURNED_[] = "operator does not return int";
36const char SC_ID_NO_SC_LOGIC_RETURNED_[] = "operator does not return sc_logic";
37const char SC_ID_OPERAND_NOT_SC_LOGIC_[] = "operand is not sc_logic";
38const char SC_ID_OPERAND_NOT_BOOL_[] = "operand is not bool";
39const char SC_ID_INSTANCE_EXISTS_[] = "object already exists";
40const char SC_ID_ILLEGAL_CHARACTERS_[] = "illegal characters";
41const char SC_ID_VC6_PROCESS_HELPER_[] =
42 "internal error: sc_vc6_process_helper";
43const char SC_ID_VC6_MAX_PROCESSES_EXCEEDED_[] =
44 "maximum number of processes per module exceeded (VC6)";
45const char SC_ID_END_MODULE_NOT_CALLED_[] =
46 "module construction not properly completed: did "
47 "you forget to add a sc_module_name parameter to "
48 "your module constructor?";
49const char SC_ID_HIER_NAME_INCORRECT_[] =
50 "hierarchical name as shown may be incorrect due to previous errors";
51const char SC_ID_SET_STACK_SIZE_[] =
52 "set_stack_size() is only allowed for SC_THREADs and SC_CTHREADs";
53const char SC_ID_SC_MODULE_NAME_USE_[] = "incorrect use of sc_module_name";
54const char SC_ID_SC_MODULE_NAME_REQUIRED_[] =
55 "an sc_module_name parameter for your constructor is required";
56const char SC_ID_SET_TIME_RESOLUTION_[] = "set time resolution failed";
57const char SC_ID_SET_DEFAULT_TIME_UNIT_[] = "set default time unit failed";
58const char SC_ID_DEFAULT_TIME_UNIT_CHANGED_[] =
59 "default time unit changed to time resolution";
60const char SC_ID_INCONSISTENT_API_CONFIG_[] =
61 "inconsistent library configuration detected";
62const char SC_ID_WAIT_NOT_ALLOWED_[] =
63 "wait() is only allowed in SC_THREADs and SC_CTHREADs";
64const char SC_ID_NEXT_TRIGGER_NOT_ALLOWED_[] =
65 "next_trigger() is only allowed in SC_METHODs";
66const char SC_ID_IMMEDIATE_NOTIFICATION_[] =
67 "immediate notification is not allowed during update phase or elaboration";
68const char SC_ID_HALT_NOT_ALLOWED_[] = "halt() is only allowed in SC_CTHREADs";
69const char SC_ID_WATCHING_NOT_ALLOWED_[] =
70 "watching() has been deprecated, use reset_signal_is()";
71const char SC_ID_DONT_INITIALIZE_[] =
72 "dont_initialize() has no effect for SC_CTHREADs";
73const char SC_ID_WAIT_N_INVALID_[] = "wait(n) is only valid for n > 0";
74const char SC_ID_MAKE_SENSITIVE_[] = "make sensitive failed";
75const char SC_ID_MAKE_SENSITIVE_POS_[] = "make sensitive pos failed";
76const char SC_ID_MAKE_SENSITIVE_NEG_[] = "make sensitive neg failed";
77const char SC_ID_INSERT_MODULE_[] = "insert module failed";
78const char SC_ID_REMOVE_MODULE_[] = "remove module failed";
79const char SC_ID_NOTIFY_DELAYED_[] =
80 "notify_delayed() cannot be called on events "
81 "that have pending notifications";
82const char SC_ID_GEN_UNIQUE_NAME_[] =
83 "cannot generate unique name from null string";
84const char SC_ID_MODULE_NAME_STACK_EMPTY_[] =
85 "module name stack is empty: did you forget to "
86 "add a sc_module_name parameter to your module "
87 "constructor?";
88const char SC_ID_NAME_EXISTS_[] = "name already exists";
89const char SC_ID_IMMEDIATE_SELF_NOTIFICATION_[] =
90 "immediate self-notification ignored as of IEEE 1666-2011";
91const char SC_ID_WAIT_DURING_UNWINDING_[] =
92 "wait() not allowed during unwinding";
93const char SC_ID_CYCLE_MISSES_EVENTS_[] =
94 "the simulation contains timed-events but they are "
95 "ignored by sc_cycle() ==> the simulation will be "
96 "incorrect";
97const char SC_ID_RETHROW_UNWINDING_[] =
98 "sc_unwind_exception not re-thrown during kill/reset";
99const char SC_ID_PROCESS_ALREADY_UNWINDING_[] =
100 "kill/reset ignored during unwinding";
101const char SC_ID_MODULE_METHOD_AFTER_START_[] =
102 "call to SC_METHOD in sc_module while simulation running";
103const char SC_ID_MODULE_THREAD_AFTER_START_[] =
104 "call to SC_THREAD in sc_module while simulation running";
105const char SC_ID_MODULE_CTHREAD_AFTER_START_[] =
106 "call to SC_CTHREAD in sc_module while simulation running";
107const char SC_ID_SIMULATION_TIME_OVERFLOW_[] =
108 "simulation time value overflow, simulation aborted";
109const char SC_ID_SIMULATION_STOP_CALLED_TWICE_[] =
110 "sc_stop has already been called";
111const char SC_ID_SIMULATION_START_AFTER_STOP_[] =
112 "sc_start called after sc_stop has been called";
113const char SC_ID_STOP_MODE_AFTER_START_[] =
114 "attempt to set sc_stop mode after start will be ignored";
115const char SC_ID_SIMULATION_START_AFTER_ERROR_[] =
116 "attempt to restart simulation after error";
117const char SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_[] = "uncaught exception";
118const char SC_ID_PHASE_CALLBACKS_UNSUPPORTED_[] =
119 "simulation phase callbacks not enabled";
120const char SC_ID_PHASE_CALLBACK_NOT_IMPLEMENTED_[] =
121 "empty simulation phase callback called";
122const char SC_ID_PHASE_CALLBACK_REGISTER_[] =
123 "register simulation phase callback";
124const char SC_ID_PHASE_CALLBACK_FORBIDDEN_[] =
125 "forbidden action in simulation phase callback";
126const char SC_ID_SIMULATION_START_UNEXPECTED_[] =
127 "sc_start called unexpectedly";
128const char SC_ID_THROW_IT_IGNORED_[] =
129 "throw_it on method/non-running process is being ignored ";
130const char SC_ID_NOT_EXPECTING_DYNAMIC_EVENT_NOTIFY_[] =
131 "dynamic event notification encountered when sensitivity is static";
132const char SC_ID_DISABLE_WILL_ORPHAN_PROCESS_[] =
133 "disable() or dont_initialize() called on process with no static "
134 "sensitivity, it will be orphaned";
135const char SC_ID_PROCESS_CONTROL_CORNER_CASE_[] =
136 "Undefined process control interaction";
137const char SC_ID_METHOD_TERMINATION_EVENT_[] =
138 "Attempt to get terminated event for a method process";
139const char SC_ID_JOIN_ON_METHOD_HANDLE_[] =
140 "Attempt to register method process with sc_join object";
141const char SC_ID_NO_PROCESS_SEMANTICS_[] =
142 "Attempt to invoke process with no semantics() method";
143const char SC_ID_EVENT_ON_NULL_PROCESS_[] =
144 "Attempt to get an event for non-existent process";
145const char SC_ID_EVENT_LIST_FAILED_[] =
146 "invalid use of sc_(and|or)_event list";
147const char SC_ID_UNKNOWN_PROCESS_TYPE_[] = "Unknown process type";
148const char SC_ID_TIME_CONVERSION_FAILED_[] = "sc_time conversion failed";
149const char SC_ID_NEGATIVE_SIMULATION_TIME_[] =
150 "negative simulation interval specified in sc_start call";
151const char SC_ID_BAD_SC_MODULE_CONSTRUCTOR_[] =
152 "sc_module(const char*), sc_module(const std::string&) "
153 "have been deprecated, use sc_module(const sc_module_name&)";
154const char SC_ID_EMPTY_PROCESS_HANDLE_[] =
155 "attempt to use an empty process handle ignored";
156const char SC_ID_NO_SC_START_ACTIVITY_[] =
157 "no activity or clock movement for sc_start() invocation";
158const char SC_ID_KILL_PROCESS_WHILE_UNITIALIZED_[] =
159 "a process may not be killed before it is initialized";
160const char SC_ID_RESET_PROCESS_WHILE_NOT_RUNNING_[] =
161 "a process may not be asynchronously reset while the "
162 "simulation is not running";
163const char SC_ID_THROW_IT_WHILE_NOT_RUNNING_[] =
164 "throw_it not allowed unless simulation is running ";
165
166namespace {
167
168sc_gem5::DefaultReportMessages predfinedMessages{
169 {500, SC_ID_NO_BOOL_RETURNED_},
170 {501, SC_ID_NO_INT_RETURNED_},
171 {502, SC_ID_NO_SC_LOGIC_RETURNED_},
172 {503, SC_ID_OPERAND_NOT_SC_LOGIC_},
173 {504, SC_ID_OPERAND_NOT_BOOL_},
174 {505, SC_ID_INSTANCE_EXISTS_},
175 {506, SC_ID_ILLEGAL_CHARACTERS_},
176 {507, SC_ID_VC6_PROCESS_HELPER_},
177 {508, SC_ID_VC6_MAX_PROCESSES_EXCEEDED_},
178 {509, SC_ID_END_MODULE_NOT_CALLED_},
179 {510, SC_ID_HIER_NAME_INCORRECT_},
180 {511, SC_ID_SET_STACK_SIZE_},
181 {512, SC_ID_SC_MODULE_NAME_USE_},
182 {513, SC_ID_SC_MODULE_NAME_REQUIRED_},
183 {514, SC_ID_SET_TIME_RESOLUTION_},
184 {515, SC_ID_SET_DEFAULT_TIME_UNIT_},
185 {516, SC_ID_DEFAULT_TIME_UNIT_CHANGED_},
186 {517, SC_ID_INCONSISTENT_API_CONFIG_},
187 {519, SC_ID_WAIT_NOT_ALLOWED_},
188 {520, SC_ID_NEXT_TRIGGER_NOT_ALLOWED_},
189 {521, SC_ID_IMMEDIATE_NOTIFICATION_},
190 {522, SC_ID_HALT_NOT_ALLOWED_},
191 {523, SC_ID_WATCHING_NOT_ALLOWED_},
192 {524, SC_ID_DONT_INITIALIZE_},
193 {525, SC_ID_WAIT_N_INVALID_},
194 {526, SC_ID_MAKE_SENSITIVE_},
195 {527, SC_ID_MAKE_SENSITIVE_POS_},
196 {528, SC_ID_MAKE_SENSITIVE_NEG_},
197 {529, SC_ID_INSERT_MODULE_},
198 {530, SC_ID_REMOVE_MODULE_},
199 {531, SC_ID_NOTIFY_DELAYED_},
200 {532, SC_ID_GEN_UNIQUE_NAME_},
201 {533, SC_ID_MODULE_NAME_STACK_EMPTY_},
202 {534, SC_ID_NAME_EXISTS_},
203 {536, SC_ID_IMMEDIATE_SELF_NOTIFICATION_},
204 {537, SC_ID_WAIT_DURING_UNWINDING_},
205 {538, SC_ID_CYCLE_MISSES_EVENTS_},
206 {539, SC_ID_RETHROW_UNWINDING_},
207 {540, SC_ID_PROCESS_ALREADY_UNWINDING_},
208 {541, SC_ID_MODULE_METHOD_AFTER_START_},
209 {542, SC_ID_MODULE_THREAD_AFTER_START_},
210 {543, SC_ID_MODULE_CTHREAD_AFTER_START_},
211 {544, SC_ID_SIMULATION_TIME_OVERFLOW_},
212 {545, SC_ID_SIMULATION_STOP_CALLED_TWICE_},
213 {546, SC_ID_SIMULATION_START_AFTER_STOP_},
214 {547, SC_ID_STOP_MODE_AFTER_START_},
215 {548, SC_ID_SIMULATION_START_AFTER_ERROR_},
216 {549, SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_},
217 {550, SC_ID_PHASE_CALLBACKS_UNSUPPORTED_},
218 {551, SC_ID_PHASE_CALLBACK_NOT_IMPLEMENTED_},
219 {552, SC_ID_PHASE_CALLBACK_REGISTER_},
220 {553, SC_ID_PHASE_CALLBACK_FORBIDDEN_},
221 {554, SC_ID_SIMULATION_START_UNEXPECTED_},
222 {556, SC_ID_THROW_IT_IGNORED_},
223 {557, SC_ID_NOT_EXPECTING_DYNAMIC_EVENT_NOTIFY_},
224 {558, SC_ID_DISABLE_WILL_ORPHAN_PROCESS_},
225 {559, SC_ID_PROCESS_CONTROL_CORNER_CASE_},
226 {560, SC_ID_METHOD_TERMINATION_EVENT_},
227 {561, SC_ID_JOIN_ON_METHOD_HANDLE_},
228 {563, SC_ID_NO_PROCESS_SEMANTICS_},
229 {564, SC_ID_EVENT_ON_NULL_PROCESS_},
230 {565, SC_ID_EVENT_LIST_FAILED_},
231 {566, SC_ID_UNKNOWN_PROCESS_TYPE_},
232 {567, SC_ID_TIME_CONVERSION_FAILED_},
233 {568, SC_ID_NEGATIVE_SIMULATION_TIME_},
234 {569, SC_ID_BAD_SC_MODULE_CONSTRUCTOR_},
235 {570, SC_ID_EMPTY_PROCESS_HANDLE_},
236 {571, SC_ID_NO_SC_START_ACTIVITY_},
237 {572, SC_ID_KILL_PROCESS_WHILE_UNITIALIZED_},
238 {573, SC_ID_RESET_PROCESS_WHILE_NOT_RUNNING_},
239 {574, SC_ID_THROW_IT_WHILE_NOT_RUNNING_}
240};
241
242} // anonymous namespace
243
244} // namespace sc_core

Generated on Tue Jun 18 2024 16:24:06 for gem5 by doxygen 1.11.0