From 773cb77656174b221c1e51b92a8af7d8e268b733 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Thu, 16 Aug 2007 16:49:02 -0400 Subject: Devices: Make EtherInts connect in the same way memory ports currently do. --HG-- extra : convert_revision : 765b096785a77df9adc4791c9101b90696bd7be2 --- src/dev/ns_gige.hh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/dev/ns_gige.hh') diff --git a/src/dev/ns_gige.hh b/src/dev/ns_gige.hh index de18571d6..5e589687a 100644 --- a/src/dev/ns_gige.hh +++ b/src/dev/ns_gige.hh @@ -39,11 +39,11 @@ #include "base/inet.hh" #include "base/statistics.hh" +#include "dev/etherdevice.hh" #include "dev/etherint.hh" #include "dev/etherpkt.hh" #include "dev/io_device.hh" #include "dev/ns_gige_reg.h" -#include "dev/pcidev.hh" #include "dev/pktfifo.hh" #include "params/NSGigE.hh" #include "sim/eventq.hh" @@ -119,7 +119,7 @@ class Packet; /** * NS DP83820 Ethernet device model */ -class NSGigE : public PciDev +class NSGigE : public EtherDevice { public: /** Transmit State Machine states */ @@ -355,6 +355,8 @@ class NSGigE : public PciDev NSGigE(Params *params); ~NSGigE(); + virtual EtherInt *getEthPort(const std::string &if_name, int idx); + virtual Tick writeConfig(PacketPtr pkt); virtual Tick read(PacketPtr pkt); @@ -366,8 +368,6 @@ class NSGigE : public PciDev bool recvPacket(EthPacketPtr packet); void transferDone(); - void setInterface(NSGigEInt *i) { assert(!interface); interface = i; } - virtual void serialize(std::ostream &os); virtual void unserialize(Checkpoint *cp, const std::string §ion); @@ -438,7 +438,8 @@ class NSGigEInt : public EtherInt public: NSGigEInt(const std::string &name, NSGigE *d) - : EtherInt(name), dev(d) { dev->setInterface(this); } + : EtherInt(name), dev(d) + { } virtual bool recvPacket(EthPacketPtr pkt) { return dev->recvPacket(pkt); } virtual void sendDone() { dev->transferDone(); } -- cgit v1.2.3