gem5  v22.1.0.0
Public Types | Public Member Functions | Protected Attributes | List of all members
gem5::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 80 of file pktfifo.hh.

Member Typedef Documentation

◆ const_iterator

typedef fifo_list::const_iterator gem5::PacketFifo::const_iterator

Definition at line 86 of file pktfifo.hh.

◆ fifo_list

Definition at line 84 of file pktfifo.hh.

◆ iterator

typedef fifo_list::iterator gem5::PacketFifo::iterator

Definition at line 85 of file pktfifo.hh.

Constructor & Destructor Documentation

◆ PacketFifo()

gem5::PacketFifo::PacketFifo ( int  max)
inlineexplicit

Definition at line 96 of file pktfifo.hh.

◆ ~PacketFifo()

virtual gem5::PacketFifo::~PacketFifo ( )
inlinevirtual

Definition at line 98 of file pktfifo.hh.

Member Function Documentation

◆ avail()

unsigned gem5::PacketFifo::avail ( ) const
inline

◆ begin() [1/2]

iterator gem5::PacketFifo::begin ( )
inline

◆ begin() [2/2]

const_iterator gem5::PacketFifo::begin ( ) const
inline

Definition at line 119 of file pktfifo.hh.

References fifo.

◆ check()

void gem5::PacketFifo::check ( ) const
inline

Definition at line 203 of file pktfifo.hh.

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

Referenced by gem5::sinic::Device::rxKick().

◆ clear()

void gem5::PacketFifo::clear ( )
inline

◆ copyout()

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

Definition at line 37 of file pktfifo.cc.

References data, end(), fifo, gem5::ArmISA::i, len, gem5::ArmISA::offset, panic, and size().

◆ countPacketsAfter()

int gem5::PacketFifo::countPacketsAfter ( const_iterator  i) const
inline

Definition at line 194 of file pktfifo.hh.

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

Referenced by gem5::sinic::Device::prepareRead().

◆ countPacketsBefore()

int gem5::PacketFifo::countPacketsBefore ( const_iterator  i) const
inline

Definition at line 186 of file pktfifo.hh.

References fifo, and gem5::ArmISA::i.

Referenced by gem5::sinic::Device::rxKick(), and gem5::sinic::Device::serialize().

◆ empty()

bool gem5::PacketFifo::empty ( ) const
inline

◆ end() [1/2]

iterator gem5::PacketFifo::end ( )
inline

◆ end() [2/2]

const_iterator gem5::PacketFifo::end ( ) const
inline

Definition at line 120 of file pktfifo.hh.

References fifo.

◆ front()

EthPacketPtr gem5::PacketFifo::front ( )
inline

◆ full()

bool gem5::PacketFifo::full ( ) const
inline

Definition at line 106 of file pktfifo.hh.

References avail().

Referenced by gem5::NSGigE::txKick().

◆ maxsize()

unsigned gem5::PacketFifo::maxsize ( ) const
inline

Definition at line 101 of file pktfifo.hh.

References _maxsize.

◆ packets()

unsigned gem5::PacketFifo::packets ( ) const
inline

Definition at line 100 of file pktfifo.hh.

References fifo.

Referenced by gem5::sinic::Device::prepareRead().

◆ pop()

void gem5::PacketFifo::pop ( )
inline

◆ push()

bool gem5::PacketFifo::push ( EthPacketPtr  ptr)
inline

◆ remove()

void gem5::PacketFifo::remove ( iterator  i)
inline

Definition at line 166 of file pktfifo.hh.

References _size, fifo, and gem5::ArmISA::i.

Referenced by gem5::sinic::Device::rxKick().

◆ reserve()

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

Definition at line 109 of file pktfifo.hh.

References _reserved, avail(), and len.

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

◆ reserved()

unsigned gem5::PacketFifo::reserved ( ) const
inline

Definition at line 103 of file pktfifo.hh.

References _reserved.

◆ serialize()

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

◆ size()

unsigned gem5::PacketFifo::size ( ) const
inline

◆ unserialize()

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

Member Data Documentation

◆ _counter

uint64_t gem5::PacketFifo::_counter
protected

Definition at line 90 of file pktfifo.hh.

Referenced by push().

◆ _maxsize

unsigned gem5::PacketFifo::_maxsize
protected

Definition at line 91 of file pktfifo.hh.

Referenced by avail(), maxsize(), and serialize().

◆ _reserved

unsigned gem5::PacketFifo::_reserved
protected

Definition at line 93 of file pktfifo.hh.

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

◆ _size

unsigned gem5::PacketFifo::_size
protected

Definition at line 92 of file pktfifo.hh.

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

◆ fifo

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

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

Generated on Wed Dec 21 2022 10:23:20 for gem5 by doxygen 1.9.1