gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
PacketFifo Class Reference

#include <pktfifo.hh>

Public Types

typedef std::list
< PacketFifoEntry
fifo_list
 
typedef fifo_list::iterator iterator
 
typedef fifo_list::const_iterator const_iterator
 

Public Member Functions

 PacketFifo (int max)
 
virtual ~PacketFifo ()
 
unsigned packets () const
 
unsigned maxsize () const
 
unsigned size () const
 
unsigned reserved () const
 
unsigned avail () const
 
bool empty () const
 
bool full () const
 
unsigned reserve (unsigned len=0)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
EthPacketPtr front ()
 
bool push (EthPacketPtr ptr)
 
void pop ()
 
void clear ()
 
void remove (iterator i)
 
bool copyout (void *dest, unsigned offset, unsigned len)
 
int countPacketsBefore (const_iterator i) const
 
int countPacketsAfter (const_iterator i) const
 
void check () const
 
void serialize (const std::string &base, CheckpointOut &cp) const
 Serialization stuff. More...
 
void unserialize (const std::string &base, CheckpointIn &cp)
 

Protected Attributes

std::list< PacketFifoEntryfifo
 
uint64_t _counter
 
unsigned _maxsize
 
unsigned _size
 
unsigned _reserved
 

Detailed Description

Definition at line 78 of file pktfifo.hh.

Member Typedef Documentation

typedef fifo_list::const_iterator PacketFifo::const_iterator

Definition at line 84 of file pktfifo.hh.

Definition at line 82 of file pktfifo.hh.

typedef fifo_list::iterator PacketFifo::iterator

Definition at line 83 of file pktfifo.hh.

Constructor & Destructor Documentation

PacketFifo::PacketFifo ( int  max)
inlineexplicit

Definition at line 94 of file pktfifo.hh.

virtual PacketFifo::~PacketFifo ( )
inlinevirtual

Definition at line 96 of file pktfifo.hh.

Member Function Documentation

unsigned PacketFifo::avail ( ) const
inline
iterator PacketFifo::begin ( )
inline
const_iterator PacketFifo::begin ( ) const
inline

Definition at line 117 of file pktfifo.hh.

References fifo.

void PacketFifo::check ( ) const
inline

Definition at line 194 of file pktfifo.hh.

References _size, begin(), end(), ArmISA::i, if(), panic, and Stats::total.

Referenced by Sinic::Device::rxKick().

void PacketFifo::clear ( )
inline
bool PacketFifo::copyout ( void *  dest,
unsigned  offset,
unsigned  len 
)

Definition at line 38 of file pktfifo.cc.

References data, ArmISA::i, panic, and X86ISA::size().

int PacketFifo::countPacketsAfter ( const_iterator  i) const
inline

Definition at line 186 of file pktfifo.hh.

References end(), and fifo.

Referenced by Sinic::Device::prepareRead().

int PacketFifo::countPacketsBefore ( const_iterator  i) const
inline

Definition at line 179 of file pktfifo.hh.

References fifo.

Referenced by Sinic::Device::rxKick(), and Sinic::Device::serialize().

bool PacketFifo::empty ( ) const
inline
iterator PacketFifo::end ( )
inline
const_iterator PacketFifo::end ( ) const
inline

Definition at line 118 of file pktfifo.hh.

References fifo.

EthPacketPtr PacketFifo::front ( )
inline
bool PacketFifo::full ( ) const
inline

Definition at line 104 of file pktfifo.hh.

References avail().

Referenced by NSGigE::txKick().

unsigned PacketFifo::maxsize ( ) const
inline

Definition at line 99 of file pktfifo.hh.

References _maxsize.

unsigned PacketFifo::packets ( ) const
inline

Definition at line 98 of file pktfifo.hh.

References fifo.

Referenced by Sinic::Device::prepareRead().

void PacketFifo::pop ( )
inline
bool PacketFifo::push ( EthPacketPtr  ptr)
inline
void PacketFifo::remove ( iterator  i)
inline

Definition at line 160 of file pktfifo.hh.

References _size, fifo, and ArmISA::i.

Referenced by Sinic::Device::rxKick().

unsigned PacketFifo::reserve ( unsigned  len = 0)
inline

Definition at line 107 of file pktfifo.hh.

References _reserved, avail(), and ArmISA::len.

Referenced by NSGigE::txKick(), and IGbE::txStateMachine().

unsigned PacketFifo::reserved ( ) const
inline

Definition at line 101 of file pktfifo.hh.

References _reserved.

void PacketFifo::serialize ( const std::string &  base,
CheckpointOut cp 
) const

Serialization stuff.

Definition at line 88 of file pktfifo.cc.

References csprintf(), ArmISA::i, and paramOut().

Referenced by Sinic::Device::serialize(), NSGigE::serialize(), and IGbE::serialize().

unsigned PacketFifo::size ( ) const
inline
void PacketFifo::unserialize ( const std::string &  base,
CheckpointIn cp 
)

Member Data Documentation

uint64_t PacketFifo::_counter
protected

Definition at line 88 of file pktfifo.hh.

Referenced by push().

unsigned PacketFifo::_maxsize
protected

Definition at line 89 of file pktfifo.hh.

Referenced by avail(), and maxsize().

unsigned PacketFifo::_reserved
protected

Definition at line 91 of file pktfifo.hh.

Referenced by avail(), clear(), push(), reserve(), and reserved().

unsigned PacketFifo::_size
protected

Definition at line 90 of file pktfifo.hh.

Referenced by avail(), check(), clear(), pop(), push(), remove(), and size().

std::list<PacketFifoEntry> PacketFifo::fifo
protected

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

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