diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-10-31 01:21:54 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-10-31 01:21:54 -0400 |
commit | 7597f87430bc25547c594dd09f10be4953f987c3 (patch) | |
tree | f1016e3df49d93020b8d2e0931872e17696a7bca /src/dev | |
parent | 04d1cfe31ce92809830722081f3223a4d61b05df (diff) | |
download | gem5-7597f87430bc25547c594dd09f10be4953f987c3.tar.xz |
Base: Rework the way M5 provides and creates random numbers.
--HG--
extra : convert_revision : 10ec3484647b3acb8e821f8520f97d535e41e861
Diffstat (limited to 'src/dev')
-rw-r--r-- | src/dev/etherlink.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dev/etherlink.cc b/src/dev/etherlink.cc index 4130a7b3f..b1266000b 100644 --- a/src/dev/etherlink.cc +++ b/src/dev/etherlink.cc @@ -177,10 +177,9 @@ EtherLink::Link::transmit(EthPacketPtr pkt) packet = pkt; Tick delay = (Tick)ceil(((double)pkt->length * ticksPerByte) + 1.0); - if (delayVar != 0) { - Random<Tick> var; - delay += var.uniform(0, delayVar); - } + if (delayVar != 0) + delay += random_mt.random<Tick>(0, delayVar); + DPRINTF(Ethernet, "scheduling packet: delay=%d, (rate=%f)\n", delay, ticksPerByte); doneEvent.schedule(curTick + delay); |