gem5  v20.1.0.0
Public Types | Public Member Functions | Private Attributes | List of all members
Fifo< T > Class Template Reference

Simple FIFO implementation backed by a circular buffer. More...

#include <circlebuf.hh>

Public Types

typedef T value_type
 

Public Member Functions

 Fifo (size_t size)
 
bool empty () const
 
size_t size () const
 
size_t capacity () const
 
void flush ()
 
template<class OutputIterator >
void peek (OutputIterator out, size_t len) const
 
template<class OutputIterator >
void read (OutputIterator out, size_t len)
 
template<class InputIterator >
void write (InputIterator in, size_t len)
 

Private Attributes

CircleBuf< value_typebuf
 

Detailed Description

template<typename T>
class Fifo< T >

Simple FIFO implementation backed by a circular buffer.

This class provides the same basic functionallity as the circular buffer with the folling differences:

Definition at line 140 of file circlebuf.hh.

Member Typedef Documentation

◆ value_type

template<typename T >
typedef T Fifo< T >::value_type

Definition at line 143 of file circlebuf.hh.

Constructor & Destructor Documentation

◆ Fifo()

template<typename T >
Fifo< T >::Fifo ( size_t  size)
inline

Definition at line 146 of file circlebuf.hh.

Member Function Documentation

◆ capacity()

template<typename T >
size_t Fifo< T >::capacity ( ) const
inline

◆ empty()

template<typename T >
bool Fifo< T >::empty ( ) const
inline

Definition at line 149 of file circlebuf.hh.

◆ flush()

template<typename T >
void Fifo< T >::flush ( )
inline

Definition at line 153 of file circlebuf.hh.

Referenced by arrayParamIn(), and DmaReadFifo::flush().

◆ peek()

template<typename T >
template<class OutputIterator >
void Fifo< T >::peek ( OutputIterator  out,
size_t  len 
) const
inline

Definition at line 156 of file circlebuf.hh.

Referenced by arrayParamOut().

◆ read()

template<typename T >
template<class OutputIterator >
void Fifo< T >::read ( OutputIterator  out,
size_t  len 
)
inline

Definition at line 158 of file circlebuf.hh.

Referenced by DmaReadFifo::tryGet().

◆ size()

template<typename T >
size_t Fifo< T >::size ( ) const
inline

◆ write()

template<typename T >
template<class InputIterator >
void Fifo< T >::write ( InputIterator  in,
size_t  len 
)
inline

Member Data Documentation

◆ buf

template<typename T >
CircleBuf<value_type> Fifo< T >::buf
private

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

Generated on Wed Sep 30 2020 14:02:24 for gem5 by doxygen 1.8.17