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::RxDescCache Class Reference
Inheritance diagram for IGbE::RxDescCache:
IGbE::DescCache< iGbReg::RxDesc > Serializable

Public Member Functions

 RxDescCache (IGbE *i, std::string n, int s)
 
int writePacket (EthPacketPtr packet, int pkt_offset)
 Write the given packet into the buffer(s) pointed to by the descriptor and update the book keeping. More...
 
void pktComplete ()
 Called by event when dma to write packet is completed. More...
 
bool packetDone ()
 Check if the dma on the packet has completed and RX state machine can continue. More...
 
void pktSplitDone ()
 
bool hasOutstandingEvents () override
 
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::RxDesc >
 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< RxDescCache,&RxDescCache::pktCompletepktEvent
 
EventWrapper< RxDescCache,&RxDescCache::pktSplitDonepktHdrEvent
 
EventWrapper< RxDescCache,&RxDescCache::pktSplitDonepktDataEvent
 
- Public Attributes inherited from IGbE::DescCache< iGbReg::RxDesc >
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 descLen () const override
 
long descTail () const override
 
void updateHead (long h) override
 
void enableSm () override
 
void fetchAfterWb () override
 
- Protected Member Functions inherited from IGbE::DescCache< iGbReg::RxDesc >
virtual void actionAfterWb ()
 
Addr pciToDma (Addr a)
 Shortcut for DMA address translation. More...
 

Protected Attributes

bool pktDone
 
int splitCount
 Variable to head with header/data completion events. More...
 
unsigned bytesCopied
 Bytes of packet that have been copied, so we know when to set EOP. More...
 
- Protected Attributes inherited from IGbE::DescCache< iGbReg::RxDesc >
CacheType usedCache
 
CacheType unusedCache
 
iGbReg::RxDescfetchBuf
 
iGbReg::RxDescwbBuf
 
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::RxDesc >
typedef std::deque
< iGbReg::RxDesc * > 
CacheType
 

Detailed Description

Definition at line 342 of file i8254xGBe.hh.

Constructor & Destructor Documentation

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

Member Function Documentation

Addr IGbE::RxDescCache::descBase ( ) const
inlineoverrideprotectedvirtual
long IGbE::RxDescCache::descHead ( ) const
inlineoverrideprotectedvirtual
long IGbE::RxDescCache::descLen ( ) const
inlineoverrideprotectedvirtual
long IGbE::RxDescCache::descTail ( ) const
inlineoverrideprotectedvirtual
void IGbE::RxDescCache::enableSm ( )
overrideprotectedvirtual

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

Definition at line 1497 of file i8254xGBe.cc.

References Draining.

void IGbE::RxDescCache::fetchAfterWb ( )
inlineoverrideprotectedvirtual
bool IGbE::RxDescCache::hasOutstandingEvents ( )
overridevirtual

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

Definition at line 1516 of file i8254xGBe.cc.

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

bool IGbE::RxDescCache::packetDone ( )

Check if the dma on the packet has completed and RX state machine can continue.

Definition at line 1506 of file i8254xGBe.cc.

Referenced by IGbE::rxStateMachine().

void IGbE::RxDescCache::pktComplete ( )
void IGbE::RxDescCache::pktSplitDone ( )

Definition at line 1213 of file i8254xGBe.cc.

References DPRINTF.

void IGbE::RxDescCache::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 1525 of file i8254xGBe.cc.

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

void IGbE::RxDescCache::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 1534 of file i8254xGBe.cc.

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

void IGbE::RxDescCache::updateHead ( long  h)
inlineoverrideprotectedvirtual
int IGbE::RxDescCache::writePacket ( EthPacketPtr  packet,
int  pkt_offset 
)

Write the given packet into the buffer(s) pointed to by the descriptor and update the book keeping.

Should only be called when there are no dma's pending.

Parameters
packetethernet packet to write
pkt_offsetbytes already copied from the packet to memory
Returns
pkt_offset + number of bytes copied during this call

Definition at line 1228 of file i8254xGBe.cc.

References iGbReg::RxDesc::adv_read, iGbReg::RxDesc::adv_wb, DPRINTF, Net::hsplit(), htole(), iGbReg::RxDesc::legacy, panic, PciDevice::pciToDma(), iGbReg::RXDT_ADV_ONEBUF, iGbReg::RXDT_ADV_SPLIT_A, and iGbReg::RXDT_LEGACY.

Referenced by IGbE::rxStateMachine().

Member Data Documentation

unsigned IGbE::RxDescCache::bytesCopied
protected

Bytes of packet that have been copied, so we know when to set EOP.

Definition at line 363 of file i8254xGBe.hh.

EventWrapper<RxDescCache, &RxDescCache::pktSplitDone> IGbE::RxDescCache::pktDataEvent

Definition at line 392 of file i8254xGBe.hh.

bool IGbE::RxDescCache::pktDone
protected

Definition at line 356 of file i8254xGBe.hh.

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

Definition at line 386 of file i8254xGBe.hh.

EventWrapper<RxDescCache, &RxDescCache::pktSplitDone> IGbE::RxDescCache::pktHdrEvent

Definition at line 391 of file i8254xGBe.hh.

int IGbE::RxDescCache::splitCount
protected

Variable to head with header/data completion events.

Definition at line 359 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