SystemC  Recoding Infrastructure for SystemC v0.6.2 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
sc_event.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_event.h --
21 
22  Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21
23 
24  CHANGE LOG AT THE END OF THE FILE
25  *****************************************************************************/
26 
27 
28 #ifndef SC_EVENT_H
29 #define SC_EVENT_H
30 #include <vector>
31 #include <string>
32 #include <set>
33 
34 #include "sysc/kernel/sc_cmnhdr.h"
38 // 02/22/2016 ZC: to enable verbose display or not
39 #ifndef _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR
40 #define _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR "SYSC_PRINT_VERBOSE_MESSAGE"
41 #endif
42 namespace sc_core {
43 
44 // forward declarations
45 class Invoker; //DM 05/17/2019 TODO: REMOVE
46 
47 class sc_event;
48 class sc_event_timed;
49 class sc_event_list;
50 class sc_event_or_list;
51 class sc_event_and_list;
52 class sc_object;
53 
54 // friend function declarations
55  int sc_notify_time_compare( const void*, const void* );
56 
57 /**************************************************************************/
63 template< typename T >
65 {
66  friend class sc_event;
67  friend class sc_event_and_list;
68  friend class sc_event_or_list;
69 
70  typedef T type;
71 
72  inline sc_event_expr()
73  : m_expr( new T(true) )
74  {}
75 
76 public:
77 
78  inline sc_event_expr( sc_event_expr const & e) // move semantics
79  : m_expr(e.m_expr)
80  {
81  e.m_expr = 0;
82  }
83 
84  T const & release() const
85  {
86  sc_assert( m_expr );
87  T* expr = m_expr;
88  m_expr=0;
89  return *expr;
90  }
91 
92  void push_back( sc_event const & e) const
93  {
94  sc_assert( m_expr );
95  m_expr->push_back(e);
96  }
97 
98  void push_back( type const & el) const
99  {
100  sc_assert( m_expr );
101  m_expr->push_back(el);
102  }
103  operator T const &() const
104  {
105  return release();
106  }
107 
109  {
110  delete m_expr;
111  }
112 
113 private:
114  mutable type * m_expr;
115 
116  // disabled
117  void operator=( sc_event_expr const & );
118 };
119 
120 /**************************************************************************/
127 {
128  friend class Invoker; //DM 05/17/2019 TODO:remove
129  friend class sc_simcontext; //DM 05/22/2019 TODO:remove
130 
131  friend class sc_process_b;
132  friend class sc_method_process;
133  friend class sc_thread_process;
134  friend void sc_thread_cor_fn( void* arg );
135 
136 public:
137  sc_event_list( const sc_event_list& );
139 
140  int size() const;
141  std::string to_string() const;
142 
143  bool and_list() const;
144 protected:
145 
146  void push_back( const sc_event& );
147  void push_back( const sc_event_list& );
148 
149  explicit
150  sc_event_list( bool and_list_, bool auto_delete_ = false );
151 
152  sc_event_list( const sc_event&,
153  bool and_list_,
154  bool auto_delete_ = false );
155 
156  ~sc_event_list();
157 
158  void swap( sc_event_list& );
159  void move_from( const sc_event_list& );
160 
161 
162 
163  void add_dynamic( sc_method_handle ) const;
164  void add_dynamic( sc_thread_handle ) const;
165  void remove_dynamic( sc_method_handle, const sc_event* ) const;
166  void remove_dynamic( sc_thread_handle, const sc_event* ) const;
167 
168  void remove_all_dynamic( sc_thread_handle ) const;
169  void remove_all_dynamic( sc_method_handle ) const; //DM 05/24/2019
170 
171  bool busy() const;
172  bool temporary() const;
173  void auto_delete() const;
174 
175  void report_premature_destruction() const;
176  void report_invalid_modification() const;
177 
178 private:
179 
180  std::vector<const sc_event*> m_events;
181  bool m_and_list;
182  bool m_auto_delete;
183  mutable unsigned m_busy;
184 };
185 
186 
187 /**************************************************************************/
194 : public sc_event_list
195 {
196  friend class sc_event;
198  friend class sc_process_b;
199  friend class sc_method_process;
200  friend class sc_thread_process;
201 
202 protected:
203 
204  explicit
205  sc_event_and_list( bool auto_delete_ );
206 
207 public:
208 
210  sc_event_and_list( const sc_event& );
211 
212  void swap( sc_event_and_list& );
215 
218 };
219 
221 
222 /**************************************************************************/
229 : public sc_event_list
230 {
231  friend class sc_event;
233  friend class sc_process_b;
234  friend class sc_method_process;
235  friend class sc_thread_process;
236 
237 protected:
238 
239  explicit
240  sc_event_or_list( bool auto_delete_ );
241 
242 public:
244  sc_event_or_list( const sc_event& );
245  void swap( sc_event_or_list& );
250 };
251 
253 
254 /**************************************************************************/
260 class sc_event
261 {
262  friend class sc_clock;
263  friend class sc_event_list;
264  friend class sc_event_timed;
265  friend class sc_simcontext;
266  friend class sc_object;
267  friend class sc_process_b;
268  friend class sc_method_process;
269  friend class sc_thread_process;
270  template<typename IF, sc_writer_policy POL> friend class sc_signal;
271  friend void sc_thread_cor_fn( void* arg );
272 
273 public:
274 
275  //a vector that contains all the notification timestamp of this event
276  //std::vector<sc_timestamp> m_notify_timestamp_list;
277  std::set<sc_timestamp> m_notify_timestamp_set;
278 
279  //returns the min value of m_notify_timestamp_list
281  //returns the min value of m_notify_timestamp_list that is larget than the argument
283 
284  //according to the notification time,
285  //erase it from the m_notify_timestamp_list
287 
288  sc_event();
289  sc_event( const char* name );
290  ~sc_event();
291 
292  void cancel();
293 
294  const char* name() const { return m_name.c_str(); }
295  const char* basename() const;
296  sc_object* get_parent_object() const { return m_parent_p; }
297  bool in_hierarchy() const { return m_name.length() != 0; }
298 
303  // 08/13/2015 GL.
304  void notify();
305 
306  void notify( const sc_time& );
307  void notify( double, sc_time_unit );
308 
309  void notify_delayed();
310  void notify_delayed( const sc_time& );
311  void notify_delayed( double, sc_time_unit );
312 
313  sc_event_or_expr operator | ( const sc_event& ) const;
315  sc_event_and_expr operator & ( const sc_event& ) const;
317 
321  // 08/12/2015 GL.
322  const sc_timestamp& get_notify_timestamp() const;
323  void push_notify_timestamp_list( const sc_timestamp& ts );
325  mutable std::vector<sc_method_handle> m_methods_static;
326  mutable std::vector<sc_method_handle> m_methods_dynamic;
327  mutable std::vector<sc_thread_handle> m_threads_static;
328  mutable std::vector<sc_thread_handle> m_threads_dynamic;
329 
330 private:
331 
332  void add_static( sc_method_handle ) const;
333  void add_static( sc_thread_handle ) const;
334  void add_dynamic( sc_method_handle ) const;
335  void add_dynamic( sc_thread_handle ) const;
336 
337  void notify_internal( const sc_time& );
338  void notify_next_delta();
339 
340  bool remove_static( sc_method_handle ) const;
341  bool remove_static( sc_thread_handle ) const;
342  bool remove_dynamic( sc_method_handle ) const;
343  bool remove_dynamic( sc_thread_handle ) const;
344 
345  void register_event( const char* name );
346  void reset();
347 
348  bool trigger();
349 
350 
354  // 08/12/2015 GL.
355  void set_notify_timestamp( const sc_timestamp& ts );
356 
357 private:
358 
359  enum notify_t { NONE, DELTA, TIMED };
360 
361  std::string m_name; // name of object.
362  sc_object* m_parent_p; // parent sc_object for this event.
363  sc_simcontext* m_simc;
364 
365 
366  sc_event_timed* m_timed;
367 
368 
369 
370 
374  // 08/13/2015 GL.
375  sc_timestamp m_notify_timestamp;
376 
377 private:
378 
379  // disabled
380  sc_event( const sc_event& );
381  sc_event& operator = ( const sc_event& );
382  notify_t m_notify_type;
383 
384 public:
386 };
387 
388 #define SC_KERNEL_EVENT_PREFIX "$$$$kernel_event$$$$_"
389 
390 extern sc_event sc_non_event; // Event that never happens.
391 
392 /**************************************************************************/
399 {
400  friend class sc_event;
401  friend class sc_simcontext;
402 
403  friend int sc_notify_time_compare( const void*, const void* );
404 
405 private:
406 
407  sc_event_timed( sc_event* e, const sc_time& t )
408  : m_event( e ), m_notify_time( t )
409  {}
410 
411  ~sc_event_timed()
412  { if( m_event != 0 ) { m_event->m_timed = 0; } }
413 
414  sc_event* event() const
415  { return m_event; }
416 
417  const sc_time& notify_time() const
418  { return m_notify_time; }
419 
420  static void* operator new( std::size_t )
421  { return allocate(); }
422 
423  static void operator delete( void* p, std::size_t )
424  { deallocate( p ); }
425 
426 private:
427 
428  // dedicated memory management
429  static void* allocate();
430  static void deallocate( void* );
431 
432 private:
433 
434  sc_event* m_event;
435  sc_time m_notify_time;
436 
437 private:
438 
439  // disabled
440  sc_event_timed();
441  sc_event_timed( const sc_event_timed& );
442  sc_event_timed& operator = ( const sc_event_timed& );
443 };
444 
445 
446 // IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
447 
448 inline
449 void
451 {
452  notify( sc_time( v, tu, m_simc ) );
453 }
454 
455 
456 inline
457 void
458 sc_event::notify_internal( const sc_time& t )
459 {
460  // 08/14/2015 GL: to get the local time stamp of this coroutine
461  sc_process_b* m_proc = m_simc->get_curr_proc();
462 
463  if( t == SC_ZERO_TIME ) {
464  /* ZC: because the event notification is removed from the if statement,
465  wait(0) should not be put into the delta list, this will create too many
466  delta events
467  // 08/14/2015 GL: set the time stamp of the event notification
468  set_notify_timestamp( m_proc->get_timestamp() );
469 
470  // add this event to the delta events set
471  m_delta_event_index = m_simc->add_delta_event( this );
472  m_notify_type = DELTA;
473  */
474  sc_event_timed* et = new sc_event_timed( this,
475  m_proc->get_timestamp().get_time_count() + t );
476  m_simc->add_timed_event( et );
477  m_timed = et;
478  m_notify_type = TIMED;
479  // 08/14/2015 GL: also set the time stamp of this event notification
480  // 08/17/2015 GL: delta cycle count starts from 0 in each timed cycle
481  set_notify_timestamp( sc_timestamp( m_proc->get_timestamp().
482  get_time_count() , m_proc->get_timestamp().
483  get_delta_count() +1 ) );
484  } else {
485  // sc_event_timed* et =
486  // new sc_event_timed( this, m_simc->time_stamp() + t );
487  // 08/13/2015 GL: get the local time stamp of this coroutine instead
488  // of the global time stamp
489  sc_event_timed* et = new sc_event_timed( this,
490  m_proc->get_timestamp().get_time_count() + t );
491  m_simc->add_timed_event( et );
492  m_timed = et;
493  m_notify_type = TIMED;
494  // 08/14/2015 GL: also set the time stamp of this event notification
495  // 08/17/2015 GL: delta cycle count starts from 0 in each timed cycle
496  set_notify_timestamp( sc_timestamp( m_proc->get_timestamp().
497  get_time_count() + t, 0 ) );
498  }
499 }
500 
501 inline
502 void
503 sc_event::notify_next_delta()
504 {
505  // 08/14/2015 GL: to get the local time stamp of this coroutine
506  sc_process_b* m_proc = m_simc->get_curr_proc();
507 
508  if( m_notify_type != NONE ) {
509  SC_REPORT_ERROR( SC_ID_NOTIFY_DELAYED_, 0 );
510  }
511 
512  // 08/14/2015 GL: set the time stamp of the event notification
513  set_notify_timestamp( m_proc->get_timestamp() );
514 
515  // add this event to the delta events set
516  m_delta_event_index = m_simc->add_delta_event( this );
517  m_notify_type = DELTA;
518 }
519 
520 inline
521 void
523 {
524  notify_delayed( sc_time( v, tu, m_simc ) );
525 }
526 
527 
528 inline
529 void
530 sc_event::add_static( sc_method_handle method_h ) const
531 {
532  m_methods_static.push_back( method_h );
533 }
534 
535 inline
536 void
537 sc_event::add_static( sc_thread_handle thread_h ) const
538 {
539  m_threads_static.push_back( thread_h );
540 }
541 
542 inline
543 void
544 sc_event::add_dynamic( sc_method_handle method_h ) const
545 {
546  m_methods_dynamic.push_back( method_h );
547 }
548 
549 inline
550 void
551 sc_event::add_dynamic( sc_thread_handle thread_h ) const
552 {
553 
554  m_threads_dynamic.push_back( thread_h );
555 }
556 
557 
558 // ----------------------------------------------------------------------------
559 // Deprecated functional notation for notifying events.
560 // ----------------------------------------------------------------------------
561 
562 extern void notify( sc_event& e );
563 extern void notify( const sc_time& t, sc_event& e );
564 extern void notify( double v, sc_time_unit tu, sc_event& e );
565 
566 
567 // IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
568 
569 inline
570 sc_event_list::sc_event_list( bool and_list_, bool auto_delete_ )
571  : m_events()
572  , m_and_list( and_list_ )
573  , m_auto_delete( auto_delete_ )
574  , m_busy( 0 )
575 {
576 }
577 
578 inline
580  bool and_list_,
581  bool auto_delete_ )
582  : m_events()
583  , m_and_list( and_list_ )
584  , m_auto_delete( auto_delete_ )
585  , m_busy(0)
586 {
587  m_events.push_back( &e );
588 }
589 
590 inline
592  : m_events()
593  , m_and_list( that.m_and_list )
594  , m_auto_delete( false )
595  , m_busy( 0 )
596 {
597  move_from( that );
598  that.auto_delete(); // free automatic lists
599 }
600 
601 inline
604 {
605  if( m_busy )
607 
608  move_from( that );
609  that.auto_delete(); // free automatic lists
610 
611  return *this;
612 }
613 
614 inline
616 {
617  if( m_busy )
619 }
620 
621 inline
622 void
624 {
625  if( busy() || that.busy() )
627  m_events.swap( that.m_events );
628 }
629 
630 inline
631 void
633 {
634  if( that.temporary() ) {
635  swap( const_cast<sc_event_list&>(that) ); // move from source
636  } else {
637  m_events = that.m_events; // copy from source
638  }
639 }
640 
641 inline
642 int
644 {
645  return m_events.size();
646 }
647 
648 inline
649 bool
651 {
652  return m_and_list;
653 }
654 
655 
656 inline
657 bool
659 {
660  return m_busy != 0;
661 }
662 
663 
664 inline
665 bool
667 {
668  return m_auto_delete && ! m_busy;
669 }
670 
671 inline
672 void
674 {
675  if( m_busy ) {
676  --m_busy;
677  }
678  if( ! m_busy && m_auto_delete ) {
679  delete this;
680  }
681 }
682 
683 
684 
685 // IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
686 
687 inline
689  : sc_event_list( false )
690 {}
691 
692 inline
694 : sc_event_list( false )
695 {
696  push_back( e );
697 }
698 
699 inline
701 : sc_event_list( false, auto_delete_ )
702 {}
703 
704 inline
707 {
708  if( busy() )
710 
711  push_back( e );
712  return *this;
713 }
714 
715 inline
718 {
719  if( busy() )
721 
722  push_back( el );
723  return *this;
724 }
725 
726 inline
729 {
730  sc_event_or_expr expr;
731  expr.push_back( *this );
732  expr.push_back( e2 );
733  return expr;
734 }
735 
736 inline
739 {
740  sc_event_or_expr expr;
741  expr.push_back( *this );
742  expr.push_back( e2 );
743  return expr;
744 }
745 
746 
747 // sc_event
748 
749 inline
751 sc_event::operator | ( const sc_event& e2 ) const
752 {
753  sc_event_or_expr expr;
754  expr.push_back( *this );
755  expr.push_back( e2 );
756  return expr;
757 }
758 
759 inline
762 {
763  sc_event_or_expr expr;
764  expr.push_back( *this );
765  expr.push_back( e2 );
766  return expr;
767 }
768 
769 // sc_event_expr
770 
771 inline
774 {
775  expr.push_back( e );
776  return expr;
777 }
778 
779 inline
782 {
783  expr.push_back( el );
784  return expr;
785 }
786 
787 inline
788 void
790 {
791  sc_event_list::swap( that );
792 }
793 
794 
795 
796 // IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
797 
798 inline
800  : sc_event_list( true )
801 {}
802 
803 inline
805 : sc_event_list( true )
806 {
807  push_back( e );
808 }
809 
810 inline
812 : sc_event_list( true, auto_delete_ )
813 {}
814 
815 inline
816 void
818 {
819  sc_event_list::swap( that );
820 }
821 
822 
823 inline
826 {
827  if( busy() )
829 
830  push_back( e );
831  return *this;
832 }
833 
834 inline
837 {
838  if( busy() )
840 
841  push_back( el );
842  return *this;
843 }
844 
845 inline
848 {
849  sc_event_and_expr expr;
850  expr.push_back( *this );
851  expr.push_back( e );
852  return expr;
853 }
854 
855 inline
858 {
859  sc_event_and_expr expr;
860  expr.push_back( *this );
861  expr.push_back( el );
862  return expr;
863 }
864 
865 // sc_event
866 
867 inline
869 sc_event::operator & ( const sc_event& e2 ) const
870 {
871  sc_event_and_expr expr;
872  expr.push_back( *this );
873  expr.push_back( e2 );
874  return expr;
875 }
876 
877 inline
880 {
881  sc_event_and_expr expr;
882  expr.push_back( *this );
883  expr.push_back( e2 );
884  return expr;
885 }
886 
887 // sc_event_expr
888 
889 inline
892 {
893  expr.push_back( e );
894  return expr;
895 }
896 
897 inline
900 {
901  expr.push_back( el );
902  return expr;
903 }
904 
905 } // namespace sc_core
906 
907 // $Log: sc_event.h,v $
908 // Revision 1.14 2011/08/29 18:04:32 acg
909 // Philipp A. Hartmann: miscellaneous clean ups.
910 //
911 // Revision 1.13 2011/08/26 20:46:09 acg
912 // Andy Goodrich: moved the modification log to the end of the file to
913 // eliminate source line number skew when check-ins are done.
914 //
915 // Revision 1.12 2011/08/24 22:05:50 acg
916 // Torsten Maehne: initialization changes to remove warnings.
917 //
918 // Revision 1.11 2011/03/12 21:07:51 acg
919 // Andy Goodrich: changes to kernel generated event support.
920 //
921 // Revision 1.10 2011/03/06 15:55:11 acg
922 // Andy Goodrich: Changes for named events.
923 //
924 // Revision 1.9 2011/03/05 01:39:21 acg
925 // Andy Goodrich: changes for named events.
926 //
927 // Revision 1.8 2011/02/18 20:27:14 acg
928 // Andy Goodrich: Updated Copyrights.
929 //
930 // Revision 1.7 2011/02/13 21:47:37 acg
931 // Andy Goodrich: update copyright notice.
932 //
933 // Revision 1.6 2011/02/01 21:03:23 acg
934 // Andy Goodrich: new return codes for trigger_dynamic calls.
935 //
936 // Revision 1.5 2011/01/18 20:10:44 acg
937 // Andy Goodrich: changes for IEEE1666_2011 semantics.
938 //
939 // Revision 1.4 2010/12/07 20:09:11 acg
940 // Andy Goodrich: writer policy fix.
941 //
942 // Revision 1.3 2009/05/22 16:06:29 acg
943 // Andy Goodrich: process control updates.
944 //
945 // Revision 1.2 2008/05/22 17:06:25 acg
946 // Andy Goodrich: updated copyright notice to include 2008.
947 //
948 // Revision 1.1.1.1 2006/12/15 20:20:05 acg
949 // SystemC 2.3
950 //
951 // Revision 1.8 2006/05/26 20:33:16 acg
952 // Andy Goodrich: changes required by additional platform compilers (i.e.,
953 // Microsoft VC++, Sun Forte, HP aCC).
954 //
955 // Revision 1.7 2006/05/08 17:57:51 acg
956 // Andy Goodrich: added David Long's forward declarations for friend
957 // functions, methods, and operators to keep the Microsoft compiler happy.
958 //
959 // Revision 1.6 2006/04/11 23:13:20 acg
960 // Andy Goodrich: Changes for reduced reset support that only includes
961 // sc_cthread, but has preliminary hooks for expanding to method and thread
962 // processes also.
963 //
964 // Revision 1.5 2006/01/24 20:56:00 acg
965 // Andy Goodrich: fixed up CVS comment.
966 //
967 // Revision 1.4 2006/01/24 20:48:14 acg
968 // Andy Goodrich: added deprecation warnings for notify_delayed(). Added two
969 // new implementation-dependent methods, notify_next_delta() & notify_internal()
970 // to replace calls to notify_delayed() from within the simulator. These two
971 // new methods are simpler than notify_delayed() and should speed up simulations
972 //
973 // Revision 1.3 2006/01/13 18:44:29 acg
974 // Added $Log to record CVS changes into the source.
975 //
976 
977 #endif
978 
979 // Taf!
void erase_notification_time(sc_timestamp)
#define sc_assert(expr)
Definition: sc_report.h:235
int m_delta_event_index
Definition: sc_event.h:385
void notify(sc_event &e)
std::vector< sc_method_handle > m_methods_static
Definition: sc_event.h:325
const char * basename() const
OR list of events.
Definition: sc_event.h:228
void notify()
The immediate notification is not supported by the out-of-order simulation in the current release...
bool busy() const
Definition: sc_event.h:658
#define SC_REPORT_ERROR(msg_type, msg)
Definition: sc_report.h:213
sc_event_expr(sc_event_expr const &e)
Definition: sc_event.h:78
int sc_notify_time_compare(const void *, const void *)
A time stamp combining timed cycles and delta cycles.
Definition: sc_process.h:434
const sc_time & get_time_count() const
Get the value of timed cycles.
void remove_dynamic(sc_method_handle, const sc_event *) const
Class for storing the time to notify a timed event.
Definition: sc_event.h:398
sc_event_or_list & operator|=(const sc_event &)
Definition: sc_event.h:706
sc_event_and_expr operator&(sc_event_and_expr expr, sc_event const &e)
Definition: sc_event.h:891
The clock channel.
Definition: sc_clock.h:43
T const & release() const
Definition: sc_event.h:84
sc_event_expr< sc_event_or_list > operator|(const sc_event &) const
Definition: sc_event.h:728
AND list of events.
Definition: sc_event.h:193
void swap(sc_event_and_list &)
Definition: sc_event.h:817
std::vector< sc_method_handle > m_methods_dynamic
Definition: sc_event.h:326
sc_event sc_non_event
const sc_timestamp & get_notify_timestamp_last() const
void push_back(type const &el) const
Definition: sc_event.h:98
Base class for lists of events.
Definition: sc_event.h:126
void push_back(sc_event const &e) const
Definition: sc_event.h:92
sc_timestamp get_earliest_time_after_certain_time(sc_timestamp)
class sc_method_process * sc_method_handle
Definition: sc_process.h:120
bool in_hierarchy() const
Definition: sc_event.h:297
sc_process_b * get_curr_proc() const
int size() const
Definition: sc_event.h:643
void add_dynamic(sc_method_handle) const
User initiated dynamic process support.
Definition: sc_process.h:558
void swap(sc_event_list &)
Definition: sc_event.h:623
friend class sc_event_timed
Definition: sc_event.h:264
friend int sc_notify_time_compare(const void *, const void *)
void remove_all_dynamic(sc_thread_handle) const
sc_event_list(const sc_event_list &)
Definition: sc_event.h:591
bool and_list() const
Definition: sc_event.h:650
std::vector< sc_thread_handle > m_threads_static
Definition: sc_event.h:327
sc_event_or_expr operator|(const sc_event &) const
Definition: sc_event.h:751
sc_event_list & operator=(const sc_event_list &)
Definition: sc_event.h:603
void swap(sc_event_or_list &)
Definition: sc_event.h:789
friend void sc_thread_cor_fn(void *arg)
friend class sc_event
Definition: sc_event.h:400
class sc_thread_process * sc_thread_handle
Definition: sc_process.h:121
sc_event_and_expr operator&(const sc_event &) const
Definition: sc_event.h:869
friend class sc_process_b
Definition: sc_event.h:267
sc_event_and_list & operator&=(const sc_event &)
Definition: sc_event.h:825
const sc_timestamp & get_notify_timestamp() const
GET the notification time stamp.
sc_event_expr< sc_event_or_list > sc_event_or_expr
Definition: sc_event.h:252
The event class.
Definition: sc_event.h:260
bool temporary() const
Definition: sc_event.h:666
void report_invalid_modification() const
void push_back(const sc_event &)
sc_timestamp get_earliest_notification_time()
The simulation context.
const char * name() const
Definition: sc_event.h:294
void push_notify_timestamp_list(const sc_timestamp &ts)
sc_event_expr< sc_event_and_list > sc_event_and_expr
Definition: sc_event.h:220
void auto_delete() const
Definition: sc_event.h:673
friend class Invoker
Definition: sc_event.h:128
const sc_time SC_ZERO_TIME
std::vector< sc_thread_handle > m_threads_dynamic
Definition: sc_event.h:328
std::set< sc_timestamp > m_notify_timestamp_set
Definition: sc_event.h:277
sc_event_expr< sc_event_and_list > operator&(const sc_event &)
Definition: sc_event.h:847
sc_event_or_expr operator|(sc_event_or_expr expr, sc_event const &e)
Definition: sc_event.h:773
void move_from(const sc_event_list &)
Definition: sc_event.h:632
The event expression class.
Definition: sc_event.h:64
const sc_timestamp & get_timestamp()
Set the local time stamp of this process.
friend void sc_thread_cor_fn(void *arg)
sc_object * get_parent_object() const
Definition: sc_event.h:296
void report_premature_destruction() const
std::string to_string() const
Abstract base class of all SystemC `simulation&#39; objects.
Definition: sc_object.h:51
sc_time_unit
Definition: sc_time.h:56