summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mem/bus.cc7
-rw-r--r--src/mem/bus.hh1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc
index 1f96115b8..13e545064 100644
--- a/src/mem/bus.cc
+++ b/src/mem/bus.cc
@@ -605,6 +605,13 @@ Bus::drain(Event * de)
}
}
+void
+Bus::startup()
+{
+ if (tickNextIdle < curTick)
+ tickNextIdle = (curTick / clock) * clock + clock;
+}
+
BEGIN_DECLARE_SIM_OBJECT_PARAMS(Bus)
Param<int> bus_id;
diff --git a/src/mem/bus.hh b/src/mem/bus.hh
index 5dd98c07e..ee647e20a 100644
--- a/src/mem/bus.hh
+++ b/src/mem/bus.hh
@@ -267,6 +267,7 @@ class Bus : public MemObject
virtual void deletePortRefs(Port *p);
virtual void init();
+ virtual void startup();
unsigned int drain(Event *de);