535,537c535,536
< Tick time = pkt->req->getTime();
< while (time < curTick)
< time += lat;
---
> Tick mem_time = pkt->req->getTime();
> Tick next_tick = cpu->nextCycle(mem_time);
539c538
< if (time == curTick)
---
> if (next_tick == curTick)
542c541
< tickEvent.schedule(pkt, time);
---
> tickEvent.schedule(pkt, next_tick);
613,615c612,613
< Tick time = pkt->req->getTime();
< while (time < curTick)
< time += lat;
---
> Tick mem_time = pkt->req->getTime();
> Tick next_tick = cpu->nextCycle(mem_time);
617c615
< if (time == curTick)
---
> if (next_tick == curTick)
620c618
< tickEvent.schedule(pkt, time);
---
> tickEvent.schedule(pkt, next_tick);