diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2011-01-07 21:50:29 -0800 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2011-01-07 21:50:29 -0800 |
commit | 6f1187943cf78c2fd0334bd7e4372ae79a587fa4 (patch) | |
tree | 8d0eac2e2f4d55d48245266d3930ad4e7f92030f /src/cpu/testers/memtest | |
parent | c22be9f2f016872b05d65c82055ddc936b4aa075 (diff) | |
download | gem5-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/cpu/testers/memtest')
-rw-r--r-- | src/cpu/testers/memtest/memtest.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cpu/testers/memtest/memtest.cc b/src/cpu/testers/memtest/memtest.cc index 6f3bbd77e..9440bfec2 100644 --- a/src/cpu/testers/memtest/memtest.cc +++ b/src/cpu/testers/memtest/memtest.cc @@ -69,14 +69,14 @@ MemTest::CpuPort::recvAtomic(PacketPtr pkt) // must be snoop upcall assert(pkt->isRequest()); assert(pkt->getDest() == Packet::Broadcast); - return curTick; + return curTick(); } void MemTest::CpuPort::recvFunctional(PacketPtr pkt) { //Do nothing if we see one come through -// if (curTick != 0)//Supress warning durring initialization +// if (curTick() != 0)//Supress warning durring initialization // warn("Functional Writes not implemented in MemTester\n"); //Need to find any response values that intersect and update return; @@ -220,7 +220,7 @@ MemTest::completeRequest(PacketPtr pkt) if (memcmp(pkt_data, data, pkt->getSize()) != 0) { panic("%s: read of %x (blk %x) @ cycle %d " "returns %x, expected %x\n", name(), - req->getPaddr(), blockAddr(req->getPaddr()), curTick, + req->getPaddr(), blockAddr(req->getPaddr()), curTick(), *pkt_data, *data); } @@ -229,7 +229,7 @@ MemTest::completeRequest(PacketPtr pkt) if (numReads == (uint64_t)nextProgressMessage) { ccprintf(cerr, "%s: completed %d read accesses @%d\n", - name(), numReads, curTick); + name(), numReads, curTick()); nextProgressMessage += progressInterval; } @@ -272,13 +272,13 @@ void MemTest::tick() { if (!tickEvent.scheduled()) - schedule(tickEvent, curTick + ticks(1)); + schedule(tickEvent, curTick() + ticks(1)); if (++noResponseCycles >= 500000) { if (issueDmas) { cerr << "DMA tester "; } - cerr << name() << ": deadlocked at cycle " << curTick << endl; + cerr << name() << ": deadlocked at cycle " << curTick() << endl; fatal(""); } |