From 442d556fbfa85673c9a3be222cb9630ba5b05be1 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 7 Sep 2018 16:53:12 -0700 Subject: systemc: Implement the deprecated "timed_out" function. This function requires some slightly annoying bookkeeping since it doesn't just report whether the current process is running as a result of a timeout, it reports whether it's running as a result of a timeout *and* it could have been running from some other sensitivity instead. Pure timeouts don't count as timeouts which makes it harder to handle in a general way. Change-Id: I533d97fe66d20d7b83aba80f2ef45a8944668070 Reviewed-on: https://gem5-review.googlesource.com/c/12608 Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/systemc/core/process.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/systemc/core/process.cc') diff --git a/src/systemc/core/process.cc b/src/systemc/core/process.cc index cc2eff512..e4d213bc1 100644 --- a/src/systemc/core/process.cc +++ b/src/systemc/core/process.cc @@ -88,7 +88,7 @@ SensitivityEventAndList::notifyWork(Event *e) e->delSensitivity(this); count++; if (count == list->events.size()) - process->satisfySensitivity(this); + satisfy(); } SensitivityEventOrList::SensitivityEventOrList( @@ -113,7 +113,7 @@ SensitivityTimeoutAndEventAndList::notifyWork(Event *e) SensitivityEventAndList::notifyWork(e); } else { // There's no inciting event, so this must be a timeout. - SensitivityTimeout::notifyWork(e); + satisfy(true); } } @@ -400,10 +400,10 @@ Process::lastReport(::sc_core::sc_report *report) Process::Process(const char *name, ProcessFuncWrapper *func, bool internal) : ::sc_core::sc_process_b(name), excWrapper(nullptr), func(func), - _internal(internal), _needsStart(true), _isUnwinding(false), - _terminated(false), _suspended(false), _disabled(false), _syncReset(false), - refCount(0), stackSize(::Fiber::DefaultStackSize), - dynamicSensitivity(nullptr) + _internal(internal), _timedOut(false), _needsStart(true), + _isUnwinding(false), _terminated(false), _suspended(false), + _disabled(false), _syncReset(false), refCount(0), + stackSize(::Fiber::DefaultStackSize), dynamicSensitivity(nullptr) { _dynamic = (::sc_core::sc_get_status() > -- cgit v1.2.3