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_wait.h -- Wait() and related functions.
23
24  Original Author: Stan Y. Liao, Synopsys, Inc.
25                   Martin Janssen, Synopsys, Inc.
26
27  CHANGE LOG AT THE END OF THE FILE
28 *****************************************************************************/
29
30#ifndef SC_WAIT_H
31#define SC_WAIT_H
32
33
34#include "sysc/kernel/sc_simcontext.h"
35
36namespace sc_core {
37
38class sc_event;
39class sc_event_and_list;
40class sc_event_or_list;
41class sc_simcontext;
42
43extern sc_simcontext* sc_get_curr_simcontext();
44
45// static sensitivity for SC_THREADs and SC_CTHREADs
46
47extern
48void
49wait( sc_simcontext* = sc_get_curr_simcontext() );
50
51
52// dynamic sensitivity for SC_THREADs and SC_CTHREADs
53
54extern
55void
56wait( const sc_event&,
57      sc_simcontext* = sc_get_curr_simcontext() );
58
59extern
60void
61wait( const sc_event_or_list&,
62      sc_simcontext* = sc_get_curr_simcontext() );
63
64extern
65void
66wait( const sc_event_and_list&,
67      sc_simcontext* = sc_get_curr_simcontext() );
68
69extern
70void
71wait( const sc_time&,
72      sc_simcontext* = sc_get_curr_simcontext() );
73
74inline
75void
76wait( double v, sc_time_unit tu,
77      sc_simcontext* simc = sc_get_curr_simcontext() )
78{
79    wait( sc_time( v, tu, simc ), simc );
80}
81
82extern
83void
84wait( const sc_time&,
85      const sc_event&,
86      sc_simcontext* = sc_get_curr_simcontext() );
87
88inline
89void
90wait( double v, sc_time_unit tu,
91      const sc_event& e,
92      sc_simcontext* simc = sc_get_curr_simcontext() )
93{
94    wait( sc_time( v, tu, simc ), e, simc );
95}
96
97extern
98void
99wait( const sc_time&,
100      const sc_event_or_list&,
101      sc_simcontext* = sc_get_curr_simcontext() );
102
103inline
104void
105wait( double v, sc_time_unit tu,
106      const sc_event_or_list& el,
107      sc_simcontext* simc = sc_get_curr_simcontext() )
108{
109    wait( sc_time( v, tu, simc ), el, simc );
110}
111
112extern
113void
114wait( const sc_time&,
115      const sc_event_and_list&,
116      sc_simcontext* = sc_get_curr_simcontext() );
117
118inline
119void
120wait( double v, sc_time_unit tu,
121      const sc_event_and_list& el,
122      sc_simcontext* simc = sc_get_curr_simcontext() )
123{
124    wait( sc_time( v, tu, simc ), el, simc );
125}
126
127
128// static sensitivity for SC_METHODs
129
130extern
131void
132next_trigger( sc_simcontext* = sc_get_curr_simcontext() );
133
134
135// dynamic sensitivity for SC_METHODs
136
137extern
138void
139next_trigger( const sc_event&,
140	      sc_simcontext* = sc_get_curr_simcontext() );
141
142extern
143void
144next_trigger( const sc_event_or_list&,
145	      sc_simcontext* = sc_get_curr_simcontext() );
146
147extern
148void
149next_trigger( const sc_event_and_list&,
150	      sc_simcontext* = sc_get_curr_simcontext() );
151
152extern
153void
154next_trigger( const sc_time&,
155	      sc_simcontext* = sc_get_curr_simcontext() );
156
157inline
158void
159next_trigger( double v, sc_time_unit tu,
160	      sc_simcontext* simc = sc_get_curr_simcontext() )
161{
162    next_trigger( sc_time( v, tu, simc ), simc );
163}
164
165extern
166void
167next_trigger( const sc_time&,
168	      const sc_event&,
169	      sc_simcontext* = sc_get_curr_simcontext() );
170
171inline
172void
173next_trigger( double v, sc_time_unit tu,
174	      const sc_event& e,
175	      sc_simcontext* simc = sc_get_curr_simcontext() )
176{
177    next_trigger( sc_time( v, tu, simc ), e, simc );
178}
179
180extern
181void
182next_trigger( const sc_time&,
183	      const sc_event_or_list&,
184	      sc_simcontext* = sc_get_curr_simcontext() );
185
186inline
187void
188next_trigger( double v, sc_time_unit tu,
189	      const sc_event_or_list& el,
190	      sc_simcontext* simc = sc_get_curr_simcontext() )
191{
192    next_trigger( sc_time( v, tu, simc ), el, simc );
193}
194
195extern
196void
197next_trigger( const sc_time&,
198	      const sc_event_and_list&,
199	      sc_simcontext* = sc_get_curr_simcontext() );
200
201inline
202void
203next_trigger( double v, sc_time_unit tu,
204	      const sc_event_and_list& el,
205	      sc_simcontext* simc = sc_get_curr_simcontext() )
206{
207    next_trigger( sc_time( v, tu, simc ), el, simc );
208}
209
210
211// for SC_METHODs and SC_THREADs and SC_CTHREADs
212
213extern
214bool
215timed_out( sc_simcontext* = sc_get_curr_simcontext() );
216
217// misc.
218
219extern
220void
221sc_set_location( const char*,
222		 int,
223		 sc_simcontext* = sc_get_curr_simcontext() );
224
225} // namespace sc_core
226
227/*
228$Log: sc_wait.h,v $
229Revision 1.6  2011/08/26 20:46:11  acg
230 Andy Goodrich: moved the modification log to the end of the file to
231 eliminate source line number skew when check-ins are done.
232
233Revision 1.5  2011/02/18 20:27:14  acg
234 Andy Goodrich: Updated Copyrights.
235
236Revision 1.4  2011/02/13 21:47:38  acg
237 Andy Goodrich: update copyright notice.
238
239Revision 1.3  2011/01/18 20:10:45  acg
240 Andy Goodrich: changes for IEEE1666_2011 semantics.
241
242Revision 1.2  2008/05/22 17:06:27  acg
243 Andy Goodrich: updated copyright notice to include 2008.
244
245Revision 1.1.1.1  2006/12/15 20:20:05  acg
246SystemC 2.3
247
248Revision 1.2  2006/01/03 23:18:45  acg
249Changed copyright to include 2006.
250
251Revision 1.1.1.1  2005/12/19 23:16:44  acg
252First check in of SystemC 2.1 into its own archive.
253
254Revision 1.10  2005/07/30 03:45:05  acg
255Changes from 2.1, including changes for sc_process_handle.
256
257Revision 1.9  2005/04/04 00:16:08  acg
258Changes for directory name change to sys from systemc.
259Changes for sc_string going to std::string.
260Changes for sc_pvector going to std::vector.
261Changes for reference pools for bit and part selections.
262Changes for const sc_concatref support.
263
264Revision 1.6  2004/10/13 18:13:22  acg
265sc_ver.h - updated version number. sc_wait.h remove inclusion of
266sysc/kernel/sc_event.h because it is not necessary.
267
268Revision 1.5  2004/09/27 20:49:10  acg
269Andy Goodrich, Forte Design Systems, Inc.
270   - Added a $Log comment so that CVS checkin comments appear in the
271        checkout source.
272
273*/
274
275#endif
276
277// Taf!
278