gem5  v22.1.0.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
gem5::IGbE::TxDescCache Class Reference
Inheritance diagram for gem5::IGbE::TxDescCache:
gem5::IGbE::DescCache< igbreg::TxDesc > gem5::Serializable

Public Member Functions

 TxDescCache (IGbE *i, std::string n, int s)
 
unsigned getPacketSize (EthPacketPtr p)
 Tell the cache to DMA a packet from main memory into its buffer and return the size the of the packet to reserve space in tx fifo. More...
 
void getPacketData (EthPacketPtr p)
 
void processContextDesc ()
 
unsigned descInBlock (unsigned num_desc)
 Return the number of dsecriptors in a cache block for threshold operations. More...
 
bool packetAvailable ()
 Ask if the packet has been transfered so the state machine can give it to the fifo. More...
 
bool packetWaiting ()
 Ask if we are still waiting for the packet to be transfered. More...
 
bool packetMultiDesc ()
 Ask if this packet is composed of multiple descriptors so even if we've got data, we need to wait for more before we can send it out. More...
 
void pktComplete ()
 Called by event when dma to write packet is completed. More...
 
void headerComplete ()
 
void completionWriteback (Addr a, bool enabled)
 
bool hasOutstandingEvents () override
 
void nullCallback ()
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from gem5::IGbE::DescCache< igbreg::TxDesc >
 DescCache (IGbE *i, const std::string n, int s)
 
virtual ~DescCache ()
 
std::string name ()
 
void areaChanged ()
 If the address/len/head change when we've got descriptors that are dirty that is very bad. More...
 
void writeback (Addr aMask)
 
void writeback1 ()
 
void fetchDescriptors ()
 Fetch a chunk of descriptors into the descriptor cache. More...
 
void fetchDescriptors1 ()
 
void fetchComplete ()
 Called by event when dma to read descriptors is completed. More...
 
void wbComplete ()
 Called by event when dma to writeback descriptors is completed. More...
 
unsigned descLeft () const
 
unsigned descUsed () const
 
unsigned descUnused () const
 
void reset ()
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from gem5::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 

Public Attributes

EventFunctionWrapper pktEvent
 
EventFunctionWrapper headerEvent
 
EventFunctionWrapper nullEvent
 
- Public Attributes inherited from gem5::IGbE::DescCache< igbreg::TxDesc >
std::string annSmFetch
 Annotate sm. More...
 
std::string annSmWb
 
std::string annUnusedDescQ
 
std::string annUsedCacheQ
 
std::string annUsedDescQ
 
std::string annUnusedCacheQ
 
std::string annDescQ
 
EventFunctionWrapper wbDelayEvent
 
EventFunctionWrapper fetchDelayEvent
 
EventFunctionWrapper fetchEvent
 
EventFunctionWrapper wbEvent
 

Protected Member Functions

Addr descBase () const override
 
long descHead () const override
 
long descTail () const override
 
long descLen () const override
 
void updateHead (long h) override
 
void enableSm () override
 
void actionAfterWb () override
 
void fetchAfterWb () override
 
- Protected Member Functions inherited from gem5::IGbE::DescCache< igbreg::TxDesc >
Addr pciToDma (Addr a)
 Shortcut for DMA address translation. More...
 

Protected Attributes

bool pktDone
 
bool isTcp
 
bool pktWaiting
 
bool pktMultiDesc
 
Addr completionAddress
 
bool completionEnabled
 
uint32_t descEnd
 
bool useTso
 
Addr tsoHeaderLen
 
Addr tsoMss
 
Addr tsoTotalLen
 
Addr tsoUsedLen
 
Addr tsoPrevSeq
 
Addr tsoPktPayloadBytes
 
bool tsoLoadedHeader
 
bool tsoPktHasHeader
 
uint8_t tsoHeader [256]
 
Addr tsoDescBytesUsed
 
Addr tsoCopyBytes
 
int tsoPkts
 
- Protected Attributes inherited from gem5::IGbE::DescCache< igbreg::TxDesc >
CacheType usedCache
 
CacheType unusedCache
 
igbreg::TxDescfetchBuf
 
igbreg::TxDescwbBuf
 
IGbEigbe
 
std::string _name
 
int cachePnt
 
int size
 
int curFetching
 
int wbOut
 
bool moreToWb
 
Addr wbAlignment
 
EthPacketPtr pktPtr
 The packet that is currently being dmad to memory if any. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it. More...
 
- Protected Types inherited from gem5::IGbE::DescCache< igbreg::TxDesc >
typedef std::deque< igbreg::TxDesc * > CacheType
 

Detailed Description

Definition at line 366 of file i8254xGBe.hh.

Constructor & Destructor Documentation

◆ TxDescCache()

gem5::IGbE::TxDescCache::TxDescCache ( IGbE i,
std::string  n,
int  s 
)

Definition at line 1498 of file i8254xGBe.cc.

References pktComplete().

Member Function Documentation

◆ actionAfterWb()

void gem5::IGbE::TxDescCache::actionAfterWb ( )
overrideprotectedvirtual

◆ completionWriteback()

void gem5::IGbE::TxDescCache::completionWriteback ( Addr  a,
bool  enabled 
)
inline

◆ descBase()

Addr gem5::IGbE::TxDescCache::descBase ( ) const
inlineoverrideprotectedvirtual

◆ descHead()

long gem5::IGbE::TxDescCache::descHead ( ) const
inlineoverrideprotectedvirtual

◆ descInBlock()

unsigned gem5::IGbE::TxDescCache::descInBlock ( unsigned  num_desc)
inline

Return the number of dsecriptors in a cache block for threshold operations.

Definition at line 422 of file i8254xGBe.hh.

References gem5::DmaDevice::cacheBlockSize(), and gem5::IGbE::DescCache< igbreg::TxDesc >::igbe.

◆ descLen()

long gem5::IGbE::TxDescCache::descLen ( ) const
inlineoverrideprotectedvirtual

◆ descTail()

long gem5::IGbE::TxDescCache::descTail ( ) const
inlineoverrideprotectedvirtual

◆ enableSm()

void gem5::IGbE::TxDescCache::enableSm ( )
overrideprotectedvirtual

Implements gem5::IGbE::DescCache< igbreg::TxDesc >.

Definition at line 1986 of file i8254xGBe.cc.

References gem5::Draining.

◆ fetchAfterWb()

void gem5::IGbE::TxDescCache::fetchAfterWb ( )
inlineoverrideprotectedvirtual

◆ getPacketData()

void gem5::IGbE::TxDescCache::getPacketData ( EthPacketPtr  p)

◆ getPacketSize()

unsigned gem5::IGbE::TxDescCache::getPacketSize ( EthPacketPtr  p)

Tell the cache to DMA a packet from main memory into its buffer and return the size the of the packet to reserve space in tx fifo.

Returns
size of the packet

Definition at line 1619 of file i8254xGBe.cc.

References gem5::igbreg::TxDesc::d1, gem5::igbreg::TxDesc::d2, DPRINTF, gem5::igbreg::txd_op::getLen(), and gem5::VegaISA::p.

Referenced by gem5::IGbE::txStateMachine().

◆ hasOutstandingEvents()

bool gem5::IGbE::TxDescCache::hasOutstandingEvents ( )
overridevirtual

Reimplemented from gem5::IGbE::DescCache< igbreg::TxDesc >.

Definition at line 1995 of file i8254xGBe.cc.

Referenced by gem5::IGbE::checkDrain(), and gem5::IGbE::drain().

◆ headerComplete()

void gem5::IGbE::TxDescCache::headerComplete ( )

Definition at line 1594 of file i8254xGBe.cc.

References DPRINTF, and gem5::igbreg::txd_op::getLen().

◆ nullCallback()

void gem5::IGbE::TxDescCache::nullCallback ( )
inline

Definition at line 465 of file i8254xGBe.hh.

References DPRINTF.

◆ packetAvailable()

bool gem5::IGbE::TxDescCache::packetAvailable ( )

Ask if the packet has been transfered so the state machine can give it to the fifo.

Returns
packet available in descriptor cache

Definition at line 1976 of file i8254xGBe.cc.

Referenced by gem5::IGbE::txStateMachine().

◆ packetMultiDesc()

bool gem5::IGbE::TxDescCache::packetMultiDesc ( )
inline

Ask if this packet is composed of multiple descriptors so even if we've got data, we need to wait for more before we can send it out.

Returns
packet can't be sent out because it's a multi-descriptor packet

Definition at line 444 of file i8254xGBe.hh.

References pktMultiDesc.

Referenced by gem5::IGbE::txStateMachine().

◆ packetWaiting()

bool gem5::IGbE::TxDescCache::packetWaiting ( )
inline

Ask if we are still waiting for the packet to be transfered.

Returns
packet still in transit.

Definition at line 436 of file i8254xGBe.hh.

References pktWaiting.

Referenced by gem5::IGbE::txStateMachine().

◆ pktComplete()

void gem5::IGbE::TxDescCache::pktComplete ( )

◆ processContextDesc()

void gem5::IGbE::TxDescCache::processContextDesc ( )

◆ serialize()

void gem5::IGbE::TxDescCache::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 1918 of file i8254xGBe.cc.

References gem5::IGbE::DescCache< T >::serialize(), SERIALIZE_ARRAY, and SERIALIZE_SCALAR.

◆ unserialize()

void gem5::IGbE::TxDescCache::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 1947 of file i8254xGBe.cc.

References gem5::IGbE::DescCache< T >::unserialize(), UNSERIALIZE_ARRAY, and UNSERIALIZE_SCALAR.

◆ updateHead()

void gem5::IGbE::TxDescCache::updateHead ( long  h)
inlineoverrideprotectedvirtual

Member Data Documentation

◆ completionAddress

Addr gem5::IGbE::TxDescCache::completionAddress
protected

Definition at line 387 of file i8254xGBe.hh.

Referenced by completionWriteback().

◆ completionEnabled

bool gem5::IGbE::TxDescCache::completionEnabled
protected

Definition at line 388 of file i8254xGBe.hh.

Referenced by completionWriteback().

◆ descEnd

uint32_t gem5::IGbE::TxDescCache::descEnd
protected

Definition at line 389 of file i8254xGBe.hh.

◆ headerEvent

EventFunctionWrapper gem5::IGbE::TxDescCache::headerEvent

Definition at line 452 of file i8254xGBe.hh.

◆ isTcp

bool gem5::IGbE::TxDescCache::isTcp
protected

Definition at line 384 of file i8254xGBe.hh.

◆ nullEvent

EventFunctionWrapper gem5::IGbE::TxDescCache::nullEvent

Definition at line 468 of file i8254xGBe.hh.

◆ pktDone

bool gem5::IGbE::TxDescCache::pktDone
protected

Definition at line 383 of file i8254xGBe.hh.

◆ pktEvent

EventFunctionWrapper gem5::IGbE::TxDescCache::pktEvent

Definition at line 449 of file i8254xGBe.hh.

◆ pktMultiDesc

bool gem5::IGbE::TxDescCache::pktMultiDesc
protected

Definition at line 386 of file i8254xGBe.hh.

Referenced by packetMultiDesc().

◆ pktWaiting

bool gem5::IGbE::TxDescCache::pktWaiting
protected

Definition at line 385 of file i8254xGBe.hh.

Referenced by packetWaiting().

◆ tsoCopyBytes

Addr gem5::IGbE::TxDescCache::tsoCopyBytes
protected

Definition at line 404 of file i8254xGBe.hh.

◆ tsoDescBytesUsed

Addr gem5::IGbE::TxDescCache::tsoDescBytesUsed
protected

Definition at line 403 of file i8254xGBe.hh.

◆ tsoHeader

uint8_t gem5::IGbE::TxDescCache::tsoHeader[256]
protected

Definition at line 402 of file i8254xGBe.hh.

◆ tsoHeaderLen

Addr gem5::IGbE::TxDescCache::tsoHeaderLen
protected

Definition at line 394 of file i8254xGBe.hh.

◆ tsoLoadedHeader

bool gem5::IGbE::TxDescCache::tsoLoadedHeader
protected

Definition at line 400 of file i8254xGBe.hh.

◆ tsoMss

Addr gem5::IGbE::TxDescCache::tsoMss
protected

Definition at line 395 of file i8254xGBe.hh.

◆ tsoPktHasHeader

bool gem5::IGbE::TxDescCache::tsoPktHasHeader
protected

Definition at line 401 of file i8254xGBe.hh.

◆ tsoPktPayloadBytes

Addr gem5::IGbE::TxDescCache::tsoPktPayloadBytes
protected

Definition at line 399 of file i8254xGBe.hh.

◆ tsoPkts

int gem5::IGbE::TxDescCache::tsoPkts
protected

Definition at line 405 of file i8254xGBe.hh.

◆ tsoPrevSeq

Addr gem5::IGbE::TxDescCache::tsoPrevSeq
protected

Definition at line 398 of file i8254xGBe.hh.

◆ tsoTotalLen

Addr gem5::IGbE::TxDescCache::tsoTotalLen
protected

Definition at line 396 of file i8254xGBe.hh.

◆ tsoUsedLen

Addr gem5::IGbE::TxDescCache::tsoUsedLen
protected

Definition at line 397 of file i8254xGBe.hh.

◆ useTso

bool gem5::IGbE::TxDescCache::useTso
protected

Definition at line 393 of file i8254xGBe.hh.


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