TLM-2.0  2.0.4
Accellera TLM-2.0 proof-of-concept library
tlm::tlm_fifo< T > Class Template Reference

#include <tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo.h>

Inheritance diagram for tlm::tlm_fifo< T >:
Collaboration diagram for tlm::tlm_fifo< T >:

Public Types

typedef unsigned phase_cb_mask
 

Public Member Functions

 tlm_fifo (int size_=1)
 
 tlm_fifo (const char *name_, int size_=1)
 
virtual ~tlm_fifo ()
 
get (tlm_tag< T > *=0)
 
bool nb_get (T &)
 
bool nb_can_get (tlm_tag< T > *=0) const
 
const sc_core::sc_eventok_to_get (tlm_tag< T > *=0) const
 
peek (tlm_tag< T > *=0) const
 
bool nb_peek (T &) const
 
bool nb_can_peek (tlm_tag< T > *=0) const
 
const sc_core::sc_eventok_to_peek (tlm_tag< T > *=0) const
 
void put (const T &)
 
bool nb_put (const T &)
 
bool nb_can_put (tlm_tag< T > *=0) const
 
const sc_core::sc_eventok_to_put (tlm_tag< 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
 
virtual void get (T &t)
 
virtual void register_port (sc_port_base &port_, const char *if_typename_)
 
virtual const sc_eventdefault_event () const
 
virtual void peek (T &t) const
 
bool update_requested ()
 
void request_update ()
 
void async_request_update ()
 
const char * name () const
 
const char * basename () const
 
virtual void print (::std::ostream &os=::std::cout) const
 
virtual void dump (::std::ostream &os=::std::cout) const
 
virtual void trace (sc_trace_file *tf) const
 
sc_simcontextsimcontext () const
 
bool add_attribute (sc_attr_base &)
 
sc_attr_base * get_attribute (const std::string &name_)
 
const sc_attr_base * get_attribute (const std::string &name_) const
 
sc_attr_base * remove_attribute (const std::string &name_)
 
void remove_all_attributes ()
 
int num_attributes () const
 
sc_attr_cltn & attr_cltn ()
 
const sc_attr_cltn & attr_cltn () const
 
virtual const std::vector< sc_event *> & get_child_events () const
 
virtual const std::vector< sc_object *> & get_child_objects () const
 
sc_objectget_parent () const
 
sc_objectget_parent_object () const
 

Public Attributes

 list_end
 

Static Public Attributes

static const char *const kind_string = "tlm_fifo"
 

Protected Member Functions

sc_core::sc_eventread_event (tlm_tag< T > *=0)
 
void update ()
 
void init (int)
 
virtual void before_end_of_elaboration ()
 
virtual void end_of_elaboration ()
 
virtual void start_of_simulation ()
 
virtual void end_of_simulation ()
 
bool async_attach_suspending ()
 
bool async_detach_suspending ()
 
void wait ()
 
void wait (const sc_event &e)
 
void wait (const sc_event_or_list &el)
 
void wait (const 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, const sc_event_or_list &el)
 
void wait (double v, sc_time_unit tu, const sc_event_or_list &el)
 
void wait (const sc_time &t, const sc_event_and_list &el)
 
void wait (double v, sc_time_unit tu, const sc_event_and_list &el)
 
void wait (int n)
 
void next_trigger ()
 
void next_trigger (const sc_event &e)
 
void next_trigger (const sc_event_or_list &el)
 
void next_trigger (const 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, const sc_event_or_list &el)
 
void next_trigger (double v, sc_time_unit tu, const sc_event_or_list &el)
 
void next_trigger (const sc_time &t, const sc_event_and_list &el)
 
void next_trigger (double v, sc_time_unit tu, const sc_event_and_list &el)
 
bool timed_out ()
 
virtual void add_child_event (sc_event *event_p)
 
virtual void add_child_object (sc_object *object_p)
 
virtual bool remove_child_event (sc_event *event_p)
 
virtual bool remove_child_object (sc_object *object_p)
 
phase_cb_mask register_simulation_phase_callback (phase_cb_mask)
 
phase_cb_mask unregister_simulation_phase_callback (phase_cb_mask)
 

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
 

Detailed Description

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

Definition at line 45 of file tlm_fifo.h.

Constructor & Destructor Documentation

◆ tlm_fifo() [1/2]

template<typename T>
tlm::tlm_fifo< T >::tlm_fifo ( int  size_ = 1)
inlineexplicit

Definition at line 54 of file tlm_fifo.h.

◆ tlm_fifo() [2/2]

template<typename T>
tlm::tlm_fifo< T >::tlm_fifo ( const char *  name_,
int  size_ = 1 
)
inlineexplicit

Definition at line 61 of file tlm_fifo.h.

◆ ~tlm_fifo()

template<typename T>
virtual tlm::tlm_fifo< T >::~tlm_fifo ( )
inlinevirtual

Definition at line 70 of file tlm_fifo.h.

Member Function Documentation

◆ debug()

template<typename T>
void tlm::tlm_fifo< T >::debug ( ) const
inlinevirtual

Implements tlm::tlm_fifo_debug_if< T >.

Definition at line 124 of file tlm_fifo.h.

◆ get() [1/2]

template<typename T>
virtual void tlm::tlm_blocking_get_if< T >::get ( T &  t)
inlinevirtualinherited

Definition at line 56 of file tlm_core_ifs.h.

◆ get() [2/2]

template<typename T >
T tlm::tlm_fifo< T >::get ( tlm_tag< T > *  = 0)
inlinevirtual

Implements tlm::tlm_blocking_get_if< T >.

Definition at line 34 of file tlm_fifo_put_get.h.

◆ init()

template<typename T >
void tlm::tlm_fifo< T >::init ( int  size_)
inlineprotected

Definition at line 212 of file tlm_fifo.h.

◆ kind()

template<typename T>
const char* tlm::tlm_fifo< T >::kind ( ) const
inlinevirtual

Reimplemented from sc_core::sc_prim_channel.

Definition at line 142 of file tlm_fifo.h.

◆ nb_bound()

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

Definition at line 75 of file tlm_fifo_resize.h.

◆ nb_can_get()

template<typename T >
bool tlm::tlm_fifo< T >::nb_can_get ( tlm_tag< T > *  = 0) const
inlinevirtual

Implements tlm::tlm_nonblocking_get_if< T >.

Definition at line 72 of file tlm_fifo_put_get.h.

◆ nb_can_peek()

template<typename T >
bool tlm::tlm_fifo< T >::nb_can_peek ( tlm_tag< T > *  = 0) const
inlinevirtual

Implements tlm::tlm_nonblocking_peek_if< T >.

Definition at line 77 of file tlm_fifo_peek.h.

◆ nb_can_put()

template<typename T >
bool tlm::tlm_fifo< T >::nb_can_put ( tlm_tag< T > *  = 0) const
inlinevirtual

Implements tlm::tlm_nonblocking_put_if< T >.

Definition at line 132 of file tlm_fifo_put_get.h.

◆ nb_expand()

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

Definition at line 34 of file tlm_fifo_resize.h.

◆ nb_get()

template<typename T >
bool tlm::tlm_fifo< T >::nb_get ( T &  val_)
inlinevirtual

Implements tlm::tlm_nonblocking_get_if< T >.

Definition at line 53 of file tlm_fifo_put_get.h.

◆ nb_peek() [1/2]

template<typename T >
bool tlm::tlm_fifo< T >::nb_peek ( T &  t) const
inlinevirtual

Implements tlm::tlm_nonblocking_peek_if< T >.

Definition at line 45 of file tlm_fifo_peek.h.

◆ nb_peek() [2/2]

template<typename T >
bool tlm::tlm_fifo< T >::nb_peek ( T &  t,
int  n 
) const
inlinevirtual

Implements tlm::tlm_fifo_debug_if< T >.

Definition at line 59 of file tlm_fifo_peek.h.

◆ nb_poke()

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

Implements tlm::tlm_fifo_debug_if< T >.

Definition at line 85 of file tlm_fifo_peek.h.

◆ nb_put()

template<typename T >
bool tlm::tlm_fifo< T >::nb_put ( const T &  val_)
inlinevirtual

Implements tlm::tlm_nonblocking_put_if< T >.

Definition at line 109 of file tlm_fifo_put_get.h.

◆ nb_reduce()

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

Definition at line 62 of file tlm_fifo_resize.h.

◆ nb_unbound()

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

Definition at line 46 of file tlm_fifo_resize.h.

◆ ok_to_get()

template<typename T>
const sc_core::sc_event& tlm::tlm_fifo< T >::ok_to_get ( tlm_tag< T > *  = 0) const
inlinevirtual

Implements tlm::tlm_nonblocking_get_if< T >.

Definition at line 78 of file tlm_fifo.h.

◆ ok_to_peek()

template<typename T>
const sc_core::sc_event& tlm::tlm_fifo< T >::ok_to_peek ( tlm_tag< T > *  = 0) const
inlinevirtual

Implements tlm::tlm_nonblocking_peek_if< T >.

Definition at line 88 of file tlm_fifo.h.

◆ ok_to_put()

template<typename T>
const sc_core::sc_event& tlm::tlm_fifo< T >::ok_to_put ( tlm_tag< T > *  = 0) const
inlinevirtual

Implements tlm::tlm_nonblocking_put_if< T >.

Definition at line 99 of file tlm_fifo.h.

◆ peek() [1/2]

template<typename T >
T tlm::tlm_fifo< T >::peek ( tlm_tag< T > *  = 0) const
inlinevirtual

Implements tlm::tlm_blocking_peek_if< T >.

Definition at line 28 of file tlm_fifo_peek.h.

◆ peek() [2/2]

template<typename T>
virtual void tlm::tlm_blocking_peek_if< T >::peek ( T &  t) const
inlinevirtualinherited

Definition at line 108 of file tlm_core_ifs.h.

◆ put()

template<typename T >
void tlm::tlm_fifo< T >::put ( const T &  val_)
inlinevirtual

Implements tlm::tlm_blocking_put_if< T >.

Definition at line 88 of file tlm_fifo_put_get.h.

◆ read_event()

template<typename T>
sc_core::sc_event& tlm::tlm_fifo< T >::read_event ( tlm_tag< T > *  = 0)
inlineprotected

Definition at line 147 of file tlm_fifo.h.

◆ size()

template<typename T>
int tlm::tlm_fifo< T >::size ( ) const
inlinevirtual

Implements tlm::tlm_fifo_debug_if< T >.

Definition at line 120 of file tlm_fifo.h.

◆ update()

template<typename T >
void tlm::tlm_fifo< T >::update ( )
inlineprotectedvirtual

Reimplemented from sc_core::sc_prim_channel.

Definition at line 238 of file tlm_fifo.h.

◆ used()

template<typename T>
int tlm::tlm_fifo< T >::used ( ) const
inlinevirtual

Implements tlm::tlm_fifo_debug_if< T >.

Definition at line 116 of file tlm_fifo.h.

Member Data Documentation

◆ buffer

template<typename T>
circular_buffer<T> tlm::tlm_fifo< T >::buffer
protected

Definition at line 161 of file tlm_fifo.h.

◆ kind_string

template<typename T>
const char *const tlm::tlm_fifo< T >::kind_string = "tlm_fifo"
static

Definition at line 140 of file tlm_fifo.h.

◆ m_data_read_event

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

Definition at line 171 of file tlm_fifo.h.

◆ m_data_written_event

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

Definition at line 172 of file tlm_fifo.h.

◆ m_expand

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

Definition at line 168 of file tlm_fifo.h.

◆ m_num_read

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

Definition at line 166 of file tlm_fifo.h.

◆ m_num_read_no_notify

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

Definition at line 169 of file tlm_fifo.h.

◆ m_num_readable

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

Definition at line 165 of file tlm_fifo.h.

◆ m_num_written

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

Definition at line 167 of file tlm_fifo.h.

◆ m_size

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

Definition at line 163 of file tlm_fifo.h.


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