1/*****************************************************************************
2
3  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4  more contributor license agreements.  See the NOTICE file distributed
5  with this work for additional information regarding copyright ownership.
6  Accellera licenses this file to you under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with the
8  License.  You may obtain a copy of the License at
9
10    http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  implied.  See the License for the specific language governing
16  permissions and limitations under the License.
17
18 *****************************************************************************/
19
20/*****************************************************************************
21
22  sc_kernel_ids.h -- Report ids for the kernel code.
23
24  Original Author: Martin Janssen, Synopsys, Inc., 2002-01-17
25
26 CHANGE LOG AT THE END OF THE FILE
27 *****************************************************************************/
28
29#ifndef SC_KERNEL_IDS_H
30#define SC_KERNEL_IDS_H
31
32
33#include "sysc/utils/sc_report.h"
34
35
36// ----------------------------------------------------------------------------
37//  Report ids (kernel)
38//
39//  Report ids in the range of 500-599.
40// ----------------------------------------------------------------------------
41
42#ifndef SC_DEFINE_MESSAGE
43#define SC_DEFINE_MESSAGE(id,unused1,unused2) \
44    namespace sc_core { extern const char id[]; }
45namespace sc_core {
46    extern const char SC_ID_REGISTER_ID_FAILED_[]; // in sc_report_handler.cpp
47}
48#endif
49
50SC_DEFINE_MESSAGE(SC_ID_NO_BOOL_RETURNED_            , 500,
51	"operator does not return boolean")
52SC_DEFINE_MESSAGE(SC_ID_NO_INT_RETURNED_             , 501,
53	"operator does not return int")
54SC_DEFINE_MESSAGE(SC_ID_NO_SC_LOGIC_RETURNED_        , 502,
55	"operator does not return sc_logic")
56SC_DEFINE_MESSAGE(SC_ID_OPERAND_NOT_SC_LOGIC_        , 503,
57	"operand is not sc_logic")
58SC_DEFINE_MESSAGE(SC_ID_OPERAND_NOT_BOOL_            , 504,
59	"operand is not bool")
60SC_DEFINE_MESSAGE(SC_ID_INSTANCE_EXISTS_             , 505,
61	"object already exists")
62SC_DEFINE_MESSAGE(SC_ID_ILLEGAL_CHARACTERS_          , 506,
63	"illegal characters" )
64SC_DEFINE_MESSAGE(SC_ID_VC6_PROCESS_HELPER_          , 507,
65	"internal error: sc_vc6_process_helper" )
66SC_DEFINE_MESSAGE(SC_ID_VC6_MAX_PROCESSES_EXCEEDED_  , 508,
67	"maximum number of processes per module exceeded (VC6)" )
68SC_DEFINE_MESSAGE(SC_ID_END_MODULE_NOT_CALLED_       , 509,
69	"module construction not properly completed: did "
70	"you forget to add a sc_module_name parameter to "
71	"your module constructor?" )
72SC_DEFINE_MESSAGE(SC_ID_HIER_NAME_INCORRECT_         , 510,
73	"hierarchical name as shown may be incorrect due to previous errors" )
74SC_DEFINE_MESSAGE(SC_ID_SET_STACK_SIZE_              , 511,
75	"set_stack_size() is only allowed for SC_THREADs and SC_CTHREADs" )
76SC_DEFINE_MESSAGE(SC_ID_SC_MODULE_NAME_USE_          , 512,
77	"incorrect use of sc_module_name" )
78SC_DEFINE_MESSAGE(SC_ID_SC_MODULE_NAME_REQUIRED_     , 513,
79	"an sc_module_name parameter for your constructor is required" )
80SC_DEFINE_MESSAGE(SC_ID_SET_TIME_RESOLUTION_         , 514,
81	"set time resolution failed" )
82SC_DEFINE_MESSAGE(SC_ID_SET_DEFAULT_TIME_UNIT_       , 515,
83	"set default time unit failed" )
84SC_DEFINE_MESSAGE(SC_ID_DEFAULT_TIME_UNIT_CHANGED_   , 516,
85	"default time unit changed to time resolution" )
86SC_DEFINE_MESSAGE(SC_ID_INCONSISTENT_API_CONFIG_     , 517,
87	"inconsistent library configuration detected" )
88// available message number 518
89SC_DEFINE_MESSAGE(SC_ID_WAIT_NOT_ALLOWED_            , 519,
90	"wait() is only allowed in SC_THREADs and SC_CTHREADs" )
91SC_DEFINE_MESSAGE(SC_ID_NEXT_TRIGGER_NOT_ALLOWED_    , 520,
92	"next_trigger() is only allowed in SC_METHODs" )
93SC_DEFINE_MESSAGE(SC_ID_IMMEDIATE_NOTIFICATION_      , 521,
94	"immediate notification is not allowed during the update phase" )
95SC_DEFINE_MESSAGE(SC_ID_HALT_NOT_ALLOWED_            , 522,
96	"halt() is only allowed in SC_CTHREADs" )
97SC_DEFINE_MESSAGE(SC_ID_WATCHING_NOT_ALLOWED_        , 523,
98	"watching() has been deprecated, use reset_signal_is()" )
99SC_DEFINE_MESSAGE(SC_ID_DONT_INITIALIZE_             , 524,
100	"dont_initialize() has no effect for SC_CTHREADs" )
101SC_DEFINE_MESSAGE(SC_ID_WAIT_N_INVALID_              , 525,
102	"wait(n) is only valid for n > 0" )
103SC_DEFINE_MESSAGE(SC_ID_MAKE_SENSITIVE_              , 526,
104	"make sensitive failed" )
105SC_DEFINE_MESSAGE(SC_ID_MAKE_SENSITIVE_POS_          , 527,
106	"make sensitive pos failed" )
107SC_DEFINE_MESSAGE(SC_ID_MAKE_SENSITIVE_NEG_          , 528,
108	"make sensitive neg failed" )
109SC_DEFINE_MESSAGE(SC_ID_INSERT_MODULE_               , 529,
110	"insert module failed" )
111SC_DEFINE_MESSAGE(SC_ID_REMOVE_MODULE_               , 530,
112	"remove module failed" )
113SC_DEFINE_MESSAGE(SC_ID_NOTIFY_DELAYED_              , 531,
114	"notify_delayed() cannot be called on events "
115	"that have pending notifications" )
116SC_DEFINE_MESSAGE(SC_ID_GEN_UNIQUE_NAME_             , 532,
117	"cannot generate unique name from null string" )
118SC_DEFINE_MESSAGE(SC_ID_MODULE_NAME_STACK_EMPTY_     , 533,
119	"module name stack is empty: did you forget to "
120	"add a sc_module_name parameter to your module "
121	"constructor?" )
122// available message number 534
123// available message number 535
124SC_DEFINE_MESSAGE( SC_ID_IMMEDIATE_SELF_NOTIFICATION_, 536,
125         "immediate self-notification ignored as of IEEE 1666-2011" )
126SC_DEFINE_MESSAGE( SC_ID_WAIT_DURING_UNWINDING_      , 537,
127         "wait() not allowed during unwinding" )
128SC_DEFINE_MESSAGE(SC_ID_CYCLE_MISSES_EVENTS_         , 538,
129         "the simulation contains timed-events but they are "
130         "ignored by sc_cycle() ==> the simulation will be "
131	 "incorrect" )
132SC_DEFINE_MESSAGE( SC_ID_RETHROW_UNWINDING_          , 539,
133         "sc_unwind_exception not re-thrown during kill/reset" )
134SC_DEFINE_MESSAGE( SC_ID_PROCESS_ALREADY_UNWINDING_  , 540,
135         "kill/reset ignored during unwinding" )
136SC_DEFINE_MESSAGE(SC_ID_MODULE_METHOD_AFTER_START_   , 541,
137	"call to SC_METHOD in sc_module while simulation running" )
138SC_DEFINE_MESSAGE(SC_ID_MODULE_THREAD_AFTER_START_   , 542,
139	"call to SC_THREAD in sc_module while simulation running" )
140SC_DEFINE_MESSAGE(SC_ID_MODULE_CTHREAD_AFTER_START_   , 543,
141	"call to SC_CTHREAD in sc_module while simulation running" )
142SC_DEFINE_MESSAGE(SC_ID_SIMULATION_TIME_OVERFLOW_   , 544,
143	"simulation time value overflow, simulation aborted" )
144SC_DEFINE_MESSAGE(SC_ID_SIMULATION_STOP_CALLED_TWICE_ , 545,
145	"sc_stop has already been called" )
146SC_DEFINE_MESSAGE(SC_ID_SIMULATION_START_AFTER_STOP_  , 546,
147	"sc_start called after sc_stop has been called" )
148SC_DEFINE_MESSAGE(SC_ID_STOP_MODE_AFTER_START_        , 547,
149	"attempt to set sc_stop mode  after start will be ignored" )
150SC_DEFINE_MESSAGE( SC_ID_SIMULATION_START_AFTER_ERROR_, 548,
151       "attempt to restart simulation after error" )
152SC_DEFINE_MESSAGE( SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_, 549,
153       "uncaught exception" )
154SC_DEFINE_MESSAGE(SC_ID_PHASE_CALLBACKS_UNSUPPORTED_   , 550,
155       "simulation phase callbacks not enabled")
156SC_DEFINE_MESSAGE(SC_ID_PHASE_CALLBACK_NOT_IMPLEMENTED_, 551,
157       "empty simulation phase callback called" )
158SC_DEFINE_MESSAGE(SC_ID_PHASE_CALLBACK_REGISTER_,        552,
159       "register simulation phase callback" )
160SC_DEFINE_MESSAGE(SC_ID_PHASE_CALLBACK_FORBIDDEN_,       553,
161       "forbidden action in simulation phase callback" )
162// available message number 554
163// available message number 555
164SC_DEFINE_MESSAGE(SC_ID_THROW_IT_IGNORED_  , 556,
165        "throw_it on method/non-running process is being ignored " )
166SC_DEFINE_MESSAGE(SC_ID_NOT_EXPECTING_DYNAMIC_EVENT_NOTIFY_ , 557,
167	"dynamic event notification encountered when sensitivity is static" )
168SC_DEFINE_MESSAGE(SC_ID_DISABLE_WILL_ORPHAN_PROCESS_     , 558,
169       "disable() or dont_initialize() called on process with no static sensitivity, it will be orphaned" )
170SC_DEFINE_MESSAGE(SC_ID_PROCESS_CONTROL_CORNER_CASE_     , 559,
171	"Undefined process control interaction" )
172SC_DEFINE_MESSAGE(SC_ID_METHOD_TERMINATION_EVENT_        , 560,
173	"Attempt to get terminated event for a method process" )
174SC_DEFINE_MESSAGE(SC_ID_JOIN_ON_METHOD_HANDLE_        , 561,
175	"Attempt to register method process with sc_join object" )
176SC_DEFINE_MESSAGE(SC_ID_NO_PROCESS_SEMANTICS_         , 563,
177	"Attempt to invoke process with no semantics() method" )
178SC_DEFINE_MESSAGE(SC_ID_EVENT_ON_NULL_PROCESS_         , 564,
179	"Attempt to get an event for non-existent process" )
180// available message number 565
181SC_DEFINE_MESSAGE(SC_ID_UNKNOWN_PROCESS_TYPE_,       566,
182	"Unknown process type" )
183// available message number 567
184SC_DEFINE_MESSAGE(SC_ID_NEGATIVE_SIMULATION_TIME_, 568,
185        "negative simulation interval specified in sc_start call" )
186SC_DEFINE_MESSAGE(SC_ID_BAD_SC_MODULE_CONSTRUCTOR_  , 569,
187        "sc_module(const char*), sc_module(const std::string&) "
188        "have been deprecated, use sc_module(const sc_module_name&)" )
189SC_DEFINE_MESSAGE(SC_ID_EMPTY_PROCESS_HANDLE_  , 570,
190        "attempt to use an empty process handle ignored" )
191SC_DEFINE_MESSAGE(SC_ID_NO_SC_START_ACTIVITY_  , 571,
192        "no activity or clock movement for sc_start() invocation" )
193SC_DEFINE_MESSAGE(SC_ID_KILL_PROCESS_WHILE_UNITIALIZED_  , 572,
194        "a process may not be killed before it is initialized" )
195SC_DEFINE_MESSAGE(SC_ID_RESET_PROCESS_WHILE_NOT_RUNNING_  , 573,
196        "a process may not be asynchronously reset while the simulation is not running" )
197SC_DEFINE_MESSAGE(SC_ID_THROW_IT_WHILE_NOT_RUNNING_  , 574,
198        "throw_it not allowed unless simulation is running " )
199
200
201/*****************************************************************************
202
203  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
204  changes you are making here.
205
206      Name, Affiliation, Date:
207  Description of Modification:
208
209 *****************************************************************************/
210
211// $Log: sc_kernel_ids.h,v $
212// Revision 1.25  2011/08/26 22:06:34  acg
213//  Torsten Maehne: formating fix.
214//
215// Revision 1.24  2011/08/07 19:08:04  acg
216//  Andy Goodrich: moved logs to end of file so line number synching works
217//  better between versions.
218//
219// Revision 1.23  2011/07/24 11:15:47  acg
220//  Philipp A. Hartmann: Improvements to error/warning messages related to
221//  process control.
222//
223// Revision 1.22  2011/05/09 04:07:48  acg
224//  Philipp A. Hartmann:
225//    (1) Restore hierarchy in all phase callbacks.
226//    (2) Ensure calls to before_end_of_elaboration.
227//
228// Revision 1.21  2011/04/19 19:15:41  acg
229//  Andy Goodrich: fix so warning message is always issued for a throw_it()
230//  on a method process.
231//
232// Revision 1.20  2011/04/19 15:04:27  acg
233//  Philipp A. Hartmann: clean up SC_ID messages.
234//
235// Revision 1.19  2011/04/19 02:39:09  acg
236//  Philipp A. Hartmann: added checks for additional throws during stack unwinds.
237//
238// Revision 1.18  2011/04/05 06:23:45  acg
239//  Andy Goodrich: comments for throws while the simulator is not running.
240//
241// Revision 1.17  2011/04/01 22:30:39  acg
242//  Andy Goodrich: change hard assertion to warning for trigger_dynamic()
243//  getting called when there is only STATIC sensitivity. This can result
244//  because of sc_process_handle::throw_it().
245//
246// Revision 1.16  2011/03/28 13:02:51  acg
247//  Andy Goodrich: Changes for disable() interactions.
248//
249// Revision 1.15  2011/03/07 17:34:21  acg
250//  Andy Goodrich: changed process control corner case message. Added more
251//  place holders for unused message numbers.
252//
253// Revision 1.14  2011/03/06 19:57:11  acg
254//  Andy Goodrich: refinements for the illegal suspend - synchronous reset
255//  interaction.
256//
257// Revision 1.13  2011/03/06 15:56:29  acg
258//  Andy Goodrich: added process control corner case error message, remove
259//  unused messages.
260//
261// Revision 1.12  2011/03/05 19:44:20  acg
262//  Andy Goodrich: changes for object and event naming and structures.
263//
264// Revision 1.11  2011/02/18 20:27:14  acg
265//  Andy Goodrich: Updated Copyrights.
266//
267// Revision 1.10  2011/02/13 21:47:37  acg
268//  Andy Goodrich: update copyright notice.
269//
270// Revision 1.9  2011/02/13 21:29:16  acg
271//  Andy Goodrich: added error messages for throws that occur before
272//  simulator intialization.
273//
274// Revision 1.8  2011/02/11 13:25:24  acg
275//  Andy Goodrich: Philipp A. Hartmann's changes:
276//    (1) Removal of SC_CTHREAD method overloads.
277//    (2) New exception processing code.
278//
279// Revision 1.7  2011/02/07 19:17:20  acg
280//  Andy Goodrich: changes for IEEE 1666 compatibility.
281//
282// Revision 1.6  2011/01/19 23:21:50  acg
283//  Andy Goodrich: changes for IEEE 1666 2011
284//
285// Revision 1.5  2010/07/30 05:21:22  acg
286//  Andy Goodrich: release 2.3 fixes.
287//
288// Revision 1.4  2009/02/28 00:26:58  acg
289//  Andy Goodrich: changed boost name space to sc_boost to allow use with
290//  full boost library applications.
291//
292// Revision 1.3  2008/11/17 15:57:15  acg
293//  Andy Goodrich: added deprecation message for sc_module(const char*)
294//
295// Revision 1.2  2008/05/22 17:06:25  acg
296//  Andy Goodrich: updated copyright notice to include 2008.
297//
298// Revision 1.1.1.1  2006/12/15 20:20:05  acg
299// SystemC 2.3
300//
301// Revision 1.7  2006/08/29 23:37:13  acg
302//  Andy Goodrich: Added check for negative time.
303//
304// Revision 1.6  2006/04/20 17:08:16  acg
305//  Andy Goodrich: 3.0 style process changes.
306//
307// Revision 1.5  2006/01/25 00:31:19  acg
308//  Andy Goodrich: Changed over to use a standard message id of
309//  SC_ID_IEEE_1666_DEPRECATION for all deprecation messages.
310//
311// Revision 1.4  2006/01/24 20:49:04  acg
312// Andy Goodrich: changes to remove the use of deprecated features within the
313// simulator, and to issue warning messages when deprecated features are used.
314//
315// Revision 1.3  2006/01/13 18:44:29  acg
316// Added $Log to record CVS changes into the source.
317//
318
319#endif
320
321// Taf!
322