SystemC  2.3.2
Accellera SystemC proof-of-concept library
sc_module.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_module.h -- Base class of all hierarchical modules and channels.
23 */
35 #ifndef SC_MODULE_H
36 #define SC_MODULE_H
37 
39 #include "sysc/kernel/sc_process.h"
42 #include "sysc/kernel/sc_time.h"
43 #include "sysc/kernel/sc_wait.h"
45 #include "sysc/kernel/sc_process.h"
47 #include "sysc/utils/sc_list.h"
48 
49 namespace sc_core {
50 
51 class sc_name_gen;
52 template<class T> class sc_in;
53 template<class T> class sc_inout;
54 template<class T> class sc_out;
55 
64 {
67 
68  sc_bind_proxy();
71 };
72 
73 
75 
76 
84 : public sc_object, public sc_process_host
85 {
86  friend class sc_module_name;
87  friend class sc_module_registry;
88  friend class sc_object;
89  friend class sc_port_registry;
90  friend class sc_process_b;
91  friend class sc_simcontext;
92 
93 public:
94 
96  { return simcontext(); }
97 
98  // to generate unique names for objects in an MT-Safe way
99  const char* gen_unique_name( const char* basename_, bool preserve_first );
100 
101  virtual const char* kind() const
102  { return "sc_module"; }
103 
104 protected:
105 
106  // called by construction_done
107  virtual void before_end_of_elaboration();
108 
109  void construction_done();
110 
111  // called by elaboration_done (does nothing by default)
112  virtual void end_of_elaboration();
113 
114  void elaboration_done( bool& );
115 
116  // called by start_simulation (does nothing by default)
117  virtual void start_of_simulation();
118 
119  void start_simulation();
120 
121  // called by simulation_done (does nothing by default)
122  virtual void end_of_simulation();
123 
124  void simulation_done();
125 
126  void sc_module_init();
127 
128  // constructor
129  sc_module();
130  sc_module( const sc_module_name& nm ); /* for those used to old style */
131 
132  /* DEPRECATED */ sc_module( const char* nm );
133  /* DEPRECATED */ sc_module( const std::string& nm );
134 
135 public:
136 
137  // destructor
138  virtual ~sc_module();
139 
140  // positional binding methods
141 
144 
146  { return operator << ( interface_ ); }
147 
149  { return operator << ( port_ ); }
150 
151  // operator() is declared at the end of the class.
152 
153  const ::std::vector<sc_object*>& get_child_objects() const;
154 
155 protected:
156 
157  // this must be called by user-defined modules
158  void end_module();
159 
160 
161  // to prevent initialization for SC_METHODs and SC_THREADs
162  void dont_initialize();
163 
164  // positional binding code - used by operator ()
165 
166  void positional_bind( sc_interface& );
167  void positional_bind( sc_port_base& );
168 
169  // set reset sensitivity for SC_xTHREADs
170  void async_reset_signal_is( const sc_in<bool>& port, bool level );
171  void async_reset_signal_is( const sc_inout<bool>& port, bool level );
172  void async_reset_signal_is( const sc_out<bool>& port, bool level );
173  void async_reset_signal_is( const sc_signal_in_if<bool>& iface, bool level);
174  void reset_signal_is( const sc_in<bool>& port, bool level );
175  void reset_signal_is( const sc_inout<bool>& port, bool level );
176  void reset_signal_is( const sc_out<bool>& port, bool level );
177  void reset_signal_is( const sc_signal_in_if<bool>& iface, bool level );
178 
179  // static sensitivity for SC_THREADs and SC_CTHREADs
180 
181  void wait()
182  { ::sc_core::wait( simcontext() ); }
183 
184  // dynamic sensitivity for SC_THREADs and SC_CTHREADs
185 
186  void wait( const sc_event& e )
187  { ::sc_core::wait( e, simcontext() ); }
188 
189  void wait( const sc_event_or_list& el )
190  { ::sc_core::wait( el, simcontext() ); }
191 
192  void wait( const sc_event_and_list& el )
193  { ::sc_core::wait( el, simcontext() ); }
194 
195  void wait( const sc_time& t )
196  { ::sc_core::wait( t, simcontext() ); }
197 
198  void wait( double v, sc_time_unit tu )
199  { ::sc_core::wait( sc_time( v, tu, simcontext() ), simcontext() ); }
200 
201  void wait( const sc_time& t, const sc_event& e )
202  { ::sc_core::wait( t, e, simcontext() ); }
203 
204  void wait( double v, sc_time_unit tu, const sc_event& e )
205  { ::sc_core::wait(
206  sc_time( v, tu, simcontext() ), e, simcontext() ); }
207 
208  void wait( const sc_time& t, const sc_event_or_list& el )
209  { ::sc_core::wait( t, el, simcontext() ); }
210 
211  void wait( double v, sc_time_unit tu, const sc_event_or_list& el )
212  { ::sc_core::wait( sc_time( v, tu, simcontext() ), el, simcontext() ); }
213 
214  void wait( const sc_time& t, const sc_event_and_list& el )
215  { ::sc_core::wait( t, el, simcontext() ); }
216 
217  void wait( double v, sc_time_unit tu, const sc_event_and_list& el )
218  { ::sc_core::wait( sc_time( v, tu, simcontext() ), el, simcontext() ); }
219 
220 
221  // static sensitivity for SC_METHODs
222 
224  { ::sc_core::next_trigger( simcontext() ); }
225 
226 
227  // dynamic sensitivty for SC_METHODs
228 
229  void next_trigger( const sc_event& e )
230  { ::sc_core::next_trigger( e, simcontext() ); }
231 
232  void next_trigger( const sc_event_or_list& el )
233  { ::sc_core::next_trigger( el, simcontext() ); }
234 
235  void next_trigger( const sc_event_and_list& el )
236  { ::sc_core::next_trigger( el, simcontext() ); }
237 
238  void next_trigger( const sc_time& t )
239  { ::sc_core::next_trigger( t, simcontext() ); }
240 
241  void next_trigger( double v, sc_time_unit tu )
243  sc_time( v, tu, simcontext() ), simcontext() ); }
244 
245  void next_trigger( const sc_time& t, const sc_event& e )
246  { ::sc_core::next_trigger( t, e, simcontext() ); }
247 
248  void next_trigger( double v, sc_time_unit tu, const sc_event& e )
250  sc_time( v, tu, simcontext() ), e, simcontext() ); }
251 
252  void next_trigger( const sc_time& t, const sc_event_or_list& el )
253  { ::sc_core::next_trigger( t, el, simcontext() ); }
254 
255  void next_trigger( double v, sc_time_unit tu, const sc_event_or_list& el )
257  sc_time( v, tu, simcontext() ), el, simcontext() ); }
258 
259  void next_trigger( const sc_time& t, const sc_event_and_list& el )
260  { ::sc_core::next_trigger( t, el, simcontext() ); }
261 
262  void next_trigger( double v, sc_time_unit tu, const sc_event_and_list& el )
264  sc_time( v, tu, simcontext() ), el, simcontext() ); }
265 
266 
267  // for SC_METHODs and SC_THREADs and SC_CTHREADs
268 
269  bool timed_out()
271 
272 
273  // for SC_CTHREADs
274 
275  void halt()
276  { ::sc_core::halt( simcontext() ); }
277 
278  void wait( int n )
279  { ::sc_core::wait( n, simcontext() ); }
280 
282  { ::sc_core::at_posedge( s, simcontext() ); }
283 
285  { ::sc_core::at_posedge( s, simcontext() ); }
286 
288  { ::sc_core::at_negedge( s, simcontext() ); }
289 
291  { ::sc_core::at_negedge( s, simcontext() ); }
292 
293  // Catch uses of watching:
294  void watching( bool /* expr */ )
295  { SC_REPORT_ERROR(SC_ID_WATCHING_NOT_ALLOWED_,""); }
296 
297  // These are protected so that user derived classes can refer to them.
301 
302  // Function to set the stack size of the current (c)thread process.
303  void set_stack_size( std::size_t );
304 
305  int append_port( sc_port_base* );
306 
307 private:
308  sc_module( const sc_module& );
309  const sc_module& operator = ( const sc_module& );
310 
311 private:
312 
313  bool m_end_module_called;
314  std::vector<sc_port_base*>* m_port_vec;
315  int m_port_index;
316  sc_name_gen* m_name_gen;
317  sc_module_name* m_module_name_p;
318 
319 public:
320 
321  void defunct() { }
322 
323  // positional binding methods (cont'd)
324 
325  void operator () ( const sc_bind_proxy& p001,
326  const sc_bind_proxy& p002 = SC_BIND_PROXY_NIL,
327  const sc_bind_proxy& p003 = SC_BIND_PROXY_NIL,
328  const sc_bind_proxy& p004 = SC_BIND_PROXY_NIL,
329  const sc_bind_proxy& p005 = SC_BIND_PROXY_NIL,
330  const sc_bind_proxy& p006 = SC_BIND_PROXY_NIL,
331  const sc_bind_proxy& p007 = SC_BIND_PROXY_NIL,
332  const sc_bind_proxy& p008 = SC_BIND_PROXY_NIL,
333  const sc_bind_proxy& p009 = SC_BIND_PROXY_NIL,
334  const sc_bind_proxy& p010 = SC_BIND_PROXY_NIL,
335  const sc_bind_proxy& p011 = SC_BIND_PROXY_NIL,
336  const sc_bind_proxy& p012 = SC_BIND_PROXY_NIL,
337  const sc_bind_proxy& p013 = SC_BIND_PROXY_NIL,
338  const sc_bind_proxy& p014 = SC_BIND_PROXY_NIL,
339  const sc_bind_proxy& p015 = SC_BIND_PROXY_NIL,
340  const sc_bind_proxy& p016 = SC_BIND_PROXY_NIL,
341  const sc_bind_proxy& p017 = SC_BIND_PROXY_NIL,
342  const sc_bind_proxy& p018 = SC_BIND_PROXY_NIL,
343  const sc_bind_proxy& p019 = SC_BIND_PROXY_NIL,
344  const sc_bind_proxy& p020 = SC_BIND_PROXY_NIL,
345  const sc_bind_proxy& p021 = SC_BIND_PROXY_NIL,
346  const sc_bind_proxy& p022 = SC_BIND_PROXY_NIL,
347  const sc_bind_proxy& p023 = SC_BIND_PROXY_NIL,
348  const sc_bind_proxy& p024 = SC_BIND_PROXY_NIL,
349  const sc_bind_proxy& p025 = SC_BIND_PROXY_NIL,
350  const sc_bind_proxy& p026 = SC_BIND_PROXY_NIL,
351  const sc_bind_proxy& p027 = SC_BIND_PROXY_NIL,
352  const sc_bind_proxy& p028 = SC_BIND_PROXY_NIL,
353  const sc_bind_proxy& p029 = SC_BIND_PROXY_NIL,
354  const sc_bind_proxy& p030 = SC_BIND_PROXY_NIL,
355  const sc_bind_proxy& p031 = SC_BIND_PROXY_NIL,
356  const sc_bind_proxy& p032 = SC_BIND_PROXY_NIL,
357  const sc_bind_proxy& p033 = SC_BIND_PROXY_NIL,
358  const sc_bind_proxy& p034 = SC_BIND_PROXY_NIL,
359  const sc_bind_proxy& p035 = SC_BIND_PROXY_NIL,
360  const sc_bind_proxy& p036 = SC_BIND_PROXY_NIL,
361  const sc_bind_proxy& p037 = SC_BIND_PROXY_NIL,
362  const sc_bind_proxy& p038 = SC_BIND_PROXY_NIL,
363  const sc_bind_proxy& p039 = SC_BIND_PROXY_NIL,
364  const sc_bind_proxy& p040 = SC_BIND_PROXY_NIL,
365  const sc_bind_proxy& p041 = SC_BIND_PROXY_NIL,
366  const sc_bind_proxy& p042 = SC_BIND_PROXY_NIL,
367  const sc_bind_proxy& p043 = SC_BIND_PROXY_NIL,
368  const sc_bind_proxy& p044 = SC_BIND_PROXY_NIL,
369  const sc_bind_proxy& p045 = SC_BIND_PROXY_NIL,
370  const sc_bind_proxy& p046 = SC_BIND_PROXY_NIL,
371  const sc_bind_proxy& p047 = SC_BIND_PROXY_NIL,
372  const sc_bind_proxy& p048 = SC_BIND_PROXY_NIL,
373  const sc_bind_proxy& p049 = SC_BIND_PROXY_NIL,
374  const sc_bind_proxy& p050 = SC_BIND_PROXY_NIL,
375  const sc_bind_proxy& p051 = SC_BIND_PROXY_NIL,
376  const sc_bind_proxy& p052 = SC_BIND_PROXY_NIL,
377  const sc_bind_proxy& p053 = SC_BIND_PROXY_NIL,
378  const sc_bind_proxy& p054 = SC_BIND_PROXY_NIL,
379  const sc_bind_proxy& p055 = SC_BIND_PROXY_NIL,
380  const sc_bind_proxy& p056 = SC_BIND_PROXY_NIL,
381  const sc_bind_proxy& p057 = SC_BIND_PROXY_NIL,
382  const sc_bind_proxy& p058 = SC_BIND_PROXY_NIL,
383  const sc_bind_proxy& p059 = SC_BIND_PROXY_NIL,
384  const sc_bind_proxy& p060 = SC_BIND_PROXY_NIL,
385  const sc_bind_proxy& p061 = SC_BIND_PROXY_NIL,
386  const sc_bind_proxy& p062 = SC_BIND_PROXY_NIL,
387  const sc_bind_proxy& p063 = SC_BIND_PROXY_NIL,
388  const sc_bind_proxy& p064 = SC_BIND_PROXY_NIL );
389 
390 };
391 
394 #define SC_NEW(x) ::sc_core::sc_module_dynalloc(new x);
395 
396 
402 #define SC_MODULE(user_module_name) \
403  struct user_module_name : ::sc_core::sc_module
404 
406 #define SC_CTOR(user_module_name) \
407  typedef user_module_name SC_CURRENT_USER_MODULE; \
408  user_module_name( ::sc_core::sc_module_name )
409 
410 // the SC_HAS_PROCESS macro call must be followed by a ;
412 #define SC_HAS_PROCESS(user_module_name) \
413  typedef user_module_name SC_CURRENT_USER_MODULE
414 
415 // The this-> construct on sensitive operators in the macros below is
416 // required for gcc 4.x when a templated class has a templated parent that is
417 // derived from sc_module:
418 //
419 // template<typename X>
420 // class B : public sc_module;
421 // template<typename X>
422 // class A : public B<X>
423 
424 #define declare_method_process(handle, name, host_tag, func) \
425  { \
426  ::sc_core::sc_process_handle handle = \
427  sc_core::sc_get_curr_simcontext()->create_method_process( \
428  name, false, SC_MAKE_FUNC_PTR( host_tag, func ), \
429  this, 0 ); \
430  this->sensitive << handle; \
431  this->sensitive_pos << handle; \
432  this->sensitive_neg << handle; \
433  }
434 
435 #define declare_thread_process(handle, name, host_tag, func) \
436  { \
437  ::sc_core::sc_process_handle handle = \
438  sc_core::sc_get_curr_simcontext()->create_thread_process( \
439  name, false, \
440  SC_MAKE_FUNC_PTR( host_tag, func ), this, 0 ); \
441  this->sensitive << handle; \
442  this->sensitive_pos << handle; \
443  this->sensitive_neg << handle; \
444  }
445 
446 #define declare_cthread_process(handle, name, host_tag, func, edge) \
447  { \
448  ::sc_core::sc_process_handle handle = \
449  sc_core::sc_get_curr_simcontext()->create_cthread_process( \
450  name, false, \
451  SC_MAKE_FUNC_PTR( host_tag, func ), this, 0 ); \
452  this->sensitive.operator() ( handle, edge );\
453  }
454 
456 #define SC_CTHREAD(func, edge) \
457  declare_cthread_process( func ## _handle, \
458  #func, \
459  SC_CURRENT_USER_MODULE, \
460  func, \
461  edge )
462 
464 #define SC_METHOD(func) \
465  declare_method_process( func ## _handle, \
466  #func, \
467  SC_CURRENT_USER_MODULE, \
468  func )
469 
471 #define SC_THREAD(func) \
472  declare_thread_process( func ## _handle, \
473  #func, \
474  SC_CURRENT_USER_MODULE, \
475  func )
476 
477 
478 
485 
486 } // namespace sc_core
487 
488 /*****************************************************************************
489 
490  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
491  changes you are making here.
492 
493  Name, Affiliation, Date: Ali Dasdan, Synopsys, Inc.
494  Description of Modification: - Implementation of operator() and operator,
495  positional connection method.
496  - Implementation of error checking in
497  operator<<'s.
498  - Implementation of the function test_module_prm.
499  - Implementation of set_stack_size().
500 
501  Name, Affiliation, Date: Gene Bushuyev, Synopsys, Inc.
502  Description of Modification: - Change implementation for VC6.
503 
504  Name, Affiliation, Date: Andy Godorich, Forte
505  Bishnupriya Bhattacharya, Cadence Design Systems,
506  25 August, 2003
507  Description of Modification: inherit from sc_process_host as a part of
508  implementing dynamic processes
509 
510  *****************************************************************************/
511 
512 // $Log: sc_module.h,v $
513 // Revision 1.11 2011/08/26 20:46:10 acg
514 // Andy Goodrich: moved the modification log to the end of the file to
515 // eliminate source line number skew when check-ins are done.
516 //
517 // Revision 1.10 2011/08/15 16:43:24 acg
518 // Torsten Maehne: changes to remove unused argument warnings.
519 //
520 // Revision 1.9 2011/03/05 19:44:20 acg
521 // Andy Goodrich: changes for object and event naming and structures.
522 //
523 // Revision 1.8 2011/02/18 20:27:14 acg
524 // Andy Goodrich: Updated Copyrights.
525 //
526 // Revision 1.7 2011/02/13 21:47:37 acg
527 // Andy Goodrich: update copyright notice.
528 //
529 // Revision 1.6 2011/01/18 20:10:44 acg
530 // Andy Goodrich: changes for IEEE1666_2011 semantics.
531 //
532 // Revision 1.5 2010/12/07 20:09:12 acg
533 // Andy Goodrich: remove unused signal declaration
534 //
535 // Revision 1.4 2009/05/22 16:06:29 acg
536 // Andy Goodrich: process control updates.
537 //
538 // Revision 1.3 2008/05/22 17:06:25 acg
539 // Andy Goodrich: updated copyright notice to include 2008.
540 //
541 // Revision 1.2 2007/01/24 20:14:40 acg
542 // Andy Goodrich: improved comments about the use of this-> in the macros
543 // that access sensitive.
544 //
545 // Revision 1.1.1.1 2006/12/15 20:20:05 acg
546 // SystemC 2.3
547 //
548 // Revision 1.10 2006/12/02 20:58:18 acg
549 // Andy Goodrich: updates from 2.2 for IEEE 1666 support.
550 //
551 // Revision 1.7 2006/04/11 23:13:21 acg
552 // Andy Goodrich: Changes for reduced reset support that only includes
553 // sc_cthread, but has preliminary hooks for expanding to method and thread
554 // processes also.
555 //
556 // Revision 1.6 2006/03/15 17:53:34 acg
557 // Andy Goodrich, Forte Design
558 // Reordered includes to pick up <cassert> for use by sc_process_name.h
559 //
560 // Revision 1.5 2006/03/14 23:56:58 acg
561 // Andy Goodrich: This fixes a bug when an exception is thrown in
562 // sc_module::sc_module() for a dynamically allocated sc_module
563 // object. We are calling sc_module::end_module() on a module that has
564 // already been deleted. The scenario runs like this:
565 //
566 // a) the sc_module constructor is entered
567 // b) the exception is thrown
568 // c) the exception processor deletes the storage for the sc_module
569 // d) the stack is unrolled causing the sc_module_name instance to be deleted
570 // e) ~sc_module_name() calls end_module() with its pointer to the sc_module
571 // f) because the sc_module has been deleted its storage is corrupted,
572 // either by linking it to a free space chain, or by reuse of some sort
573 // g) the m_simc field is garbage
574 // h) the m_object_manager field is also garbage
575 // i) an exception occurs
576 //
577 // This does not happen for automatic sc_module instances since the
578 // storage for the module is not reclaimed its just part of the stack.
579 //
580 // I am fixing this by having the destructor for sc_module clear the
581 // module pointer in its sc_module_name instance. That cuts things at
582 // step (e) above, since the pointer will be null if the module has
583 // already been deleted. To make sure the module stack is okay, I call
584 // end-module() in ~sc_module in the case where there is an
585 // sc_module_name pointer lying around.
586 //
587 // Revision 1.4 2006/01/24 20:49:05 acg
588 // Andy Goodrich: changes to remove the use of deprecated features within the
589 // simulator, and to issue warning messages when deprecated features are used.
590 //
591 // Revision 1.3 2006/01/13 18:44:30 acg
592 // Added $Log to record CVS changes into the source.
593 
594 #endif
Struct for temporarily storing a pointer to an interface or port.
Definition: sc_module.h:63
void next_trigger(const sc_time &t, const sc_event_and_list &el)
Definition: sc_module.h:259
Static sensitivity class for negative edge events.
Definition: sc_sensitive.h:209
void wait(double v, sc_time_unit tu)
Definition: sc_module.h:198
inline ::std::ostream & operator<<(::std::ostream &os, const sc_fifo< T > &a)
Definition: sc_fifo.h:431
void wait(const sc_event_and_list &el)
Definition: sc_module.h:192
virtual const char * kind() const
Definition: sc_module.h:101
Process base class support.
void next_trigger(const sc_event_and_list &el)
Definition: sc_module.h:235
void at_posedge(const sc_signal_in_if< bool > &s)
Definition: sc_module.h:281
Registry for all ports.
Definition: sc_port.h:208
Specialization of sc_signal_in_if<T> for type bool.
operand is not sc_logic object already exists internal maximum number of processes per module module construction not properly hierarchical name as shown may be incorrect due to previous errors incorrect use of sc_module_name set time resolution failed default time unit changed to time resolution immediate notification is not allowed during update phase or elaboration use reset_signal_is()" ) SC_DEFINE_MESSAGE(SC_ID_DONT_INITIALIZE_
Abstract base class of all SystemC `simulation&#39; objects.
Definition: sc_object.h:61
Specialization of sc_inout<T> for type bool.
void next_trigger(const sc_event_or_list &el)
Definition: sc_module.h:232
AND list of events.
Definition: sc_event.h:189
void SC_API halt(sc_simcontext *)
void next_trigger(double v, sc_time_unit tu, const sc_event_or_list &el)
Definition: sc_module.h:255
void wait(const sc_time &t)
Definition: sc_module.h:195
sc_port_base * port
Definition: sc_module.h:66
Wait() and related functions.
Simple implementation of a doubly linked list.
Abstract base class for class sc_port_b.
Definition: sc_port.h:81
The event class.
Definition: sc_event.h:256
sc_sensitive_pos sensitive_pos
Definition: sc_module.h:299
SC_API sc_module * sc_module_dynalloc(sc_module *)
void at_negedge(const sc_signal_in_if< sc_dt::sc_logic > &s)
Definition: sc_module.h:290
Process access support.
Module name class.
sc_module sc_behavior
Definition: sc_module.h:484
Static sensitivity class for positive edge events.
Definition: sc_sensitive.h:143
void watching(bool)
Definition: sc_module.h:294
SC_API const sc_bind_proxy SC_BIND_PROXY_NIL
void wait(const sc_event &e)
Definition: sc_module.h:186
void next_trigger(const sc_time &t)
Definition: sc_module.h:238
Unique name generator class.
Definition: sc_name_gen.h:48
void wait(double v, sc_time_unit tu, const sc_event &e)
Definition: sc_module.h:204
Wait() and related functions for SC_CTHREADs.
Base class for all structural entities.
Definition: sc_module.h:83
Static sensitivity class for events.
Definition: sc_sensitive.h:65
sc_concref_r< sc_bitref_r< T1 >, sc_bitref_r< T2 > > operator,(sc_bitref_r< T1 >, sc_bitref_r< T2 >)
void wait(const sc_time &t, const sc_event_and_list &el)
Definition: sc_module.h:214
Abstract base class of all interface classes.
Definition: sc_interface.h:51
The time class.
Specialization of sc_signal_in_if<T> for type sc_dt::sc_logic.
Registry for all modules.
void next_trigger(double v, sc_time_unit tu)
Definition: sc_module.h:241
void at_posedge(const sc_signal_in_if< sc_dt::sc_logic > &s)
Definition: sc_module.h:284
SC_API bool timed_out(sc_simcontext *)
The simulation context.
void wait(int n)
Definition: sc_module.h:278
sc_interface * iface
Definition: sc_module.h:65
sc_module sc_channel
Definition: sc_module.h:483
class SC_API sc_module
Definition: sc_object.h:48
sc_sensitive sensitive
Definition: sc_module.h:298
void next_trigger(const sc_event &e)
Definition: sc_module.h:229
void next_trigger(double v, sc_time_unit tu, const sc_event &e)
Definition: sc_module.h:248
Specialization of sc_in<T> for type bool.
void at_negedge(const sc_signal_in_if< bool > &s)
Definition: sc_module.h:287
The time class.
Definition: sc_time.h:82
void next_trigger(const sc_time &t, const sc_event &e)
Definition: sc_module.h:245
void next_trigger(double v, sc_time_unit tu, const sc_event_and_list &el)
Definition: sc_module.h:262
void at_negedge(const sc_signal_in_if< bool > &, sc_simcontext *=sc_get_curr_simcontext())
void wait(const sc_time &t, const sc_event &e)
Definition: sc_module.h:201
void wait(double v, sc_time_unit tu, const sc_event_and_list &el)
Definition: sc_module.h:217
void next_trigger(const sc_time &t, const sc_event_or_list &el)
Definition: sc_module.h:252
sc_sensitive_neg sensitive_neg
Definition: sc_module.h:300
An object used to help manage object names.
Sensitivity classes. Requires "sc_process.h".
Report ids for the kernel code.
#define SC_REPORT_ERROR(msg_type, msg)
Definition: sc_report.h:223
OR list of events.
Definition: sc_event.h:224
operand is not sc_logic object already exists internal maximum number of processes per module module construction not properly hierarchical name as shown may be incorrect due to previous errors incorrect use of sc_module_name set time resolution failed default time unit changed to time resolution immediate notification is not allowed during update phase or elaboration use dont_initialize() has no effect for SC_CTHREADs" ) SC_DEFINE_MESSAGE(SC_ID_WAIT_N_INVALID_
void wait(const sc_time &t, const sc_event_or_list &el)
Definition: sc_module.h:208
void at_posedge(const sc_signal_in_if< bool > &, sc_simcontext *=sc_get_curr_simcontext())
void wait(double v, sc_time_unit tu, const sc_event_or_list &el)
Definition: sc_module.h:211
void wait(const sc_event_or_list &el)
Definition: sc_module.h:189
#define SC_API
Definition: sc_cmnhdr.h:168
sc_time_unit
Enumeration of time units.
Definition: sc_time.h:64
operand is not sc_logic object already exists internal maximum number of processes per module module construction not properly hierarchical name as shown may be incorrect due to previous errors incorrect use of sc_module_name set time resolution failed default time unit changed to time resolution next_trigger() is only allowed in SC_METHODs" ) SC_DEFINE_MESSAGE(SC_ID_IMMEDIATE_NOTIFICATION_
sc_simcontext * sc_get_curr_simcontext()
Definition: sc_module.h:95
void SC_API wait(int, sc_simcontext *)