void CoreRecorder::recordAccess(uint64_t startCycle) {
    assert(eventRecorder.hasRecord());
    TimingRecord tr = eventRecorder.popRecord();
    TimingEvent* origPrevResp = prevRespEvent;

    assert(startCycle >= prevRespCycle);
    assert(tr.reqCycle >= startCycle);

    if (IsGet(tr.type)) {
        uint64_t delay = tr.reqCycle - prevRespCycle;
        TimingEvent* ev = new (eventRecorder) TimingCoreEvent(delay, prevRespCycle - gapCycles, this);
        ev->setMinStartCycle(prevRespCycle);
        prevRespEvent->addChild(ev, eventRecorder)->addChild(tr.startEvent, eventRecorder);
        prevRespEvent = tr.endEvent;
        prevRespCycle = tr.respCycle;
        assert(prevRespEvent);
    } else {
        assert(IsPut(tr.type));
        // Link previous response and this req directly (don't even create a new event)
        DelayEvent* dr = new (eventRecorder) DelayEvent(tr.reqCycle - prevRespCycle);
        dr->setMinStartCycle(prevRespCycle);
        prevRespEvent->addChild(dr, eventRecorder)->addChild(tr.startEvent, eventRecorder);
        //tr.endEvent not linked to anything, it's a PUT
    }

    origPrevResp->produceCrossings(&eventRecorder);
    eventRecorder.getCrossingStack().clear();
}
示例#2
0
	bool command::IsUserPut(){
		return (IsPut(ArrayOfCommand[1]) && IsInteger(ArrayOfCommand[2]) && IsInteger(ArrayOfCommand[3]) && IsMark(ArrayOfCommand[4]) && JumlahString == 3);
	}