sc_core::sc_clock Class Reference

#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]

List of all members.

Public Types

enum  { list_end = 0xdb }

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)
 register a port with this interface (does nothing by default); define this for static design rule checking
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
sc_signal_in_if< bool > & signal ()
const sc_signal_in_if< bool > & signal () const
 sc_signal ()
 sc_signal (const char *name_)
virtual const sc_eventdefault_event () const
 get the default event (default: return event that is never notified)
virtual const sc_eventvalue_changed_event () const
virtual const sc_eventposedge_event () const
virtual const sc_eventnegedge_event () const
virtual const bool & read () const
virtual const bool & get_data_ref () const
virtual bool event () const
virtual bool posedge () const
virtual bool negedge () const
virtual sc_resetis_reset () const
 operator const bool & () const
const bool & get_new_value () const
void trace (sc_trace_file *tf) const
virtual void print (::std::ostream &=::std::cout) const
 print object
virtual void dump (::std::ostream &=::std::cout) const
 dump() is more detailed than print()
bool update_requested ()
void request_update ()
const char * name () const
 return full name of sc_object
const char * basename () const
 return base name of sc_object (last part)
sc_simcontextsimcontext () const
bool add_attribute (sc_attr_base &)
 add attribute
sc_attr_baseget_attribute (const std::string &name_)
 get attribute by name
const sc_attr_baseget_attribute (const std::string &name_) const
 get attribute by name
sc_attr_baseremove_attribute (const std::string &name_)
 remove attribute by name
void remove_all_attributes ()
 remove all attributes
int num_attributes () const
 get the number of attributes
sc_attr_cltnattr_cltn ()
 get the attribute collection
const sc_attr_cltnattr_cltn () const
 get the attribute collection
virtual const std::vector
< sc_object * > & 
get_child_objects () const
 return child objects
sc_objectget_parent () const
 return parent object
sc_objectget_parent_object () const
 return parent object

Static Public Member Functions

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

Protected Member Functions

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
virtual void update ()
 sc_signal_in_if ()
virtual void end_of_elaboration ()
virtual void start_of_simulation ()
virtual void end_of_simulation ()
void wait ()
void wait (const sc_event &e)
void wait (sc_event_or_list &el)
void wait (sc_event_and_list &el)
void wait (const sc_time &t)
void wait (double v, sc_time_unit tu)
void wait (const sc_time &t, const sc_event &e)
void wait (double v, sc_time_unit tu, const sc_event &e)
void wait (const sc_time &t, sc_event_or_list &el)
void wait (double v, sc_time_unit tu, sc_event_or_list &el)
void wait (const sc_time &t, sc_event_and_list &el)
void wait (double v, sc_time_unit tu, sc_event_and_list &el)
void wait (int n)
void next_trigger ()
void next_trigger (const sc_event &e)
void next_trigger (sc_event_or_list &el)
void next_trigger (sc_event_and_list &el)
void next_trigger (const sc_time &t)
void next_trigger (double v, sc_time_unit tu)
void next_trigger (const sc_time &t, const sc_event &e)
void next_trigger (double v, sc_time_unit tu, const sc_event &e)
void next_trigger (const sc_time &t, sc_event_or_list &el)
void next_trigger (double v, sc_time_unit tu, sc_event_or_list &el)
void next_trigger (const sc_time &t, sc_event_and_list &el)
void next_trigger (double v, sc_time_unit tu, sc_event_and_list &el)
bool timed_out ()
sc_dt::uint64 delta_count ()

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
sc_eventm_change_event_p
bool m_cur_val
sc_dt::uint64 m_delta
sc_eventm_negedge_event_p
bool m_new_val
sc_port_basem_output
sc_eventm_posedge_event_p
sc_resetm_reset_p
sc_objectm_writer

Friends

class sc_clock_posedge_callback
class sc_clock_negedge_callback


Detailed Description

Definition at line 84 of file sc_clock.h.


Member Enumeration Documentation

anonymous enum [inherited]

Enumerator:
list_end 

Definition at line 75 of file sc_prim_channel.h.


Constructor & Destructor Documentation

sc_core::sc_clock::sc_clock (  ) 

Definition at line 97 of file sc_clock.cpp.

sc_core::sc_clock::sc_clock ( const char *  name_  )  [explicit]

Definition at line 108 of file sc_clock.cpp.

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 
)

Definition at line 119 of file sc_clock.cpp.

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 140 of file sc_clock.cpp.

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 155 of file sc_clock.cpp.

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 179 of file sc_clock.cpp.

sc_core::sc_clock::~sc_clock (  )  [virtual]

Definition at line 259 of file sc_clock.cpp.


Member Function Documentation

void sc_core::sc_clock::register_port ( sc_port_base port_,
const char *  if_typename_ 
) [virtual]

register a port with this interface (does nothing by default); define this for static design rule checking

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

Definition at line 262 of file sc_clock.cpp.

void sc_core::sc_clock::write ( const bool &  value  )  [virtual]

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

Definition at line 271 of file sc_clock.cpp.

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

Definition at line 131 of file sc_clock.h.

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

Definition at line 135 of file sc_clock.h.

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

Definition at line 141 of file sc_clock.h.

sc_time sc_core::sc_clock::start_time (  )  const [inline]

Definition at line 144 of file sc_clock.h.

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

Definition at line 281 of file sc_clock.cpp.

virtual const char* sc_core::sc_clock::kind (  )  const [inline, virtual]

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

Definition at line 149 of file sc_clock.h.

sc_signal_in_if<bool>& sc_core::sc_clock::signal (  )  [inline]

Definition at line 155 of file sc_clock.h.

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

Definition at line 158 of file sc_clock.h.

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

Definition at line 161 of file sc_clock.h.

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

Definition at line 164 of file sc_clock.h.

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

Definition at line 167 of file sc_clock.h.

static void sc_core::sc_clock::stop (  )  [inline, static]

Definition at line 170 of file sc_clock.h.

void sc_core::sc_clock::before_end_of_elaboration (  )  [protected, virtual]

Reimplemented from sc_core::sc_prim_channel.

Definition at line 229 of file sc_clock.cpp.

void sc_core::sc_clock::posedge_action (  )  [inline, protected]

Definition at line 216 of file sc_clock.h.

void sc_core::sc_clock::negedge_action (  )  [inline, protected]

Definition at line 225 of file sc_clock.h.

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

Definition at line 290 of file sc_clock.cpp.

void sc_core::sc_clock::init ( const sc_time period_,
double  duty_cycle_,
const sc_time start_time_,
bool  posedge_first_ 
) [protected]

Definition at line 303 of file sc_clock.cpp.

bool sc_core::sc_clock::is_clock (  )  const [inline, protected, virtual]

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

Definition at line 188 of file sc_clock.h.

sc_core::sc_core::sc_signal< bool >::sc_signal (  )  [inline, inherited]

Definition at line 274 of file sc_signal.h.

sc_core::sc_core::sc_signal< bool >::sc_signal ( const char *  name_  )  [inline, explicit, inherited]

Definition at line 287 of file sc_signal.h.

virtual const sc_event& sc_core::sc_core::sc_signal< bool >::default_event (  )  const [inline, virtual, inherited]

get the default event (default: return event that is never notified)

Reimplemented from sc_core::sc_interface.

Definition at line 309 of file sc_signal.h.

virtual const sc_event& sc_core::sc_core::sc_signal< bool >::value_changed_event (  )  const [inline, virtual, inherited]

Implements sc_core::sc_core::sc_signal_in_if< bool >.

Definition at line 317 of file sc_signal.h.

virtual const sc_event& sc_core::sc_core::sc_signal< bool >::posedge_event (  )  const [inline, virtual, inherited]

Implements sc_core::sc_core::sc_signal_in_if< bool >.

Definition at line 324 of file sc_signal.h.

virtual const sc_event& sc_core::sc_core::sc_signal< bool >::negedge_event (  )  const [inline, virtual, inherited]

Implements sc_core::sc_core::sc_signal_in_if< bool >.

Definition at line 332 of file sc_signal.h.

virtual const bool& sc_core::sc_core::sc_signal< bool >::read (  )  const [inline, virtual, inherited]

Implements sc_core::sc_core::sc_signal_in_if< bool >.

Definition at line 341 of file sc_signal.h.

virtual const bool& sc_core::sc_core::sc_signal< bool >::get_data_ref (  )  const [inline, virtual, inherited]

Implements sc_core::sc_core::sc_signal_in_if< bool >.

Definition at line 345 of file sc_signal.h.

virtual bool sc_core::sc_core::sc_signal< bool >::event (  )  const [inline, virtual, inherited]

Implements sc_core::sc_core::sc_signal_in_if< bool >.

Definition at line 350 of file sc_signal.h.

virtual bool sc_core::sc_core::sc_signal< bool >::posedge (  )  const [inline, virtual, inherited]

Implements sc_core::sc_core::sc_signal_in_if< bool >.

Definition at line 354 of file sc_signal.h.

virtual bool sc_core::sc_core::sc_signal< bool >::negedge (  )  const [inline, virtual, inherited]

Implements sc_core::sc_core::sc_signal_in_if< bool >.

Definition at line 358 of file sc_signal.h.

sc_reset * sc_core::sc_core::sc_signal< bool >::is_reset (  )  const [virtual, inherited]

Implements sc_core::sc_core::sc_signal_in_if< bool >.

Definition at line 151 of file sc_signal.cpp.

sc_core::sc_core::sc_signal< bool >::operator const bool & (  )  const [inline, inherited]

Definition at line 370 of file sc_signal.h.

const bool& sc_core::sc_core::sc_signal< bool >::get_new_value (  )  const [inline, inherited]

Definition at line 381 of file sc_signal.h.

void sc_core::sc_core::sc_signal< bool >::trace ( sc_trace_file tf  )  const [inline, virtual, inherited]

Reimplemented from sc_core::sc_object.

Definition at line 385 of file sc_signal.h.

void sc_core::sc_core::sc_signal< bool >::print ( ::std::ostream &  os = ::std::cout  )  const [inline, virtual, inherited]

print object

Reimplemented from sc_core::sc_object.

Definition at line 466 of file sc_signal.h.

void sc_core::sc_core::sc_signal< bool >::dump ( ::std::ostream &  os = ::std::cout  )  const [inline, virtual, inherited]

dump() is more detailed than print()

Reimplemented from sc_core::sc_object.

Definition at line 473 of file sc_signal.h.

void sc_core::sc_core::sc_signal< bool >::update (  )  [inline, protected, virtual, inherited]

Reimplemented from sc_core::sc_prim_channel.

Definition at line 483 of file sc_signal.h.

sc_core::sc_core::sc_signal_in_if< bool >::sc_signal_in_if (  )  [inline, protected, inherited]

Definition at line 166 of file sc_signal_ifs.h.

bool sc_core::sc_prim_channel::update_requested (  )  [inline, inherited]

Definition at line 80 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::request_update (  )  [inline, inherited]

Definition at line 355 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::end_of_elaboration (  )  [protected, virtual, inherited]

Definition at line 115 of file sc_prim_channel.cpp.

void sc_core::sc_prim_channel::start_of_simulation (  )  [protected, virtual, inherited]

Definition at line 130 of file sc_prim_channel.cpp.

void sc_core::sc_prim_channel::end_of_simulation (  )  [protected, virtual, inherited]

Definition at line 144 of file sc_prim_channel.cpp.

void sc_core::sc_prim_channel::wait (  )  [inline, protected, inherited]

Reimplemented in sc_core::sc_semaphore.

Definition at line 117 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( const sc_event e  )  [inline, protected, inherited]

Definition at line 123 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( sc_event_or_list el  )  [inline, protected, inherited]

Definition at line 126 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( sc_event_and_list el  )  [inline, protected, inherited]

Definition at line 129 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( const sc_time t  )  [inline, protected, inherited]

Definition at line 132 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( double  v,
sc_time_unit  tu 
) [inline, protected, inherited]

Definition at line 135 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( const sc_time t,
const sc_event e 
) [inline, protected, inherited]

Definition at line 138 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( double  v,
sc_time_unit  tu,
const sc_event e 
) [inline, protected, inherited]

Definition at line 141 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( const sc_time t,
sc_event_or_list el 
) [inline, protected, inherited]

Definition at line 144 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( double  v,
sc_time_unit  tu,
sc_event_or_list el 
) [inline, protected, inherited]

Definition at line 147 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( const sc_time t,
sc_event_and_list el 
) [inline, protected, inherited]

Definition at line 150 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( double  v,
sc_time_unit  tu,
sc_event_and_list el 
) [inline, protected, inherited]

Definition at line 153 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::wait ( int  n  )  [inline, protected, inherited]

Definition at line 156 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger (  )  [inline, protected, inherited]

Definition at line 162 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger ( const sc_event e  )  [inline, protected, inherited]

Definition at line 168 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger ( sc_event_or_list el  )  [inline, protected, inherited]

Definition at line 171 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger ( sc_event_and_list el  )  [inline, protected, inherited]

Definition at line 174 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger ( const sc_time t  )  [inline, protected, inherited]

Definition at line 177 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger ( double  v,
sc_time_unit  tu 
) [inline, protected, inherited]

Definition at line 180 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger ( const sc_time t,
const sc_event e 
) [inline, protected, inherited]

Definition at line 183 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger ( double  v,
sc_time_unit  tu,
const sc_event e 
) [inline, protected, inherited]

Definition at line 186 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger ( const sc_time t,
sc_event_or_list el 
) [inline, protected, inherited]

Definition at line 190 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger ( double  v,
sc_time_unit  tu,
sc_event_or_list el 
) [inline, protected, inherited]

Definition at line 193 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger ( const sc_time t,
sc_event_and_list el 
) [inline, protected, inherited]

Definition at line 197 of file sc_prim_channel.h.

void sc_core::sc_prim_channel::next_trigger ( double  v,
sc_time_unit  tu,
sc_event_and_list el 
) [inline, protected, inherited]

Definition at line 200 of file sc_prim_channel.h.

bool sc_core::sc_prim_channel::timed_out (  )  [inline, protected, inherited]

Definition at line 207 of file sc_prim_channel.h.

sc_dt::uint64 sc_core::sc_prim_channel::delta_count (  )  [inline, protected, inherited]

Definition at line 213 of file sc_prim_channel.h.

const char* sc_core::sc_object::name (  )  const [inline, inherited]

return full name of sc_object

Definition at line 80 of file sc_object.h.

const char * sc_core::sc_object::basename (  )  const [inherited]

return base name of sc_object (last part)

Definition at line 95 of file sc_object.cpp.

sc_simcontext* sc_core::sc_object::simcontext (  )  const [inline, inherited]

Definition at line 95 of file sc_object.h.

bool sc_core::sc_object::add_attribute ( sc_attr_base attribute_  )  [inherited]

add attribute

Definition at line 311 of file sc_object.cpp.

sc_attr_base * sc_core::sc_object::get_attribute ( const std::string &  name_  )  [inherited]

get attribute by name

Definition at line 321 of file sc_object.cpp.

const sc_attr_base * sc_core::sc_object::get_attribute ( const std::string &  name_  )  const [inherited]

get attribute by name

Definition at line 328 of file sc_object.cpp.

sc_attr_base * sc_core::sc_object::remove_attribute ( const std::string &  name_  )  [inherited]

remove attribute by name

Definition at line 338 of file sc_object.cpp.

void sc_core::sc_object::remove_all_attributes (  )  [inherited]

remove all attributes

Definition at line 350 of file sc_object.cpp.

int sc_core::sc_object::num_attributes (  )  const [inherited]

get the number of attributes

Definition at line 360 of file sc_object.cpp.

sc_attr_cltn & sc_core::sc_object::attr_cltn (  )  [inherited]

get the attribute collection

Definition at line 372 of file sc_object.cpp.

const sc_attr_cltn & sc_core::sc_object::attr_cltn (  )  const [inherited]

get the attribute collection

Definition at line 379 of file sc_object.cpp.

virtual const std::vector<sc_object*>& sc_core::sc_object::get_child_objects (  )  const [inline, virtual, inherited]

return child objects

Reimplemented in sc_core::sc_module, and sc_core::sc_process_b.

Definition at line 121 of file sc_object.h.

sc_object* sc_core::sc_object::get_parent (  )  const [inline, inherited]

return parent object

Definition at line 125 of file sc_object.h.

sc_object* sc_core::sc_object::get_parent_object (  )  const [inline, inherited]

return parent object

Definition at line 127 of file sc_object.h.


Friends And Related Function Documentation

friend class sc_clock_posedge_callback [friend]

Definition at line 89 of file sc_clock.h.

friend class sc_clock_negedge_callback [friend]

Definition at line 90 of file sc_clock.h.


Member Data Documentation

Definition at line 192 of file sc_clock.h.

double sc_core::sc_clock::m_duty_cycle [protected]

Definition at line 193 of file sc_clock.h.

Definition at line 194 of file sc_clock.h.

Definition at line 195 of file sc_clock.h.

Definition at line 196 of file sc_clock.h.

Definition at line 197 of file sc_clock.h.

Definition at line 199 of file sc_clock.h.

Definition at line 200 of file sc_clock.h.

sc_event* sc_core::sc_core::sc_signal< bool >::m_change_event_p [mutable, protected, inherited]

Definition at line 407 of file sc_signal.h.

bool sc_core::sc_core::sc_signal< bool >::m_cur_val [protected, inherited]

Definition at line 408 of file sc_signal.h.

sc_dt::uint64 sc_core::sc_core::sc_signal< bool >::m_delta [protected, inherited]

Definition at line 409 of file sc_signal.h.

sc_event* sc_core::sc_core::sc_signal< bool >::m_negedge_event_p [mutable, protected, inherited]

Definition at line 410 of file sc_signal.h.

bool sc_core::sc_core::sc_signal< bool >::m_new_val [protected, inherited]

Definition at line 411 of file sc_signal.h.

sc_port_base* sc_core::sc_core::sc_signal< bool >::m_output [protected, inherited]

Definition at line 412 of file sc_signal.h.

sc_event* sc_core::sc_core::sc_signal< bool >::m_posedge_event_p [mutable, protected, inherited]

Definition at line 413 of file sc_signal.h.

sc_reset* sc_core::sc_core::sc_signal< bool >::m_reset_p [mutable, protected, inherited]

Definition at line 414 of file sc_signal.h.

sc_object* sc_core::sc_core::sc_signal< bool >::m_writer [protected, inherited]

Definition at line 415 of file sc_signal.h.


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

Generated on Wed Jan 21 15:32:12 2009 for SystemC by  doxygen 1.5.5