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 <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Gabe Black
2018-08-09 20:31:35 -07:00
parent 7dd1cea517
commit a11636c7d1

View File

@@ -210,6 +210,14 @@ Scheduler::pause()
_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