timing.cc (6658:f4de76601762) | timing.cc (6739:48d10ba361c9) |
---|---|
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; --- 259 unchanged lines hidden (view full) --- 268} 269 270void 271TimingSimpleCPU::sendData(Fault fault, RequestPtr req, 272 uint8_t *data, uint64_t *res, bool read) 273{ 274 _status = Running; 275 if (fault != NoFault) { | 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; --- 259 unchanged lines hidden (view full) --- 268} 269 270void 271TimingSimpleCPU::sendData(Fault fault, RequestPtr req, 272 uint8_t *data, uint64_t *res, bool read) 273{ 274 _status = Running; 275 if (fault != NoFault) { |
276 if (req->isPrefetch()) 277 fault = NoFault; |
|
276 delete data; 277 delete req; 278 279 translationFault(fault); 280 return; 281 } 282 PacketPtr pkt; 283 buildPacket(pkt, req, read); --- 26 unchanged lines hidden (view full) --- 310 311void 312TimingSimpleCPU::sendSplitData(Fault fault1, Fault fault2, 313 RequestPtr req1, RequestPtr req2, RequestPtr req, 314 uint8_t *data, bool read) 315{ 316 _status = Running; 317 if (fault1 != NoFault || fault2 != NoFault) { | 278 delete data; 279 delete req; 280 281 translationFault(fault); 282 return; 283 } 284 PacketPtr pkt; 285 buildPacket(pkt, req, read); --- 26 unchanged lines hidden (view full) --- 312 313void 314TimingSimpleCPU::sendSplitData(Fault fault1, Fault fault2, 315 RequestPtr req1, RequestPtr req2, RequestPtr req, 316 uint8_t *data, bool read) 317{ 318 _status = Running; 319 if (fault1 != NoFault || fault2 != NoFault) { |
320 if (req1->isPrefetch()) 321 fault1 = NoFault; 322 if (req2->isPrefetch()) 323 fault2 = NoFault; |
|
318 delete data; 319 delete req1; 320 delete req2; 321 if (fault1 != NoFault) 322 translationFault(fault1); 323 else if (fault2 != NoFault) 324 translationFault(fault2); 325 return; --- 29 unchanged lines hidden (view full) --- 355 } 356 } 357 } 358} 359 360void 361TimingSimpleCPU::translationFault(Fault fault) 362{ | 324 delete data; 325 delete req1; 326 delete req2; 327 if (fault1 != NoFault) 328 translationFault(fault1); 329 else if (fault2 != NoFault) 330 translationFault(fault2); 331 return; --- 29 unchanged lines hidden (view full) --- 361 } 362 } 363 } 364} 365 366void 367TimingSimpleCPU::translationFault(Fault fault) 368{ |
369 // fault may be NoFault in cases where a fault is suppressed, 370 // for instance prefetches. |
|
363 numCycles += tickToCycles(curTick - previousTick); 364 previousTick = curTick; 365 366 if (traceData) { 367 // Since there was a fault, we shouldn't trace this instruction. 368 delete traceData; 369 traceData = NULL; 370 } --- 695 unchanged lines hidden --- | 371 numCycles += tickToCycles(curTick - previousTick); 372 previousTick = curTick; 373 374 if (traceData) { 375 // Since there was a fault, we shouldn't trace this instruction. 376 delete traceData; 377 traceData = NULL; 378 } --- 695 unchanged lines hidden --- |