fix bug in timing cpu. getTime() is the time the requset was created, not the time it was repsonded to. In timing mode the
time it was responded to is curTick. Doesn't change the results, but it does make implementation of nextCycle() more difficult --HG-- extra : convert_revision : 67ed6261a5451d17d96d5df45992590acc353afc
This commit is contained in:
parent
7994fa9431
commit
2d08ab0cc2
1 changed files with 2 additions and 4 deletions
|
@ -560,8 +560,7 @@ TimingSimpleCPU::IcachePort::recvTiming(PacketPtr pkt)
|
||||||
{
|
{
|
||||||
if (pkt->isResponse()) {
|
if (pkt->isResponse()) {
|
||||||
// delay processing of returned data until next CPU clock edge
|
// delay processing of returned data until next CPU clock edge
|
||||||
Tick mem_time = pkt->req->getTime();
|
Tick next_tick = cpu->nextCycle(curTick);
|
||||||
Tick next_tick = cpu->nextCycle(mem_time);
|
|
||||||
|
|
||||||
if (next_tick == curTick)
|
if (next_tick == curTick)
|
||||||
cpu->completeIfetch(pkt);
|
cpu->completeIfetch(pkt);
|
||||||
|
@ -655,8 +654,7 @@ TimingSimpleCPU::DcachePort::recvTiming(PacketPtr pkt)
|
||||||
{
|
{
|
||||||
if (pkt->isResponse()) {
|
if (pkt->isResponse()) {
|
||||||
// delay processing of returned data until next CPU clock edge
|
// delay processing of returned data until next CPU clock edge
|
||||||
Tick mem_time = pkt->req->getTime();
|
Tick next_tick = cpu->nextCycle(curTick);
|
||||||
Tick next_tick = cpu->nextCycle(mem_time);
|
|
||||||
|
|
||||||
if (next_tick == curTick)
|
if (next_tick == curTick)
|
||||||
cpu->completeDataAccess(pkt);
|
cpu->completeDataAccess(pkt);
|
||||||
|
|
Loading…
Reference in a new issue