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