sc_core::sc_fifo< T > Class Template Reference

The sc_fifo<T> primitive channel class. More...

#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 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 *)
virtual void read (T &, int)
 A new parameter segment ID is added for the out-of-order simulation.
virtual T read (int)
 A new parameter segment ID is added for the out-of-order simulation.
virtual bool nb_read (T &)
virtual int num_available () const
virtual const sc_eventdata_written_event () const
virtual void write (const T &, int)
 A new parameter segment ID is added for the out-of-order simulation.
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)
 This operator is not supported by the out-of-order simulation in the current release.
void trace (sc_trace_file *tf) const
virtual void print (::std::ostream &=::std::cout) const
virtual void dump (::std::ostream &=::std::cout) const
virtual const char * kind () const

Protected Member Functions

virtual void update ()
 The update method (does nothing by default).
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

Detailed Description

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

The sc_fifo<T> primitive channel class.

Definition at line 48 of file sc_fifo.h.


Constructor & Destructor Documentation

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

Definition at line 57 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 65 of file sc_fifo.h.

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

Definition at line 76 of file sc_fifo.h.


Member Function Documentation

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

Definition at line 447 of file sc_fifo.h.

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

Definition at line 478 of file sc_fifo.h.

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

Definition at line 463 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 151 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 119 of file sc_fifo.h.

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

Reimplemented from sc_core::sc_object.

Definition at line 385 of file sc_fifo.h.

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

Definition at line 430 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 177 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 289 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 331 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 107 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 138 of file sc_fifo.h.

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

Definition at line 157 of file sc_fifo.h.

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

This operator is not supported by the out-of-order simulation in the current release.

Definition at line 166 of file sc_fifo.h.

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

Reimplemented from sc_core::sc_object.

Definition at line 367 of file sc_fifo.h.

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

A new parameter segment ID is added for the out-of-order simulation.

Implements sc_core::sc_fifo_blocking_in_if< T >.

Definition at line 277 of file sc_fifo.h.

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

A new parameter segment ID is added for the out-of-order simulation.

Implements sc_core::sc_fifo_blocking_in_if< T >.

Definition at line 259 of file sc_fifo.h.

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

Reimplemented from sc_core::sc_interface.

Definition at line 223 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 351 of file sc_fifo.h.

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

The update method (does nothing by default).

This function is not supported by the out-of-order simulation in the current release.

Reimplemented from sc_core::sc_prim_channel.

Definition at line 408 of file sc_fifo.h.

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

A new parameter segment ID is added for the out-of-order simulation.

Implements sc_core::sc_fifo_blocking_out_if< T >.

Definition at line 312 of file sc_fifo.h.


Member Data Documentation

template<class T >
T* sc_core::sc_fifo< T >::m_buf [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 207 of file sc_fifo.h.

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

Definition at line 208 of file sc_fifo.h.

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

Definition at line 196 of file sc_fifo.h.

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

Definition at line 204 of file sc_fifo.h.

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

Definition at line 203 of file sc_fifo.h.

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

Definition at line 205 of file sc_fifo.h.

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

Definition at line 200 of file sc_fifo.h.

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

Definition at line 197 of file sc_fifo.h.

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

Definition at line 194 of file sc_fifo.h.

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

Definition at line 198 of file sc_fifo.h.

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

Definition at line 201 of file sc_fifo.h.


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

Generated on 29 Oct 2015 for SystemC by  doxygen 1.6.1