SystemC  Recoding Infrastructure for SystemC v0.6.2 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
sc_wait.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  The following code is derived, directly or indirectly, from the SystemC
4  source code Copyright (c) 1996-2014 by all Contributors.
5  All Rights reserved.
6 
7  The contents of this file are subject to the restrictions and limitations
8  set forth in the SystemC Open Source License (the "License");
9  You may not use this file except in compliance with such restrictions and
10  limitations. You may obtain instructions on how to receive a copy of the
11  License at http://www.accellera.org/. Software distributed by Contributors
12  under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
13  ANY KIND, either express or implied. See the License for the specific
14  language governing rights and limitations under the License.
15 
16  *****************************************************************************/
17 
18 /*****************************************************************************
19 
20  sc_wait.h -- Wait() and related functions.
21 
22  Original Author: Stan Y. Liao, Synopsys, Inc.
23  Martin Janssen, Synopsys, Inc.
24 
25  CHANGE LOG AT THE END OF THE FILE
26  *****************************************************************************/
27 
28 #ifndef SC_WAIT_H
29 #define SC_WAIT_H
30 
31 
33 // 02/22/2016 ZC: to enable verbose display or not
34 #ifndef _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR
35 #define _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR "SYSC_PRINT_VERBOSE_MESSAGE"
36 #endif
37 namespace sc_core {
38 
39 class sc_event;
40 class sc_event_and_list;
41 class sc_event_or_list;
42 class sc_simcontext;
43 
44 extern sc_simcontext* sc_get_curr_simcontext();
45 
46 void message_test();
47 // static sensitivity for SC_THREADs and SC_CTHREADs
48 
54 extern
55 void
56 aux_seg_bound(sc_simcontext* simc);
57 
58 // 06/12/2015 GL: modified for the OoO simulation
59 extern
60 void
61 wait( int = -1,
62  sc_simcontext* = sc_get_curr_simcontext() );
63 
64 
65 // dynamic sensitivity for SC_THREADs and SC_CTHREADs
66 
71 // 06/12/2015 GL: modified for the OoO simulation
72 extern
73 void
74 wait( const sc_event&,
75  int = -1,
76  sc_simcontext* = sc_get_curr_simcontext() );
77 
82 // 06/12/2015 GL: modified for the OoO simulation
83 extern
84 void
85 wait( const sc_event_or_list&,
86  int = -1,
87  sc_simcontext* = sc_get_curr_simcontext() );
88 
93 // 06/12/2015 GL: modified for the OoO simulation
94 extern
95 void
96 wait( const sc_event_and_list&,
97  int = -1,
98  sc_simcontext* = sc_get_curr_simcontext() );
99 
104 // 06/12/2015 GL: modified for the OoO simulation
105 extern
106 void
107 wait( const sc_time&,
108  int = -1,
109  sc_simcontext* = sc_get_curr_simcontext() );
110 
115 // 06/12/2015 GL: modified for the OoO simulation
116 inline
117 void
118 wait( double v, sc_time_unit tu,
119  int seg_id = -1,
121 {
122  wait( sc_time( v, tu, simc ), seg_id, simc );
123 }
124 
129 // 06/12/2015 GL: modified for the OoO simulation
130 extern
131 void
132 wait( const sc_time&,
133  const sc_event&,
134  int = -1,
135  sc_simcontext* = sc_get_curr_simcontext() );
136 
141 // 06/12/2015 GL: modified for the OoO simulation
142 inline
143 void
144 wait( double v, sc_time_unit tu,
145  const sc_event& e,
146  int seg_id = -1,
148 {
149  wait( sc_time( v, tu, simc ), e, seg_id, simc );
150 }
151 
156 // 06/12/2015 GL: modified for the OoO simulation
157 extern
158 void
159 wait( const sc_time&,
160  const sc_event_or_list&,
161  int = -1,
162  sc_simcontext* = sc_get_curr_simcontext() );
163 
168 // 06/12/2015 GL: modified for the OoO simulation
169 inline
170 void
171 wait( double v, sc_time_unit tu,
172  const sc_event_or_list& el,
173  int seg_id = -1,
175 {
176  wait( sc_time( v, tu, simc ), el, seg_id, simc );
177 }
178 
183 // 06/12/2015 GL: modified for the OoO simulation
184 extern
185 void
186 wait( const sc_time&,
187  const sc_event_and_list&,
188  int = -1,
189  sc_simcontext* = sc_get_curr_simcontext() );
190 
195 // 06/12/2015 GL: modified for the OoO simulation
196 inline
197 void
198 wait( double v, sc_time_unit tu,
199  const sc_event_and_list& el,
200  int seg_id = -1,
202 {
203  wait( sc_time( v, tu, simc ), el, seg_id, simc );
204 }
205 
206 
207 // static sensitivity for SC_METHODs
208 
213 // 06/12/2015 GL: modified for the OoO simulation
214 extern
215 void
216 next_trigger( sc_simcontext* = sc_get_curr_simcontext() );
217 
218 
219 // dynamic sensitivity for SC_METHODs
220 
225 // 06/12/2015 GL: modified for the OoO simulation
226 extern
227 void
228 next_trigger( const sc_event&,
229  sc_simcontext* = sc_get_curr_simcontext() );
230 
235 // 06/12/2015 GL: modified for the OoO simulation
236 extern
237 void
238 next_trigger( const sc_event_or_list&,
239  sc_simcontext* = sc_get_curr_simcontext() );
240 
245 // 06/12/2015 GL: modified for the OoO simulation
246 extern
247 void
248 next_trigger( const sc_event_and_list&,
249  sc_simcontext* = sc_get_curr_simcontext() );
250 
255 // 06/12/2015 GL: modified for the OoO simulation
256 extern
257 void
258 next_trigger( const sc_time&,
259  sc_simcontext* = sc_get_curr_simcontext() );
260 
265 // 06/12/2015 GL: modified for the OoO simulation
266 inline
267 void
270 {
271  next_trigger( sc_time( v, tu, simc ), simc );
272 }
273 
278 // 06/12/2015 GL: modified for the OoO simulation
279 extern
280 void
281 next_trigger( const sc_time&,
282  const sc_event&,
283  sc_simcontext* = sc_get_curr_simcontext() );
284 
289 // 06/12/2015 GL: modified for the OoO simulation
290 inline
291 void
293  const sc_event& e,
295 {
296  next_trigger( sc_time( v, tu, simc ), e, simc );
297 }
298 
303 // 06/12/2015 GL: modified for the OoO simulation
304 extern
305 void
306 next_trigger( const sc_time&,
307  const sc_event_or_list&,
308  sc_simcontext* = sc_get_curr_simcontext() );
309 
314 // 06/12/2015 GL: modified for the OoO simulation
315 inline
316 void
318  const sc_event_or_list& el,
320 {
321  next_trigger( sc_time( v, tu, simc ), el, simc );
322 }
323 
328 // 06/12/2015 GL: modified for the OoO simulation
329 extern
330 void
331 next_trigger( const sc_time&,
332  const sc_event_and_list&,
333  sc_simcontext* = sc_get_curr_simcontext() );
334 
339 // 06/12/2015 GL: modified for the OoO simulation
340 inline
341 void
343  const sc_event_and_list& el,
345 {
346  next_trigger( sc_time( v, tu, simc ), el, simc );
347 }
348 
349 
350 // for SC_METHODs and SC_THREADs and SC_CTHREADs
351 
352 extern
353 bool
354 timed_out( sc_simcontext* = sc_get_curr_simcontext() );
355 
356 // misc.
357 
358 extern
359 void
360 sc_set_location( const char*,
361  int,
362  sc_simcontext* = sc_get_curr_simcontext() );
363 
364 } // namespace sc_core
365 
366 /*
367 $Log: sc_wait.h,v $
368 Revision 1.6 2011/08/26 20:46:11 acg
369  Andy Goodrich: moved the modification log to the end of the file to
370  eliminate source line number skew when check-ins are done.
371 
372 Revision 1.5 2011/02/18 20:27:14 acg
373  Andy Goodrich: Updated Copyrights.
374 
375 Revision 1.4 2011/02/13 21:47:38 acg
376  Andy Goodrich: update copyright notice.
377 
378 Revision 1.3 2011/01/18 20:10:45 acg
379  Andy Goodrich: changes for IEEE1666_2011 semantics.
380 
381 Revision 1.2 2008/05/22 17:06:27 acg
382  Andy Goodrich: updated copyright notice to include 2008.
383 
384 Revision 1.1.1.1 2006/12/15 20:20:05 acg
385 SystemC 2.3
386 
387 Revision 1.2 2006/01/03 23:18:45 acg
388 Changed copyright to include 2006.
389 
390 Revision 1.1.1.1 2005/12/19 23:16:44 acg
391 First check in of SystemC 2.1 into its own archive.
392 
393 Revision 1.10 2005/07/30 03:45:05 acg
394 Changes from 2.1, including changes for sc_process_handle.
395 
396 Revision 1.9 2005/04/04 00:16:08 acg
397 Changes for directory name change to sys from systemc.
398 Changes for sc_string going to std::string.
399 Changes for sc_pvector going to std::vector.
400 Changes for reference pools for bit and part selections.
401 Changes for const sc_concatref support.
402 
403 Revision 1.6 2004/10/13 18:13:22 acg
404 sc_ver.h - updated version number. sc_wait.h remove inclusion of
405 sysc/kernel/sc_event.h because it is not necessary.
406 
407 Revision 1.5 2004/09/27 20:49:10 acg
408 Andy Goodrich, Forte Design Systems, Inc.
409  - Added a $Log comment so that CVS checkin comments appear in the
410  checkout source.
411 
412 */
413 
414 #endif
415 
416 // Taf!
OR list of events.
Definition: sc_event.h:228
bool timed_out(sc_simcontext *)
AND list of events.
Definition: sc_event.h:193
void wait(int, sc_simcontext *)
void message_test()
void sc_set_location(const char *, int, sc_simcontext *=sc_get_curr_simcontext())
The event class.
Definition: sc_event.h:260
The simulation context.
sc_simcontext * sc_get_curr_simcontext()
void next_trigger(sc_simcontext *)
A new parameter segment ID is added for the out-of-order simulation.
void aux_seg_bound(sc_simcontext *simc)
A new parameter segment ID is added for the out-of-order simulation.
sc_time_unit
Definition: sc_time.h:56