Go to the documentation of this file.
33 #ifndef __DEV_NET_I8254XGBE_HH__
34 #define __DEV_NET_I8254XGBE_HH__
40 #include "debug/EthernetDesc.hh"
41 #include "debug/EthernetIntr.hh"
48 #include "params/IGbE.hh"
93 "Posting RXT interrupt because RDTR timer expired\n");
103 "Posting RXT interrupt because RADV timer expired\n");
113 "Posting TXDW interrupt because TADV timer expired\n");
123 "Posting TXDW interrupt because TIDV timer expired\n");
180 virtual long descLen()
const = 0;
450 "Completion writeback Addr: %#x enabled: %d\n",
459 DPRINTF(EthernetDesc,
"Completion writeback complete\n");
480 void init()
override;
517 #endif //__DEV_NET_I8254XGBE_HH__
long descLen() const override
void unserialize(CheckpointIn &cp) override
Unserialize an object.
virtual bool recvPacket(EthPacketPtr pkt)
long descTail() const override
bool scheduled() const
Determine if the current event is scheduled.
void fetchDescriptors()
Fetch a chunk of descriptors into the descriptor cache.
IGbEInt(const std::string &name, IGbE *d)
virtual long descLen() const =0
void postInterrupt(iGbReg::IntTypes t, bool now=false)
Write an interrupt into the interrupt pending register and check mask and interrupt limit timer befor...
std::string annSmFetch
Annotate sm.
@ Running
Running normally.
void fetchComplete()
Called by event when dma to read descriptors is completed.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
EthPacketPtr pktPtr
The packet that is currently being dmad to memory if any.
const PortID InvalidPortID
virtual void actionAfterWb()
void actionAfterWb() override
EventFunctionWrapper headerEvent
Basic support for object serialization.
EventFunctionWrapper wbEvent
bool packetAvailable()
Ask if the packet has been transfered so the state machine can give it to the fifo.
bool packetWaiting()
Ask if we are still waiting for the packet to be transfered.
bool ethRxPkt(EthPacketPtr packet)
uint64_t Tick
Tick count type.
EventFunctionWrapper nullEvent
IGbE(const Params *params)
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
std::string annUnusedDescQ
unsigned descUnused() const
EventFunctionWrapper rdtrEvent
unsigned int cacheBlockSize() const
EventFunctionWrapper pktDataEvent
void completionWriteback(Addr a, bool enabled)
bool hasOutstandingEvents() override
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
long descLen() const override
const Params * params() const
EventFunctionWrapper tidvEvent
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
EventFunctionWrapper fetchDelayEvent
virtual long descHead() const =0
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
RxDescCache(IGbE *i, std::string n, int s)
Addr descBase() const override
void serialize(CheckpointOut &cp) const override
Serialize an object.
void cpuClearInt()
Clear the interupt line to the cpu.
unsigned descLeft() const
void fetchAfterWb() override
DrainState
Object drain/handover states.
void serialize(CheckpointOut &cp) const override
Serialize an object.
Addr pciToDma(Addr a)
Shortcut for DMA address translation.
void getPacketData(EthPacketPtr p)
bool hasOutstandingEvents() override
unsigned bytesCopied
Bytes of packet that have been copied, so we know when to set EOP.
void serialize(CheckpointOut &cp) const override
Serialize an object.
void pktComplete()
Called by event when dma to write packet is completed.
void updateHead(long h) override
EventFunctionWrapper tadvEvent
Tick writeConfig(PacketPtr pkt) override
Write to the PCI config space data that is stored locally.
uint16_t flash[iGbReg::EEPROM_SIZE]
virtual void enableSm()=0
long descHead() const override
virtual Addr descBase() const =0
Ports are used to interface objects to each other.
EventFunctionWrapper pktHdrEvent
DescCache(IGbE *i, const std::string n, int s)
void wbComplete()
Called by event when dma to writeback descriptors is completed.
void writeback(Addr aMask)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
virtual long descTail() const =0
EventFunctionWrapper wbDelayEvent
void updateHead(long h) override
unsigned descInBlock(unsigned num_desc)
Return the number of dsecriptors in a cache block for threshold operations.
long descTail() const override
bool packetDone()
Check if the dma on the packet has completed and RX state machine can continue.
std::string annUsedCacheQ
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
TxDescCache(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.
EventFunctionWrapper interEvent
DrainState drainState() const
Return the current drain state of an object.
EventFunctionWrapper pktEvent
unsigned descUsed() const
std::shared_ptr< EthPacketData > EthPacketPtr
EventFunctionWrapper tickEvent
const std::string & name() const
Return port name (for DPRINTF).
void serialize(CheckpointOut &cp) const override
Serialize an object.
const SimObjectParams * _params
Cached copy of the object parameters.
void drainResume() override
Resume execution after a successful drain.
std::string annUnusedCacheQ
void areaChanged()
If the address/len/head change when we've got descriptors that are dirty that is very bad.
void chkInterrupt()
Check and see if changes to the mask register have caused an interrupt to need to be sent or perhaps ...
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
virtual bool hasOutstandingEvents()
void restartClock()
This function is used to restart the clock so it can handle things like draining and resume in one pl...
EventFunctionWrapper fetchEvent
virtual void updateHead(long h)=0
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...
EventFunctionWrapper radvEvent
std::ostream CheckpointOut
Addr descBase() const override
EventFunctionWrapper pktEvent
int splitCount
Variable to head with header/data completion events.
void checkDrain()
Check if all the draining things that need to occur have occured and handle the drain event if so.
void fetchAfterWb() override
void delayIntEvent()
Send an interrupt to the cpu.
void processContextDesc()
virtual void fetchAfterWb()=0
long descHead() const override
void pktComplete()
Called by event when dma to write packet is completed.
std::deque< T * > CacheType
Addr pciToDma(Addr pci_addr) const
bool packetMultiDesc()
Ask if this packet is composed of multiple descriptors so even if we've got data, we need to wait for...
const uint8_t EEPROM_SIZE
Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17