Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/12080 )
Change subject: systemc: Ensure delta notifications happen at the right
time after sc_pause.
......................................................................
systemc: Ensure delta notifications happen at the right time after sc_pause.
Normally delta notifications would be created during the evaluation or
update phases, and so there isn't any problem with them cutting in
front of those stages. When the simulation is paused however, those
notifications could be waiting before the ready event starts and could
preempt it.
This change adds a check for that situation to the end of the pause
event and runs the evalution and update stages inline if necessary.
Change-Id: I4477b2ae8e7980406df00ba7320ae2a24ae2da9b
Reviewed-on: https://gem5-review.googlesource.com/12080
Reviewed-by: Gabe Black <gabebl...@google.com>
Maintainer: Gabe Black <gabebl...@google.com>
---
M src/systemc/core/scheduler.cc
1 file changed, 8 insertions(+), 0 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc
index 44c5646..d2e87f2 100644
--- a/src/systemc/core/scheduler.cc
+++ b/src/systemc/core/scheduler.cc
@@ -210,6 +210,14 @@
_paused = true;
kernel->status(::sc_core::SC_PAUSED);
scMain->run();
+
+ // If the ready event is supposed to run now, run it inline so that it
+ // preempts any delta notifications which were scheduled while we were
+ // paused.
+ if (readyEvent.scheduled()) {
+ eq->deschedule(&readyEvent);
+ runReady();
+ }
}
void
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12080
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: I4477b2ae8e7980406df00ba7320ae2a24ae2da9b
Gerrit-Change-Number: 12080
Gerrit-PatchSet: 10
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