SystemC  Recoding Infrastructure for SystemC v0.6.3 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
sc_core::sc_clock Class Reference

The clock channel. More...

#include <sysc/communication/sc_clock.h>

Inheritance diagram for sc_core::sc_clock:
Inheritance graph
[legend]
Collaboration diagram for sc_core::sc_clock:
Collaboration graph
[legend]

Public Member Functions

 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 register_port (sc_port_base &, const char *if_type)
 
virtual void write (const bool &)
 
const sc_timeperiod () const
 
double duty_cycle () const
 
bool posedge_first () const
 
sc_time start_time () const
 
virtual const char * kind () const
 
- Public Member Functions inherited from sc_core::sc_signal< bool, SC_ONE_WRITER >
 sc_signal ()
 
 sc_signal (const char *name_)
 
 sc_signal (const char *name_, const bool &initial_value_)
 
virtual ~sc_signal ()
 
virtual sc_writer_policy get_writer_policy () const
 
virtual const sc_eventdefault_event () const
 
virtual const sc_eventvalue_changed_event () const
 
virtual const bool & read () const
 
virtual const bool & get_data_ref () const
 
virtual bool event () const
 
 operator const bool & () const
 
this_typeoperator= (const bool &a)
 
this_typeoperator= (const sc_signal_in_if< bool > &a)
 
this_typeoperator= (const this_type &a)
 
const bool & get_new_value () const
 
void trace (sc_trace_file *tf) const
 
virtual void print (::std::ostream &=::std::cout) const
 
virtual void dump (::std::ostream &=::std::cout) const
 
- Public Member Functions inherited from sc_core::sc_signal_in_if< bool >
virtual const sc_eventposedge_event () const =0
 
virtual const sc_eventnegedge_event () const =0
 
virtual bool posedge () const =0
 
virtual bool negedge () const =0
 
- Public Member Functions inherited from sc_core::sc_interface
virtual ~sc_interface ()
 
- Public Member Functions inherited from sc_core::sc_signal_write_if< bool >
 sc_signal_write_if ()
 
- Public Member Functions inherited from sc_core::sc_prim_channel
bool update_requested ()
 
void request_update ()
 
void async_request_update ()
 
- Public Member Functions inherited from sc_core::sc_object
const char * name () const
 
const char * basename () const
 
sc_simcontextsimcontext () const
 
bool add_attribute (sc_attr_base &)
 
sc_attr_baseget_attribute (const std::string &name_)
 
const sc_attr_baseget_attribute (const std::string &name_) const
 
sc_attr_baseremove_attribute (const std::string &name_)
 
void remove_all_attributes ()
 
int num_attributes () const
 
sc_attr_cltnattr_cltn ()
 
const sc_attr_cltnattr_cltn () const
 
virtual const std::vector
< sc_event * > & 
get_child_events () const
 
virtual const std::vector
< sc_object * > & 
get_child_objects () const
 
sc_objectget_parent () const
 
sc_objectget_parent_object () const
 

Static Public Member Functions

static const sc_timetime_stamp ()
 

Protected Member Functions

void before_end_of_elaboration ()
 This function is not supported by the out-of-order simulation in the current release. More...
 
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 Member Functions inherited from sc_core::sc_signal< bool, SC_ONE_WRITER >
virtual void update ()
 The update method (does nothing by default). More...
 
void do_update ()
 
- Protected Member Functions inherited from sc_core::sc_signal_inout_if< bool >
 sc_signal_inout_if ()
 
- Protected Member Functions inherited from sc_core::sc_signal_in_if< bool >
 sc_signal_in_if ()
 
- Protected Member Functions inherited from sc_core::sc_interface
 sc_interface ()
 
- Protected Member Functions inherited from sc_core::sc_prim_channel
 sc_prim_channel ()
 
 sc_prim_channel (const char *)
 
virtual ~sc_prim_channel ()
 
virtual void end_of_elaboration ()
 
virtual void start_of_simulation ()
 
virtual void end_of_simulation ()
 
void wait (int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (const sc_event &e, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (const sc_event_or_list &el, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (const sc_event_and_list &el, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (const sc_time &t, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (double v, sc_time_unit tu, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (const sc_time &t, const sc_event &e, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (double v, sc_time_unit tu, const sc_event &e, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (const sc_time &t, const sc_event_or_list &el, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (double v, sc_time_unit tu, const sc_event_or_list &el, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (const sc_time &t, const sc_event_and_list &el, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (double v, sc_time_unit tu, const sc_event_and_list &el, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void wait (int n, int seg_id=-1)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger ()
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger (const sc_event &e)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger (const sc_event_or_list &el)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger (const sc_event_and_list &el)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger (const sc_time &t)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger (double v, sc_time_unit tu)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger (const sc_time &t, const sc_event &e)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger (double v, sc_time_unit tu, const sc_event &e)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger (const sc_time &t, const sc_event_or_list &el)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger (double v, sc_time_unit tu, const sc_event_or_list &el)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger (const sc_time &t, const sc_event_and_list &el)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
void next_trigger (double v, sc_time_unit tu, const sc_event_and_list &el)
 A new parameter segment ID is added for the out-of-order simulation. More...
 
bool timed_out ()
 
- Protected Member Functions inherited from sc_core::sc_object
 sc_object ()
 
 sc_object (const char *nm)
 
 sc_object (const sc_object &)
 
sc_objectoperator= (const sc_object &)
 
virtual ~sc_object ()
 
virtual void add_child_event (sc_event *event_p)
 
virtual void add_child_object (sc_object *object_p)
 
virtual bool remove_child_event (sc_event *event_p)
 
virtual bool remove_child_object (sc_object *object_p)
 
phase_cb_mask register_simulation_phase_callback (phase_cb_mask)
 
phase_cb_mask unregister_simulation_phase_callback (phase_cb_mask)
 

Protected Attributes

sc_time m_period
 
double m_duty_cycle
 
sc_time m_start_time
 
bool m_posedge_first
 
sc_time m_posedge_time
 
sc_time m_negedge_time
 
sc_event m_next_posedge_event
 
sc_event m_next_negedge_event
 
- Protected Attributes inherited from sc_core::sc_signal< bool, SC_ONE_WRITER >
sc_eventm_change_event_p
 
bool m_cur_val
 
sc_dt::uint64 m_change_stamp
 
bool m_new_val
 
- Protected Attributes inherited from sc_core::sc_prim_channel
CHNL_MTX_TYPE_ m_mutex
 A mutex to protect concurrent communication. More...
 

Friends

class sc_clock_posedge_callback
 
class sc_clock_negedge_callback
 

Additional Inherited Members

- Public Types inherited from sc_core::sc_prim_channel
enum  { list_end = 0xdb }
 
- Public Types inherited from sc_core::sc_object
typedef unsigned phase_cb_mask
 
- Protected Types inherited from sc_core::sc_signal< bool, SC_ONE_WRITER >
typedef sc_signal_inout_if< bool > if_type
 
typedef sc_signal< bool, POL > this_type
 
typedef sc_writer_policy_check
< POL > 
policy_type
 

Detailed Description

The clock channel.

Definition at line 43 of file sc_clock.h.

Constructor & Destructor Documentation

sc_core::sc_clock::sc_clock ( )
sc_core::sc_clock::sc_clock ( const char *  name_)
explicit
sc_core::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 
)
sc_core::sc_clock::sc_clock ( const char *  name_,
double  period_v_,
sc_time_unit  period_tu_,
double  duty_cycle_ = 0.5 
)
sc_core::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 
)
sc_core::sc_clock::sc_clock ( const char *  name_,
double  period_,
double  duty_cycle_ = 0.5,
double  start_time_ = 0.0,
bool  posedge_first_ = true 
)
virtual sc_core::sc_clock::~sc_clock ( )
virtual

Member Function Documentation

void sc_core::sc_clock::before_end_of_elaboration ( )
protectedvirtual

This function is not supported by the out-of-order simulation in the current release.

Reimplemented from sc_core::sc_prim_channel.

double sc_core::sc_clock::duty_cycle ( ) const
inline

Definition at line 95 of file sc_clock.h.

void sc_core::sc_clock::init ( const sc_time ,
double  ,
const sc_time ,
bool   
)
protected
bool sc_core::sc_clock::is_clock ( ) const
inlineprotected

Definition at line 155 of file sc_clock.h.

virtual const char* sc_core::sc_clock::kind ( ) const
inlinevirtual

Reimplemented from sc_core::sc_signal< bool, SC_ONE_WRITER >.

Definition at line 109 of file sc_clock.h.

void sc_core::sc_clock::negedge_action ( )
inlineprotected

Definition at line 196 of file sc_clock.h.

const sc_time& sc_core::sc_clock::period ( ) const
inline

Definition at line 91 of file sc_clock.h.

void sc_core::sc_clock::posedge_action ( )
inlineprotected

Definition at line 183 of file sc_clock.h.

bool sc_core::sc_clock::posedge_first ( ) const
inline

Definition at line 101 of file sc_clock.h.

virtual void sc_core::sc_clock::register_port ( sc_port_base ,
const char *  if_type 
)
virtual
void sc_core::sc_clock::report_error ( const char *  id,
const char *  add_msg = 0 
) const
protected
sc_time sc_core::sc_clock::start_time ( ) const
inline

Definition at line 104 of file sc_clock.h.

static const sc_time& sc_core::sc_clock::time_stamp ( )
static
virtual void sc_core::sc_clock::write ( const bool &  )
virtual

Friends And Related Function Documentation

friend class sc_clock_negedge_callback
friend

Definition at line 50 of file sc_clock.h.

friend class sc_clock_posedge_callback
friend

Definition at line 49 of file sc_clock.h.

Member Data Documentation

double sc_core::sc_clock::m_duty_cycle
protected

Definition at line 160 of file sc_clock.h.

sc_time sc_core::sc_clock::m_negedge_time
protected

Definition at line 164 of file sc_clock.h.

sc_event sc_core::sc_clock::m_next_negedge_event
protected

Definition at line 167 of file sc_clock.h.

sc_event sc_core::sc_clock::m_next_posedge_event
protected

Definition at line 166 of file sc_clock.h.

sc_time sc_core::sc_clock::m_period
protected

Definition at line 159 of file sc_clock.h.

bool sc_core::sc_clock::m_posedge_first
protected

Definition at line 162 of file sc_clock.h.

sc_time sc_core::sc_clock::m_posedge_time
protected

Definition at line 163 of file sc_clock.h.

sc_time sc_core::sc_clock::m_start_time
protected

Definition at line 161 of file sc_clock.h.


The documentation for this class was generated from the following file: