gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

EventWrapper< TxDescCache,&TxDescCache::pktCompletepktEvent
 
EventWrapper< TxDescCache,&TxDescCache::headerCompleteheaderEvent
 
EventWrapper< TxDescCache,&TxDescCache::nullCallbacknullEvent
 
- 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
 
EventWrapper< DescCache,&DescCache::writeback1 > wbDelayEvent
 
EventWrapper< DescCache,&DescCache::fetchDescriptors1 > fetchDelayEvent
 
EventWrapper< DescCache,&DescCache::fetchComplete > fetchEvent
 
EventWrapper< DescCache,&DescCache::wbComplete > 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 >
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 ()
 Get the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 
static void unserializeGlobals (CheckpointIn &cp)
 
- Static Public Attributes inherited from Serializable
static int ckptCount = 0
 
static int ckptMaxCount = 0
 
static int ckptPrevCount = -1
 
- Protected Types inherited from IGbE::DescCache< iGbReg::TxDesc >
typedef std::deque
< iGbReg::TxDesc * > 
CacheType
 

Detailed Description

Definition at line 403 of file i8254xGBe.hh.

Constructor & Destructor Documentation

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

Member Function Documentation

void IGbE::TxDescCache::actionAfterWb ( )
overrideprotectedvirtual

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

Definition at line 1955 of file i8254xGBe.cc.

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

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

Definition at line 492 of file i8254xGBe.hh.

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

Referenced by IGbE::write().

Addr IGbE::TxDescCache::descBase ( ) const
inlineoverrideprotectedvirtual
long IGbE::TxDescCache::descHead ( ) const
inlineoverrideprotectedvirtual
unsigned IGbE::TxDescCache::descInBlock ( unsigned  num_desc)
inline

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

Definition at line 459 of file i8254xGBe.hh.

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

long IGbE::TxDescCache::descLen ( ) const
inlineoverrideprotectedvirtual
long IGbE::TxDescCache::descTail ( ) const
inlineoverrideprotectedvirtual
void IGbE::TxDescCache::enableSm ( )
overrideprotectedvirtual

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

Definition at line 2039 of file i8254xGBe.cc.

References Draining.

void IGbE::TxDescCache::fetchAfterWb ( )
inlineoverrideprotectedvirtual
void IGbE::TxDescCache::getPacketData ( EthPacketPtr  p)
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 1666 of file i8254xGBe.cc.

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

Referenced by IGbE::txStateMachine().

bool IGbE::TxDescCache::hasOutstandingEvents ( )
overridevirtual

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

Definition at line 2048 of file i8254xGBe.cc.

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

void IGbE::TxDescCache::headerComplete ( )

Definition at line 1641 of file i8254xGBe.cc.

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

void IGbE::TxDescCache::nullCallback ( )
inline

Definition at line 502 of file i8254xGBe.hh.

References DPRINTF.

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

Referenced by IGbE::txStateMachine().

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

References pktMultiDesc.

Referenced by IGbE::txStateMachine().

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

References pktWaiting.

Referenced by IGbE::txStateMachine().

void IGbE::TxDescCache::pktComplete ( )
void IGbE::TxDescCache::processContextDesc ( )
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 1971 of file i8254xGBe.cc.

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

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

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

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

Member Data Documentation

Addr IGbE::TxDescCache::completionAddress
protected

Definition at line 424 of file i8254xGBe.hh.

Referenced by completionWriteback().

bool IGbE::TxDescCache::completionEnabled
protected

Definition at line 425 of file i8254xGBe.hh.

Referenced by completionWriteback().

uint32_t IGbE::TxDescCache::descEnd
protected

Definition at line 426 of file i8254xGBe.hh.

EventWrapper<TxDescCache, &TxDescCache::headerComplete> IGbE::TxDescCache::headerEvent

Definition at line 489 of file i8254xGBe.hh.

bool IGbE::TxDescCache::isTcp
protected

Definition at line 421 of file i8254xGBe.hh.

EventWrapper<TxDescCache, &TxDescCache::nullCallback> IGbE::TxDescCache::nullEvent

Definition at line 505 of file i8254xGBe.hh.

bool IGbE::TxDescCache::pktDone
protected

Definition at line 420 of file i8254xGBe.hh.

EventWrapper<TxDescCache, &TxDescCache::pktComplete> IGbE::TxDescCache::pktEvent

Definition at line 486 of file i8254xGBe.hh.

bool IGbE::TxDescCache::pktMultiDesc
protected

Definition at line 423 of file i8254xGBe.hh.

Referenced by packetMultiDesc().

bool IGbE::TxDescCache::pktWaiting
protected

Definition at line 422 of file i8254xGBe.hh.

Referenced by packetWaiting().

Addr IGbE::TxDescCache::tsoCopyBytes
protected

Definition at line 441 of file i8254xGBe.hh.

Addr IGbE::TxDescCache::tsoDescBytesUsed
protected

Definition at line 440 of file i8254xGBe.hh.

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

Definition at line 439 of file i8254xGBe.hh.

Addr IGbE::TxDescCache::tsoHeaderLen
protected

Definition at line 431 of file i8254xGBe.hh.

bool IGbE::TxDescCache::tsoLoadedHeader
protected

Definition at line 437 of file i8254xGBe.hh.

Addr IGbE::TxDescCache::tsoMss
protected

Definition at line 432 of file i8254xGBe.hh.

bool IGbE::TxDescCache::tsoPktHasHeader
protected

Definition at line 438 of file i8254xGBe.hh.

Addr IGbE::TxDescCache::tsoPktPayloadBytes
protected

Definition at line 436 of file i8254xGBe.hh.

int IGbE::TxDescCache::tsoPkts
protected

Definition at line 442 of file i8254xGBe.hh.

Addr IGbE::TxDescCache::tsoPrevSeq
protected

Definition at line 435 of file i8254xGBe.hh.

Addr IGbE::TxDescCache::tsoTotalLen
protected

Definition at line 433 of file i8254xGBe.hh.

Addr IGbE::TxDescCache::tsoUsedLen
protected

Definition at line 434 of file i8254xGBe.hh.

bool IGbE::TxDescCache::useTso
protected

Definition at line 430 of file i8254xGBe.hh.


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

Generated on Fri Jun 9 2017 13:04:13 for gem5 by doxygen 1.8.6