summaryrefslogtreecommitdiff
path: root/src/mem/bus.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2007-08-12 19:43:54 -0400
committerAli Saidi <saidi@eecs.umich.edu>2007-08-12 19:43:54 -0400
commit02353a60ee6ce831302067aae38bc31b739f14e5 (patch)
tree630b02e2850aa3fe08e87c49ed827095c749bae3 /src/mem/bus.cc
parent64295b800fd67e9b9bb3eee0131511a71ddf1fdb (diff)
downloadgem5-02353a60ee6ce831302067aae38bc31b739f14e5.tar.xz
MemorySystem: Fix the use of ?: to produce correct results.
--HG-- extra : convert_revision : 31aad7170b35556a4c984f4ebc013137d55d85eb
Diffstat (limited to 'src/mem/bus.cc')
-rw-r--r--src/mem/bus.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc
index 42c4431bb..620e2ac60 100644
--- a/src/mem/bus.cc
+++ b/src/mem/bus.cc
@@ -148,10 +148,7 @@ void Bus::occupyBus(PacketPtr pkt)
// The first word will be delivered after the current tick, the delivery
// of the address if any, and one bus cycle to deliver the data
- pkt->firstWordTime =
- tickNextIdle +
- pkt->isRequest() ? clock : 0 +
- clock;
+ pkt->firstWordTime = tickNextIdle + (pkt->isRequest() ? clock : 0) + clock;
//Advance it numCycles bus cycles.
//XXX Should this use the repeated addition trick as well?