Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

sc_clock Class Reference

#include <sc_clock.h>

Inheritance diagram for sc_clock:

Inheritance graph
[legend]
Collaboration diagram for sc_clock:

Collaboration graph
[legend]
List of all members.

Public Methods

 sc_clock ()
 sc_clock (const char *name_)
 sc_clock (const char *name_, const sc_time &period_, double duty_cycle_=0.5, const sc_time &start_time_=SC_ZERO_TIME, bool posedge_first_=true)
 sc_clock (const char *name_, double period_v_, sc_time_unit period_tu_, double duty_cycle_=0.5)
 sc_clock (const char *name_, double period_v_, sc_time_unit period_tu_, double duty_cycle_, double start_time_v_, sc_time_unit start_time_tu_, bool posedge_first_=true)
 sc_clock (const char *name_, double period_, double duty_cycle_=0.5, double start_time_=0.0, bool posedge_first_=true)
virtual ~sc_clock ()
virtual void write (const bool &)
const sc_timeperiod () const
double duty_cycle () const
virtual const char * kind () const
sc_signal_in_if< bool > & signal ()
const sc_signal_in_if< bool > & signal () const

Static Public Methods

const sc_timetime_stamp ()
void start (const sc_time &duration)
void start (double v, sc_time_unit tu)
void start (double duration=-1)
void stop ()

Protected Methods

void before_end_of_elaboration ()
void posedge_action ()
void negedge_action ()
void report_error (const char *id, const char *add_msg=0) const
void init (const sc_time &, double, const sc_time &, bool)
bool is_clock () const

Protected Attributes

sc_time m_period
double m_duty_cycle
sc_time m_start_time
sc_time m_posedge_time
sc_time m_negedge_time
sc_event m_next_posedge_event
sc_event m_next_negedge_event

Friends

class sc_clock_posedge_callback
class sc_clock_negedge_callback

Constructor & Destructor Documentation

sc_clock::sc_clock  
 

Definition at line 63 of file sc_clock.cpp.

References init(), m_next_posedge_event, m_start_time, and sc_event::notify_delayed().

sc_clock::sc_clock const char *    name_ [explicit]
 

Definition at line 74 of file sc_clock.cpp.

References init(), m_next_posedge_event, m_start_time, and sc_event::notify_delayed().

sc_clock::sc_clock const char *    name_,
const sc_time   period_,
double    duty_cycle_ = 0.5,
const sc_time   start_time_ = SC_ZERO_TIME,
bool    posedge_first_ = true
 

Definition at line 85 of file sc_clock.cpp.

References init(), m_next_negedge_event, m_next_posedge_event, m_start_time, and sc_event::notify_delayed().

sc_clock::sc_clock const char *    name_,
double    period_v_,
sc_time_unit    period_tu_,
double    duty_cycle_ = 0.5
 

Definition at line 106 of file sc_clock.cpp.

References init(), m_next_posedge_event, m_start_time, sc_event::notify_delayed(), sc_time_unit, and sc_object::simcontext().

sc_clock::sc_clock const char *    name_,
double    period_v_,
sc_time_unit    period_tu_,
double    duty_cycle_,
double    start_time_v_,
sc_time_unit    start_time_tu_,
bool    posedge_first_ = true
 

Definition at line 121 of file sc_clock.cpp.

References init(), m_next_negedge_event, m_next_posedge_event, m_start_time, sc_event::notify_delayed(), sc_time_unit, and sc_object::simcontext().

sc_clock::sc_clock const char *    name_,
double    period_,
double    duty_cycle_ = 0.5,
double    start_time_ = 0.0,
bool    posedge_first_ = true
 

Definition at line 145 of file sc_clock.cpp.

References init(), m_next_negedge_event, m_next_posedge_event, m_start_time, and sc_event::notify_delayed().

sc_clock::~sc_clock   [virtual]
 

Definition at line 197 of file sc_clock.cpp.


Member Function Documentation

void sc_clock::before_end_of_elaboration   [protected, virtual]
 

Reimplemented from sc_prim_channel.

Definition at line 175 of file sc_clock.cpp.

References sc_object::basename(), sc_spawn_options::dont_initialize(), m_next_negedge_event, m_next_posedge_event, sc_clock_negedge_callback, sc_clock_posedge_callback, sc_gen_unique_name(), sc_spawn(), sc_spawn_options::set_sensitivity(), and sc_spawn_options::spawn_method().

double sc_clock::duty_cycle   const [inline]
 

Definition at line 106 of file sc_clock.h.

References m_duty_cycle.

void sc_clock::init const sc_time  ,
double   ,
const sc_time  ,
bool   
[protected]
 

Definition at line 233 of file sc_clock.cpp.

References sc_signal< bool >::m_cur_val, m_duty_cycle, m_negedge_time, sc_signal< bool >::m_new_val, m_period, m_posedge_time, m_start_time, and report_error().

Referenced by sc_clock().

bool sc_clock::is_clock   const [inline, protected, virtual]
 

Reimplemented from sc_signal< bool >.

Definition at line 152 of file sc_clock.h.

virtual const char* sc_clock::kind   const [inline, virtual]
 

Reimplemented from sc_signal< bool >.

Definition at line 113 of file sc_clock.h.

void sc_clock::negedge_action   [inline, protected]
 

Definition at line 189 of file sc_clock.h.

References m_next_posedge_event, m_posedge_time, sc_event::notify_delayed(), and sc_signal< T >::write().

Referenced by sc_clock_negedge_callback::operator()().

const sc_time& sc_clock::period   const [inline]
 

Definition at line 102 of file sc_clock.h.

References m_period.

void sc_clock::posedge_action   [inline, protected]
 

Definition at line 179 of file sc_clock.h.

References m_negedge_time, m_next_negedge_event, sc_event::notify_delayed(), and sc_signal< T >::write().

Referenced by sc_clock_posedge_callback::operator()().

void sc_clock::report_error const char *    id,
const char *    add_msg = 0
const [protected]
 

Definition at line 220 of file sc_clock.cpp.

References sc_object::name(), SC_REPORT_ERROR, and sprintf().

Referenced by init().

const sc_signal_in_if<bool>& sc_clock::signal   const [inline]
 

Definition at line 122 of file sc_clock.h.

sc_signal_in_if<bool>& sc_clock::signal   [inline]
 

Definition at line 119 of file sc_clock.h.

void sc_clock::start double    duration = -1 [inline, static]
 

Definition at line 131 of file sc_clock.h.

References sc_start().

void sc_clock::start double    v,
sc_time_unit    tu
[inline, static]
 

Definition at line 128 of file sc_clock.h.

References sc_start(), and sc_time_unit.

void sc_clock::start const sc_time   duration [inline, static]
 

Definition at line 125 of file sc_clock.h.

References sc_start().

Referenced by sc_start().

void sc_clock::stop   [inline, static]
 

Definition at line 134 of file sc_clock.h.

References sc_stop().

const sc_time & sc_clock::time_stamp   [static]
 

Definition at line 211 of file sc_clock.cpp.

References sc_time_stamp().

void sc_clock::write const bool &    [virtual]
 

Reimplemented from sc_signal< bool >.

Definition at line 201 of file sc_clock.cpp.

References SC_REPORT_ERROR, and value.


Friends And Related Function Documentation

friend class sc_clock_negedge_callback [friend]
 

Definition at line 62 of file sc_clock.h.

Referenced by before_end_of_elaboration().

friend class sc_clock_posedge_callback [friend]
 

Definition at line 61 of file sc_clock.h.

Referenced by before_end_of_elaboration().


Member Data Documentation

double sc_clock::m_duty_cycle [protected]
 

Definition at line 157 of file sc_clock.h.

Referenced by duty_cycle(), and init().

sc_time sc_clock::m_negedge_time [protected]
 

Definition at line 160 of file sc_clock.h.

Referenced by init(), and posedge_action().

sc_event sc_clock::m_next_negedge_event [protected]
 

Definition at line 163 of file sc_clock.h.

Referenced by before_end_of_elaboration(), posedge_action(), and sc_clock().

sc_event sc_clock::m_next_posedge_event [protected]
 

Definition at line 162 of file sc_clock.h.

Referenced by before_end_of_elaboration(), negedge_action(), and sc_clock().

sc_time sc_clock::m_period [protected]
 

Definition at line 156 of file sc_clock.h.

Referenced by init(), and period().

sc_time sc_clock::m_posedge_time [protected]
 

Definition at line 159 of file sc_clock.h.

Referenced by init(), and negedge_action().

sc_time sc_clock::m_start_time [protected]
 

Definition at line 158 of file sc_clock.h.

Referenced by init(), and sc_clock().


The documentation for this class was generated from the following files:
Generated on Fri Jan 14 08:31:09 2005 for SystemC2.1beta11(excludingMSLib)(IncludingSCV)\nProvidedby:www.openverificationfoundation.org by doxygen1.2.18