tlm::tlm_fifo< T > Class Template Reference

#include <tlm_fifo.h>

Inheritance diagram for tlm::tlm_fifo< T >:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 tlm_fifo (int size_=1)
 tlm_fifo (const char *name_, int size_=1)
virtual ~tlm_fifo ()
get (tlm_tag< T > *t=0)
bool nb_get (T &)
bool nb_can_get (tlm_tag< T > *t=0) const
const sc_core::sc_event & ok_to_get (tlm_tag< T > *t=0) const
peek (tlm_tag< T > *t=0) const
bool nb_peek (T &) const
bool nb_can_peek (tlm_tag< T > *t=0) const
const sc_core::sc_event & ok_to_peek (tlm_tag< T > *t=0) const
void put (const T &)
bool nb_put (const T &)
bool nb_can_put (tlm_tag< T > *t=0) const
const sc_core::sc_event & ok_to_put (tlm_tag< T > *t=0) const
void nb_expand (unsigned int n=1)
void nb_unbound (unsigned int n=16)
bool nb_reduce (unsigned int n=1)
bool nb_bound (unsigned int n)
bool nb_peek (T &, int n) const
bool nb_poke (const T &, int n=0)
int used () const
int size () const
void debug () const
const char * kind () const

Static Public Attributes

static const char *const kind_string = "tlm_fifo"

Protected Member Functions

sc_core::sc_event & read_event (tlm_tag< T > *t=0)
void update ()
void init (int)

Protected Attributes

circular_buffer< T > * buffer
int m_size
int m_num_readable
int m_num_read
int m_num_written
bool m_expand
int m_num_read_no_notify
sc_core::sc_event m_data_read_event
sc_core::sc_event m_data_written_event

Private Member Functions

 tlm_fifo (const tlm_fifo< T > &)
tlm_fifooperator= (const tlm_fifo< T > &)
bool is_empty () const
bool is_full () const


Detailed Description

template<typename T>
class tlm::tlm_fifo< T >

Definition at line 43 of file tlm_fifo.h.


Constructor & Destructor Documentation

template<typename T>
tlm::tlm_fifo< T >::tlm_fifo ( int  size_ = 1  )  [inline, explicit]

Definition at line 52 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::init().

Here is the call graph for this function:

template<typename T>
tlm::tlm_fifo< T >::tlm_fifo ( const char *  name_,
int  size_ = 1 
) [inline, explicit]

Definition at line 59 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::init().

Here is the call graph for this function:

template<typename T>
virtual tlm::tlm_fifo< T >::~tlm_fifo (  )  [inline, virtual]

Definition at line 68 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::buffer.

template<typename T>
tlm::tlm_fifo< T >::tlm_fifo ( const tlm_fifo< T > &   )  [private]


Member Function Documentation

template<typename T>
T tlm::tlm_fifo< T >::get ( tlm_tag< T > *  t = 0  )  [inline, virtual]

Implements tlm::tlm_blocking_get_if< T >.

Definition at line 32 of file tlm_fifo_put_get.h.

References tlm::tlm_fifo< T >::buffer, tlm::tlm_fifo< T >::is_empty(), tlm::tlm_fifo< T >::m_data_written_event, and tlm::tlm_fifo< T >::m_num_read.

Here is the call graph for this function:

template<typename T>
bool tlm::tlm_fifo< T >::nb_get ( T &  val_  )  [inline, virtual]

Implements tlm::tlm_nonblocking_get_if< T >.

Definition at line 51 of file tlm_fifo_put_get.h.

References tlm::tlm_fifo< T >::buffer, tlm::tlm_fifo< T >::is_empty(), and tlm::tlm_fifo< T >::m_num_read.

Here is the call graph for this function:

template<typename T>
bool tlm::tlm_fifo< T >::nb_can_get ( tlm_tag< T > *  t = 0  )  const [inline, virtual]

Implements tlm::tlm_nonblocking_get_if< T >.

Definition at line 70 of file tlm_fifo_put_get.h.

References tlm::tlm_fifo< T >::is_empty().

Here is the call graph for this function:

template<typename T>
const sc_core::sc_event& tlm::tlm_fifo< T >::ok_to_get ( tlm_tag< T > *  t = 0  )  const [inline, virtual]

Implements tlm::tlm_nonblocking_get_if< T >.

Definition at line 80 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::m_data_written_event.

template<typename T>
T tlm::tlm_fifo< T >::peek ( tlm_tag< T > *  t = 0  )  const [inline, virtual]

Implements tlm::tlm_blocking_peek_if< T >.

Definition at line 26 of file tlm_fifo_peek.h.

References tlm::tlm_fifo< T >::buffer, tlm::tlm_fifo< T >::is_empty(), and tlm::tlm_fifo< T >::m_data_written_event.

Here is the call graph for this function:

template<typename T>
bool tlm::tlm_fifo< T >::nb_peek ( T &  t  )  const [inline, virtual]

Implements tlm::tlm_nonblocking_peek_if< T >.

Definition at line 44 of file tlm_fifo_peek.h.

References tlm::tlm_fifo< T >::buffer, and tlm::tlm_fifo< T >::used().

Here is the call graph for this function:

template<typename T>
bool tlm::tlm_fifo< T >::nb_can_peek ( tlm_tag< T > *  t = 0  )  const [inline, virtual]

Implements tlm::tlm_nonblocking_peek_if< T >.

Definition at line 76 of file tlm_fifo_peek.h.

References tlm::tlm_fifo< T >::is_empty().

Here is the call graph for this function:

template<typename T>
const sc_core::sc_event& tlm::tlm_fifo< T >::ok_to_peek ( tlm_tag< T > *  t = 0  )  const [inline, virtual]

Implements tlm::tlm_nonblocking_peek_if< T >.

Definition at line 90 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::m_data_written_event.

template<typename T>
void tlm::tlm_fifo< T >::put ( const T &  val_  )  [inline, virtual]

Implements tlm::tlm_blocking_put_if< T >.

Definition at line 86 of file tlm_fifo_put_get.h.

References tlm::tlm_fifo< T >::buffer, tlm::tlm_fifo< T >::is_full(), tlm::tlm_fifo< T >::m_data_read_event, and tlm::tlm_fifo< T >::m_num_written.

Here is the call graph for this function:

template<typename T>
bool tlm::tlm_fifo< T >::nb_put ( const T &  val_  )  [inline, virtual]

Implements tlm::tlm_nonblocking_put_if< T >.

Definition at line 107 of file tlm_fifo_put_get.h.

References tlm::tlm_fifo< T >::buffer, tlm::tlm_fifo< T >::is_full(), and tlm::tlm_fifo< T >::m_num_written.

Referenced by tlm::tlm_analysis_fifo< T >::write().

Here is the call graph for this function:

template<typename T>
bool tlm::tlm_fifo< T >::nb_can_put ( tlm_tag< T > *  t = 0  )  const [inline, virtual]

Implements tlm::tlm_nonblocking_put_if< T >.

Definition at line 130 of file tlm_fifo_put_get.h.

References tlm::tlm_fifo< T >::is_full().

Here is the call graph for this function:

template<typename T>
const sc_core::sc_event& tlm::tlm_fifo< T >::ok_to_put ( tlm_tag< T > *  t = 0  )  const [inline, virtual]

Implements tlm::tlm_nonblocking_put_if< T >.

Definition at line 101 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::m_data_read_event.

template<typename T>
void tlm::tlm_fifo< T >::nb_expand ( unsigned int  n = 1  )  [inline]

Definition at line 32 of file tlm_fifo_resize.h.

References tlm::tlm_fifo< T >::m_expand, and tlm::tlm_fifo< T >::m_size.

template<typename T>
void tlm::tlm_fifo< T >::nb_unbound ( unsigned int  n = 16  )  [inline]

Definition at line 43 of file tlm_fifo_resize.h.

References tlm::tlm_fifo< T >::buffer, tlm::tlm_fifo< T >::m_expand, and tlm::tlm_fifo< T >::m_size.

template<typename T>
bool tlm::tlm_fifo< T >::nb_reduce ( unsigned int  n = 1  )  [inline]

Definition at line 59 of file tlm_fifo_resize.h.

References tlm::tlm_fifo< T >::m_size, tlm::tlm_fifo< T >::nb_bound(), and tlm::tlm_fifo< T >::size().

Here is the call graph for this function:

template<typename T>
bool tlm::tlm_fifo< T >::nb_bound ( unsigned int  n  )  [inline]

Definition at line 72 of file tlm_fifo_resize.h.

References tlm::tlm_fifo< T >::m_size, and tlm::tlm_fifo< T >::used().

Referenced by tlm::tlm_fifo< T >::nb_reduce().

Here is the call graph for this function:

template<typename T>
bool tlm::tlm_fifo< T >::nb_peek ( T &  t,
int  n 
) const [inline, virtual]

Implements tlm::tlm_fifo_debug_if< T >.

Definition at line 58 of file tlm_fifo_peek.h.

References tlm::tlm_fifo< T >::buffer, and tlm::tlm_fifo< T >::used().

Here is the call graph for this function:

template<typename T>
bool tlm::tlm_fifo< T >::nb_poke ( const T &  t,
int  n = 0 
) [inline, virtual]

Implements tlm::tlm_fifo_debug_if< T >.

Definition at line 84 of file tlm_fifo_peek.h.

References tlm::tlm_fifo< T >::buffer, and tlm::tlm_fifo< T >::used().

Here is the call graph for this function:

template<typename T>
int tlm::tlm_fifo< T >::used (  )  const [inline, virtual]

Implements tlm::tlm_fifo_debug_if< T >.

Definition at line 118 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::m_num_read, and tlm::tlm_fifo< T >::m_num_readable.

Referenced by tlm::tlm_fifo< T >::debug(), tlm::tlm_fifo< T >::is_empty(), tlm::tlm_fifo< T >::nb_bound(), tlm::tlm_fifo< T >::nb_peek(), and tlm::tlm_fifo< T >::nb_poke().

template<typename T>
int tlm::tlm_fifo< T >::size (  )  const [inline, virtual]

Implements tlm::tlm_fifo_debug_if< T >.

Definition at line 122 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::m_size.

Referenced by tlm::tlm_fifo< T >::debug(), tlm::tlm_fifo< T >::is_full(), and tlm::tlm_fifo< T >::nb_reduce().

template<typename T>
void tlm::tlm_fifo< T >::debug (  )  const [inline, virtual]

Implements tlm::tlm_fifo_debug_if< T >.

Definition at line 126 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::is_empty(), tlm::tlm_fifo< T >::is_full(), tlm::tlm_fifo< T >::m_num_read, tlm::tlm_fifo< T >::m_num_readable, tlm::tlm_fifo< T >::m_num_written, tlm::tlm_fifo< T >::size(), and tlm::tlm_fifo< T >::used().

Here is the call graph for this function:

template<typename T>
const char* tlm::tlm_fifo< T >::kind (  )  const [inline]

Definition at line 144 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::kind_string.

template<typename T>
sc_core::sc_event& tlm::tlm_fifo< T >::read_event ( tlm_tag< T > *  t = 0  )  [inline, protected]

Definition at line 149 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::m_data_read_event.

template<typename T>
void tlm::tlm_fifo< T >::update (  )  [inline, protected]

Definition at line 236 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::buffer, tlm::tlm_fifo< T >::m_data_read_event, tlm::tlm_fifo< T >::m_data_written_event, tlm::tlm_fifo< T >::m_expand, tlm::tlm_fifo< T >::m_num_read, tlm::tlm_fifo< T >::m_num_read_no_notify, tlm::tlm_fifo< T >::m_num_readable, and tlm::tlm_fifo< T >::m_num_written.

template<typename T>
void tlm::tlm_fifo< T >::init ( int  size_  )  [inline, protected]

Definition at line 210 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::buffer, tlm::tlm_fifo< T >::m_expand, tlm::tlm_fifo< T >::m_num_read, tlm::tlm_fifo< T >::m_num_read_no_notify, tlm::tlm_fifo< T >::m_num_readable, tlm::tlm_fifo< T >::m_num_written, and tlm::tlm_fifo< T >::m_size.

Referenced by tlm::tlm_fifo< T >::tlm_fifo().

template<typename T>
tlm_fifo& tlm::tlm_fifo< T >::operator= ( const tlm_fifo< T > &   )  [private]

template<typename T>
bool tlm::tlm_fifo< T >::is_empty (  )  const [inline, private]

Definition at line 187 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::used().

Referenced by tlm::tlm_fifo< T >::debug(), tlm::tlm_fifo< T >::get(), tlm::tlm_fifo< T >::nb_can_get(), tlm::tlm_fifo< T >::nb_can_peek(), tlm::tlm_fifo< T >::nb_get(), and tlm::tlm_fifo< T >::peek().

Here is the call graph for this function:

template<typename T>
bool tlm::tlm_fifo< T >::is_full (  )  const [inline, private]

Definition at line 191 of file tlm_fifo.h.

References tlm::tlm_fifo< T >::m_num_readable, tlm::tlm_fifo< T >::m_num_written, and tlm::tlm_fifo< T >::size().

Referenced by tlm::tlm_fifo< T >::debug(), tlm::tlm_fifo< T >::nb_can_put(), tlm::tlm_fifo< T >::nb_put(), and tlm::tlm_fifo< T >::put().

Here is the call graph for this function:


Member Data Documentation

template<typename T>
const char *const tlm::tlm_fifo< T >::kind_string = "tlm_fifo" [inline, static]

Definition at line 142 of file tlm_fifo.h.

Referenced by tlm::tlm_fifo< T >::kind().

template<typename T>
circular_buffer<T>* tlm::tlm_fifo< T >::buffer [protected]

Definition at line 163 of file tlm_fifo.h.

Referenced by tlm::tlm_fifo< T >::get(), tlm::tlm_fifo< T >::init(), tlm::tlm_fifo< T >::nb_get(), tlm::tlm_fifo< T >::nb_peek(), tlm::tlm_fifo< T >::nb_poke(), tlm::tlm_fifo< T >::nb_put(), tlm::tlm_fifo< T >::nb_unbound(), tlm::tlm_fifo< T >::peek(), tlm::tlm_fifo< T >::put(), tlm::tlm_fifo< T >::update(), and tlm::tlm_fifo< T >::~tlm_fifo().

template<typename T>
int tlm::tlm_fifo< T >::m_size [protected]

Definition at line 165 of file tlm_fifo.h.

Referenced by tlm::tlm_fifo< T >::init(), tlm::tlm_fifo< T >::nb_bound(), tlm::tlm_fifo< T >::nb_expand(), tlm::tlm_fifo< T >::nb_reduce(), tlm::tlm_fifo< T >::nb_unbound(), and tlm::tlm_fifo< T >::size().

template<typename T>
int tlm::tlm_fifo< T >::m_num_readable [protected]

Definition at line 167 of file tlm_fifo.h.

Referenced by tlm::tlm_fifo< T >::debug(), tlm::tlm_fifo< T >::init(), tlm::tlm_fifo< T >::is_full(), tlm::tlm_fifo< T >::update(), and tlm::tlm_fifo< T >::used().

template<typename T>
int tlm::tlm_fifo< T >::m_num_read [protected]

Definition at line 168 of file tlm_fifo.h.

Referenced by tlm::tlm_fifo< T >::debug(), tlm::tlm_fifo< T >::get(), tlm::tlm_fifo< T >::init(), tlm::tlm_fifo< T >::nb_get(), tlm::tlm_fifo< T >::update(), and tlm::tlm_fifo< T >::used().

template<typename T>
int tlm::tlm_fifo< T >::m_num_written [protected]

Definition at line 169 of file tlm_fifo.h.

Referenced by tlm::tlm_fifo< T >::debug(), tlm::tlm_fifo< T >::init(), tlm::tlm_fifo< T >::is_full(), tlm::tlm_fifo< T >::nb_put(), tlm::tlm_fifo< T >::put(), and tlm::tlm_fifo< T >::update().

template<typename T>
bool tlm::tlm_fifo< T >::m_expand [protected]

Definition at line 170 of file tlm_fifo.h.

Referenced by tlm::tlm_fifo< T >::init(), tlm::tlm_fifo< T >::nb_expand(), tlm::tlm_fifo< T >::nb_unbound(), and tlm::tlm_fifo< T >::update().

template<typename T>
int tlm::tlm_fifo< T >::m_num_read_no_notify [protected]

Definition at line 171 of file tlm_fifo.h.

Referenced by tlm::tlm_fifo< T >::init(), and tlm::tlm_fifo< T >::update().

template<typename T>
sc_core::sc_event tlm::tlm_fifo< T >::m_data_read_event [protected]

Definition at line 173 of file tlm_fifo.h.

Referenced by tlm::tlm_fifo< T >::ok_to_put(), tlm::tlm_fifo< T >::put(), tlm::tlm_fifo< T >::read_event(), and tlm::tlm_fifo< T >::update().

template<typename T>
sc_core::sc_event tlm::tlm_fifo< T >::m_data_written_event [protected]

Definition at line 174 of file tlm_fifo.h.

Referenced by tlm::tlm_fifo< T >::get(), tlm::tlm_fifo< T >::ok_to_get(), tlm::tlm_fifo< T >::ok_to_peek(), tlm::tlm_fifo< T >::peek(), and tlm::tlm_fifo< T >::update().


The documentation for this class was generated from the following files:
Generated on Thu Jun 5 17:44:07 2008 for TLM 2 by  doxygen 1.5.3