Deleted Added
sdiff udiff text old ( 8711:c7e14f52c682 ) new ( 8832:247fee427324 )
full compact
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
50using namespace std;
51
52int TESTER_ALLOCATOR=0;
53
54bool
55MemTest::CpuPort::recvTiming(PacketPtr pkt)
56{

--- 70 unchanged lines hidden (view full) ---

127 retryPkt(NULL),
128// mainMem(main_mem),
129// checkMem(check_mem),
130 size(p->memory_size),
131 percentReads(p->percent_reads),
132 percentFunctional(p->percent_functional),
133 percentUncacheable(p->percent_uncacheable),
134 issueDmas(p->issue_dmas),
135 progressInterval(p->progress_interval),
136 nextProgressMessage(p->progress_interval),
137 percentSourceUnaligned(p->percent_source_unaligned),
138 percentDestUnaligned(p->percent_dest_unaligned),
139 maxLoads(p->max_loads),
140 atomic(p->atomic),
141 suppress_func_warnings(p->suppress_func_warnings)
142{

--- 173 unchanged lines hidden (view full) ---

316 paddr = uncacheAddr + offset;
317 } else {
318 paddr = ((base) ? baseAddr1 : baseAddr2) + offset;
319 }
320 bool do_functional = (random() % 100 < percentFunctional) && !uncacheable;
321
322 if (issueDmas) {
323 paddr &= ~((1 << dma_access_size) - 1);
324 req->setPhys(paddr, 1 << dma_access_size, flags);
325 req->setThreadContext(id,0);
326 } else {
327 paddr &= ~((1 << access_size) - 1);
328 req->setPhys(paddr, 1 << access_size, flags);
329 req->setThreadContext(id,0);
330 }
331 assert(req->getSize() == 1);
332
333 uint8_t *result = new uint8_t[8];
334
335 if (cmd < percentReads) {
336 // read

--- 93 unchanged lines hidden ---