summaryrefslogtreecommitdiff
path: root/dev/etherlink.cc
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2005-04-14 16:06:34 -0400
committerKevin Lim <ktlim@umich.edu>2005-04-14 16:06:34 -0400
commit26d6d97f5d46bfe2cc5734eb632bec0bc67aed19 (patch)
treeed8a33f234ee4d85bc79f6179ea8907976ee3e70 /dev/etherlink.cc
parentdcedd7866e35adc1e0fbc081188b259ffc7bbdf5 (diff)
parent5e67b78af7f74d7223ced5b54978ca9fa29606c5 (diff)
downloadgem5-26d6d97f5d46bfe2cc5734eb632bec0bc67aed19.tar.xz
Merge ktlim@zizzer.eecs.umich.edu:/bk/m5
into zamp.eecs.umich.edu:/z/ktlim2/m5 --HG-- extra : convert_revision : 0baadd8d68bfa6f8e96307eb2d4426b0d9e0b8b4
Diffstat (limited to 'dev/etherlink.cc')
-rw-r--r--dev/etherlink.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/dev/etherlink.cc b/dev/etherlink.cc
index ba0fa705c..d63f4b3ad 100644
--- a/dev/etherlink.cc
+++ b/dev/etherlink.cc
@@ -48,12 +48,9 @@
using namespace std;
EtherLink::EtherLink(const string &name, EtherInt *peer0, EtherInt *peer1,
- Tick speed, Tick dly, EtherDump *dump)
+ double rate, Tick delay, EtherDump *dump)
: SimObject(name)
{
- double rate = ((double)ticksPerSecond * 8.0) / (double)speed;
- Tick delay = dly * Clock::Int::us;
-
link[0] = new Link(name + ".link0", this, 0, rate, delay, dump);
link[1] = new Link(name + ".link1", this, 1, rate, delay, dump);
@@ -271,7 +268,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(EtherLink)
SimObjectParam<EtherInt *> int1;
SimObjectParam<EtherInt *> int2;
- Param<Tick> speed;
+ Param<double> speed;
Param<Tick> delay;
SimObjectParam<EtherDump *> dump;
@@ -281,9 +278,9 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(EtherLink)
INIT_PARAM(int1, "interface 1"),
INIT_PARAM(int2, "interface 2"),
- INIT_PARAM_DFLT(speed, "link speed in bits per second", 100000000),
- INIT_PARAM_DFLT(delay, "transmit delay of packets in us", 0),
- INIT_PARAM_DFLT(dump, "object to dump network packets to", NULL)
+ INIT_PARAM(speed, "link speed in bits per second"),
+ INIT_PARAM(delay, "transmit delay of packets in us"),
+ INIT_PARAM(dump, "object to dump network packets to")
END_INIT_SIM_OBJECT_PARAMS(EtherLink)