memtest.cc (8711:c7e14f52c682) memtest.cc (8832:247fee427324)
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"
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"
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),
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())),
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);
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);
324 req->setPhys(paddr, 1 << dma_access_size, flags);
326 req->setPhys(paddr, 1 << dma_access_size, flags, masterId);
325 req->setThreadContext(id,0);
326 } else {
327 paddr &= ~((1 << access_size) - 1);
327 req->setThreadContext(id,0);
328 } else {
329 paddr &= ~((1 << access_size) - 1);
328 req->setPhys(paddr, 1 << access_size, flags);
330 req->setPhys(paddr, 1 << access_size, flags, masterId);
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 ---
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 ---