SINIC: Commit old code from ASPLOS 2006 studies.
[gem5.git] / src / dev / etherbus.cc
index 3e59229ad2e41ced513ff9ce99660daab83aef08..2316bfed95cde3e940488743a16aad782a722970 100644 (file)
 
 using namespace std;
 
-EtherBus::EtherBus(const string &name, double speed, bool loop,
-                   EtherDump *packet_dump)
-    : SimObject(name), ticksPerByte(speed), loopback(loop),
-      event(&mainEventQueue, this), sender(0), dump(packet_dump)
+EtherBus::EtherBus(const Params *p)
+    : EtherObject(p), ticksPerByte(p->speed), loopback(p->loopback),
+      event(&mainEventQueue, this), sender(0), dump(p->dump)
 {
 }
 
@@ -78,9 +77,11 @@ EtherBus::txDone()
     packet = 0;
 }
 
-void
-EtherBus::reg(EtherInt *dev)
-{ devlist.push_back(dev); }
+EtherInt*
+EtherBus::getEthPort(const std::string &if_name, int idx)
+{
+    panic("Etherbus doesn't work\n");
+}
 
 bool
 EtherBus::send(EtherInt *sndr, EthPacketPtr &pkt)
@@ -106,5 +107,5 @@ EtherBus::send(EtherInt *sndr, EthPacketPtr &pkt)
 EtherBus *
 EtherBusParams::create()
 {
-    return new EtherBus(name, speed, loopback, dump);
+    return new EtherBus(this);
 }