gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 217 of file circlebuf.hh.

Member Typedef Documentation

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

Definition at line 220 of file circlebuf.hh.

Constructor & Destructor Documentation

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

Definition at line 223 of file circlebuf.hh.

Member Function Documentation

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

Definition at line 226 of file circlebuf.hh.

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

Definition at line 230 of file circlebuf.hh.

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

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

Definition at line 233 of file circlebuf.hh.

Referenced by arrayParamOut().

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

Definition at line 235 of file circlebuf.hh.

Referenced by DmaReadFifo::tryGet().

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

Member Data Documentation

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

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

Generated on Fri Jun 9 2017 13:04:10 for gem5 by doxygen 1.8.6