Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/12256

Change subject: systemc: Check for time overflow in sc_start.
......................................................................

systemc: Check for time overflow in sc_start.

A regression tests checks this situation.

Change-Id: I7716bf7c8cf219c372ab9722fc0ad52e7e674b17
---
M src/systemc/core/sc_main.cc
1 file changed, 4 insertions(+), 0 deletions(-)



diff --git a/src/systemc/core/sc_main.cc b/src/systemc/core/sc_main.cc
index 39f6e17..ea243bf 100644
--- a/src/systemc/core/sc_main.cc
+++ b/src/systemc/core/sc_main.cc
@@ -194,6 +194,10 @@
         ::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);
     }
 }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12256
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I7716bf7c8cf219c372ab9722fc0ad52e7e674b17
Gerrit-Change-Number: 12256
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to