gem5  v20.1.0.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
IGbE::TxDescCache Class Reference
Inheritance diagram for IGbE::TxDescCache:
IGbE::DescCache< iGbReg::TxDesc > 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 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 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 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 IGbE::DescCache< iGbReg::TxDesc >
virtual Addr descBase () const=0
 
virtual long descHead () const=0
 
virtual long descTail () const=0
 
virtual long descLen () const=0
 
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 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 Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 Serializes all the SimObjects. More...
 
static void unserializeGlobals (CheckpointIn &cp)
 
- Protected Types inherited from IGbE::DescCache< iGbReg::TxDesc >
typedef std::deque< iGbReg::TxDesc * > CacheType
 

Detailed Description

Definition at line 359 of file i8254xGBe.hh.

Constructor & Destructor Documentation

◆ TxDescCache()

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

Definition at line 1497 of file i8254xGBe.cc.

References pktComplete().

Member Function Documentation

◆ actionAfterWb()

void IGbE::TxDescCache::actionAfterWb ( )
overrideprotectedvirtual

Reimplemented from IGbE::DescCache< iGbReg::TxDesc >.

Definition at line 1901 of file i8254xGBe.cc.

References DPRINTF, iGbReg::IT_TXDW, mbits(), and PciDevice::pciToDma().

◆ completionWriteback()

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

Definition at line 448 of file i8254xGBe.hh.

References ArmISA::a, completionAddress, completionEnabled, DPRINTF, and Stats::enabled().

Referenced by IGbE::write().

◆ descBase()

Addr IGbE::TxDescCache::descBase ( ) const
inlineoverrideprotected

◆ descHead()

long IGbE::TxDescCache::descHead ( ) const
inlineoverrideprotected

◆ descInBlock()

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

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

Definition at line 415 of file i8254xGBe.hh.

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

◆ descLen()

long IGbE::TxDescCache::descLen ( ) const
inlineoverrideprotected

◆ descTail()

long IGbE::TxDescCache::descTail ( ) const
inlineoverrideprotected

◆ enableSm()

void IGbE::TxDescCache::enableSm ( )
overrideprotectedvirtual

Implements IGbE::DescCache< iGbReg::TxDesc >.

Definition at line 1985 of file i8254xGBe.cc.

References Draining.

◆ fetchAfterWb()

void IGbE::TxDescCache::fetchAfterWb ( )
inlineoverrideprotectedvirtual

◆ getPacketData()

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

◆ getPacketSize()

unsigned 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 1618 of file i8254xGBe.cc.

References iGbReg::TxDesc::d1, iGbReg::TxDesc::d2, DPRINTF, iGbReg::TxdOp::getLen(), and MipsISA::p.

Referenced by IGbE::txStateMachine().

◆ hasOutstandingEvents()

bool IGbE::TxDescCache::hasOutstandingEvents ( )
overridevirtual

Reimplemented from IGbE::DescCache< iGbReg::TxDesc >.

Definition at line 1994 of file i8254xGBe.cc.

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

◆ headerComplete()

void IGbE::TxDescCache::headerComplete ( )

Definition at line 1593 of file i8254xGBe.cc.

References DPRINTF, and iGbReg::TxdOp::getLen().

◆ nullCallback()

void IGbE::TxDescCache::nullCallback ( )
inline

Definition at line 458 of file i8254xGBe.hh.

References DPRINTF.

◆ packetAvailable()

bool 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 1975 of file i8254xGBe.cc.

Referenced by IGbE::txStateMachine().

◆ packetMultiDesc()

bool 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 437 of file i8254xGBe.hh.

References pktMultiDesc.

Referenced by IGbE::txStateMachine().

◆ packetWaiting()

bool IGbE::TxDescCache::packetWaiting ( )
inline

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

Returns
packet still in transit.

Definition at line 429 of file i8254xGBe.hh.

References pktWaiting.

Referenced by IGbE::txStateMachine().

◆ pktComplete()

void IGbE::TxDescCache::pktComplete ( )

◆ processContextDesc()

void IGbE::TxDescCache::processContextDesc ( )

◆ serialize()

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

Serialize an object.

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

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 1917 of file i8254xGBe.cc.

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

◆ unserialize()

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

Unserialize an object.

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

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 1946 of file i8254xGBe.cc.

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

◆ updateHead()

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

Member Data Documentation

◆ completionAddress

Addr IGbE::TxDescCache::completionAddress
protected

Definition at line 380 of file i8254xGBe.hh.

Referenced by completionWriteback().

◆ completionEnabled

bool IGbE::TxDescCache::completionEnabled
protected

Definition at line 381 of file i8254xGBe.hh.

Referenced by completionWriteback().

◆ descEnd

uint32_t IGbE::TxDescCache::descEnd
protected

Definition at line 382 of file i8254xGBe.hh.

◆ headerEvent

EventFunctionWrapper IGbE::TxDescCache::headerEvent

Definition at line 445 of file i8254xGBe.hh.

◆ isTcp

bool IGbE::TxDescCache::isTcp
protected

Definition at line 377 of file i8254xGBe.hh.

◆ nullEvent

EventFunctionWrapper IGbE::TxDescCache::nullEvent

Definition at line 461 of file i8254xGBe.hh.

◆ pktDone

bool IGbE::TxDescCache::pktDone
protected

Definition at line 376 of file i8254xGBe.hh.

◆ pktEvent

EventFunctionWrapper IGbE::TxDescCache::pktEvent

Definition at line 442 of file i8254xGBe.hh.

◆ pktMultiDesc

bool IGbE::TxDescCache::pktMultiDesc
protected

Definition at line 379 of file i8254xGBe.hh.

Referenced by packetMultiDesc().

◆ pktWaiting

bool IGbE::TxDescCache::pktWaiting
protected

Definition at line 378 of file i8254xGBe.hh.

Referenced by packetWaiting().

◆ tsoCopyBytes

Addr IGbE::TxDescCache::tsoCopyBytes
protected

Definition at line 397 of file i8254xGBe.hh.

◆ tsoDescBytesUsed

Addr IGbE::TxDescCache::tsoDescBytesUsed
protected

Definition at line 396 of file i8254xGBe.hh.

◆ tsoHeader

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

Definition at line 395 of file i8254xGBe.hh.

◆ tsoHeaderLen

Addr IGbE::TxDescCache::tsoHeaderLen
protected

Definition at line 387 of file i8254xGBe.hh.

◆ tsoLoadedHeader

bool IGbE::TxDescCache::tsoLoadedHeader
protected

Definition at line 393 of file i8254xGBe.hh.

◆ tsoMss

Addr IGbE::TxDescCache::tsoMss
protected

Definition at line 388 of file i8254xGBe.hh.

◆ tsoPktHasHeader

bool IGbE::TxDescCache::tsoPktHasHeader
protected

Definition at line 394 of file i8254xGBe.hh.

◆ tsoPktPayloadBytes

Addr IGbE::TxDescCache::tsoPktPayloadBytes
protected

Definition at line 392 of file i8254xGBe.hh.

◆ tsoPkts

int IGbE::TxDescCache::tsoPkts
protected

Definition at line 398 of file i8254xGBe.hh.

◆ tsoPrevSeq

Addr IGbE::TxDescCache::tsoPrevSeq
protected

Definition at line 391 of file i8254xGBe.hh.

◆ tsoTotalLen

Addr IGbE::TxDescCache::tsoTotalLen
protected

Definition at line 389 of file i8254xGBe.hh.

◆ tsoUsedLen

Addr IGbE::TxDescCache::tsoUsedLen
protected

Definition at line 390 of file i8254xGBe.hh.

◆ useTso

bool IGbE::TxDescCache::useTso
protected

Definition at line 386 of file i8254xGBe.hh.


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

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