gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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  * Authors: Gabe Black
28  */
29 
31 #include "systemc/utils/report.hh"
32 
33 namespace sc_core
34 {
35 
36 const char SC_ID_NO_BOOL_RETURNED_[] = "operator does not return boolean";
37 const char SC_ID_NO_INT_RETURNED_[] = "operator does not return int";
38 const char SC_ID_NO_SC_LOGIC_RETURNED_[] = "operator does not return sc_logic";
39 const char SC_ID_OPERAND_NOT_SC_LOGIC_[] = "operand is not sc_logic";
40 const char SC_ID_OPERAND_NOT_BOOL_[] = "operand is not bool";
41 const char SC_ID_INSTANCE_EXISTS_[] = "object already exists";
42 const char SC_ID_ILLEGAL_CHARACTERS_[] = "illegal characters";
44  "internal error: sc_vc6_process_helper";
46  "maximum number of processes per module exceeded (VC6)";
48  "module construction not properly completed: did "
49  "you forget to add a sc_module_name parameter to "
50  "your module constructor?";
52  "hierarchical name as shown may be incorrect due to previous errors";
53 const char SC_ID_SET_STACK_SIZE_[] =
54  "set_stack_size() is only allowed for SC_THREADs and SC_CTHREADs";
55 const char SC_ID_SC_MODULE_NAME_USE_[] = "incorrect use of sc_module_name";
57  "an sc_module_name parameter for your constructor is required";
58 const char SC_ID_SET_TIME_RESOLUTION_[] = "set time resolution failed";
59 const char SC_ID_SET_DEFAULT_TIME_UNIT_[] = "set default time unit failed";
61  "default time unit changed to time resolution";
63  "inconsistent library configuration detected";
65  "wait() is only allowed in SC_THREADs and SC_CTHREADs";
67  "next_trigger() is only allowed in SC_METHODs";
69  "immediate notification is not allowed during update phase or elaboration";
70 const char SC_ID_HALT_NOT_ALLOWED_[] = "halt() is only allowed in SC_CTHREADs";
72  "watching() has been deprecated, use reset_signal_is()";
73 const char SC_ID_DONT_INITIALIZE_[] =
74  "dont_initialize() has no effect for SC_CTHREADs";
75 const char SC_ID_WAIT_N_INVALID_[] = "wait(n) is only valid for n > 0";
76 const char SC_ID_MAKE_SENSITIVE_[] = "make sensitive failed";
77 const char SC_ID_MAKE_SENSITIVE_POS_[] = "make sensitive pos failed";
78 const char SC_ID_MAKE_SENSITIVE_NEG_[] = "make sensitive neg failed";
79 const char SC_ID_INSERT_MODULE_[] = "insert module failed";
80 const char SC_ID_REMOVE_MODULE_[] = "remove module failed";
81 const char SC_ID_NOTIFY_DELAYED_[] =
82  "notify_delayed() cannot be called on events "
83  "that have pending notifications";
84 const char SC_ID_GEN_UNIQUE_NAME_[] =
85  "cannot generate unique name from null string";
87  "module name stack is empty: did you forget to "
88  "add a sc_module_name parameter to your module "
89  "constructor?";
90 const char SC_ID_NAME_EXISTS_[] = "name already exists";
92  "immediate self-notification ignored as of IEEE 1666-2011";
94  "wait() not allowed during unwinding";
96  "the simulation contains timed-events but they are "
97  "ignored by sc_cycle() ==> the simulation will be "
98  "incorrect";
100  "sc_unwind_exception not re-thrown during kill/reset";
102  "kill/reset ignored during unwinding";
104  "call to SC_METHOD in sc_module while simulation running";
106  "call to SC_THREAD in sc_module while simulation running";
108  "call to SC_CTHREAD in sc_module while simulation running";
110  "simulation time value overflow, simulation aborted";
112  "sc_stop has already been called";
114  "sc_start called after sc_stop has been called";
116  "attempt to set sc_stop mode after start will be ignored";
118  "attempt to restart simulation after error";
119 const char SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_[] = "uncaught exception";
121  "simulation phase callbacks not enabled";
123  "empty simulation phase callback called";
125  "register simulation phase callback";
127  "forbidden action in simulation phase callback";
129  "sc_start called unexpectedly";
131  "throw_it on method/non-running process is being ignored ";
133  "dynamic event notification encountered when sensitivity is static";
135  "disable() or dont_initialize() called on process with no static "
136  "sensitivity, it will be orphaned";
138  "Undefined process control interaction";
140  "Attempt to get terminated event for a method process";
142  "Attempt to register method process with sc_join object";
144  "Attempt to invoke process with no semantics() method";
146  "Attempt to get an event for non-existent process";
148  "invalid use of sc_(and|or)_event list";
149 const char SC_ID_UNKNOWN_PROCESS_TYPE_[] = "Unknown process type";
150 const char SC_ID_TIME_CONVERSION_FAILED_[] = "sc_time conversion failed";
152  "negative simulation interval specified in sc_start call";
154  "sc_module(const char*), sc_module(const std::string&) "
155  "have been deprecated, use sc_module(const sc_module_name&)";
157  "attempt to use an empty process handle ignored";
159  "no activity or clock movement for sc_start() invocation";
161  "a process may not be killed before it is initialized";
163  "a process may not be asynchronously reset while the "
164  "simulation is not running";
166  "throw_it not allowed unless simulation is running ";
167 
168 namespace {
169 
170 sc_gem5::DefaultReportMessages predfinedMessages{
171  {500, SC_ID_NO_BOOL_RETURNED_},
172  {501, SC_ID_NO_INT_RETURNED_},
173  {502, SC_ID_NO_SC_LOGIC_RETURNED_},
174  {503, SC_ID_OPERAND_NOT_SC_LOGIC_},
175  {504, SC_ID_OPERAND_NOT_BOOL_},
176  {505, SC_ID_INSTANCE_EXISTS_},
177  {506, SC_ID_ILLEGAL_CHARACTERS_},
178  {507, SC_ID_VC6_PROCESS_HELPER_},
179  {508, SC_ID_VC6_MAX_PROCESSES_EXCEEDED_},
180  {509, SC_ID_END_MODULE_NOT_CALLED_},
181  {510, SC_ID_HIER_NAME_INCORRECT_},
182  {511, SC_ID_SET_STACK_SIZE_},
183  {512, SC_ID_SC_MODULE_NAME_USE_},
184  {513, SC_ID_SC_MODULE_NAME_REQUIRED_},
185  {514, SC_ID_SET_TIME_RESOLUTION_},
186  {515, SC_ID_SET_DEFAULT_TIME_UNIT_},
187  {516, SC_ID_DEFAULT_TIME_UNIT_CHANGED_},
188  {517, SC_ID_INCONSISTENT_API_CONFIG_},
189  {519, SC_ID_WAIT_NOT_ALLOWED_},
190  {520, SC_ID_NEXT_TRIGGER_NOT_ALLOWED_},
191  {521, SC_ID_IMMEDIATE_NOTIFICATION_},
192  {522, SC_ID_HALT_NOT_ALLOWED_},
193  {523, SC_ID_WATCHING_NOT_ALLOWED_},
194  {524, SC_ID_DONT_INITIALIZE_},
195  {525, SC_ID_WAIT_N_INVALID_},
196  {526, SC_ID_MAKE_SENSITIVE_},
197  {527, SC_ID_MAKE_SENSITIVE_POS_},
198  {528, SC_ID_MAKE_SENSITIVE_NEG_},
199  {529, SC_ID_INSERT_MODULE_},
200  {530, SC_ID_REMOVE_MODULE_},
201  {531, SC_ID_NOTIFY_DELAYED_},
202  {532, SC_ID_GEN_UNIQUE_NAME_},
203  {533, SC_ID_MODULE_NAME_STACK_EMPTY_},
204  {534, SC_ID_NAME_EXISTS_},
205  {536, SC_ID_IMMEDIATE_SELF_NOTIFICATION_},
206  {537, SC_ID_WAIT_DURING_UNWINDING_},
207  {538, SC_ID_CYCLE_MISSES_EVENTS_},
208  {539, SC_ID_RETHROW_UNWINDING_},
209  {540, SC_ID_PROCESS_ALREADY_UNWINDING_},
210  {541, SC_ID_MODULE_METHOD_AFTER_START_},
211  {542, SC_ID_MODULE_THREAD_AFTER_START_},
212  {543, SC_ID_MODULE_CTHREAD_AFTER_START_},
213  {544, SC_ID_SIMULATION_TIME_OVERFLOW_},
214  {545, SC_ID_SIMULATION_STOP_CALLED_TWICE_},
215  {546, SC_ID_SIMULATION_START_AFTER_STOP_},
216  {547, SC_ID_STOP_MODE_AFTER_START_},
217  {548, SC_ID_SIMULATION_START_AFTER_ERROR_},
218  {549, SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_},
219  {550, SC_ID_PHASE_CALLBACKS_UNSUPPORTED_},
220  {551, SC_ID_PHASE_CALLBACK_NOT_IMPLEMENTED_},
221  {552, SC_ID_PHASE_CALLBACK_REGISTER_},
222  {553, SC_ID_PHASE_CALLBACK_FORBIDDEN_},
223  {554, SC_ID_SIMULATION_START_UNEXPECTED_},
224  {556, SC_ID_THROW_IT_IGNORED_},
225  {557, SC_ID_NOT_EXPECTING_DYNAMIC_EVENT_NOTIFY_},
226  {558, SC_ID_DISABLE_WILL_ORPHAN_PROCESS_},
227  {559, SC_ID_PROCESS_CONTROL_CORNER_CASE_},
228  {560, SC_ID_METHOD_TERMINATION_EVENT_},
229  {561, SC_ID_JOIN_ON_METHOD_HANDLE_},
230  {563, SC_ID_NO_PROCESS_SEMANTICS_},
231  {564, SC_ID_EVENT_ON_NULL_PROCESS_},
232  {565, SC_ID_EVENT_LIST_FAILED_},
233  {566, SC_ID_UNKNOWN_PROCESS_TYPE_},
234  {567, SC_ID_TIME_CONVERSION_FAILED_},
235  {568, SC_ID_NEGATIVE_SIMULATION_TIME_},
236  {569, SC_ID_BAD_SC_MODULE_CONSTRUCTOR_},
237  {570, SC_ID_EMPTY_PROCESS_HANDLE_},
238  {571, SC_ID_NO_SC_START_ACTIVITY_},
239  {572, SC_ID_KILL_PROCESS_WHILE_UNITIALIZED_},
240  {573, SC_ID_RESET_PROCESS_WHILE_NOT_RUNNING_},
241  {574, SC_ID_THROW_IT_WHILE_NOT_RUNNING_}
242 };
243 
244 } // anonymous namespace
245 
246 } // namespace sc_core
const char SC_ID_THROW_IT_IGNORED_[]
Definition: messages.cc:130
const char SC_ID_SIMULATION_START_AFTER_ERROR_[]
Definition: messages.cc:117
const char SC_ID_MODULE_METHOD_AFTER_START_[]
Definition: messages.cc:103
const char SC_ID_MODULE_THREAD_AFTER_START_[]
Definition: messages.cc:105
const char SC_ID_CYCLE_MISSES_EVENTS_[]
Definition: messages.cc:95
const char SC_ID_NO_INT_RETURNED_[]
Definition: messages.cc:37
const char SC_ID_NO_SC_START_ACTIVITY_[]
Definition: messages.cc:158
const char SC_ID_WAIT_NOT_ALLOWED_[]
Definition: messages.cc:64
const char SC_ID_JOIN_ON_METHOD_HANDLE_[]
Definition: messages.cc:141
const char SC_ID_VC6_PROCESS_HELPER_[]
Definition: messages.cc:43
const char SC_ID_UNKNOWN_PROCESS_TYPE_[]
Definition: messages.cc:149
const char SC_ID_METHOD_TERMINATION_EVENT_[]
Definition: messages.cc:139
const char SC_ID_OPERAND_NOT_SC_LOGIC_[]
Definition: messages.cc:39
const char SC_ID_EVENT_ON_NULL_PROCESS_[]
Definition: messages.cc:145
const char SC_ID_WAIT_N_INVALID_[]
Definition: messages.cc:75
const char SC_ID_EVENT_LIST_FAILED_[]
Definition: messages.cc:147
const char SC_ID_MAKE_SENSITIVE_NEG_[]
Definition: messages.cc:78
const char SC_ID_NO_BOOL_RETURNED_[]
Definition: messages.cc:36
const char SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_[]
Definition: messages.cc:119
const char SC_ID_STOP_MODE_AFTER_START_[]
Definition: messages.cc:115
const char SC_ID_INCONSISTENT_API_CONFIG_[]
Definition: messages.cc:62
const char SC_ID_MAKE_SENSITIVE_[]
Definition: messages.cc:76
const char SC_ID_SC_MODULE_NAME_USE_[]
Definition: messages.cc:55
const char SC_ID_WAIT_DURING_UNWINDING_[]
Definition: messages.cc:93
const char SC_ID_NO_SC_LOGIC_RETURNED_[]
Definition: messages.cc:38
const char SC_ID_PROCESS_CONTROL_CORNER_CASE_[]
Definition: messages.cc:137
const char SC_ID_SC_MODULE_NAME_REQUIRED_[]
Definition: messages.cc:56
const char SC_ID_INSERT_MODULE_[]
Definition: messages.cc:79
const char SC_ID_NAME_EXISTS_[]
Definition: messages.cc:90
const char SC_ID_INSTANCE_EXISTS_[]
Definition: messages.cc:41
const char SC_ID_TIME_CONVERSION_FAILED_[]
Definition: messages.cc:150
const char SC_ID_KILL_PROCESS_WHILE_UNITIALIZED_[]
Definition: messages.cc:160
const char SC_ID_SET_DEFAULT_TIME_UNIT_[]
Definition: messages.cc:59
const char SC_ID_GEN_UNIQUE_NAME_[]
Definition: messages.cc:84
const char SC_ID_PHASE_CALLBACK_REGISTER_[]
Definition: messages.cc:124
const char SC_ID_SIMULATION_START_UNEXPECTED_[]
Definition: messages.cc:128
const char SC_ID_SET_TIME_RESOLUTION_[]
Definition: messages.cc:58
const char SC_ID_HALT_NOT_ALLOWED_[]
Definition: messages.cc:70
const char SC_ID_NEGATIVE_SIMULATION_TIME_[]
Definition: messages.cc:151
const char SC_ID_NOT_EXPECTING_DYNAMIC_EVENT_NOTIFY_[]
Definition: messages.cc:132
const char SC_ID_PROCESS_ALREADY_UNWINDING_[]
Definition: messages.cc:101
const char SC_ID_IMMEDIATE_SELF_NOTIFICATION_[]
Definition: messages.cc:91
const char SC_ID_OPERAND_NOT_BOOL_[]
Definition: messages.cc:40
const char SC_ID_RETHROW_UNWINDING_[]
Definition: messages.cc:99
const char SC_ID_PHASE_CALLBACKS_UNSUPPORTED_[]
Definition: messages.cc:120
const char SC_ID_DEFAULT_TIME_UNIT_CHANGED_[]
Definition: messages.cc:60
const char SC_ID_ILLEGAL_CHARACTERS_[]
Definition: messages.cc:42
const char SC_ID_EMPTY_PROCESS_HANDLE_[]
Definition: messages.cc:156
const char SC_ID_VC6_MAX_PROCESSES_EXCEEDED_[]
Definition: messages.cc:45
const char SC_ID_MODULE_CTHREAD_AFTER_START_[]
Definition: messages.cc:107
const char SC_ID_PHASE_CALLBACK_NOT_IMPLEMENTED_[]
Definition: messages.cc:122
const char SC_ID_NEXT_TRIGGER_NOT_ALLOWED_[]
Definition: messages.cc:66
const char SC_ID_DISABLE_WILL_ORPHAN_PROCESS_[]
Definition: messages.cc:134
const char SC_ID_SIMULATION_TIME_OVERFLOW_[]
Definition: messages.cc:109
const char SC_ID_HIER_NAME_INCORRECT_[]
Definition: messages.cc:51
const char SC_ID_MODULE_NAME_STACK_EMPTY_[]
Definition: messages.cc:86
const char SC_ID_SIMULATION_STOP_CALLED_TWICE_[]
Definition: messages.cc:111
const char SC_ID_SET_STACK_SIZE_[]
Definition: messages.cc:53
const char SC_ID_BAD_SC_MODULE_CONSTRUCTOR_[]
Definition: messages.cc:153
const char SC_ID_NO_PROCESS_SEMANTICS_[]
Definition: messages.cc:143
const char SC_ID_REMOVE_MODULE_[]
Definition: messages.cc:80
const char SC_ID_SIMULATION_START_AFTER_STOP_[]
Definition: messages.cc:113
const char SC_ID_DONT_INITIALIZE_[]
Definition: messages.cc:73
const char SC_ID_THROW_IT_WHILE_NOT_RUNNING_[]
Definition: messages.cc:165
const char SC_ID_MAKE_SENSITIVE_POS_[]
Definition: messages.cc:77
const char SC_ID_END_MODULE_NOT_CALLED_[]
Definition: messages.cc:47
const char SC_ID_IMMEDIATE_NOTIFICATION_[]
Definition: messages.cc:68
const char SC_ID_NOTIFY_DELAYED_[]
Definition: messages.cc:81
const char SC_ID_RESET_PROCESS_WHILE_NOT_RUNNING_[]
Definition: messages.cc:162
const char SC_ID_WATCHING_NOT_ALLOWED_[]
Definition: messages.cc:71
const char SC_ID_PHASE_CALLBACK_FORBIDDEN_[]
Definition: messages.cc:126

Generated on Fri Feb 28 2020 16:27:03 for gem5 by doxygen 1.8.13