void DInst::dump(const char *str) { #ifdef ENABLE_CUDA printf("%s:PE:%d %p (%d) %lld %c DInst: pc=0x%x, addr=0x%x data=0x%x src1=%d (%d) src2 = %d dest1 =%d dest2 = %d",str, (int)getPE(), this, fid, (long long)ID, keepStats? 't': 'd', (int)pc,(int)addr, (int)data,(int)(inst.getSrc1()), inst.getOpcode(),inst.getSrc2(),inst.getDst1(), inst.getDst2()); #else printf("%s:%p (%d) %lld %c DInst: pc=0x%x, addr=0x%x data=0x%x src1=%d (%d) src2 = %d dest1 =%d dest2 = %d",str, this, fid, (long long)ID, keepStats? 't': 'd', (int)pc,(int)addr, (int)data,(int)(inst.getSrc1()), inst.getOpcode(),inst.getSrc2(),inst.getDst1(), inst.getDst2()); #endif if (performed) { printf(" performed"); }else if (executed) { printf(" executed"); }else if (issued) { printf(" issued"); }else{ printf(" non-issued"); } if (replay) printf(" REPLAY "); if (hasPending()) printf(" has pending"); if (!isSrc1Ready()) printf(" has src1 deps"); if (!isSrc2Ready()) printf(" has src2 deps"); if (!isSrc3Ready()) printf(" has src3 deps"); //inst.dump("Inst->"); printf("\n"); }
void DInst::dump(const char *str) { fprintf(stderr,"%s:%p (%d) %lld %c DInst: pc=0x%x, addr=0x%x src1=%d (%d) src2 = %d dest1 =%d dest2 = %d",str, this, fid, (long long)ID, keepStats? 't': 'd', (int)pc,(int)addr,(int)(inst.getSrc1()), inst.getOpcode(),inst.getSrc2(),inst.getDst1(), inst.getDst2()); if (performed) { fprintf(stderr," performed"); }else if (executed) { fprintf(stderr," executed"); }else if (issued) { fprintf(stderr," issued"); }else{ fprintf(stderr," non-issued"); } if (replay) fprintf(stderr," REPLAY "); if (hasPending()) fprintf(stderr," has pending"); if (!isSrc1Ready()) fprintf(stderr," has src1 deps"); if (!isSrc2Ready()) fprintf(stderr," has src2 deps"); if (!isSrc3Ready()) fprintf(stderr," has src3 deps"); //inst.dump("Inst->"); fprintf(stderr,"\n"); }
void DInst::dump(const char *str) { fprintf(stderr,"%s:(%d) DInst: vaddr=0x%x ", str, cId, (int)vaddr); if (executed) { fprintf(stderr, " executed"); }else if (issued) { fprintf(stderr, " issued"); }else{ fprintf(stderr, " non-issued"); } if (hasPending()) fprintf(stderr, " has pending"); if (!isSrc1Ready()) fprintf(stderr, " has src1 deps"); if (!isSrc2Ready()) fprintf(stderr, " has src2 deps"); inst->dump(""); }
void DInst::awakeRemoteInstructions() { while (hasPending()) { DInst *dstReady = getNextPending(); I(inst->isStore()); I( dstReady->inst->isLoad()); I(!dstReady->isExecuted()); I( dstReady->hasDepsAtRetire()); I( dstReady->isSrc2Ready()); // LDSTBuffer queue in src2, free by now dstReady->clearDepsAtRetire(); if (dstReady->isIssued() && !dstReady->hasDeps()) { Resource *dstRes = dstReady->getResource(); // Coherence would add the latency because the cache line must be brought // again (in theory it must be local to dinst processor and marked dirty I(dstRes); // since isIssued it should have a resource dstRes->simTime(dstReady); } } }
void DInst::killSilently() { I(getPendEvent()==0); I(getResource()==0); #ifdef SESC_BAAD if (fetch2Time == 0) { fetch1QSize--; }else if (renameTime == 0) { fetch2QSize--; }else if (issueTime == 0) { issueQSize--; }else if (schedTime == 0) { schedQSize--; }else if (exeTime == 0) { exeQSize--; }else{ retireQSize--; } #endif markIssued(); markExecuted(); if( getFetch() ) { getFetch()->unBlockFetch(); IS(setFetch(0)); } if (getInst()->isStore()) LDSTBuffer::storeLocallyPerformed(this); while (hasPending()) { DInst *dstReady = getNextPending(); if (!dstReady->isIssued()) { // Accross processor dependence if (dstReady->hasDepsAtRetire()) dstReady->clearDepsAtRetire(); I(!dstReady->hasDeps()); continue; } if (dstReady->isExecuted()) { // The instruction got executed even though it has dependences. This is // because the instruction got silently killed (killSilently) if (!dstReady->hasDeps()) dstReady->scrap(); continue; } if (!dstReady->hasDeps()) { I(dstReady->isIssued()); I(!dstReady->isExecuted()); Resource *dstRes = dstReady->getResource(); I(dstRes); dstRes->simTime(dstReady); } } #ifdef TASKSCALAR notifyDataDepViolation(DataDepViolationAtRetire); if (lvid) { // maybe got killSilently lvid = 0; lvidVersion->decOutsReqs(); lvidVersion->garbageCollect(); IS(lvidVersion=0); } I(lvidVersion==0); #endif I(!getFetch()); if (hasDeps()) return; I(nDeps == 0); // No deps src #if (defined TLS) I(!myEpoch); #endif I(!getFetch()); #if (defined MIPS_EMUL) context->delDInst(); context=0; #endif dInstPool.in(this); }