Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/12209 )

Change subject: systemc: Fix the priority of the maximum time event.
......................................................................

systemc: Fix the priority of the maximum time event.

Change-Id: I3e5e71165d06da77076f0e58012c575e24456182
Reviewed-on: https://gem5-review.googlesource.com/12209
Reviewed-by: Gabe Black <gabebl...@google.com>
Maintainer: Gabe Black <gabebl...@google.com>
---
M src/systemc/core/scheduler.hh
1 file changed, 10 insertions(+), 7 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved



diff --git a/src/systemc/core/scheduler.hh b/src/systemc/core/scheduler.hh
index 0c755ed..983c53f 100644
--- a/src/systemc/core/scheduler.hh
+++ b/src/systemc/core/scheduler.hh
@@ -129,11 +129,14 @@
  * MAX RUN TIME
  *
  * When sc_start is called, it's possible to pass in a maximum time the
- * simulation should run to, at which point sc_pause is implicitly called.
- * That's implemented by scheduling an event at the max time with a priority
- * which is lower than all the others so that it happens only if time would
- * advance. When that event triggers, it calls the same function as the pause
- * event.
+ * simulation should run to, at which point sc_pause is implicitly called. The
+ * simulation is supposed to run up to the latest timed notification phase
+ * which is less than or equal to the maximum time. In other words it should + * run timed notifications at the maximum time, but not the subsequent evaluate
+ * phase. That's implemented by scheduling an event at the max time with a
+ * priority which is lower than all the others except the ready event. Timed + * notifications will happen before it fires, but it will override any ready
+ * event and prevent the evaluate phase from starting.
  */

 class Scheduler
@@ -279,9 +282,9 @@

     static Priority StopPriority = DefaultPriority - 1;
     static Priority PausePriority = DefaultPriority + 1;
-    static Priority ReadyPriority = DefaultPriority + 2;
+    static Priority MaxTickPriority = DefaultPriority + 2;
+    static Priority ReadyPriority = DefaultPriority + 3;
     static Priority StarvationPriority = ReadyPriority;
-    static Priority MaxTickPriority = DefaultPriority + 3;

     EventQueue *eq;
     std::map<Tick, int> pendingTicks;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12209
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: I3e5e71165d06da77076f0e58012c575e24456182
Gerrit-Change-Number: 12209
Gerrit-PatchSet: 8
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Matthias Jung <jun...@eit.uni-kl.de>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to