summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/systemc/core/sc_main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/systemc/core/sc_main.cc b/src/systemc/core/sc_main.cc
index 39f6e174b..ea243bf61 100644
--- a/src/systemc/core/sc_main.cc
+++ b/src/systemc/core/sc_main.cc
@@ -194,6 +194,10 @@ sc_start(const sc_time &time, sc_starvation_policy p)
::sc_gem5::scheduler.oneCycle();
} else {
Tick now = ::sc_gem5::scheduler.getCurTick();
+ if (MaxTick - now < time.value()) {
+ SC_REPORT_ERROR("(E544) simulation time value overflow, "
+ "simulation aborted", "");
+ }
::sc_gem5::scheduler.start(now + time.value(), p == SC_RUN_TO_TIME);
}
}