This constant isn't in normalized units, ie doesn't scale when the time
value of a Tick changes, is global, has an extremely generic name even
though it's only used by a few ethernet devices, and has an arbitrary
value.
Get rid of it, and replace it with 1ns, what it would typically be
equivalent to when using the default 1ps time scale.
Change-Id: I31d9dad438f854b4152cd53c9a7042a25d13e0a6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29398
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
if (!sendPacket(outputFifo.front())) {
DPRINTF(Ethernet, "output port busy...retry later\n");
if (!txEvent.scheduled())
- parent->schedule(txEvent, curTick() + retryTime);
+ parent->schedule(txEvent, curTick() + SimClock::Int::ns);
} else {
DPRINTF(Ethernet, "packet sent: len=%d\n", outputFifo.front()->length);
outputFifo.pop();
DPRINTF(Ethernet, "bus busy...buffer for retransmission\n");
packetBuffer.push(packet);
if (!txEvent.scheduled())
- schedule(txEvent, curTick() + retryTime);
+ schedule(txEvent, curTick() + SimClock::Int::ns);
} else if (dump) {
dump->dump(packet);
}
}
if (!packetBuffer.empty() && !txEvent.scheduled())
- schedule(txEvent, curTick() + retryTime);
+ schedule(txEvent, curTick() + SimClock::Int::ns);
}
if (!txFifo.empty() && !txEvent.scheduled()) {
DPRINTF(Ethernet, "reschedule transmit\n");
- schedule(txEvent, curTick() + retryTime);
+ schedule(txEvent, curTick() + SimClock::Int::ns);
}
}
/// The universal simulation clock.
inline Tick curTick() { return _curEventQueue->getCurTick(); }
-const Tick retryTime = 1000;
-
/// These are variables that are set based on the simulator frequency
///@{
namespace SimClock {