sc_core::sc_semaphore Class Reference

#include <sysc/communication/sc_semaphore.h>

Inheritance diagram for sc_core::sc_semaphore:

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

Collaboration graph
[legend]

List of all members.

Public Types

enum  { list_end = 0xdb }

Public Member Functions

 sc_semaphore (int init_value_)
 sc_semaphore (const char *name_, int init_value_)
virtual int wait ()
virtual int trywait ()
virtual int post ()
virtual int get_value () const
virtual const char * kind () const
virtual void register_port (sc_port_base &port_, const char *if_typename_)
 register a port with this interface (does nothing by default); define this for static design rule checking
virtual const sc_eventdefault_event () const
 get the default event (default: return event that is never notified)
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)
virtual void print (::std::ostream &os=::std::cout) const
 print object
virtual void dump (::std::ostream &os=::std::cout) const
 dump() is more detailed than print()
virtual void trace (sc_trace_file *tf) const
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

Protected Member Functions

bool in_use () const
void report_error (const char *id, const char *add_msg=0) const
virtual void update ()
virtual void before_end_of_elaboration ()
virtual void end_of_elaboration ()
virtual void start_of_simulation ()
virtual void end_of_simulation ()
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_event m_free
int m_value


Detailed Description

Definition at line 65 of file sc_semaphore.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_semaphore::sc_semaphore ( int  init_value_  )  [explicit]

Definition at line 74 of file sc_semaphore.cpp.

sc_core::sc_semaphore::sc_semaphore ( const char *  name_,
int  init_value_ 
)

Definition at line 83 of file sc_semaphore.cpp.


Member Function Documentation

int sc_core::sc_semaphore::wait (  )  [virtual]

Reimplemented from sc_core::sc_prim_channel.

Definition at line 97 of file sc_semaphore.cpp.

int sc_core::sc_semaphore::trywait (  )  [virtual]

Implements sc_core::sc_semaphore_if.

Definition at line 110 of file sc_semaphore.cpp.

int sc_core::sc_semaphore::post (  )  [virtual]

Implements sc_core::sc_semaphore_if.

Definition at line 123 of file sc_semaphore.cpp.

virtual int sc_core::sc_semaphore::get_value (  )  const [inline, virtual]

Implements sc_core::sc_semaphore_if.

Definition at line 89 of file sc_semaphore.h.

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

Reimplemented from sc_core::sc_prim_channel.

Definition at line 92 of file sc_semaphore.h.

bool sc_core::sc_semaphore::in_use (  )  const [inline, protected]

Definition at line 99 of file sc_semaphore.h.

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

Definition at line 60 of file sc_semaphore.cpp.

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

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

Reimplemented in sc_core::sc_clock, sc_core::sc_fifo< T >, sc_core::sc_signal< T >, sc_core::sc_core::sc_signal< bool >, sc_core::sc_core::sc_signal< sc_dt::sc_logic >, sc_core::sc_signal_resolved, sc_core::sc_signal_rv< W >, and sc_core::sc_signal< sc_dt::sc_lv< W > >.

Definition at line 62 of file sc_interface.cpp.

const sc_event & sc_core::sc_interface::default_event (  )  const [virtual, inherited]

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

Reimplemented in sc_core::sc_event_queue, sc_core::sc_signal< T >, sc_core::sc_core::sc_signal< bool >, sc_core::sc_core::sc_signal< sc_dt::sc_logic >, and sc_core::sc_signal< sc_dt::sc_lv< W > >.

Definition at line 69 of file sc_interface.cpp.

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::update (  )  [protected, virtual, inherited]

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

Reimplemented in sc_core::sc_clock.

Definition at line 101 of file sc_prim_channel.cpp.

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 ( 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.

void sc_core::sc_object::print ( ::std::ostream &  os = ::std::cout  )  const [virtual, inherited]

void sc_core::sc_object::dump ( ::std::ostream &  os = ::std::cout  )  const [virtual, inherited]

void sc_core::sc_object::trace ( sc_trace_file tf  )  const [virtual, inherited]

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.


Member Data Documentation

Definition at line 108 of file sc_semaphore.h.

Definition at line 109 of file sc_semaphore.h.


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

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