sc_core::sc_fifo< T > Class Template Reference

#include <sysc/communication/sc_fifo.h>

Inheritance diagram for sc_core::sc_fifo< T >:

Inheritance graph
[legend]
Collaboration diagram for sc_core::sc_fifo< T >:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { list_end = 0xdb }

Public Member Functions

 sc_fifo (int size_=16)
 sc_fifo (const char *name_, int size_=16)
virtual ~sc_fifo ()
virtual void register_port (sc_port_base &, const char *)
 register a port with this interface (does nothing by default); define this for static design rule checking
virtual void read (T &)
virtual T read ()
virtual bool nb_read (T &)
virtual int num_available () const
virtual const sc_eventdata_written_event () const
virtual void write (const T &)
virtual bool nb_write (const T &)
virtual int num_free () const
virtual const sc_eventdata_read_event () const
 operator T ()
sc_fifo< T > & operator= (const T &a)
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()
virtual const char * kind () const
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)
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

virtual void update ()
void init (int)
void buf_init (int)
bool buf_write (const T &)
bool buf_read (T &)
virtual void before_end_of_elaboration ()
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

int m_size
Tm_buf
int m_free
int m_ri
int m_wi
sc_port_basem_reader
sc_port_basem_writer
int m_num_readable
int m_num_read
int m_num_written
sc_event m_data_read_event
sc_event m_data_written_event


Detailed Description

template<class T>
class sc_core::sc_fifo< T >

Definition at line 83 of file sc_fifo.h.


Member Enumeration Documentation

anonymous enum [inherited]

Enumerator:
list_end 

Definition at line 75 of file sc_prim_channel.h.


Constructor & Destructor Documentation

template<class T>
sc_core::sc_fifo< T >::sc_fifo ( int  size_ = 16  )  [inline, explicit]

Definition at line 92 of file sc_fifo.h.

template<class T>
sc_core::sc_fifo< T >::sc_fifo ( const char *  name_,
int  size_ = 16 
) [inline, explicit]

Definition at line 96 of file sc_fifo.h.

template<class T>
virtual sc_core::sc_fifo< T >::~sc_fifo (  )  [inline, virtual]

Definition at line 103 of file sc_fifo.h.


Member Function Documentation

template<class T>
void sc_core::sc_fifo< T >::register_port ( sc_port_base port_,
const char *  if_typename_ 
) [inline, virtual]

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

Reimplemented from sc_core::sc_interface.

Definition at line 213 of file sc_fifo.h.

template<class T>
void sc_core::sc_fifo< T >::read ( T val_  )  [inline, virtual]

Implements sc_core::sc_fifo_blocking_in_if< T >.

Definition at line 238 of file sc_fifo.h.

template<class T>
T sc_core::sc_fifo< T >::read (  )  [inline, virtual]

Implements sc_core::sc_fifo_blocking_in_if< T >.

Definition at line 251 of file sc_fifo.h.

template<class T>
bool sc_core::sc_fifo< T >::nb_read ( T val_  )  [inline, virtual]

Implements sc_core::sc_fifo_nonblocking_in_if< T >.

Definition at line 263 of file sc_fifo.h.

template<class T>
virtual int sc_core::sc_fifo< T >::num_available (  )  const [inline, virtual]

Implements sc_core::sc_fifo_in_if< T >.

Definition at line 122 of file sc_fifo.h.

template<class T>
virtual const sc_event& sc_core::sc_fifo< T >::data_written_event (  )  const [inline, virtual]

Implements sc_core::sc_fifo_nonblocking_in_if< T >.

Definition at line 128 of file sc_fifo.h.

template<class T>
void sc_core::sc_fifo< T >::write ( const T val_  )  [inline, virtual]

Implements sc_core::sc_fifo_blocking_out_if< T >.

Definition at line 280 of file sc_fifo.h.

template<class T>
bool sc_core::sc_fifo< T >::nb_write ( const T val_  )  [inline, virtual]

Implements sc_core::sc_fifo_nonblocking_out_if< T >.

Definition at line 295 of file sc_fifo.h.

template<class T>
virtual int sc_core::sc_fifo< T >::num_free (  )  const [inline, virtual]

Implements sc_core::sc_fifo_out_if< T >.

Definition at line 141 of file sc_fifo.h.

template<class T>
virtual const sc_event& sc_core::sc_fifo< T >::data_read_event (  )  const [inline, virtual]

Implements sc_core::sc_fifo_nonblocking_out_if< T >.

Definition at line 147 of file sc_fifo.h.

template<class T>
sc_core::sc_fifo< T >::operator T (  )  [inline]

Definition at line 153 of file sc_fifo.h.

template<class T>
sc_fifo<T>& sc_core::sc_fifo< T >::operator= ( const T a  )  [inline]

Definition at line 157 of file sc_fifo.h.

template<class T>
void sc_core::sc_fifo< T >::trace ( sc_trace_file tf  )  const [inline, virtual]

Reimplemented from sc_core::sc_object.

Definition at line 310 of file sc_fifo.h.

template<class T>
void sc_core::sc_fifo< T >::print ( ::std::ostream &  os = ::std::cout  )  const [inline, virtual]

print object

Reimplemented from sc_core::sc_object.

Definition at line 326 of file sc_fifo.h.

template<class T>
void sc_core::sc_fifo< T >::dump ( ::std::ostream &  os = ::std::cout  )  const [inline, virtual]

dump() is more detailed than print()

Reimplemented from sc_core::sc_object.

Definition at line 340 of file sc_fifo.h.

template<class T>
virtual const char* sc_core::sc_fifo< T >::kind (  )  const [inline, virtual]

Reimplemented from sc_core::sc_prim_channel.

Definition at line 167 of file sc_fifo.h.

template<class T>
void sc_core::sc_fifo< T >::update (  )  [inline, protected, virtual]

Reimplemented from sc_core::sc_prim_channel.

Definition at line 358 of file sc_fifo.h.

template<class T>
void sc_core::sc_fifo< T >::init ( int  size_  )  [inline, protected]

Definition at line 379 of file sc_fifo.h.

template<class T>
void sc_core::sc_fifo< T >::buf_init ( int  size_  )  [inline, protected]

Definition at line 395 of file sc_fifo.h.

template<class T>
bool sc_core::sc_fifo< T >::buf_write ( const T val_  )  [inline, protected]

Definition at line 410 of file sc_fifo.h.

template<class T>
bool sc_core::sc_fifo< T >::buf_read ( T val_  )  [inline, protected]

Definition at line 424 of file sc_fifo.h.

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::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 (  )  [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.


Member Data Documentation

template<class T>
int sc_core::sc_fifo< T >::m_size [protected]

Definition at line 184 of file sc_fifo.h.

template<class T>
T* sc_core::sc_fifo< T >::m_buf [protected]

Definition at line 185 of file sc_fifo.h.

template<class T>
int sc_core::sc_fifo< T >::m_free [protected]

Definition at line 186 of file sc_fifo.h.

template<class T>
int sc_core::sc_fifo< T >::m_ri [protected]

Definition at line 187 of file sc_fifo.h.

template<class T>
int sc_core::sc_fifo< T >::m_wi [protected]

Definition at line 188 of file sc_fifo.h.

template<class T>
sc_port_base* sc_core::sc_fifo< T >::m_reader [protected]

Definition at line 190 of file sc_fifo.h.

template<class T>
sc_port_base* sc_core::sc_fifo< T >::m_writer [protected]

Definition at line 191 of file sc_fifo.h.

template<class T>
int sc_core::sc_fifo< T >::m_num_readable [protected]

Definition at line 193 of file sc_fifo.h.

template<class T>
int sc_core::sc_fifo< T >::m_num_read [protected]

Definition at line 194 of file sc_fifo.h.

template<class T>
int sc_core::sc_fifo< T >::m_num_written [protected]

Definition at line 195 of file sc_fifo.h.

template<class T>
sc_event sc_core::sc_fifo< T >::m_data_read_event [protected]

Definition at line 197 of file sc_fifo.h.

template<class T>
sc_event sc_core::sc_fifo< T >::m_data_written_event [protected]

Definition at line 198 of file sc_fifo.h.


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

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