gem5  v20.1.0.0
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
sc_core::sc_fifo< T > Class Template Reference

#include <sc_fifo.hh>

Inheritance diagram for sc_core::sc_fifo< T >:
sc_core::sc_fifo_in_if< T > sc_core::sc_fifo_out_if< T > sc_core::sc_prim_channel sc_core::sc_fifo_nonblocking_in_if< T > sc_core::sc_fifo_blocking_in_if< T > sc_core::sc_fifo_nonblocking_out_if< T > sc_core::sc_fifo_blocking_out_if< T > sc_core::sc_object sc_core::sc_interface sc_core::sc_interface sc_core::sc_interface sc_core::sc_interface

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 &port, const char *iface_type_name)
 
virtual void read (T &t)
 
virtual T read ()
 
virtual bool nb_read (T &t)
 
 operator T ()
 
virtual void write (const T &t)
 
virtual bool nb_write (const T &t)
 
sc_fifo< T > & operator= (const T &t)
 
virtual const sc_eventdata_written_event () const
 
virtual const sc_eventdata_read_event () const
 
virtual int num_available () const
 
virtual int num_free () const
 
virtual void print (std::ostream &os=std::cout) const
 
virtual void dump (std::ostream &os=std::cout) const
 
virtual const char * kind () const
 
- Public Member Functions inherited from sc_core::sc_interface
virtual const sc_eventdefault_event () const
 
virtual ~sc_interface ()
 
- Public Member Functions inherited from sc_core::sc_object
const char * name () const
 
const char * basename () 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
 

Protected Member Functions

virtual void update ()
 
- Protected Member Functions inherited from sc_core::sc_fifo_in_if< T >
 sc_fifo_in_if ()
 
- Protected Member Functions inherited from sc_core::sc_interface
 sc_interface ()
 
- Protected Member Functions inherited from sc_core::sc_fifo_out_if< T >
 sc_fifo_out_if ()
 
- 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 ()
 

Private Member Functions

 sc_fifo (const sc_fifo< T > &)
 
sc_fifooperator= (const sc_fifo< T > &)
 

Private Attributes

sc_gem5::InternalScEvent _dataReadEvent
 
sc_gem5::InternalScEvent _dataWriteEvent
 
sc_port_base_reader
 
sc_port_base_writer
 
int _size
 
int _num_free
 
int _num_available
 
std::list< T > _entries
 
bool _readsHappened
 
bool _writesHappened
 

Detailed Description

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

Definition at line 48 of file sc_fifo.hh.

Constructor & Destructor Documentation

◆ sc_fifo() [1/3]

template<class T >
sc_core::sc_fifo< T >::sc_fifo ( int  size = 16)
inlineexplicit

Definition at line 53 of file sc_fifo.hh.

◆ sc_fifo() [2/3]

template<class T >
sc_core::sc_fifo< T >::sc_fifo ( const char *  name,
int  size = 16 
)
inlineexplicit

Definition at line 60 of file sc_fifo.hh.

◆ ~sc_fifo()

template<class T >
virtual sc_core::sc_fifo< T >::~sc_fifo ( )
inlinevirtual

Definition at line 66 of file sc_fifo.hh.

◆ sc_fifo() [3/3]

template<class T >
sc_core::sc_fifo< T >::sc_fifo ( const sc_fifo< T > &  )
inlineprivate

Definition at line 197 of file sc_fifo.hh.

Member Function Documentation

◆ data_read_event()

template<class T >
virtual const sc_event& sc_core::sc_fifo< T >::data_read_event ( ) const
inlinevirtual

◆ data_written_event()

template<class T >
virtual const sc_event& sc_core::sc_fifo< T >::data_written_event ( ) const
inlinevirtual

◆ dump()

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

Reimplemented from sc_core::sc_object.

Definition at line 168 of file sc_fifo.hh.

References sc_core::sc_fifo< T >::_entries, sc_core::sc_object::name(), and X86ISA::os.

◆ kind()

template<class T >
virtual const char* sc_core::sc_fifo< T >::kind ( ) const
inlinevirtual

Reimplemented from sc_core::sc_prim_channel.

Definition at line 177 of file sc_fifo.hh.

◆ nb_read()

template<class T >
virtual bool sc_core::sc_fifo< T >::nb_read ( T &  t)
inlinevirtual

◆ nb_write()

template<class T >
virtual bool sc_core::sc_fifo< T >::nb_write ( const T &  t)
inlinevirtual

◆ num_available()

template<class T >
virtual int sc_core::sc_fifo< T >::num_available ( ) const
inlinevirtual

◆ num_free()

template<class T >
virtual int sc_core::sc_fifo< T >::num_free ( ) const
inlinevirtual

◆ operator T()

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

Definition at line 116 of file sc_fifo.hh.

References sc_core::sc_fifo< T >::read().

◆ operator=() [1/2]

template<class T >
sc_fifo& sc_core::sc_fifo< T >::operator= ( const sc_fifo< T > &  )
inlineprivate

Definition at line 199 of file sc_fifo.hh.

◆ operator=() [2/2]

template<class T >
sc_fifo<T>& sc_core::sc_fifo< T >::operator= ( const T &  t)
inline

Definition at line 139 of file sc_fifo.hh.

References ArmISA::t, and sc_core::sc_fifo< T >::write().

◆ print()

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

Reimplemented from sc_core::sc_object.

Definition at line 160 of file sc_fifo.hh.

References sc_core::sc_fifo< T >::_entries, and X86ISA::os.

◆ read() [1/2]

template<class T >
virtual T sc_core::sc_fifo< T >::read ( )
inlinevirtual

◆ read() [2/2]

template<class T >
virtual void sc_core::sc_fifo< T >::read ( T &  t)
inlinevirtual

◆ register_port()

template<class T >
virtual void sc_core::sc_fifo< T >::register_port ( sc_port_base port,
const char *  iface_type_name 
)
inlinevirtual

◆ update()

template<class T >
virtual void sc_core::sc_fifo< T >::update ( )
inlineprotectedvirtual

◆ write()

template<class T >
virtual void sc_core::sc_fifo< T >::write ( const T &  t)
inlinevirtual

Member Data Documentation

◆ _dataReadEvent

template<class T >
sc_gem5::InternalScEvent sc_core::sc_fifo< T >::_dataReadEvent
private

◆ _dataWriteEvent

template<class T >
sc_gem5::InternalScEvent sc_core::sc_fifo< T >::_dataWriteEvent
private

◆ _entries

template<class T >
std::list<T> sc_core::sc_fifo< T >::_entries
mutableprivate

◆ _num_available

template<class T >
int sc_core::sc_fifo< T >::_num_available
private

◆ _num_free

template<class T >
int sc_core::sc_fifo< T >::_num_free
private

◆ _reader

template<class T >
sc_port_base* sc_core::sc_fifo< T >::_reader
private

Definition at line 204 of file sc_fifo.hh.

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

◆ _readsHappened

template<class T >
bool sc_core::sc_fifo< T >::_readsHappened
private

Definition at line 211 of file sc_fifo.hh.

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

◆ _size

template<class T >
int sc_core::sc_fifo< T >::_size
private

Definition at line 207 of file sc_fifo.hh.

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

◆ _writer

template<class T >
sc_port_base* sc_core::sc_fifo< T >::_writer
private

Definition at line 205 of file sc_fifo.hh.

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

◆ _writesHappened

template<class T >
bool sc_core::sc_fifo< T >::_writesHappened
private

Definition at line 212 of file sc_fifo.hh.

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


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

Generated on Wed Sep 30 2020 14:03:08 for gem5 by doxygen 1.8.17