gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
IGbE::DescCache< T > Class Template Referenceabstract
Inheritance diagram for IGbE::DescCache< T >:
Serializable

Public Member Functions

 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...
 
virtual bool hasOutstandingEvents ()
 
- 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

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::writeback1wbDelayEvent
 
EventWrapper< DescCache,&DescCache::fetchDescriptors1fetchDelayEvent
 
EventWrapper< DescCache,&DescCache::fetchCompletefetchEvent
 
EventWrapper< DescCache,&DescCache::wbCompletewbEvent
 

Protected Types

typedef std::deque< T * > CacheType
 

Protected Member Functions

virtual Addr descBase () const =0
 
virtual long descHead () const =0
 
virtual long descTail () const =0
 
virtual long descLen () const =0
 
virtual void updateHead (long h)=0
 
virtual void enableSm ()=0
 
virtual void actionAfterWb ()
 
virtual void fetchAfterWb ()=0
 
Addr pciToDma (Addr a)
 Shortcut for DMA address translation. More...
 

Protected Attributes

CacheType usedCache
 
CacheType unusedCache
 
T * fetchBuf
 
T * wbBuf
 
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
 

Detailed Description

template<class T>
class IGbE::DescCache< T >

Definition at line 218 of file i8254xGBe.hh.

Member Typedef Documentation

template<class T>
typedef std::deque<T *> IGbE::DescCache< T >::CacheType
protected

Definition at line 230 of file i8254xGBe.hh.

Constructor & Destructor Documentation

template<class T >
IGbE::DescCache< T >::DescCache ( IGbE i,
const std::string  n,
int  s 
)
template<class T >
IGbE::DescCache< T >::~DescCache ( )
virtual

Definition at line 836 of file i8254xGBe.cc.

References reset.

Member Function Documentation

template<class T>
virtual void IGbE::DescCache< T >::actionAfterWb ( )
inlineprotectedvirtual

Reimplemented in IGbE::TxDescCache.

Definition at line 227 of file i8254xGBe.hh.

template<class T >
void IGbE::DescCache< T >::areaChanged ( )

If the address/len/head change when we've got descriptors that are dirty that is very bad.

This function checks that we don't and if we do panics.

Definition at line 845 of file i8254xGBe.cc.

References panic, and reset.

Referenced by IGbE::write().

template<class T>
virtual Addr IGbE::DescCache< T >::descBase ( ) const
protectedpure virtual

Implemented in IGbE::TxDescCache, and IGbE::RxDescCache.

template<class T>
virtual long IGbE::DescCache< T >::descHead ( ) const
protectedpure virtual

Implemented in IGbE::TxDescCache, and IGbE::RxDescCache.

template<class T>
unsigned IGbE::DescCache< T >::descLeft ( ) const
inline

Definition at line 309 of file i8254xGBe.hh.

Referenced by IGbE::ethTxDone(), IGbE::rxStateMachine(), and IGbE::txStateMachine().

template<class T>
virtual long IGbE::DescCache< T >::descLen ( ) const
protectedpure virtual
template<class T>
virtual long IGbE::DescCache< T >::descTail ( ) const
protectedpure virtual
template<class T>
unsigned IGbE::DescCache< T >::descUnused ( ) const
inline

Definition at line 325 of file i8254xGBe.hh.

Referenced by IGbE::rxStateMachine(), and IGbE::txStateMachine().

template<class T>
unsigned IGbE::DescCache< T >::descUsed ( ) const
inline

Definition at line 322 of file i8254xGBe.hh.

Referenced by IGbE::rxStateMachine().

template<class T>
virtual void IGbE::DescCache< T >::enableSm ( )
protectedpure virtual

Implemented in IGbE::TxDescCache, and IGbE::RxDescCache.

template<class T>
virtual void IGbE::DescCache< T >::fetchAfterWb ( )
protectedpure virtual

Implemented in IGbE::TxDescCache, and IGbE::RxDescCache.

template<class T >
void IGbE::DescCache< T >::fetchComplete ( )

Called by event when dma to read descriptors is completed.

Definition at line 1012 of file i8254xGBe.cc.

References DPRINTF, CPA::FL_WAIT, X86ISA::size(), and X86ISA::x.

template<class T >
void IGbE::DescCache< T >::fetchDescriptors ( )

Fetch a chunk of descriptors into the descriptor cache.

Calls fetchComplete when the memory system returns the data

Definition at line 938 of file i8254xGBe.cc.

References curTick(), DPRINTF, and X86ISA::size().

Referenced by IGbE::rxStateMachine(), IGbE::txStateMachine(), and IGbE::write().

template<class T >
void IGbE::DescCache< T >::fetchDescriptors1 ( )

Definition at line 990 of file i8254xGBe.cc.

References curTick(), DPRINTF, PciDevice::pciToDma(), and Running.

template<class T>
virtual bool IGbE::DescCache< T >::hasOutstandingEvents ( )
inlinevirtual

Reimplemented in IGbE::TxDescCache, and IGbE::RxDescCache.

Definition at line 335 of file i8254xGBe.hh.

template<class T>
std::string IGbE::DescCache< T >::name ( )
inline

Definition at line 276 of file i8254xGBe.hh.

template<class T>
Addr IGbE::DescCache< T >::pciToDma ( Addr  a)
inlineprotected

Shortcut for DMA address translation.

Definition at line 266 of file i8254xGBe.hh.

template<class T >
void IGbE::DescCache< T >::reset ( )

Definition at line 1107 of file i8254xGBe.cc.

References DPRINTF, and X86ISA::x.

Referenced by IGbE::write().

template<class T >
void IGbE::DescCache< T >::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 1124 of file i8254xGBe.cc.

References arrayParamOut(), csprintf(), SERIALIZE_SCALAR, and X86ISA::x.

Referenced by IGbE::RxDescCache::serialize(), and IGbE::TxDescCache::serialize().

template<class T >
void IGbE::DescCache< T >::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 1159 of file i8254xGBe.cc.

References arrayParamIn(), csprintf(), UNSERIALIZE_SCALAR, and X86ISA::x.

Referenced by IGbE::RxDescCache::unserialize(), and IGbE::TxDescCache::unserialize().

template<class T>
virtual void IGbE::DescCache< T >::updateHead ( long  h)
protectedpure virtual

Implemented in IGbE::TxDescCache, and IGbE::RxDescCache.

template<class T >
void IGbE::DescCache< T >::wbComplete ( )

Called by event when dma to writeback descriptors is completed.

Definition at line 1056 of file i8254xGBe.cc.

References DPRINTF, CPA::FL_WAIT, ArmISA::writeback, and X86ISA::x.

template<class T >
void IGbE::DescCache< T >::writeback ( Addr  aMask)
template<class T >
void IGbE::DescCache< T >::writeback1 ( )

Definition at line 909 of file i8254xGBe.cc.

References curTick(), DPRINTF, PciDevice::pciToDma(), Running, and X86ISA::x.

Member Data Documentation

template<class T>
std::string IGbE::DescCache< T >::_name
protected

Definition at line 241 of file i8254xGBe.hh.

Referenced by IGbE::DescCache< iGbReg::RxDesc >::name().

template<class T>
std::string IGbE::DescCache< T >::annDescQ

Definition at line 270 of file i8254xGBe.hh.

template<class T>
std::string IGbE::DescCache< T >::annSmFetch

Annotate sm.

Definition at line 270 of file i8254xGBe.hh.

template<class T>
std::string IGbE::DescCache< T >::annSmWb

Definition at line 270 of file i8254xGBe.hh.

template<class T>
std::string IGbE::DescCache< T >::annUnusedCacheQ

Definition at line 270 of file i8254xGBe.hh.

Referenced by IGbE::rxStateMachine(), and IGbE::txStateMachine().

template<class T>
std::string IGbE::DescCache< T >::annUnusedDescQ

Definition at line 270 of file i8254xGBe.hh.

template<class T>
std::string IGbE::DescCache< T >::annUsedCacheQ

Definition at line 270 of file i8254xGBe.hh.

template<class T>
std::string IGbE::DescCache< T >::annUsedDescQ

Definition at line 270 of file i8254xGBe.hh.

template<class T>
int IGbE::DescCache< T >::cachePnt
protected

Definition at line 244 of file i8254xGBe.hh.

Referenced by IGbE::DescCache< iGbReg::RxDesc >::descLeft().

template<class T>
int IGbE::DescCache< T >::curFetching
protected

Definition at line 250 of file i8254xGBe.hh.

template<class T>
T* IGbE::DescCache< T >::fetchBuf
protected

Definition at line 234 of file i8254xGBe.hh.

Referenced by IGbE::DescCache< T >::DescCache().

template<class T>
EventWrapper<DescCache, &DescCache::fetchDescriptors1> IGbE::DescCache< T >::fetchDelayEvent

Definition at line 293 of file i8254xGBe.hh.

template<class T>
EventWrapper<DescCache, &DescCache::fetchComplete> IGbE::DescCache< T >::fetchEvent
template<class T>
IGbE* IGbE::DescCache< T >::igbe
protected

Definition at line 238 of file i8254xGBe.hh.

Referenced by IGbE::DescCache< iGbReg::RxDesc >::pciToDma().

template<class T>
bool IGbE::DescCache< T >::moreToWb
protected

Definition at line 257 of file i8254xGBe.hh.

template<class T>
EthPacketPtr IGbE::DescCache< T >::pktPtr
protected

The packet that is currently being dmad to memory if any.

Definition at line 263 of file i8254xGBe.hh.

template<class T>
int IGbE::DescCache< T >::size
protected

Definition at line 247 of file i8254xGBe.hh.

Referenced by IGbE::DescCache< T >::DescCache().

template<class T>
CacheType IGbE::DescCache< T >::unusedCache
protected
template<class T>
CacheType IGbE::DescCache< T >::usedCache
protected

Definition at line 231 of file i8254xGBe.hh.

Referenced by IGbE::DescCache< iGbReg::RxDesc >::descUsed().

template<class T>
Addr IGbE::DescCache< T >::wbAlignment
protected

Definition at line 260 of file i8254xGBe.hh.

template<class T>
T* IGbE::DescCache< T >::wbBuf
protected

Definition at line 235 of file i8254xGBe.hh.

Referenced by IGbE::DescCache< T >::DescCache().

template<class T>
EventWrapper<DescCache, &DescCache::writeback1> IGbE::DescCache< T >::wbDelayEvent

Definition at line 286 of file i8254xGBe.hh.

template<class T>
EventWrapper<DescCache, &DescCache::wbComplete> IGbE::DescCache< T >::wbEvent
template<class T>
int IGbE::DescCache< T >::wbOut
protected

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