1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 32 unchanged lines hidden (view full) --- 41#include "cpu/testers/memtest/memtest.hh" 42#include "debug/MemTest.hh" 43#include "mem/mem_object.hh" 44#include "mem/packet.hh" 45#include "mem/port.hh" 46#include "mem/request.hh" 47#include "sim/sim_events.hh" 48#include "sim/stats.hh" |
49#include "sim/system.hh" |
50 51using namespace std; 52 53int TESTER_ALLOCATOR=0; 54 55bool 56MemTest::CpuPort::recvTiming(PacketPtr pkt) 57{ --- 70 unchanged lines hidden (view full) --- 128 retryPkt(NULL), 129// mainMem(main_mem), 130// checkMem(check_mem), 131 size(p->memory_size), 132 percentReads(p->percent_reads), 133 percentFunctional(p->percent_functional), 134 percentUncacheable(p->percent_uncacheable), 135 issueDmas(p->issue_dmas), |
136 masterId(p->sys->getMasterId(name())), |
137 progressInterval(p->progress_interval), 138 nextProgressMessage(p->progress_interval), 139 percentSourceUnaligned(p->percent_source_unaligned), 140 percentDestUnaligned(p->percent_dest_unaligned), 141 maxLoads(p->max_loads), 142 atomic(p->atomic), 143 suppress_func_warnings(p->suppress_func_warnings) 144{ --- 173 unchanged lines hidden (view full) --- 318 paddr = uncacheAddr + offset; 319 } else { 320 paddr = ((base) ? baseAddr1 : baseAddr2) + offset; 321 } 322 bool do_functional = (random() % 100 < percentFunctional) && !uncacheable; 323 324 if (issueDmas) { 325 paddr &= ~((1 << dma_access_size) - 1); |
326 req->setPhys(paddr, 1 << dma_access_size, flags, masterId); |
327 req->setThreadContext(id,0); 328 } else { 329 paddr &= ~((1 << access_size) - 1); |
330 req->setPhys(paddr, 1 << access_size, flags, masterId); |
331 req->setThreadContext(id,0); 332 } 333 assert(req->getSize() == 1); 334 335 uint8_t *result = new uint8_t[8]; 336 337 if (cmd < percentReads) { 338 // read --- 93 unchanged lines hidden --- |