systemc: Implement the synchronous reset state.

Change-Id: Ie0c29bb6cf918aea1c0bc719b9d37628b5b19339
Reviewed-on: https://gem5-review.googlesource.com/c/13185
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Gabe Black
2018-09-26 00:24:01 -07:00
parent fc752d3f3c
commit f4ab64a588
2 changed files with 9 additions and 6 deletions

View File

@@ -119,6 +119,7 @@ class Process : public ::sc_core::sc_process_b, public ListNode
bool hasStaticSensitivities() { return !staticSensitivities.empty(); }
bool internal() { return _internal; }
bool timedOut() { return _timedOut; }
bool syncReset() { return _syncReset; }
bool dontInitialize() { return _dontInitialize; }
void dontInitialize(bool di) { _dontInitialize = di; }

View File

@@ -178,12 +178,14 @@ Scheduler::yield()
}
}
}
if (_current && _current->excWrapper) {
// Make sure this isn't a method process.
assert(!_current->needsStart());
auto ew = _current->excWrapper;
_current->excWrapper = nullptr;
ew->throw_it();
if (_current && !_current->needsStart()) {
if (_current->excWrapper) {
auto ew = _current->excWrapper;
_current->excWrapper = nullptr;
ew->throw_it();
} else if (_current->syncReset()) {
_current->reset(false);
}
}
}