62 explicit sc_clock(
const char* name_ );
66 double duty_cycle_ = 0.5,
68 bool posedge_first_ =
true );
73 double duty_cycle_ = 0.5 );
81 bool posedge_first_ =
true );
86 double duty_cycle_ = 0.5,
87 double start_time_ = 0.0,
88 bool posedge_first_ =
true );
94 virtual void write(
const bool& );
102 {
return m_duty_cycle; }
108 {
return m_posedge_first; }
111 {
return m_start_time; }
113 static const sc_time& time_stamp();
115 virtual const char*
kind()
const 116 {
return "sc_clock"; }
119 #if 0 // @@@@#### REMOVE 128 static void start(
const sc_time& duration )
134 static void start(
double duration = -1 )
143 void before_end_of_elaboration();
146 void posedge_action();
147 void negedge_action();
151 void report_error(
const char*
id,
const char* add_msg = 0 )
const;
186 m_next_negedge_event.notify_internal( m_negedge_time );
195 m_next_posedge_event.notify_internal( m_posedge_time );
206 inline void operator () () { m_target_p->posedge_action(); }
214 inline void operator () () { m_target_p->negedge_action(); }
SC_API const sc_time SC_ZERO_TIME
Specialization of sc_signal_in_if<T> for type bool.
virtual const char * kind() const
The sc_signal<T> primitive channel class.
double duty_cycle() const
Abstract base class for class sc_port_b.
The sc_signal<T> input/output interface class.
sc_event m_next_negedge_event
sc_event m_next_posedge_event
Base class of all hierarchical modules and channels.
sc_clock_posedge_callback(sc_clock *target_p)
sc_clock_negedge_callback(sc_clock *target_p)
const sc_time & period() const
sc_time start_time() const
bool posedge_first() const
sc_time_unit
Enumeration of time units.