Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

sc_fifo< T > Class Template Reference

#include <sc_fifo.h>

Inheritance diagram for sc_fifo< T >:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 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 *)
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 (ostream &) const
virtual void dump (ostream &) const
virtual const char * kind () const

Protected Methods

virtual void update ()
void init (int)
void buf_init (int)
bool buf_write (const T &)
bool buf_read (T &)

Protected Attributes

int m_size
T * m_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

template<class T>
class sc_fifo< T >


Constructor & Destructor Documentation

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

Definition at line 66 of file sc_fifo.h.

References sc_fifo< T >::init().

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

Definition at line 70 of file sc_fifo.h.

References sc_fifo< T >::init().

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

Definition at line 77 of file sc_fifo.h.

References sc_fifo< T >::m_buf.


Member Function Documentation

template<class T>
void sc_fifo< T >::buf_init int    [inline, protected]
 

Definition at line 369 of file sc_fifo.h.

References sc_fifo< T >::m_buf, sc_fifo< T >::m_free, sc_fifo< T >::m_ri, sc_fifo< T >::m_size, sc_fifo< T >::m_wi, and SC_REPORT_ERROR.

Referenced by sc_fifo< T >::init().

template<class T>
bool sc_fifo< T >::buf_read T &    [inline, protected]
 

Definition at line 398 of file sc_fifo.h.

References sc_fifo< T >::m_buf, sc_fifo< T >::m_free, sc_fifo< T >::m_ri, and sc_fifo< T >::m_size.

Referenced by sc_fifo< T >::nb_read(), and sc_fifo< T >::read().

template<class T>
bool sc_fifo< T >::buf_write const T &    [inline, protected]
 

Definition at line 384 of file sc_fifo.h.

References sc_fifo< T >::m_buf, sc_fifo< T >::m_free, sc_fifo< T >::m_size, and sc_fifo< T >::m_wi.

Referenced by sc_fifo< T >::nb_write(), and sc_fifo< T >::write().

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

Implements sc_fifo_nonblocking_out_if< T >.

Definition at line 121 of file sc_fifo.h.

References sc_fifo< T >::m_data_read_event.

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

Implements sc_fifo_nonblocking_in_if< T >.

Definition at line 102 of file sc_fifo.h.

References sc_fifo< T >::m_data_written_event.

template<class T>
void sc_fifo< T >::dump ostream &    const [inline, virtual]
 

Reimplemented from sc_object.

Definition at line 314 of file sc_fifo.h.

References sc_fifo< T >::m_buf, sc_fifo< T >::m_free, sc_fifo< T >::m_ri, sc_fifo< T >::m_size, sc_fifo< T >::m_wi, and sc_object::name().

template<class T>
void sc_fifo< T >::init int    [inline, protected]
 

Definition at line 353 of file sc_fifo.h.

References sc_fifo< T >::buf_init(), sc_fifo< T >::m_num_read, sc_fifo< T >::m_num_readable, sc_fifo< T >::m_num_written, sc_fifo< T >::m_reader, and sc_fifo< T >::m_writer.

Referenced by sc_fifo< T >::sc_fifo().

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

Reimplemented from sc_prim_channel.

Definition at line 141 of file sc_fifo.h.

template<class T>
bool sc_fifo< T >::nb_read T &    [inline, virtual]
 

Implements sc_fifo_nonblocking_in_if< T >.

Definition at line 237 of file sc_fifo.h.

References sc_fifo< T >::buf_read(), sc_fifo< T >::m_num_read, sc_fifo< T >::num_available(), and sc_prim_channel::request_update().

template<class T>
bool sc_fifo< T >::nb_write const T &    [inline, virtual]
 

Implements sc_fifo_nonblocking_out_if< T >.

Definition at line 269 of file sc_fifo.h.

References sc_fifo< T >::buf_write(), sc_fifo< T >::m_num_written, sc_fifo< T >::num_free(), and sc_prim_channel::request_update().

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

Implements sc_fifo_in_if< T >.

Definition at line 96 of file sc_fifo.h.

References sc_fifo< T >::m_num_read, and sc_fifo< T >::m_num_readable.

Referenced by sc_fifo< T >::nb_read(), and sc_fifo< T >::read().

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

Implements sc_fifo_out_if< T >.

Definition at line 115 of file sc_fifo.h.

References sc_fifo< T >::m_num_readable, sc_fifo< T >::m_num_written, and sc_fifo< T >::m_size.

Referenced by sc_fifo< T >::nb_write(), and sc_fifo< T >::write().

template<class T>
sc_fifo< T >::operator T   [inline]
 

Definition at line 127 of file sc_fifo.h.

References sc_fifo< T >::read().

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

Definition at line 131 of file sc_fifo.h.

References sc_fifo< T >::write().

template<class T>
void sc_fifo< T >::print ostream &    const [inline, virtual]
 

Reimplemented from sc_object.

Definition at line 300 of file sc_fifo.h.

References sc_fifo< T >::m_buf, sc_fifo< T >::m_free, sc_fifo< T >::m_ri, sc_fifo< T >::m_size, and sc_fifo< T >::m_wi.

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

Implements sc_fifo_blocking_in_if< T >.

Definition at line 225 of file sc_fifo.h.

Referenced by sc_fifo< T >::operator T().

template<class T>
void sc_fifo< T >::read T &    [inline, virtual]
 

Implements sc_fifo_blocking_in_if< T >.

Definition at line 212 of file sc_fifo.h.

References sc_fifo< T >::buf_read(), sc_fifo< T >::m_data_written_event, sc_fifo< T >::m_num_read, sc_fifo< T >::num_available(), sc_prim_channel::request_update(), and sc_prim_channel::wait().

template<class T>
void sc_fifo< T >::register_port sc_port_base  ,
const char *   
[inline, virtual]
 

Reimplemented from sc_interface.

Definition at line 187 of file sc_fifo.h.

References sc_fifo< T >::m_reader, sc_fifo< T >::m_writer, and SC_REPORT_ERROR.

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

Reimplemented from sc_object.

Definition at line 284 of file sc_fifo.h.

References sc_fifo< T >::m_buf, sc_fifo< T >::m_size, sc_object::name(), and sprintf().

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

Reimplemented from sc_prim_channel.

Definition at line 332 of file sc_fifo.h.

References sc_fifo< T >::m_data_read_event, sc_fifo< T >::m_data_written_event, sc_fifo< T >::m_free, sc_fifo< T >::m_num_read, sc_fifo< T >::m_num_readable, sc_fifo< T >::m_num_written, sc_fifo< T >::m_size, and sc_event::notify_delayed().

template<class T>
void sc_fifo< T >::write const T &    [inline, virtual]
 

Implements sc_fifo_blocking_out_if< T >.

Definition at line 254 of file sc_fifo.h.

References sc_fifo< T >::buf_write(), sc_fifo< T >::m_data_read_event, sc_fifo< T >::m_num_written, sc_fifo< T >::num_free(), sc_prim_channel::request_update(), and sc_prim_channel::wait().

Referenced by sc_fifo< T >::operator=().


Member Data Documentation

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

Definition at line 159 of file sc_fifo.h.

Referenced by sc_fifo< T >::buf_init(), sc_fifo< T >::buf_read(), sc_fifo< T >::buf_write(), sc_fifo< T >::dump(), sc_fifo< T >::print(), sc_fifo< T >::trace(), and sc_fifo< T >::~sc_fifo().

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

Definition at line 171 of file sc_fifo.h.

Referenced by sc_fifo< T >::data_read_event(), sc_fifo< T >::update(), and sc_fifo< T >::write().

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

Definition at line 172 of file sc_fifo.h.

Referenced by sc_fifo< T >::data_written_event(), sc_fifo< T >::read(), and sc_fifo< T >::update().

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

Definition at line 160 of file sc_fifo.h.

Referenced by sc_fifo< T >::buf_init(), sc_fifo< T >::buf_read(), sc_fifo< T >::buf_write(), sc_fifo< T >::dump(), sc_fifo< T >::print(), and sc_fifo< T >::update().

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

Definition at line 168 of file sc_fifo.h.

Referenced by sc_fifo< T >::init(), sc_fifo< T >::nb_read(), sc_fifo< T >::num_available(), sc_fifo< T >::read(), and sc_fifo< T >::update().

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

Definition at line 167 of file sc_fifo.h.

Referenced by sc_fifo< T >::init(), sc_fifo< T >::num_available(), sc_fifo< T >::num_free(), and sc_fifo< T >::update().

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

Definition at line 169 of file sc_fifo.h.

Referenced by sc_fifo< T >::init(), sc_fifo< T >::nb_write(), sc_fifo< T >::num_free(), sc_fifo< T >::update(), and sc_fifo< T >::write().

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

Definition at line 164 of file sc_fifo.h.

Referenced by sc_fifo< T >::init(), and sc_fifo< T >::register_port().

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

Definition at line 161 of file sc_fifo.h.

Referenced by sc_fifo< T >::buf_init(), sc_fifo< T >::buf_read(), sc_fifo< T >::dump(), and sc_fifo< T >::print().

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

Definition at line 158 of file sc_fifo.h.

Referenced by sc_fifo< T >::buf_init(), sc_fifo< T >::buf_read(), sc_fifo< T >::buf_write(), sc_fifo< T >::dump(), sc_fifo< T >::num_free(), sc_fifo< T >::print(), sc_fifo< T >::trace(), and sc_fifo< T >::update().

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

Definition at line 162 of file sc_fifo.h.

Referenced by sc_fifo< T >::buf_init(), sc_fifo< T >::buf_write(), sc_fifo< T >::dump(), and sc_fifo< T >::print().

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

Definition at line 165 of file sc_fifo.h.

Referenced by sc_fifo< T >::init(), and sc_fifo< T >::register_port().


The documentation for this class was generated from the following file:
Generated on Fri Jan 14 08:31:21 2005 for SystemC2.1beta11(excludingMSLib)(IncludingSCV)\nProvidedby:www.openverificationfoundation.org by doxygen1.2.18