39 #ifndef _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR
40 #define _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR "SYSC_PRINT_VERBOSE_MESSAGE"
50 class sc_event_or_list;
51 class sc_event_and_list;
63 template<
typename T >
73 : m_expr( new T(true) )
101 m_expr->push_back(el);
103 operator T
const &()
const
114 mutable type * m_expr;
154 bool auto_delete_ =
false );
180 std::vector<const sc_event*> m_events;
183 mutable unsigned m_busy;
270 template<
typename IF, sc_writer_policy POL>
friend class sc_signal;
294 const char*
name()
const {
return m_name.c_str(); }
337 void notify_internal(
const sc_time& );
338 void notify_next_delta();
345 void register_event(
const char*
name );
359 enum notify_t { NONE, DELTA, TIMED };
382 notify_t m_notify_type;
388 #define SC_KERNEL_EVENT_PREFIX "$$$$kernel_event$$$$_"
408 : m_event( e ), m_notify_time( t )
412 {
if( m_event != 0 ) { m_event->m_timed = 0; } }
417 const sc_time& notify_time()
const
418 {
return m_notify_time; }
420 static void*
operator new( std::size_t )
421 {
return allocate(); }
423 static void operator delete(
void* p, std::size_t )
429 static void* allocate();
430 static void deallocate(
void* );
435 sc_time m_notify_time;
441 sc_event_timed(
const sc_event_timed& );
442 sc_event_timed& operator = (
const sc_event_timed& );
458 sc_event::notify_internal(
const sc_time& t )
476 m_simc->add_timed_event( et );
478 m_notify_type = TIMED;
483 get_delta_count() +1 ) );
491 m_simc->add_timed_event( et );
493 m_notify_type = TIMED;
497 get_time_count() + t, 0 ) );
503 sc_event::notify_next_delta()
508 if( m_notify_type != NONE ) {
513 set_notify_timestamp( m_proc->get_timestamp() );
517 m_notify_type = DELTA;
562 extern void notify( sc_event& e );
563 extern void notify(
const sc_time& t, sc_event& e );
572 , m_and_list( and_list_ )
573 , m_auto_delete( auto_delete_ )
583 , m_and_list( and_list_ )
584 , m_auto_delete( auto_delete_ )
587 m_events.push_back( &e );
593 , m_and_list( that.m_and_list )
594 , m_auto_delete( false )
627 m_events.swap( that.m_events );
635 swap( const_cast<sc_event_list&>(that) );
637 m_events = that.m_events;
645 return m_events.size();
668 return m_auto_delete && ! m_busy;
678 if( ! m_busy && m_auto_delete ) {
void erase_notification_time(sc_timestamp)
std::vector< sc_method_handle > m_methods_static
const char * basename() const
void notify()
The immediate notification is not supported by the out-of-order simulation in the current release...
#define SC_REPORT_ERROR(msg_type, msg)
sc_event_expr(sc_event_expr const &e)
int sc_notify_time_compare(const void *, const void *)
A time stamp combining timed cycles and delta cycles.
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.
sc_event_or_list & operator|=(const sc_event &)
sc_event_and_expr operator&(sc_event_and_expr expr, sc_event const &e)
T const & release() const
sc_event_expr< sc_event_or_list > operator|(const sc_event &) const
void swap(sc_event_and_list &)
std::vector< sc_method_handle > m_methods_dynamic
const sc_timestamp & get_notify_timestamp_last() const
void push_back(type const &el) const
Base class for lists of events.
void push_back(sc_event const &e) const
sc_timestamp get_earliest_time_after_certain_time(sc_timestamp)
class sc_method_process * sc_method_handle
bool in_hierarchy() const
sc_process_b * get_curr_proc() const
void add_dynamic(sc_method_handle) const
User initiated dynamic process support.
void swap(sc_event_list &)
friend class sc_event_timed
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 &)
std::vector< sc_thread_handle > m_threads_static
sc_event_or_expr operator|(const sc_event &) const
sc_event_list & operator=(const sc_event_list &)
void swap(sc_event_or_list &)
friend void sc_thread_cor_fn(void *arg)
class sc_thread_process * sc_thread_handle
sc_event_and_expr operator&(const sc_event &) const
friend class sc_process_b
sc_event_and_list & operator&=(const sc_event &)
const sc_timestamp & get_notify_timestamp() const
GET the notification time stamp.
sc_event_expr< sc_event_or_list > sc_event_or_expr
void report_invalid_modification() const
void push_back(const sc_event &)
sc_timestamp get_earliest_notification_time()
const char * name() const
void push_notify_timestamp_list(const sc_timestamp &ts)
sc_event_expr< sc_event_and_list > sc_event_and_expr
const sc_time SC_ZERO_TIME
std::vector< sc_thread_handle > m_threads_dynamic
std::set< sc_timestamp > m_notify_timestamp_set
sc_event_expr< sc_event_and_list > operator&(const sc_event &)
sc_event_or_expr operator|(sc_event_or_expr expr, sc_event const &e)
void move_from(const sc_event_list &)
The event expression class.
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
void report_premature_destruction() const
std::string to_string() const
Abstract base class of all SystemC `simulation' objects.