memtest.cc (10566:c99c8d2a7c31) | memtest.cc (10653:e3fc6bc7f97e) |
---|---|
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; --- 286 unchanged lines hidden (view full) --- 295 // per tester This means we assume CPU does write forwarding 296 // to reads that alias something in the cpu store buffer. 297 if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) { 298 return; 299 } 300 301 bool do_functional = (random_mt.random(0, 100) < percentFunctional) && 302 !uncacheable; | 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; --- 286 unchanged lines hidden (view full) --- 295 // per tester This means we assume CPU does write forwarding 296 // to reads that alias something in the cpu store buffer. 297 if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) { 298 return; 299 } 300 301 bool do_functional = (random_mt.random(0, 100) < percentFunctional) && 302 !uncacheable; |
303 Request *req = new Request(); | 303 Request *req = nullptr; |
304 uint8_t *result = new uint8_t[8]; 305 306 if (issueDmas) { 307 paddr &= ~((1 << dma_access_size) - 1); | 304 uint8_t *result = new uint8_t[8]; 305 306 if (issueDmas) { 307 paddr &= ~((1 << dma_access_size) - 1); |
308 req->setPhys(paddr, 1 << dma_access_size, flags, masterId); | 308 req = new Request(paddr, 1 << dma_access_size, flags, masterId); |
309 req->setThreadContext(id,0); 310 } else { 311 paddr &= ~((1 << access_size) - 1); | 309 req->setThreadContext(id,0); 310 } else { 311 paddr &= ~((1 << access_size) - 1); |
312 req->setPhys(paddr, 1 << access_size, flags, masterId); | 312 req = new Request(paddr, 1 << access_size, flags, masterId); |
313 req->setThreadContext(id,0); 314 } 315 assert(req->getSize() == 1); 316 317 if (cmd < percentReads) { 318 // read 319 outstandingAddrs.insert(paddr); 320 --- 69 unchanged lines hidden --- | 313 req->setThreadContext(id,0); 314 } 315 assert(req->getSize() == 1); 316 317 if (cmd < percentReads) { 318 // read 319 outstandingAddrs.insert(paddr); 320 --- 69 unchanged lines hidden --- |