gem5  v20.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< bool, SC_ONE_WRITER > sc_gem5::ScSignalBasePicker< bool > sc_core::sc_signal_inout_if< bool > sc_gem5::ScSignalBaseBinary sc_core::sc_signal_in_if< bool > sc_core::sc_signal_write_if< bool > sc_gem5::ScSignalBase sc_core::sc_interface sc_core::sc_interface sc_core::sc_prim_channel 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< bool, SC_ONE_WRITER >
 ScSignalBaseT (const char *_name)
 
 ScSignalBaseT (const char *_name, const bool &initial_value)
 
virtual ~ScSignalBaseT ()
 
virtual void register_port (sc_core::sc_port_base &port, const char *iface_type_name)
 
virtual const bool & read () const
 
 operator const bool & () const
 
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_signal_in_if< bool >
virtual const bool & read () const =0
 
virtual const sc_eventvalue_changed_event () const =0
 
virtual const sc_eventposedge_event () const =0
 
virtual const sc_eventnegedge_event () const =0
 
virtual bool event () const =0
 
virtual bool posedge () const =0
 
virtual bool negedge () const =0
 
- Public Member Functions inherited from sc_core::sc_interface
virtual const sc_eventdefault_event () const
 
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< bool >
 ScSignalBasePicker (const char *_name)
 
- Protected Member Functions inherited from sc_gem5::ScSignalBaseBinary
 ScSignalBaseBinary (const char *_name)
 
void _signalReset (sc_gem5::Reset *reset)
 
void _signalReset ()
 
const sc_core::sc_eventposedgeEvent () const
 
const sc_core::sc_eventnegedgeEvent () const
 
bool posedge () const
 
bool negedge () const
 
void _signalPosedge ()
 
void _signalNegedge ()
 
- 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 ()
 
virtual sc_core::sc_writer_policy get_writer_policy () const =0
 
- 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< 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_signal_write_if< bool >
 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< bool, SC_ONE_WRITER >
bool m_cur_val
 
bool m_new_val
 
WriteChecker< WRITER_POLICY > _checker
 
- Protected Attributes inherited from sc_gem5::ScSignalBaseBinary
std::vector< sc_gem5::Reset * > _resets
 
InternalScEvent _posedgeEvent
 
InternalScEvent _negedgeEvent
 
uint64_t _posStamp
 
uint64_t _negStamp
 
- 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 94 of file sc_clock.cc.

◆ sc_clock() [2/7]

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

Definition at line 99 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 135 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 141 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 148 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 171 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 170 of file sc_clock.cc.

References _period.

Referenced by sc_clock().

◆ posedge_first()

bool sc_core::sc_clock::posedge_first ( ) const

Definition at line 173 of file sc_clock.cc.

References _posedgeFirst.

◆ start_time()

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

Definition at line 172 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 176 of file sc_clock.cc.

References sc_core::sc_time_stamp().

◆ write()

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

Reimplemented from sc_gem5::ScSignalBaseT< bool, SC_ONE_WRITER >.

Definition at line 165 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 Sep 30 2020 14:03:08 for gem5 by doxygen 1.8.17