summaryrefslogtreecommitdiff
path: root/src/dev/arm/pl111.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2011-01-07 21:50:29 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2011-01-07 21:50:29 -0800
commit6f1187943cf78c2fd0334bd7e4372ae79a587fa4 (patch)
tree8d0eac2e2f4d55d48245266d3930ad4e7f92030f /src/dev/arm/pl111.cc
parentc22be9f2f016872b05d65c82055ddc936b4aa075 (diff)
downloadgem5-6f1187943cf78c2fd0334bd7e4372ae79a587fa4.tar.xz
Replace curTick global variable with accessor functions.
This step makes it easy to replace the accessor functions (which still access a global variable) with ones that access per-thread curTick values.
Diffstat (limited to 'src/dev/arm/pl111.cc')
-rw-r--r--src/dev/arm/pl111.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dev/arm/pl111.cc b/src/dev/arm/pl111.cc
index e78d28141..e597bf272 100644
--- a/src/dev/arm/pl111.cc
+++ b/src/dev/arm/pl111.cc
@@ -355,7 +355,7 @@ Pl111::readFramebuffer()
startAddr = lcdUpbase;
}
curAddr = 0;
- startTime = curTick;
+ startTime = curTick();
maxAddr = static_cast<Addr>(length*sizeof(uint32_t));
dmaPendingNum =0 ;
@@ -388,9 +388,9 @@ Pl111::dmaDone()
DPRINTF(PL111, " -- DMA pending number %d\n", dmaPendingNum);
if (maxAddr == curAddr && !dmaPendingNum) {
- if ((curTick - startTime) > maxFrameTime)
+ if ((curTick() - startTime) > maxFrameTime)
warn("CLCD controller buffer underrun, took %d cycles when should"
- " have taken %d\n", curTick - startTime, maxFrameTime);
+ " have taken %d\n", curTick() - startTime, maxFrameTime);
// double buffering so the vnc server doesn't see a tear in the screen
memcpy(frameBuffer, dmaBuffer, maxAddr);
@@ -400,7 +400,7 @@ Pl111::dmaDone()
writeBMP(frameBuffer);
DPRINTF(PL111, "-- schedule next dma read event at %d tick \n",
- maxFrameTime + curTick);
+ maxFrameTime + curTick());
schedule(readEvent, nextCycle(startTime + maxFrameTime));
}
@@ -415,7 +415,7 @@ Pl111::dmaDone()
Tick
Pl111::nextCycle()
{
- Tick nextTick = curTick + clock - 1;
+ Tick nextTick = curTick() + clock - 1;
nextTick -= nextTick%clock;
return nextTick;
}
@@ -427,7 +427,7 @@ Pl111::nextCycle(Tick beginTick)
if (nextTick%clock!=0)
nextTick = nextTick - (nextTick%clock) + clock;
- assert(nextTick >= curTick);
+ assert(nextTick >= curTick());
return nextTick;
}