From fc4ab050b4940138a4288c416f3bfa9dc442c7b6 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Sat, 9 Jun 2007 23:01:47 -0700 Subject: Add a startup function that will fast forward to the right clock edge using a divide in order to not loop forever after resuming from a checkpoint --HG-- extra : convert_revision : 4bbc70b1be4e5c4ed99d4f88418ab620d5ce475a --- src/mem/bus.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mem/bus.cc') 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 bus_id; -- cgit v1.2.3