gem5  v22.1.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
sc_core::sc_clock Class Reference

#include <sc_clock.hh>

Inheritance diagram for sc_core::sc_clock:
sc_core::sc_signal< bool > sc_gem5::ScSignalBaseT< T, WRITER_POLICY > sc_gem5::ScSignalBasePicker< T > sc_core::sc_signal_inout_if< T > sc_gem5::ScSignalBase sc_core::sc_signal_in_if< T > sc_core::sc_signal_write_if< T > sc_core::sc_prim_channel sc_core::sc_interface sc_core::sc_interface sc_core::sc_object

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 write (const bool &)
 
const sc_timeperiod () const
 
double duty_cycle () const
 
const sc_timestart_time () const
 
bool posedge_first () const
 
virtual const char * kind () const
 
- Public Member Functions inherited from sc_core::sc_signal< bool >
 sc_signal ()
 
 sc_signal (const char *name)
 
 sc_signal (const char *name, const bool &initial_value)
 
virtual ~sc_signal ()
 
sc_signal< bool, SC_ONE_WRITER > & operator= (const bool &t)
 
sc_signal< bool, SC_ONE_WRITER > & operator= (const sc_signal< bool, SC_ONE_WRITER > &s)
 
- Public Member Functions inherited from sc_gem5::ScSignalBaseT< T, WRITER_POLICY >
 ScSignalBaseT (const char *_name)
 
 ScSignalBaseT (const char *_name, const T &initial_value)
 
virtual ~ScSignalBaseT ()
 
virtual void register_port (sc_core::sc_port_base &port, const char *iface_type_name)
 
virtual const T & read () const
 
 operator const T & () const
 
virtual void write (const T &t)
 
virtual const sc_core::sc_eventdefault_event () const
 
virtual const sc_core::sc_eventvalue_changed_event () const
 
virtual void print (std::ostream &os=std::cout) const
 
virtual void dump (std::ostream &os=std::cout) const
 
virtual bool event () const
 
virtual sc_core::sc_writer_policy get_writer_policy () const
 
- Public Member Functions inherited from sc_core::sc_object
const char * name () const
 
const char * basename () const
 
virtual const std::vector< sc_object * > & get_child_objects () const
 
virtual const std::vector< sc_event * > & get_child_events () const
 
sc_objectget_parent_object () const
 
bool add_attribute (sc_attr_base &)
 
sc_attr_baseget_attribute (const std::string &)
 
sc_attr_baseremove_attribute (const std::string &)
 
void remove_all_attributes ()
 
int num_attributes () const
 
sc_attr_cltnattr_cltn ()
 
const sc_attr_cltnattr_cltn () const
 
sc_simcontextsimcontext () const
 
- Public Member Functions inherited from sc_core::sc_interface
virtual ~sc_interface ()
 

Static Public Member Functions

static const sc_timetime_stamp ()
 

Protected Member Functions

virtual void before_end_of_elaboration ()
 
- Protected Member Functions inherited from sc_core::sc_signal< bool >
virtual void update ()
 
- Protected Member Functions inherited from sc_gem5::ScSignalBasePicker< T >
 ScSignalBasePicker (const char *_name)
 
- Protected Member Functions inherited from sc_gem5::ScSignalBase
 ScSignalBase (const char *_name)
 
virtual ~ScSignalBase ()
 
const sc_core::sc_eventdefaultEvent () const
 
const sc_core::sc_eventvalueChangedEvent () const
 
bool event () const
 
void _signalChange ()
 
- Protected Member Functions inherited from sc_core::sc_prim_channel
 sc_prim_channel ()
 
 sc_prim_channel (const char *)
 
virtual ~sc_prim_channel ()
 
void request_update ()
 
void async_request_update ()
 
void next_trigger ()
 
void next_trigger (const sc_event &)
 
void next_trigger (const sc_event_or_list &)
 
void next_trigger (const sc_event_and_list &)
 
void next_trigger (const sc_time &)
 
void next_trigger (double, sc_time_unit)
 
void next_trigger (const sc_time &, const sc_event &)
 
void next_trigger (double, sc_time_unit, const sc_event &)
 
void next_trigger (const sc_time &, const sc_event_or_list &)
 
void next_trigger (double, sc_time_unit, const sc_event_or_list &)
 
void next_trigger (const sc_time &, const sc_event_and_list &)
 
void next_trigger (double, sc_time_unit, const sc_event_and_list &)
 
bool timed_out ()
 
void wait ()
 
void wait (int)
 
void wait (const sc_event &)
 
void wait (const sc_event_or_list &)
 
void wait (const sc_event_and_list &)
 
void wait (const sc_time &)
 
void wait (double, sc_time_unit)
 
void wait (const sc_time &, const sc_event &)
 
void wait (double, sc_time_unit, const sc_event &)
 
void wait (const sc_time &, const sc_event_or_list &)
 
void wait (double, sc_time_unit, const sc_event_or_list &)
 
void wait (const sc_time &, const sc_event_and_list &)
 
void wait (double, sc_time_unit, const sc_event_and_list &)
 
virtual void end_of_elaboration ()
 
virtual void start_of_simulation ()
 
virtual void end_of_simulation ()
 
- Protected Member Functions inherited from sc_core::sc_object
 sc_object ()
 
 sc_object (const char *)
 
 sc_object (const sc_object &)
 
sc_objectoperator= (const sc_object &)
 
virtual ~sc_object ()
 
- Protected Member Functions inherited from sc_core::sc_signal_inout_if< T >
 sc_signal_inout_if ()
 
- Protected Member Functions inherited from sc_core::sc_signal_in_if< T >
 sc_signal_in_if ()
 
- Protected Member Functions inherited from sc_core::sc_interface
 sc_interface ()
 
- Protected Member Functions inherited from sc_core::sc_signal_write_if< T >
 sc_signal_write_if ()
 

Private Member Functions

 sc_clock (const sc_clock &)
 
sc_clockoperator= (const sc_clock &)
 
void tickUp ()
 
void tickDown ()
 

Private Attributes

sc_time _period
 
double _dutyCycle
 
sc_time _startTime
 
bool _posedgeFirst
 
::sc_gem5::ClockTick_gem5UpEdge
 
::sc_gem5::ClockTick_gem5DownEdge
 

Friends

class ::sc_gem5::ClockTick
 

Additional Inherited Members

- Protected Attributes inherited from sc_gem5::ScSignalBaseT< T, WRITER_POLICY >
m_cur_val
 
m_new_val
 
WriteChecker< WRITER_POLICY > _checker
 
- Protected Attributes inherited from sc_gem5::ScSignalBase
InternalScEvent _valueChangedEvent
 
uint64_t _changeStamp
 
sc_core::sc_port_base_gem5WriterPort
 

Detailed Description

Definition at line 49 of file sc_clock.hh.

Constructor & Destructor Documentation

◆ sc_clock() [1/7]

sc_core::sc_clock::sc_clock ( )

Definition at line 93 of file sc_clock.cc.

◆ sc_clock() [2/7]

sc_core::sc_clock::sc_clock ( const char *  name)
explicit

Definition at line 98 of file sc_clock.cc.

◆ sc_clock() [3/7]

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_clock() [4/7]

sc_core::sc_clock::sc_clock ( const char *  name,
double  period_v,
sc_time_unit  period_tu,
double  duty_cycle = 0.5 
)

Definition at line 134 of file sc_clock.cc.

◆ sc_clock() [5/7]

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 
)

Definition at line 140 of file sc_clock.cc.

◆ sc_clock() [6/7]

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 
)

Definition at line 147 of file sc_clock.cc.

◆ ~sc_clock()

sc_core::sc_clock::~sc_clock ( )
virtual

◆ sc_clock() [7/7]

sc_core::sc_clock::sc_clock ( const sc_clock )
inlineprivate

Definition at line 91 of file sc_clock.hh.

Member Function Documentation

◆ before_end_of_elaboration()

void sc_core::sc_clock::before_end_of_elaboration ( )
protectedvirtual

◆ duty_cycle()

double sc_core::sc_clock::duty_cycle ( ) const

Definition at line 170 of file sc_clock.cc.

References _dutyCycle.

Referenced by sc_clock().

◆ kind()

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

Reimplemented from sc_gem5::ScSignalBase.

Definition at line 82 of file sc_clock.hh.

◆ operator=()

sc_clock& sc_core::sc_clock::operator= ( const sc_clock )
inlineprivate

Definition at line 92 of file sc_clock.hh.

◆ period()

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

Definition at line 169 of file sc_clock.cc.

References _period.

Referenced by sc_clock().

◆ posedge_first()

bool sc_core::sc_clock::posedge_first ( ) const

Definition at line 172 of file sc_clock.cc.

References _posedgeFirst.

◆ start_time()

const sc_time & sc_core::sc_clock::start_time ( ) const

Definition at line 171 of file sc_clock.cc.

References _startTime.

◆ tickDown()

void sc_core::sc_clock::tickDown ( )
inlineprivate

◆ tickUp()

void sc_core::sc_clock::tickUp ( )
inlineprivate

◆ time_stamp()

const sc_time & sc_core::sc_clock::time_stamp ( )
static

Definition at line 175 of file sc_clock.cc.

References sc_core::sc_time_stamp().

◆ write()

void sc_core::sc_clock::write ( const bool &  )
virtual

Definition at line 164 of file sc_clock.cc.

References panic.

Friends And Related Function Documentation

◆ ::sc_gem5::ClockTick

friend class ::sc_gem5::ClockTick
friend

Definition at line 88 of file sc_clock.hh.

Member Data Documentation

◆ _dutyCycle

double sc_core::sc_clock::_dutyCycle
private

Definition at line 95 of file sc_clock.hh.

Referenced by before_end_of_elaboration(), and duty_cycle().

◆ _gem5DownEdge

::sc_gem5::ClockTick* sc_core::sc_clock::_gem5DownEdge
private

Definition at line 100 of file sc_clock.hh.

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

◆ _gem5UpEdge

::sc_gem5::ClockTick* sc_core::sc_clock::_gem5UpEdge
private

Definition at line 99 of file sc_clock.hh.

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

◆ _period

sc_time sc_core::sc_clock::_period
private

Definition at line 94 of file sc_clock.hh.

Referenced by before_end_of_elaboration(), and period().

◆ _posedgeFirst

bool sc_core::sc_clock::_posedgeFirst
private

Definition at line 97 of file sc_clock.hh.

Referenced by before_end_of_elaboration(), and posedge_first().

◆ _startTime

sc_time sc_core::sc_clock::_startTime
private

Definition at line 96 of file sc_clock.hh.

Referenced by before_end_of_elaboration(), and start_time().


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

Generated on Wed Dec 21 2022 10:25:06 for gem5 by doxygen 1.9.1