changeset 83f139c32c2f in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=83f139c32c2f
description:
uart: use integer versions of time instead of messing around with floats
diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
src/dev/uart8250.cc | 5 ++---
diffs (22 lines):
diff -r f2b4d8bea5d3 -r 83f139c32c2f src/dev/uart8250.cc
--- a/src/dev/uart8250.cc Sat Feb 27 18:52:57 2010 -0800
+++ b/src/dev/uart8250.cc Sun Feb 28 19:28:09 2010 -0800
@@ -90,7 +90,7 @@
void
Uart8250::IntrEvent::scheduleIntr()
{
- static const Tick interval = (Tick)((Clock::Float::s / 2e9) * 450);
+ static const Tick interval = 225 * Clock::Int::ns;
DPRINTF(Uart, "Scheduling IER interrupt for %#x, at cycle %lld\n", intrBit,
curTick + interval);
if (!scheduled())
@@ -217,8 +217,7 @@
if (UART_IER_THRI & IER)
{
DPRINTF(Uart, "IER: IER_THRI set, scheduling TX
intrrupt\n");
- if (curTick - lastTxInt >
- (Tick)((Clock::Float::s / 2e9) * 450)) {
+ if (curTick - lastTxInt > 225 * Clock::Int::ns) {
DPRINTF(Uart, "-- Interrupting Immediately... %d,%d\n",
curTick, lastTxInt);
txIntrEvent.process();
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev