gem5
|
#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< PacketFifoEntry > | fifo |
uint64_t | _counter |
unsigned | _maxsize |
unsigned | _size |
unsigned | _reserved |
Definition at line 78 of file pktfifo.hh.
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.
|
inlineexplicit |
Definition at line 94 of file pktfifo.hh.
|
inlinevirtual |
Definition at line 96 of file pktfifo.hh.
|
inline |
Definition at line 102 of file pktfifo.hh.
References _maxsize, _reserved, and _size.
Referenced by full(), Sinic::Device::prepareRead(), push(), Sinic::Device::recvPacket(), NSGigE::recvPacket(), reserve(), Sinic::Device::transmit(), NSGigE::transmit(), Sinic::Device::txKick(), NSGigE::txKick(), IGbE::txStateMachine(), and IGbE::txWire().
|
inline |
Definition at line 114 of file pktfifo.hh.
References fifo.
Referenced by check(), clear(), Sinic::Device::prepareRead(), Sinic::Device::serialize(), and Sinic::Device::unserialize().
|
inline |
Definition at line 117 of file pktfifo.hh.
References fifo.
|
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().
|
inline |
Definition at line 151 of file pktfifo.hh.
References _reserved, _size, begin(), end(), fifo, and ArmISA::i.
Referenced by IGbE::IGbE(), Sinic::Device::reset(), NSGigE::rxReset(), NSGigE::txReset(), and IGbE::write().
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().
|
inline |
Definition at line 186 of file pktfifo.hh.
Referenced by Sinic::Device::prepareRead().
|
inline |
Definition at line 179 of file pktfifo.hh.
References fifo.
Referenced by Sinic::Device::rxKick(), and Sinic::Device::serialize().
|
inline |
Definition at line 103 of file pktfifo.hh.
References size().
Referenced by pop(), Sinic::Device::prepareRead(), Sinic::Device::rxKick(), NSGigE::rxKick(), IGbE::rxStateMachine(), Sinic::Device::transferDone(), NSGigE::transferDone(), Sinic::Device::transmit(), NSGigE::transmit(), and IGbE::txWire().
|
inline |
Definition at line 115 of file pktfifo.hh.
References fifo.
Referenced by check(), clear(), countPacketsAfter(), Sinic::Device::recvPacket(), Sinic::Device::reset(), Sinic::Device::rxKick(), Sinic::Device::serialize(), Sinic::Device::unserialize(), and Sinic::Device::write().
|
inline |
Definition at line 118 of file pktfifo.hh.
References fifo.
|
inline |
Definition at line 120 of file pktfifo.hh.
References fifo.
Referenced by NSGigE::rxKick(), IGbE::rxStateMachine(), Sinic::Device::transmit(), NSGigE::transmit(), and IGbE::txWire().
|
inline |
|
inline |
Definition at line 99 of file pktfifo.hh.
References _maxsize.
|
inline |
Definition at line 98 of file pktfifo.hh.
References fifo.
Referenced by Sinic::Device::prepareRead().
|
inline |
Definition at line 139 of file pktfifo.hh.
References _size, empty(), and fifo.
Referenced by NSGigE::rxKick(), IGbE::rxStateMachine(), Sinic::Device::transmit(), NSGigE::transmit(), and IGbE::txWire().
|
inline |
Definition at line 122 of file pktfifo.hh.
References _counter, _reserved, _size, avail(), fifo, length, PacketFifoEntry::number, and PacketFifoEntry::packet.
Referenced by IGbE::ethRxPkt(), Sinic::Device::recvPacket(), NSGigE::recvPacket(), Sinic::Device::txKick(), NSGigE::txKick(), and IGbE::txStateMachine().
|
inline |
Definition at line 160 of file pktfifo.hh.
References _size, fifo, and ArmISA::i.
Referenced by Sinic::Device::rxKick().
|
inline |
Definition at line 107 of file pktfifo.hh.
References _reserved, avail(), and ArmISA::len.
Referenced by NSGigE::txKick(), and IGbE::txStateMachine().
|
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().
|
inline |
Definition at line 100 of file pktfifo.hh.
References _size.
Referenced by empty(), Sinic::Device::prepareRead(), Sinic::Device::recvPacket(), Sinic::Device::rxKick(), NSGigE::rxKick(), Sinic::Device::transmit(), NSGigE::transmit(), and Sinic::Device::txKick().
void PacketFifo::unserialize | ( | const std::string & | base, |
CheckpointIn & | cp | ||
) |
Definition at line 101 of file pktfifo.cc.
References csprintf(), ArmISA::i, paramIn(), and PacketFifoEntry::unserialize().
Referenced by Sinic::Device::unserialize(), NSGigE::unserialize(), and IGbE::unserialize().
|
protected |
Definition at line 88 of file pktfifo.hh.
Referenced by push().
|
protected |
Definition at line 89 of file pktfifo.hh.
|
protected |
Definition at line 91 of file pktfifo.hh.
Referenced by avail(), clear(), push(), reserve(), and reserved().
|
protected |
|
protected |
Definition at line 87 of file pktfifo.hh.
Referenced by begin(), clear(), countPacketsAfter(), countPacketsBefore(), end(), front(), packets(), pop(), push(), and remove().