33 #ifndef SC_PRIM_CHANNEL_H 34 #define SC_PRIM_CHANNEL_H 54 enum { list_end = 0xdb };
56 virtual const char*
kind()
const 57 {
return "sc_prim_channel"; }
63 inline void request_update();
67 void async_request_update();
79 virtual void update();
82 virtual void before_end_of_elaboration();
85 virtual void end_of_elaboration();
88 virtual void start_of_simulation();
91 virtual void end_of_simulation();
96 bool async_attach_suspending();
97 bool async_detach_suspending();
176 sc_time( v, tu, simcontext() ), e, simcontext() ); }
183 sc_time( v, tu, simcontext() ), el, simcontext() ); }
190 sc_time( v, tu, simcontext() ), el, simcontext() ); }
202 {
return simcontext()->m_delta_count; }
208 void perform_update();
211 void construction_done();
214 void elaboration_done();
217 void start_simulation();
220 void simulation_done();
251 {
return static_cast<int>(m_prim_channel_vec.size()); }
259 || pending_async_updates();
262 bool pending_async_updates()
const;
269 bool async_suspend();
287 void perform_update();
290 bool construction_done();
293 void elaboration_done();
296 void start_simulation();
299 void simulation_done();
307 class async_update_list;
309 async_update_list* m_async_update_list_p;
310 int m_construction_done;
311 std::vector<sc_prim_channel*> m_prim_channel_vec;
330 prim_channel_.m_update_next_p = m_update_list_p;
331 m_update_list_p = &prim_channel_;
346 if( ! m_update_next_p ) {
347 m_registry->request_update( *
this );
358 m_registry->async_request_update(*
this);
365 return m_registry->async_attach_suspending(*
this);
372 return m_registry->async_detach_suspending(*
this);
380 sc_prim_channel::perform_update()
void next_trigger(double v, sc_time_unit tu, const sc_event_or_list &el)
void wait(double v, sc_time_unit tu, const sc_event &e)
void wait(const sc_time &t, const sc_event_and_list &el)
void wait(const sc_event &e)
void next_trigger(const sc_time &t, const sc_event &e)
void request_update(sc_prim_channel &)
void next_trigger(const sc_time &t)
SC_API void next_trigger(sc_simcontext *)
Abstract base class of all SystemC `simulation' objects.
Wait() and related functions.
void wait(const sc_time &t)
virtual const char * kind() const
void wait(const sc_event_and_list &el)
Registry for all primitive channels.
void next_trigger(const sc_event_or_list &el)
Wait() and related functions for SC_CTHREADs.
bool async_attach_suspending()
void next_trigger(double v, sc_time_unit tu)
void wait(const sc_time &t, const sc_event &e)
bool pending_updates() const
void wait(double v, sc_time_unit tu, const sc_event_and_list &el)
void wait(const sc_time &t, const sc_event_or_list &el)
Abstract base class of all SystemC `simulation' objects.
void wait(double v, sc_time_unit tu)
SC_API bool timed_out(sc_simcontext *)
void next_trigger(const sc_event &e)
void wait(double v, sc_time_unit tu, const sc_event_or_list &el)
void next_trigger(const sc_time &t, const sc_event_and_list &el)
void next_trigger(const sc_time &t, const sc_event_or_list &el)
void wait(const sc_event_or_list &el)
bool async_detach_suspending()
void next_trigger(double v, sc_time_unit tu, const sc_event &e)
void async_request_update()
void next_trigger(double v, sc_time_unit tu, const sc_event_and_list &el)
void next_trigger(const sc_event_and_list &el)
Abstract base class of all primitive channel classes.
sc_time_unit
Enumeration of time units.
void SC_API wait(int, sc_simcontext *)