gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
i8254xGBe.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2006 The Regents of The University of Michigan
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  * Authors: Ali Saidi
29  */
30 
31 /* @file
32  * Device model for Intel's 8254x line of gigabit ethernet controllers.
33  */
34 
35 #ifndef __DEV_NET_I8254XGBE_HH__
36 #define __DEV_NET_I8254XGBE_HH__
37 
38 #include <deque>
39 #include <string>
40 
41 #include "base/cp_annotate.hh"
42 #include "base/inet.hh"
43 #include "debug/EthernetDesc.hh"
44 #include "debug/EthernetIntr.hh"
45 #include "dev/net/etherdevice.hh"
46 #include "dev/net/etherint.hh"
47 #include "dev/net/etherpkt.hh"
49 #include "dev/net/pktfifo.hh"
50 #include "dev/pci/device.hh"
51 #include "params/IGbE.hh"
52 #include "sim/eventq.hh"
53 
54 class IGbEInt;
55 
56 class IGbE : public EtherDevice
57 {
58  private:
60  CPA *cpa;
61 
62  // device registers
64 
65  // eeprom data, status and control bits
67  uint8_t eeOpcode, eeAddr;
69 
70  // packet fifos
73 
74  // Packet that we are currently putting into the txFifo
76 
77  // Should to Rx/Tx State machine tick?
78  bool rxTick;
79  bool txTick;
80  bool txFifoTick;
81 
83 
84  // Number of bytes copied from current RX packet
85  unsigned pktOffset;
86 
87  // Delays in managaging descriptors
91 
92  // Event and function to deal with RDTR timer expiring
93  void rdtrProcess() {
95  DPRINTF(EthernetIntr,
96  "Posting RXT interrupt because RDTR timer expired\n");
98  }
99 
100  //friend class EventWrapper<IGbE, &IGbE::rdtrProcess>;
102 
103  // Event and function to deal with RADV timer expiring
104  void radvProcess() {
106  DPRINTF(EthernetIntr,
107  "Posting RXT interrupt because RADV timer expired\n");
109  }
110 
111  //friend class EventWrapper<IGbE, &IGbE::radvProcess>;
113 
114  // Event and function to deal with TADV timer expiring
115  void tadvProcess() {
117  DPRINTF(EthernetIntr,
118  "Posting TXDW interrupt because TADV timer expired\n");
120  }
121 
122  //friend class EventWrapper<IGbE, &IGbE::tadvProcess>;
124 
125  // Event and function to deal with TIDV timer expiring
126  void tidvProcess() {
128  DPRINTF(EthernetIntr,
129  "Posting TXDW interrupt because TIDV timer expired\n");
131  }
132  //friend class EventWrapper<IGbE, &IGbE::tidvProcess>;
134 
135  // Main event to tick the device
136  void tick();
137  //friend class EventWrapper<IGbE, &IGbE::tick>;
139 
140 
141  uint64_t macAddr;
142 
143  void rxStateMachine();
144  void txStateMachine();
145  void txWire();
146 
152  void postInterrupt(iGbReg::IntTypes t, bool now = false);
153 
157  void chkInterrupt();
158 
161  void delayIntEvent();
162  void cpuPostInt();
163  // Event to moderate interrupts
165 
168  void cpuClearInt();
169 
170  Tick intClock() { return SimClock::Int::ns * 1024; }
171 
174  void restartClock();
175 
179  void checkDrain();
180 
181  void anBegin(std::string sm, std::string st, int flags = CPA::FL_NONE) {
182  if (cpa)
183  cpa->hwBegin((CPA::flags)flags, sys, macAddr, sm, st);
184  }
185 
186  void anQ(std::string sm, std::string q) {
187  if (cpa)
188  cpa->hwQ(CPA::FL_NONE, sys, macAddr, sm, q, macAddr);
189  }
190 
191  void anDq(std::string sm, std::string q) {
192  if (cpa)
193  cpa->hwDq(CPA::FL_NONE, sys, macAddr, sm, q, macAddr);
194  }
195 
196  void anPq(std::string sm, std::string q, int num = 1) {
197  if (cpa)
198  cpa->hwPq(CPA::FL_NONE, sys, macAddr, sm, q, macAddr, NULL, num);
199  }
200 
201  void anRq(std::string sm, std::string q, int num = 1) {
202  if (cpa)
203  cpa->hwRq(CPA::FL_NONE, sys, macAddr, sm, q, macAddr, NULL, num);
204  }
205 
206  void anWe(std::string sm, std::string q) {
207  if (cpa)
208  cpa->hwWe(CPA::FL_NONE, sys, macAddr, sm, q, macAddr);
209  }
210 
211  void anWf(std::string sm, std::string q) {
212  if (cpa)
213  cpa->hwWf(CPA::FL_NONE, sys, macAddr, sm, q, macAddr);
214  }
215 
216 
217  template<class T>
218  class DescCache : public Serializable
219  {
220  protected:
221  virtual Addr descBase() const = 0;
222  virtual long descHead() const = 0;
223  virtual long descTail() const = 0;
224  virtual long descLen() const = 0;
225  virtual void updateHead(long h) = 0;
226  virtual void enableSm() = 0;
227  virtual void actionAfterWb() {}
228  virtual void fetchAfterWb() = 0;
229 
233 
235  T *wbBuf;
236 
237  // Pointer to the device we cache for
239 
240  // Name of this descriptor cache
241  std::string _name;
242 
243  // How far we've cached
244  int cachePnt;
245 
246  // The size of the descriptor cache
247  int size;
248 
249  // How many descriptors we are currently fetching
251 
252  // How many descriptors we are currently writing back
253  int wbOut;
254 
255  // if the we wrote back to the end of the descriptor ring and are going
256  // to have to wrap and write more
257  bool moreToWb;
258 
259  // What the alignment is of the next descriptor writeback
261 
264 
266  Addr pciToDma(Addr a) { return igbe->pciToDma(a); }
267 
268  public:
272 
273  DescCache(IGbE *i, const std::string n, int s);
274  virtual ~DescCache();
275 
276  std::string name() { return _name; }
277 
282  void areaChanged();
283 
284  void writeback(Addr aMask);
285  void writeback1();
287 
291  void fetchDescriptors();
292  void fetchDescriptors1();
294 
297  void fetchComplete();
299 
302  void wbComplete();
304 
305  /* Return the number of descriptors left in the ring, so the device has
306  * a way to figure out if it needs to interrupt.
307  */
308  unsigned
309  descLeft() const
310  {
311  unsigned left = unusedCache.size();
312  if (cachePnt > descTail())
313  left += (descLen() - cachePnt + descTail());
314  else
315  left += (descTail() - cachePnt);
316 
317  return left;
318  }
319 
320  /* Return the number of descriptors used and not written back.
321  */
322  unsigned descUsed() const { return usedCache.size(); }
323 
324  /* Return the number of cache unused descriptors we have. */
325  unsigned descUnused() const { return unusedCache.size(); }
326 
327  /* Get into a state where the descriptor address/head/etc colud be
328  * changed */
329  void reset();
330 
331 
332  void serialize(CheckpointOut &cp) const override;
333  void unserialize(CheckpointIn &cp) override;
334 
335  virtual bool hasOutstandingEvents() {
336  return wbEvent.scheduled() || fetchEvent.scheduled();
337  }
338 
339  };
340 
341 
342  class RxDescCache : public DescCache<iGbReg::RxDesc>
343  {
344  protected:
345  Addr descBase() const override { return igbe->regs.rdba(); }
346  long descHead() const override { return igbe->regs.rdh(); }
347  long descLen() const override { return igbe->regs.rdlen() >> 4; }
348  long descTail() const override { return igbe->regs.rdt(); }
349  void updateHead(long h) override { igbe->regs.rdh(h); }
350  void enableSm() override;
351  void fetchAfterWb() override {
354  }
355 
356  bool pktDone;
357 
360 
363  unsigned bytesCopied;
364 
365  public:
366  RxDescCache(IGbE *i, std::string n, int s);
367 
375  int writePacket(EthPacketPtr packet, int pkt_offset);
376 
379  void pktComplete();
380 
384  bool packetDone();
385 
387 
388  // Event to handle issuing header and data write at the same time
389  // and only callking pktComplete() when both are completed
390  void pktSplitDone();
393 
394  bool hasOutstandingEvents() override;
395 
396  void serialize(CheckpointOut &cp) const override;
397  void unserialize(CheckpointIn &cp) override;
398  };
399  friend class RxDescCache;
400 
402 
403  class TxDescCache : public DescCache<iGbReg::TxDesc>
404  {
405  protected:
406  Addr descBase() const override { return igbe->regs.tdba(); }
407  long descHead() const override { return igbe->regs.tdh(); }
408  long descTail() const override { return igbe->regs.tdt(); }
409  long descLen() const override { return igbe->regs.tdlen() >> 4; }
410  void updateHead(long h) override { igbe->regs.tdh(h); }
411  void enableSm() override;
412  void actionAfterWb() override;
413  void fetchAfterWb() override {
416  }
417 
418 
419 
420  bool pktDone;
421  bool isTcp;
426  uint32_t descEnd;
427 
428 
429  // tso variables
430  bool useTso;
439  uint8_t tsoHeader[256];
442  int tsoPkts;
443 
444  public:
445  TxDescCache(IGbE *i, std::string n, int s);
446 
451  unsigned getPacketSize(EthPacketPtr p);
453  void processContextDesc();
454 
458  unsigned
459  descInBlock(unsigned num_desc)
460  {
461  return num_desc / igbe->cacheBlockSize() / sizeof(iGbReg::TxDesc);
462  }
463 
468  bool packetAvailable();
469 
473  bool packetWaiting() { return pktWaiting; }
474 
481  bool packetMultiDesc() { return pktMultiDesc;}
482 
485  void pktComplete();
487 
488  void headerComplete();
490 
491 
493  DPRINTF(EthernetDesc,
494  "Completion writeback Addr: %#x enabled: %d\n",
495  a, enabled);
498  }
499 
500  bool hasOutstandingEvents() override;
501 
502  void nullCallback() {
503  DPRINTF(EthernetDesc, "Completion writeback complete\n");
504  }
506 
507  void serialize(CheckpointOut &cp) const override;
508  void unserialize(CheckpointIn &cp) override;
509  };
510 
511  friend class TxDescCache;
512 
514 
515  public:
516  typedef IGbEParams Params;
517  const Params *
518  params() const {
519  return dynamic_cast<const Params *>(_params);
520  }
521 
522  IGbE(const Params *params);
523  ~IGbE();
524  void init() override;
525 
526  EtherInt *getEthPort(const std::string &if_name, int idx) override;
527 
529 
530  Tick read(PacketPtr pkt) override;
531  Tick write(PacketPtr pkt) override;
532 
533  Tick writeConfig(PacketPtr pkt) override;
534 
535  bool ethRxPkt(EthPacketPtr packet);
536  void ethTxDone();
537 
538  void serialize(CheckpointOut &cp) const override;
539  void unserialize(CheckpointIn &cp) override;
540 
541  DrainState drain() override;
542  void drainResume() override;
543 
544 };
545 
546 class IGbEInt : public EtherInt
547 {
548  private:
550 
551  public:
552  IGbEInt(const std::string &name, IGbE *d)
553  : EtherInt(name), dev(d)
554  { }
555 
556  virtual bool recvPacket(EthPacketPtr pkt) { return dev->ethRxPkt(pkt); }
557  virtual void sendDone() { dev->ethTxDone(); }
558 };
559 
560 #endif //__DEV_NET_I8254XGBE_HH__
#define DPRINTF(x,...)
Definition: trace.hh:212
void anQ(std::string sm, std::string q)
Definition: i8254xGBe.hh:186
virtual long descHead() const =0
EventWrapper< RxDescCache,&RxDescCache::pktSplitDone > pktHdrEvent
Definition: i8254xGBe.hh:391
void hwDq(flags f, System *sys, uint64_t frame, std::string sm, std::string q, uint64_t qid, System *q_sys=NULL, int32_t count=1)
Definition: cp_annotate.hh:109
void processContextDesc()
Definition: i8254xGBe.cc:1564
TxDescCache txDescCache
Definition: i8254xGBe.hh:513
long descTail() const override
Definition: i8254xGBe.hh:348
void pktComplete()
Called by event when dma to write packet is completed.
Definition: i8254xGBe.cc:1336
unsigned descUsed() const
Definition: i8254xGBe.hh:322
IGbEInt * etherInt
Definition: i8254xGBe.hh:59
unsigned pktOffset
Definition: i8254xGBe.hh:85
uint64_t macAddr
Definition: i8254xGBe.hh:141
void rdtrProcess()
Definition: i8254xGBe.hh:93
void txStateMachine()
Definition: i8254xGBe.cc:2118
IGbEInt(const std::string &name, IGbE *d)
Definition: i8254xGBe.hh:552
Bitfield< 7 > i
Definition: miscregs.hh:1378
unsigned descInBlock(unsigned num_desc)
Return the number of dsecriptors in a cache block for threshold operations.
Definition: i8254xGBe.hh:459
DrainState
Object drain/handover states.
Definition: drain.hh:71
void chkInterrupt()
Check and see if changes to the mask register have caused an interrupt to need to be sent or perhaps ...
Definition: i8254xGBe.cc:791
std::string annSmWb
Definition: i8254xGBe.hh:270
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: i8254xGBe.cc:1124
TxDescCache(IGbE *i, std::string n, int s)
Definition: i8254xGBe.cc:1545
unsigned bytesCopied
Bytes of packet that have been copied, so we know when to set EOP.
Definition: i8254xGBe.hh:363
Bitfield< 8 > a
Definition: miscregs.hh:1377
void hwQ(flags f, System *sys, uint64_t frame, std::string sm, std::string q, uint64_t qid, System *q_sys=NULL, int32_t count=1)
Definition: cp_annotate.hh:106
virtual Addr descBase() const =0
void enableSm() override
Definition: i8254xGBe.cc:1497
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: i8254xGBe.cc:1159
virtual void fetchAfterWb()=0
void restartClock()
This function is used to restart the clock so it can handle things like draining and resume in one pl...
Definition: i8254xGBe.cc:2058
virtual bool recvPacket(EthPacketPtr pkt)
Definition: i8254xGBe.hh:556
int eeOpBits
Definition: i8254xGBe.hh:66
CacheType unusedCache
Definition: i8254xGBe.hh:232
EventWrapper< DescCache,&DescCache::writeback1 > wbDelayEvent
Definition: i8254xGBe.hh:286
void hwWe(flags f, System *sys, uint64_t frame, std::string sm, std::string q, uint64_t qid, System *q_sys=NULL, int32_t count=1)
Definition: cp_annotate.hh:121
DescCache(IGbE *i, const std::string n, int s)
Definition: i8254xGBe.cc:825
void rxStateMachine()
Definition: i8254xGBe.cc:2268
bool packetDone()
Check if the dma on the packet has completed and RX state machine can continue.
Definition: i8254xGBe.cc:1506
void writeback(Addr aMask)
Definition: i8254xGBe.cc:855
Addr descBase() const override
Definition: i8254xGBe.hh:406
virtual long descTail() const =0
Addr pciToDma(Addr pci_addr) const
Definition: device.hh:189
Tick rxWriteDelay
Definition: i8254xGBe.hh:90
std::string annSmFetch
Annotate sm.
Definition: i8254xGBe.hh:270
EventWrapper< TxDescCache,&TxDescCache::nullCallback > nullEvent
Definition: i8254xGBe.hh:505
EventWrapper< TxDescCache,&TxDescCache::pktComplete > pktEvent
Definition: i8254xGBe.hh:486
virtual void enableSm()=0
PacketFifo rxFifo
Definition: i8254xGBe.hh:71
void hwBegin(flags f, System *sys, uint64_t frame, std::string sm, std::string st)
Definition: cp_annotate.hh:104
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...
Definition: i8254xGBe.cc:1666
Tick wbDelay
Definition: i8254xGBe.hh:88
Bitfield< 31 > n
Definition: miscregs.hh:1636
void wbComplete()
Called by event when dma to writeback descriptors is completed.
Definition: i8254xGBe.cc:1056
void updateHead(long h) override
Definition: i8254xGBe.hh:410
void fetchAfterWb() override
Definition: i8254xGBe.hh:351
void anRq(std::string sm, std::string q, int num=1)
Definition: i8254xGBe.hh:201
void delayIntEvent()
Send an interrupt to the cpu.
Definition: i8254xGBe.cc:728
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: i8254xGBe.cc:1971
long descHead() const override
Definition: i8254xGBe.hh:407
virtual void actionAfterWb()
Definition: i8254xGBe.hh:227
EtherInt * getEthPort(const std::string &if_name, int idx) override
Additional function to return the Port of a memory object.
Definition: i8254xGBe.cc:139
void drainResume() override
Resume execution after a successful drain.
Definition: i8254xGBe.cc:2089
void anWf(std::string sm, std::string q)
Definition: i8254xGBe.hh:211
uint8_t eeAddr
Definition: i8254xGBe.hh:67
uint8_t eeOpcode
Definition: i8254xGBe.hh:67
void updateHead(long h) override
Definition: i8254xGBe.hh:349
IGbE * dev
Definition: i8254xGBe.hh:549
void postInterrupt(iGbReg::IntTypes t, bool now=false)
Write an interrupt into the interrupt pending register and check mask and interrupt limit timer befor...
Definition: i8254xGBe.cc:695
void anWe(std::string sm, std::string q)
Definition: i8254xGBe.hh:206
Bitfield< 4 > s
Definition: miscregs.hh:1738
uint8_t tsoHeader[256]
Definition: i8254xGBe.hh:439
EventWrapper< IGbE,&IGbE::delayIntEvent > interEvent
Definition: i8254xGBe.hh:164
long descTail() const override
Definition: i8254xGBe.hh:408
EventWrapper< DescCache,&DescCache::wbComplete > wbEvent
Definition: i8254xGBe.hh:303
DmaDeviceParams Params
Definition: dma_device.hh:160
uint64_t Tick
Tick count type.
Definition: types.hh:63
bool packetWaiting()
Ask if we are still waiting for the packet to be transfered.
Definition: i8254xGBe.hh:473
bool txFifoTick
Definition: i8254xGBe.hh:80
EventWrapper< RxDescCache,&RxDescCache::pktComplete > pktEvent
Definition: i8254xGBe.hh:386
Bitfield< 27 > q
Definition: miscregs.hh:1367
void writeback1()
Definition: i8254xGBe.cc:909
IGbEParams Params
Definition: i8254xGBe.hh:516
bool txTick
Definition: i8254xGBe.hh:79
Bitfield< 9 > d
Definition: miscregs.hh:1375
void checkDrain()
Check if all the draining things that need to occur have occured and handle the drain event if so...
Definition: i8254xGBe.cc:2102
std::string annUnusedDescQ
Definition: i8254xGBe.hh:270
Tick fetchDelay
Definition: i8254xGBe.hh:88
void anBegin(std::string sm, std::string st, int flags=CPA::FL_NONE)
Definition: i8254xGBe.hh:181
EventWrapper< DescCache,&DescCache::fetchComplete > fetchEvent
Definition: i8254xGBe.hh:298
unsigned int cacheBlockSize() const
Definition: dma_device.hh:180
PacketFifo txFifo
Definition: i8254xGBe.hh:72
virtual void sendDone()
Definition: i8254xGBe.hh:557
long descLen() const override
Definition: i8254xGBe.hh:409
std::shared_ptr< EthPacketData > EthPacketPtr
Definition: etherpkt.hh:90
void hwWf(flags f, System *sys, uint64_t frame, std::string sm, std::string q, uint64_t qid, System *q_sys=NULL, int32_t count=1)
Definition: cp_annotate.hh:118
void pktComplete()
Called by event when dma to write packet is completed.
Definition: i8254xGBe.cc:1754
~IGbE()
Definition: i8254xGBe.cc:126
virtual bool hasOutstandingEvents()
Definition: i8254xGBe.hh:335
EventWrapper< DescCache,&DescCache::fetchDescriptors1 > fetchDelayEvent
Definition: i8254xGBe.hh:293
void tadvProcess()
Definition: i8254xGBe.hh:115
std::string _name
Definition: i8254xGBe.hh:241
EventWrapper< IGbE,&IGbE::tick > tickEvent
Definition: i8254xGBe.hh:138
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
Tick wbCompDelay
Definition: i8254xGBe.hh:89
CacheType usedCache
Definition: i8254xGBe.hh:231
System * sys
Definition: io_device.hh:87
std::string annUsedDescQ
Definition: i8254xGBe.hh:270
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Definition: packet.hh:245
void areaChanged()
If the address/len/head change when we've got descriptors that are dirty that is very bad...
Definition: i8254xGBe.cc:845
void tick()
Definition: i8254xGBe.cc:2424
Basic support for object serialization.
Definition: serialize.hh:220
iGbReg::Regs regs
Definition: i8254xGBe.hh:63
bool rxDmaPacket
Definition: i8254xGBe.hh:82
bool enabled()
Definition: statistics.cc:502
RxDescCache(IGbE *i, std::string n, int s)
Definition: i8254xGBe.cc:1198
virtual void updateHead(long h)=0
void txWire()
Definition: i8254xGBe.cc:2386
long descLen() const override
Definition: i8254xGBe.hh:347
Tick txReadDelay
Definition: i8254xGBe.hh:90
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: i8254xGBe.cc:1525
Base Ethernet Device declaration.
DrainState drain() override
Notify an object that it needs to drain its state.
Definition: i8254xGBe.cc:2066
bool ethRxPkt(EthPacketPtr packet)
Definition: i8254xGBe.cc:2220
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: i8254xGBe.cc:358
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: i8254xGBe.cc:132
Addr pciToDma(Addr a)
Shortcut for DMA address translation.
Definition: i8254xGBe.hh:266
RxDescCache rxDescCache
Definition: i8254xGBe.hh:401
IGbE(const Params *params)
Definition: i8254xGBe.cc:60
void hwPq(flags f, System *sys, uint64_t frame, std::string sm, std::string q, uint64_t qid, System *q_sys=NULL, int32_t count=1)
Definition: cp_annotate.hh:112
Addr descBase() const override
Definition: i8254xGBe.hh:345
bool hasOutstandingEvents() override
Definition: i8254xGBe.cc:1516
void actionAfterWb() override
Definition: i8254xGBe.cc:1955
EventWrapper< TxDescCache,&TxDescCache::headerComplete > headerEvent
Definition: i8254xGBe.hh:489
void completionWriteback(Addr a, bool enabled)
Definition: i8254xGBe.hh:492
CPA * cpa
Definition: i8254xGBe.hh:60
void fetchAfterWb() override
Definition: i8254xGBe.hh:413
unsigned descUnused() const
Definition: i8254xGBe.hh:325
unsigned descLeft() const
Definition: i8254xGBe.hh:309
std::ostream CheckpointOut
Definition: serialize.hh:67
Bitfield< 11 > st
Definition: miscregs.hh:1509
void anDq(std::string sm, std::string q)
Definition: i8254xGBe.hh:191
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...
Definition: i8254xGBe.cc:1228
EventWrapper< RxDescCache,&RxDescCache::pktSplitDone > pktDataEvent
Definition: i8254xGBe.hh:392
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: i8254xGBe.cc:2510
std::deque< T * > CacheType
Definition: i8254xGBe.hh:230
EventWrapper< IGbE,&IGbE::tidvProcess > tidvEvent
Definition: i8254xGBe.hh:133
const Params * params() const
Definition: i8254xGBe.hh:518
const SimObjectParams * _params
Cached copy of the object parameters.
Definition: sim_object.hh:107
EventWrapper< IGbE,&IGbE::rdtrProcess > rdtrEvent
Definition: i8254xGBe.hh:101
void anPq(std::string sm, std::string q, int num=1)
Definition: i8254xGBe.hh:196
std::string name()
Definition: i8254xGBe.hh:276
std::string annUsedCacheQ
Definition: i8254xGBe.hh:270
const std::string & name() const
Return port name (for DPRINTF).
Definition: etherint.hh:60
long descHead() const override
Definition: i8254xGBe.hh:346
DrainState drainState() const
Return the current drain state of an object.
Definition: drain.hh:282
Tick ns
nanosecond
Definition: core.cc:66
EthPacketPtr txPacket
Definition: i8254xGBe.hh:75
const uint8_t EEPROM_SIZE
void ethTxDone()
Definition: i8254xGBe.cc:2443
void fetchDescriptors()
Fetch a chunk of descriptors into the descriptor cache.
Definition: i8254xGBe.cc:938
void fetchComplete()
Called by event when dma to read descriptors is completed.
Definition: i8254xGBe.cc:1012
int eeAddrBits
Definition: i8254xGBe.hh:66
void radvProcess()
Definition: i8254xGBe.hh:104
std::string annDescQ
Definition: i8254xGBe.hh:270
Tick lastInterrupt
Definition: i8254xGBe.hh:528
void cpuPostInt()
Definition: i8254xGBe.cc:735
The base EtherObject class, allows for an accesor function to a simobj that returns the Port...
Definition: etherdevice.hh:51
Tick intClock()
Definition: i8254xGBe.hh:170
Bitfield< 5 > t
Definition: miscregs.hh:1382
EventWrapper< IGbE,&IGbE::tadvProcess > tadvEvent
Definition: i8254xGBe.hh:123
void enableSm() override
Definition: i8254xGBe.cc:2039
bool packetMultiDesc()
Ask if this packet is composed of multiple descriptors so even if we've got data, we need to wait for...
Definition: i8254xGBe.hh:481
void cpuClearInt()
Clear the interupt line to the cpu.
Definition: i8254xGBe.cc:779
virtual long descLen() const =0
uint32_t descEnd
Definition: i8254xGBe.hh:426
uint16_t flash[iGbReg::EEPROM_SIZE]
Definition: i8254xGBe.hh:68
EthPacketPtr pktPtr
The packet that is currently being dmad to memory if any.
Definition: i8254xGBe.hh:263
Bitfield< 0 > p
bool packetAvailable()
Ask if the packet has been transfered so the state machine can give it to the fifo.
Definition: i8254xGBe.cc:2029
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: i8254xGBe.cc:1534
Tick fetchCompDelay
Definition: i8254xGBe.hh:89
void hwRq(flags f, System *sys, uint64_t frame, std::string sm, std::string q, uint64_t qid, System *q_sys=NULL, int32_t count=1)
Definition: cp_annotate.hh:115
int eeDataBits
Definition: i8254xGBe.hh:66
void getPacketData(EthPacketPtr p)
Definition: i8254xGBe.cc:1706
EventWrapper< IGbE,&IGbE::radvProcess > radvEvent
Definition: i8254xGBe.hh:112
int splitCount
Variable to head with header/data completion events.
Definition: i8254xGBe.hh:359
std::string annUnusedCacheQ
Definition: i8254xGBe.hh:270
virtual ~DescCache()
Definition: i8254xGBe.cc:836
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: i8254xGBe.cc:170
bool hasOutstandingEvents() override
Definition: i8254xGBe.cc:2048
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: i8254xGBe.cc:2459
void tidvProcess()
Definition: i8254xGBe.hh:126
bool rxTick
Definition: i8254xGBe.hh:78
void fetchDescriptors1()
Definition: i8254xGBe.cc:990
Tick writeConfig(PacketPtr pkt) override
Write to the PCI config space data that is stored locally.
Definition: i8254xGBe.cc:151
Bitfield< 1 > sm
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: i8254xGBe.cc:2000

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