systemc: Check for time overflow in sc_start.
A regression tests checks this situation. Change-Id: I7716bf7c8cf219c372ab9722fc0ad52e7e674b17 Reviewed-on: https://gem5-review.googlesource.com/12256 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user