29 #if !defined(sc_method_process_h_INCLUDED)
30 #define sc_method_process_h_INCLUDED
48 # define DEBUG_NAME ""
49 # define DEBUG_MSG(NAME,P,MSG) \
51 if ( P && ( (strlen(NAME)==0) || !strcmp(NAME,P->name())) ) \
52 std::cout << "**** " << sc_time_stamp() << " (" \
53 << sc_get_current_process_name() << "): " << MSG \
54 << " - " << P->name() << std::endl; \
57 # define DEBUG_MSG(NAME,P,MSG)
61 #ifndef _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR
62 #define _SYSC_PRINT_VERBOSE_MESSAGE_ENV_VAR "SYSC_PRINT_VERBOSE_MESSAGE"
67 class sc_event_and_list;
68 class sc_event_or_list;
75 class sc_process_handle;
76 class sc_process_table;
88 void next_trigger(
const sc_event_or_list&, sc_simcontext* );
89 void next_trigger(
const sc_event_and_list&, sc_simcontext* );
91 void next_trigger(
const sc_time&,
const sc_event&, sc_simcontext* );
92 void next_trigger(
const sc_time&,
const sc_event_or_list&, sc_simcontext* );
93 void next_trigger(
const sc_time&,
const sc_event_and_list&, sc_simcontext* );
147 virtual const char*
kind()
const
148 {
return "sc_method_process"; }
263 std::unordered_set<sc_method_process*> dependent_methods;
264 std::vector<sc_method_process*> m_contingent_methods;
265 std::unordered_set<sc_thread_process*> m_contingent_threads;
267 std::unordered_set<sc_thread_process*> dependent_threads;
269 std::unordered_set<sc_method_process*> combined_data_conflict_methods;
270 std::unordered_set<sc_thread_process*> combined_data_conflict_threads;
322 e.add_dynamic(
this );
393 e.add_dynamic(
this );
496 for (
int mon_i = 0; mon_i < mon_n; mon_i++ )
569 #if ! defined( SC_ENABLE_IMMEDIATE_SELF_NOTIFICATIONS )
575 #endif // SC_ENABLE_IMMEDIATE_SELF_NOTIFICATIONS
598 switch( e->m_notify_type )
600 case sc_event::DELTA:
610 case sc_event::TIMED:
620 simcontext()->update_oldest_time( curr_time );
758 #endif // !defined(sc_method_process_h_INCLUDED)
virtual void disable_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
friend sc_cor * get_cor_pointer(sc_process_b *process_p)
void report_immediate_self_notification() const
sc_process_b * sc_get_current_process_b()
sc_timestamp first_triggerable_time
virtual void enable_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
A scoped mutex for the kernel lock.
void set_next_runnable(sc_method_handle next_p)
#define SC_REPORT_ERROR(msg_type, msg)
sc_process_b sc_process_b
A time stamp combining timed cycles and delta cycles.
const sc_time & get_time_count() const
Get the value of timed cycles.
void oooschedule(sc_cor *cor)
Scheduling function in the OoO simulation.
sc_descendant_inclusion_info
This class provides access to an sc_process_b object instance in a manner which allows some persisten...
void trigger_static(sc_event *)
A new parameter is added to update the local time stamp in the thread process.
friend class sc_process_table
void(sc_process_host::* SC_ENTRY_FUNC)()
friend void sc_set_stack_size(sc_method_handle, std::size_t)
virtual void suspend_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
sc_event * m_timeout_event_p
sc_method_handle next_exist()
sc_cor * get_cor_pointer(sc_process_b *process_p)
Coroutine abstract base class.
const char * name() const
bool deliver_event_at_time(sc_event *e, sc_timestamp e_delivery_time)
sc_simcontext * simcontext() const
class sc_method_process * sc_method_handle
const sc_event * m_event_p
virtual void resume_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
void add_dynamic(sc_method_handle) const
User initiated dynamic process support.
std::vector< sc_process_monitor * > m_monitor_q
friend void next_trigger(sc_simcontext *)
A new parameter segment ID is added for the out-of-order simulation.
virtual void throw_user(const sc_throw_it_helper &helper, sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
void add_monitor(sc_process_monitor *monitor_p)
Class that manages the ready-to-run queues.
virtual void kill_process(sc_descendant_inclusion_info descendants=SC_NO_DESCENDANTS)
void lock_all_channels(void)
Acquire all the channel locks.
const sc_timestamp & get_notify_timestamp() const
GET the notification time stamp.
void set_stack_size(std::size_t size)
void sc_method_cor_fn(void *)
virtual ~sc_method_process()
void clear_trigger()
A new parameter segment ID is added for the out-of-order simulation.
Base class for all structural entities.
void unlock_all_channels(void)
Release all the channel locks.
sc_method_handle next_runnable()
sc_method_process(const char *name_p, bool free_host, SC_ENTRY_FUNC method_p, sc_process_host *host_p, const sc_spawn_options *opt_p)
sc_timestamp m_timestamp
The local time stamp of this process.
Base class for all hierarchical channels.
void signal_monitors(int type=0)
virtual const char * kind() const
bool trigger_dynamic(sc_event *, bool &)
sc_simcontext * sc_get_curr_simcontext()
void set_timestamp(const sc_timestamp &ts)
Get the local time stamp of this process.
void sc_set_stack_size(sc_method_handle, std::size_t)
This is the base class for objects which may have processes defined for their methods (e...
void next_trigger(sc_simcontext *)
A new parameter segment ID is added for the out-of-order simulation.
virtual void throw_reset(bool async)
void set_next_exist(sc_method_handle next_p)
sc_process_b * m_runnable_p
void remove_monitor(sc_process_monitor *monitor_p)
value_type get_delta_count() const
Get the value of delta cycles.
friend void sc_method_cor_fn(void *)
void set_segment_id(int id)
Get the current segment ID of this process.
virtual void prepare_for_simulation()
const sc_event_list * m_event_list_p