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