gem5 v24.0.0.0
Loading...
Searching...
No Matches
tlm::tlm_fifo< T > Class Template Reference

#include <fifo.hh>

Inheritance diagram for tlm::tlm_fifo< T >:
tlm::tlm_fifo_get_if< T > tlm::tlm_fifo_put_if< T > sc_core::sc_prim_channel tlm::tlm_get_peek_if< T > tlm::tlm_fifo_debug_if< T > tlm::tlm_put_if< T > tlm::tlm_fifo_debug_if< T > sc_core::sc_object sc_core::sc_interface tlm::tlm_nonblocking_put_if< T > tlm::tlm_blocking_put_if< T > sc_core::sc_interface tlm::tlm_nonblocking_get_peek_if< T > tlm::tlm_blocking_get_peek_if< T > tlm::tlm_peek_if< T > tlm::tlm_get_if< T > tlm::tlm_analysis_fifo< T >

Public Member Functions

 tlm_fifo (int size_=1)
 
 tlm_fifo (const char *name_, int size_=1)
 
virtual ~tlm_fifo ()
 
get (tlm_tag< T > *=nullptr)
 
bool nb_get (T &)
 
bool nb_can_get (tlm_tag< T > *=nullptr) const
 
const sc_core::sc_eventok_to_get (tlm_tag< T > *=nullptr) const
 
peek (tlm_tag< T > *=nullptr) const
 
bool nb_peek (T &) const
 
bool nb_can_peek (tlm_tag< T > *=nullptr) const
 
const sc_core::sc_eventok_to_peek (tlm_tag< T > *=nullptr) const
 
void put (const T &)
 
bool nb_put (const T &)
 
bool nb_can_put (tlm_tag< T > *=nullptr) const
 
const sc_core::sc_eventok_to_put (tlm_tag< T > *=nullptr) 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
 
- Public Member Functions inherited from tlm::tlm_blocking_get_if< T >
virtual void get (T &t)
 
- Public Member Functions inherited from sc_core::sc_interface
virtual void register_port (sc_port_base &, const char *)
 
virtual const sc_eventdefault_event () const
 
virtual ~sc_interface ()
 
- Public Member Functions inherited from tlm::tlm_blocking_peek_if< T >
virtual void peek (T &t) const
 
- Public Member Functions inherited from sc_core::sc_object
const char * name () const
 
const char * basename () const
 
virtual void print (std::ostream &=std::cout) const
 
virtual void dump (std::ostream &=std::cout) const
 
virtual const std::vector< sc_object * > & get_child_objects () const
 
virtual const std::vector< sc_event * > & get_child_events () const
 
sc_objectget_parent_object () const
 
bool add_attribute (sc_attr_base &)
 
sc_attr_baseget_attribute (const std::string &)
 
sc_attr_baseremove_attribute (const std::string &)
 
void remove_all_attributes ()
 
int num_attributes () const
 
sc_attr_cltnattr_cltn ()
 
const sc_attr_cltnattr_cltn () const
 
sc_simcontextsimcontext () const
 

Static Public Attributes

static const char *const kind_string = "tlm_fifo"
 

Protected Member Functions

sc_core::sc_eventread_event (tlm_tag< T > *=nullptr)
 
void update ()
 
void init (int)
 
- Protected Member Functions inherited from sc_core::sc_interface
 sc_interface ()
 
- Protected Member Functions inherited from sc_core::sc_prim_channel
 sc_prim_channel ()
 
 sc_prim_channel (const char *)
 
virtual ~sc_prim_channel ()
 
void request_update ()
 
void async_request_update ()
 
void next_trigger ()
 
void next_trigger (const sc_event &)
 
void next_trigger (const sc_event_or_list &)
 
void next_trigger (const sc_event_and_list &)
 
void next_trigger (const sc_time &)
 
void next_trigger (double, sc_time_unit)
 
void next_trigger (const sc_time &, const sc_event &)
 
void next_trigger (double, sc_time_unit, const sc_event &)
 
void next_trigger (const sc_time &, const sc_event_or_list &)
 
void next_trigger (double, sc_time_unit, const sc_event_or_list &)
 
void next_trigger (const sc_time &, const sc_event_and_list &)
 
void next_trigger (double, sc_time_unit, const sc_event_and_list &)
 
bool timed_out ()
 
void wait ()
 
void wait (int)
 
void wait (const sc_event &)
 
void wait (const sc_event_or_list &)
 
void wait (const sc_event_and_list &)
 
void wait (const sc_time &)
 
void wait (double, sc_time_unit)
 
void wait (const sc_time &, const sc_event &)
 
void wait (double, sc_time_unit, const sc_event &)
 
void wait (const sc_time &, const sc_event_or_list &)
 
void wait (double, sc_time_unit, const sc_event_or_list &)
 
void wait (const sc_time &, const sc_event_and_list &)
 
void wait (double, sc_time_unit, const sc_event_and_list &)
 
virtual void before_end_of_elaboration ()
 
virtual void end_of_elaboration ()
 
virtual void start_of_simulation ()
 
virtual void end_of_simulation ()
 
- Protected Member Functions inherited from sc_core::sc_object
 sc_object ()
 
 sc_object (const char *)
 
 sc_object (const sc_object &)
 
sc_objectoperator= (const sc_object &)
 
virtual ~sc_object ()
 

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 44 of file fifo.hh.

Constructor & Destructor Documentation

◆ tlm_fifo() [1/3]

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

Definition at line 49 of file fifo.hh.

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

◆ tlm_fifo() [2/3]

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

Definition at line 55 of file fifo.hh.

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

◆ ~tlm_fifo()

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

Definition at line 62 of file fifo.hh.

◆ tlm_fifo() [3/3]

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

Member Function Documentation

◆ debug()

◆ get()

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

Implements tlm::tlm_blocking_get_if< T >.

Definition at line 29 of file fifo_put_get.hh.

◆ init()

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

Definition at line 187 of file fifo.hh.

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

◆ is_empty()

template<typename T >
bool tlm::tlm_fifo< T >::is_empty ( ) const
inlineprivate

Definition at line 164 of file fifo.hh.

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

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

◆ is_full()

template<typename T >
bool tlm::tlm_fifo< T >::is_full ( ) const
inlineprivate

◆ kind()

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

Reimplemented from sc_core::sc_prim_channel.

Definition at line 128 of file fifo.hh.

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

◆ nb_bound()

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

Definition at line 65 of file fifo_resize.hh.

◆ nb_can_get()

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

Implements tlm::tlm_nonblocking_get_if< T >.

Definition at line 60 of file fifo_put_get.hh.

◆ nb_can_peek()

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

Implements tlm::tlm_nonblocking_peek_if< T >.

Definition at line 68 of file fifo_peek.hh.

◆ nb_can_put()

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

Implements tlm::tlm_nonblocking_put_if< T >.

Definition at line 106 of file fifo_put_get.hh.

◆ nb_expand()

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

Definition at line 29 of file fifo_resize.hh.

◆ 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 44 of file fifo_put_get.hh.

◆ 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 40 of file fifo_peek.hh.

◆ 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 52 of file fifo_peek.hh.

◆ 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 75 of file fifo_peek.hh.

◆ nb_put()

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

◆ nb_reduce()

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

Definition at line 54 of file fifo_resize.hh.

◆ nb_unbound()

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

Definition at line 40 of file fifo_resize.hh.

◆ ok_to_get()

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

Implements tlm::tlm_nonblocking_get_if< T >.

Definition at line 70 of file fifo.hh.

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

◆ ok_to_peek()

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

Implements tlm::tlm_nonblocking_peek_if< T >.

Definition at line 81 of file fifo.hh.

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

◆ ok_to_put()

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

Implements tlm::tlm_nonblocking_put_if< T >.

Definition at line 92 of file fifo.hh.

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

◆ operator=()

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

◆ peek()

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

Implements tlm::tlm_blocking_peek_if< T >.

Definition at line 28 of file fifo_peek.hh.

References sc_core::wait().

◆ put()

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

Implements tlm::tlm_blocking_put_if< T >.

Definition at line 69 of file fifo_put_get.hh.

◆ read_event()

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

Definition at line 132 of file fifo.hh.

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

◆ size()

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

◆ update()

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

Reimplemented from sc_core::sc_prim_channel.

Definition at line 207 of file fifo.hh.

References sc_core::SC_ZERO_TIME.

◆ used()

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

Member Data Documentation

◆ buffer

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

Definition at line 140 of file fifo.hh.

◆ kind_string

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

Definition at line 127 of file fifo.hh.

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

◆ m_data_read_event

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

Definition at line 151 of file fifo.hh.

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

◆ m_data_written_event

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

Definition at line 152 of file fifo.hh.

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

◆ m_expand

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

Definition at line 147 of file fifo.hh.

◆ m_num_read

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

Definition at line 145 of file fifo.hh.

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

◆ m_num_read_no_notify

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

Definition at line 149 of file fifo.hh.

◆ m_num_readable

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

◆ m_num_written

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

Definition at line 146 of file fifo.hh.

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

◆ m_size

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

Definition at line 142 of file fifo.hh.

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


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

Generated on Tue Jun 18 2024 16:24:56 for gem5 by doxygen 1.11.0