diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-02-19 05:56:06 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-02-19 05:56:06 -0500 |
commit | 860155a5fc48f983e9af40c19bf8db8250709c26 (patch) | |
tree | 18c5c3ccb573182ba8444fae02c2c84f2bb4a3c5 /src/mem/bus.cc | |
parent | 40d0e6c899d5da400c9647496532a8fb1ef64b7b (diff) | |
download | gem5-860155a5fc48f983e9af40c19bf8db8250709c26.tar.xz |
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.
Diffstat (limited to 'src/mem/bus.cc')
-rw-r--r-- | src/mem/bus.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc index 690d85373..1de1ac1e3 100644 --- a/src/mem/bus.cc +++ b/src/mem/bus.cc @@ -140,6 +140,13 @@ BaseBus::calcPacketTiming(PacketPtr pkt) // determine how many cycles are needed to send the data unsigned dataCycles = pkt->hasData() ? divCeil(pkt->getSize(), width) : 0; + // before setting the bus delay fields of the packet, ensure that + // the delay from any previous bus has been accounted for + if (pkt->busFirstWordDelay != 0 || pkt->busLastWordDelay != 0) + panic("Packet %s already has bus delay (%d, %d) that should be " + "accounted for.\n", pkt->cmdString(), pkt->busFirstWordDelay, + pkt->busLastWordDelay); + // The first word will be delivered on the cycle after the header. pkt->busFirstWordDelay = (headerCycles + 1) * clockPeriod() + offset; |