mem: Enforce strict use of busFirst- and busLastWordTime

This patch adds a check to ensure that the delay incurred by
the bus is not simply disregarded, but accounted for by someone. At
this point, all the modules do is to zero it out, and no additional
time is spent. This highlights where the bus timing is simply dropped
instead of being paid for.

As a follow up, the locations identified in this patch should add this
additional time to the packets in one way or another. For now it
simply acts as a sanity check and highlights where the delay is simply
ignored.

Since no time is added, all regressions remain the same.
This commit is contained in:
Andreas Hansson
2013-02-19 05:56:06 -05:00
parent 40d0e6c899
commit 860155a5fc
10 changed files with 53 additions and 0 deletions

View File

@@ -54,6 +54,9 @@ PioPort::PioPort(PioDevice *dev)
Tick
PioPort::recvAtomic(PacketPtr pkt)
{
// @todo: We need to pay for this and not just zero it out
pkt->busFirstWordDelay = pkt->busLastWordDelay = 0;
return pkt->isRead() ? device->read(pkt) : device->write(pkt);
}

View File

@@ -67,6 +67,8 @@ PciDev::PciConfigPort::recvAtomic(PacketPtr pkt)
{
assert(pkt->getAddr() >= configAddr &&
pkt->getAddr() < configAddr + PCI_CONFIG_SIZE);
// @todo someone should pay for this
pkt->busFirstWordDelay = pkt->busLastWordDelay = 0;
return pkt->isRead() ? device->readConfig(pkt) : device->writeConfig(pkt);
}

View File

@@ -81,6 +81,8 @@ class IntDev
Tick recvMessage(PacketPtr pkt)
{
// @todo someone should pay for this
pkt->busFirstWordDelay = pkt->busLastWordDelay = 0;
return device->recvMessage(pkt);
}
};