summaryrefslogtreecommitdiff
path: root/src/systemc/core/sensitivity.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-09-26 22:09:12 -0700
committerGabe Black <gabeblack@google.com>2018-10-16 00:37:02 +0000
commit1fe271c71ac43d7ac8ed5980ac3887e77f4671b4 (patch)
tree51b37271b6d6b89769b56ff3dfd2dc46f9df5430 /src/systemc/core/sensitivity.cc
parent6ae330055aa3ba8a5868ceba02bf40430a46caf3 (diff)
downloadgem5-1fe271c71ac43d7ac8ed5980ac3887e77f4671b4.tar.xz
systemc: Merge notify and notifyWork and ignore disabled for resets.
Always notify a process if a reset signal changed, even if it's disabled. Also, because notify was what checked disabled and only notifyWork was virtual, this change merges the two so both can be overridden without any extra virtual functions. Change-Id: I1e3563fa587aab65a5e95cd8a382ed48e093de3b Reviewed-on: https://gem5-review.googlesource.com/c/13188 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/sensitivity.cc')
-rw-r--r--src/systemc/core/sensitivity.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/systemc/core/sensitivity.cc b/src/systemc/core/sensitivity.cc
index b0709ee91..9ce6fc4de 100644
--- a/src/systemc/core/sensitivity.cc
+++ b/src/systemc/core/sensitivity.cc
@@ -58,7 +58,8 @@ Sensitivity::notify(Event *e)
{
if (process->disabled())
return false;
- return notifyWork(e);
+ satisfy();
+ return true;
}
bool
@@ -213,8 +214,11 @@ DynamicSensitivityEventOrList::DynamicSensitivityEventOrList(
{}
bool
-DynamicSensitivityEventOrList::notifyWork(Event *e)
+DynamicSensitivityEventOrList::notify(Event *e)
{
+ if (process->disabled())
+ return false;
+
events.erase(e->sc_event());
// All the other events need this deleted from their lists since this
@@ -232,8 +236,11 @@ DynamicSensitivityEventAndList::DynamicSensitivityEventAndList(
{}
bool
-DynamicSensitivityEventAndList::notifyWork(Event *e)
+DynamicSensitivityEventAndList::notify(Event *e)
{
+ if (process->disabled())
+ return false;
+
events.erase(e->sc_event());
// This sensitivity is satisfied if all events have triggered.
@@ -294,7 +301,7 @@ ResetSensitivitySignal::ResetSensitivitySignal(
}
bool
-ResetSensitivitySignal::notifyWork(Event *e)
+ResetSensitivitySignal::notify(Event *e)
{
process->signalReset(_signal->read() == val(), sync());
return true;