memtest.cc (12748:ae5ce8e42de7) memtest.cc (12749:223c83ed9979)
1/*
2 * Copyright (c) 2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

131 return port;
132 else
133 return MemObject::getMasterPort(if_name, idx);
134}
135
136void
137MemTest::completeRequest(PacketPtr pkt, bool functional)
138{
1/*
2 * Copyright (c) 2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

131 return port;
132 else
133 return MemObject::getMasterPort(if_name, idx);
134}
135
136void
137MemTest::completeRequest(PacketPtr pkt, bool functional)
138{
139 RequestPtr req = pkt->req;
139 const RequestPtr &req = pkt->req;
140 assert(req->getSize() == 1);
141
142 // this address is no longer outstanding
143 auto remove_addr = outstandingAddrs.find(req->getPaddr());
144 assert(remove_addr != outstandingAddrs.end());
145 outstandingAddrs.erase(remove_addr);
146
147 DPRINTF(MemTest, "Completing %s at address %x (blk %x) %s\n",

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

182
183 // update the reference data
184 referenceData[req->getPaddr()] = pkt_data[0];
185 numWrites++;
186 numWritesStat++;
187 }
188 }
189
140 assert(req->getSize() == 1);
141
142 // this address is no longer outstanding
143 auto remove_addr = outstandingAddrs.find(req->getPaddr());
144 assert(remove_addr != outstandingAddrs.end());
145 outstandingAddrs.erase(remove_addr);
146
147 DPRINTF(MemTest, "Completing %s at address %x (blk %x) %s\n",

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

182
183 // update the reference data
184 referenceData[req->getPaddr()] = pkt_data[0];
185 numWrites++;
186 numWritesStat++;
187 }
188 }
189
190 delete pkt->req;
191
192 // the packet will delete the data
193 delete pkt;
194
195 // finally shift the response timeout forward
196 reschedule(noResponseEvent, clockEdge(progressCheck), true);
197}
198
199void

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

241 paddr = uncacheAddr + offset;
242 } else {
243 paddr = ((base) ? baseAddr1 : baseAddr2) + offset;
244 }
245 } while (outstandingAddrs.find(paddr) != outstandingAddrs.end());
246
247 bool do_functional = (random_mt.random(0, 100) < percentFunctional) &&
248 !uncacheable;
190 // the packet will delete the data
191 delete pkt;
192
193 // finally shift the response timeout forward
194 reschedule(noResponseEvent, clockEdge(progressCheck), true);
195}
196
197void

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

239 paddr = uncacheAddr + offset;
240 } else {
241 paddr = ((base) ? baseAddr1 : baseAddr2) + offset;
242 }
243 } while (outstandingAddrs.find(paddr) != outstandingAddrs.end());
244
245 bool do_functional = (random_mt.random(0, 100) < percentFunctional) &&
246 !uncacheable;
249 RequestPtr req = new Request(paddr, 1, flags, masterId);
247 RequestPtr req = std::make_shared<Request>(paddr, 1, flags, masterId);
250 req->setContext(id);
251
252 outstandingAddrs.insert(paddr);
253
254 // sanity check
255 panic_if(outstandingAddrs.size() > 100,
256 "Tester %s has more than 100 outstanding requests\n", name());
257

--- 83 unchanged lines hidden ---
248 req->setContext(id);
249
250 outstandingAddrs.insert(paddr);
251
252 // sanity check
253 panic_if(outstandingAddrs.size() > 100,
254 "Tester %s has more than 100 outstanding requests\n", name());
255

--- 83 unchanged lines hidden ---