summaryrefslogtreecommitdiff
path: root/src/dev/i8254xGBe.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2007-08-16 16:49:02 -0400
committerAli Saidi <saidi@eecs.umich.edu>2007-08-16 16:49:02 -0400
commit773cb77656174b221c1e51b92a8af7d8e268b733 (patch)
treec6358a24188fde67e0d0a2816f6b9e2b55d8c535 /src/dev/i8254xGBe.hh
parenta9e4daf574e265e419a0a4a6bcbd03edf3a3299f (diff)
downloadgem5-773cb77656174b221c1e51b92a8af7d8e268b733.tar.xz
Devices: Make EtherInts connect in the same way memory ports currently do.
--HG-- extra : convert_revision : 765b096785a77df9adc4791c9101b90696bd7be2
Diffstat (limited to 'src/dev/i8254xGBe.hh')
-rw-r--r--src/dev/i8254xGBe.hh11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/dev/i8254xGBe.hh b/src/dev/i8254xGBe.hh
index caffb8c4d..95eac4f82 100644
--- a/src/dev/i8254xGBe.hh
+++ b/src/dev/i8254xGBe.hh
@@ -40,6 +40,7 @@
#include "base/inet.hh"
#include "base/statistics.hh"
+#include "dev/etherdevice.hh"
#include "dev/etherint.hh"
#include "dev/etherpkt.hh"
#include "dev/i8254xGBe_defs.hh"
@@ -50,7 +51,7 @@
class IGbEInt;
-class IGbE : public PciDev
+class IGbE : public EtherDevice
{
private:
IGbEInt *etherInt;
@@ -592,9 +593,11 @@ class IGbE : public PciDev
{
return dynamic_cast<const Params *>(_params);
}
- IGbE(Params *params);
+ IGbE(const Params *params);
~IGbE() {}
+ virtual EtherInt *getEthPort(const std::string &if_name, int idx);
+
Tick clock;
inline Tick cycles(int numCycles) const { return numCycles * clock; }
@@ -606,8 +609,6 @@ class IGbE : public PciDev
bool ethRxPkt(EthPacketPtr packet);
void ethTxDone();
- void setEthInt(IGbEInt *i) { assert(!etherInt); etherInt = i; }
-
virtual void serialize(std::ostream &os);
virtual void unserialize(Checkpoint *cp, const std::string &section);
virtual unsigned int drain(Event *de);
@@ -623,7 +624,7 @@ class IGbEInt : public EtherInt
public:
IGbEInt(const std::string &name, IGbE *d)
: EtherInt(name), dev(d)
- { dev->setEthInt(this); }
+ { }
virtual bool recvPacket(EthPacketPtr pkt) { return dev->ethRxPkt(pkt); }
virtual void sendDone() { dev->ethTxDone(); }