gem5  v20.1.0.0
Public Types | Public Member Functions | Protected Attributes | List of all members
PacketFifo Class Reference

#include <pktfifo.hh>

Public Types

typedef std::list< PacketFifoEntryfifo_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 76 of file pktfifo.hh.

Member Typedef Documentation

◆ const_iterator

typedef fifo_list::const_iterator PacketFifo::const_iterator

Definition at line 82 of file pktfifo.hh.

◆ fifo_list

Definition at line 80 of file pktfifo.hh.

◆ iterator

typedef fifo_list::iterator PacketFifo::iterator

Definition at line 81 of file pktfifo.hh.

Constructor & Destructor Documentation

◆ PacketFifo()

PacketFifo::PacketFifo ( int  max)
inlineexplicit

Definition at line 92 of file pktfifo.hh.

◆ ~PacketFifo()

virtual PacketFifo::~PacketFifo ( )
inlinevirtual

Definition at line 94 of file pktfifo.hh.

Member Function Documentation

◆ avail()

unsigned PacketFifo::avail ( ) const
inline

◆ begin() [1/2]

iterator PacketFifo::begin ( )
inline

◆ begin() [2/2]

const_iterator PacketFifo::begin ( ) const
inline

Definition at line 115 of file pktfifo.hh.

References fifo.

◆ check()

void PacketFifo::check ( ) const
inline

Definition at line 192 of file pktfifo.hh.

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

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

◆ clear()

void PacketFifo::clear ( )
inline

Definition at line 149 of file pktfifo.hh.

References _reserved, _size, begin(), end(), fifo, and ArmISA::i.

Referenced by Sinic::Device::reset(), NSGigE::rxReset(), NSGigE::txReset(), and IGbE::write().

◆ copyout()

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

Definition at line 36 of file pktfifo.cc.

References data, ArmISA::i, ArmISA::len, ArmISA::offset, and panic.

◆ countPacketsAfter()

int PacketFifo::countPacketsAfter ( const_iterator  i) const
inline

Definition at line 184 of file pktfifo.hh.

References end(), fifo, and ArmISA::i.

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

◆ countPacketsBefore()

int PacketFifo::countPacketsBefore ( const_iterator  i) const
inline

Definition at line 177 of file pktfifo.hh.

References fifo, and ArmISA::i.

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

◆ empty()

bool PacketFifo::empty ( ) const
inline

◆ end() [1/2]

iterator PacketFifo::end ( )
inline

◆ end() [2/2]

const_iterator PacketFifo::end ( ) const
inline

Definition at line 116 of file pktfifo.hh.

References fifo.

◆ front()

EthPacketPtr PacketFifo::front ( )
inline

◆ full()

bool PacketFifo::full ( ) const
inline

Definition at line 102 of file pktfifo.hh.

References avail().

Referenced by NSGigE::txKick().

◆ maxsize()

unsigned PacketFifo::maxsize ( ) const
inline

Definition at line 97 of file pktfifo.hh.

References _maxsize.

◆ packets()

unsigned PacketFifo::packets ( ) const
inline

Definition at line 96 of file pktfifo.hh.

References fifo.

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

◆ pop()

void PacketFifo::pop ( )
inline

◆ push()

bool PacketFifo::push ( EthPacketPtr  ptr)
inline

◆ remove()

void PacketFifo::remove ( iterator  i)
inline

Definition at line 158 of file pktfifo.hh.

References _size, fifo, and ArmISA::i.

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

◆ reserve()

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

Definition at line 105 of file pktfifo.hh.

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

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

◆ reserved()

unsigned PacketFifo::reserved ( ) const
inline

Definition at line 99 of file pktfifo.hh.

References _reserved.

◆ serialize()

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

Serialization stuff.

Definition at line 86 of file pktfifo.cc.

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

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

◆ size()

unsigned PacketFifo::size ( ) const
inline

◆ unserialize()

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

Member Data Documentation

◆ _counter

uint64_t PacketFifo::_counter
protected

Definition at line 86 of file pktfifo.hh.

Referenced by push().

◆ _maxsize

unsigned PacketFifo::_maxsize
protected

Definition at line 87 of file pktfifo.hh.

Referenced by avail(), and maxsize().

◆ _reserved

unsigned PacketFifo::_reserved
protected

Definition at line 89 of file pktfifo.hh.

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

◆ _size

unsigned PacketFifo::_size
protected

Definition at line 88 of file pktfifo.hh.

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

◆ fifo

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

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

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