diff -r 8a66aa3d7866 -r c5a0889733eb src/cpu/testers/memtest/memtest.hh --- a/src/cpu/testers/memtest/memtest.hh Wed Oct 03 23:08:47 2012 -0500 +++ b/src/cpu/testers/memtest/memtest.hh Wed Oct 03 23:12:47 2012 -0500 @@ -190,6 +190,3 @@ }; #endif // __CPU_MEMTEST_MEMTEST_HH__ - - - diff -r 8a66aa3d7866 -r c5a0889733eb src/cpu/testers/memtest/memtest.cc --- a/src/cpu/testers/memtest/memtest.cc Wed Oct 03 23:08:47 2012 -0500 +++ b/src/cpu/testers/memtest/memtest.cc Wed Oct 03 23:12:47 2012 -0500 @@ -183,7 +183,7 @@ if (pkt->isError()) { if (!suppress_func_warnings) { - warn("Functional Access failed for %x at %x\n", + warn("Functional %s access failed at %#x\n", pkt->isWrite() ? "write" : "read", req->getPaddr()); } } else { @@ -280,7 +280,6 @@ access_size = 0; dma_access_size = 0; - Request *req = new Request(); Request::Flags flags; Addr paddr; @@ -290,7 +289,17 @@ } else { paddr = ((base) ? baseAddr1 : baseAddr2) + offset; } + + // For now we only allow one outstanding request per address + // per tester This means we assume CPU does write forwarding + // to reads that alias something in the cpu store buffer. + if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) { + return; + } + bool do_functional = (random() % 100 < percentFunctional) && !uncacheable; + Request *req = new Request(); + uint8_t *result = new uint8_t[8]; if (issueDmas) { paddr &= ~((1 << dma_access_size) - 1); @@ -303,20 +312,8 @@ } assert(req->getSize() == 1); - uint8_t *result = new uint8_t[8]; - if (cmd < percentReads) { // read - - // For now we only allow one outstanding request per address - // per tester This means we assume CPU does write forwarding - // to reads that alias something in the cpu store buffer. - if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) { - delete [] result; - delete req; - return; - } - outstandingAddrs.insert(paddr); // ***** NOTE FOR RON: I'm not sure how to access checkMem. - Kevin @@ -342,16 +339,6 @@ } } else { // write - - // For now we only allow one outstanding request per addreess - // per tester. This means we assume CPU does write forwarding - // to reads that alias something in the cpu store buffer. - if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) { - delete [] result; - delete req; - return; - } - outstandingAddrs.insert(paddr); DPRINTF(MemTest, "initiating %swrite at addr %x (blk %x) value %x\n",