summaryrefslogtreecommitdiff
path: root/src/dev/etherlink.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/etherlink.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/etherlink.hh')
-rw-r--r--src/dev/etherlink.hh18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/dev/etherlink.hh b/src/dev/etherlink.hh
index a16d6d799..52092dbf4 100644
--- a/src/dev/etherlink.hh
+++ b/src/dev/etherlink.hh
@@ -35,8 +35,10 @@
#ifndef __DEV_ETHERLINK_HH__
#define __DEV_ETHERLINK_HH__
+#include "dev/etherobject.hh"
#include "dev/etherint.hh"
#include "dev/etherpkt.hh"
+#include "params/EtherLink.hh"
#include "sim/eventq.hh"
#include "sim/host.hh"
#include "sim/sim_object.hh"
@@ -46,7 +48,7 @@ class Checkpoint;
/*
* Model for a fixed bandwidth full duplex ethernet link
*/
-class EtherLink : public SimObject
+class EtherLink : public EtherObject
{
protected:
class Interface;
@@ -118,13 +120,21 @@ class EtherLink : public SimObject
};
Link *link[2];
- EtherInt *interface[2];
+ Interface *interface[2];
public:
- EtherLink(const std::string &name, EtherInt *peer0, EtherInt *peer1,
- double rate, Tick delay, Tick delayVar, EtherDump *dump);
+ typedef EtherLinkParams Params;
+ EtherLink(const Params *p);
virtual ~EtherLink();
+ const Params *
+ params() const
+ {
+ return dynamic_cast<const Params *>(_params);
+ }
+
+ virtual EtherInt *getEthPort(const std::string &if_name, int idx);
+
virtual void serialize(std::ostream &os);
virtual void unserialize(Checkpoint *cp, const std::string &section);