Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/13185
Change subject: systemc: Implement the synchronous reset state.
......................................................................
systemc: Implement the synchronous reset state.
Change-Id: Ie0c29bb6cf918aea1c0bc719b9d37628b5b19339
---
M src/systemc/core/process.hh
M src/systemc/core/scheduler.cc
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/systemc/core/process.hh b/src/systemc/core/process.hh
index 4266c2d..9e85fc7 100644
--- a/src/systemc/core/process.hh
+++ b/src/systemc/core/process.hh
@@ -119,6 +119,7 @@
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; }
diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc
index d79abb2..6d571f6 100644
--- a/src/systemc/core/scheduler.cc
+++ b/src/systemc/core/scheduler.cc
@@ -178,12 +178,14 @@
}
}
}
- 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);
+ }
}
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13185
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: Ie0c29bb6cf918aea1c0bc719b9d37628b5b19339
Gerrit-Change-Number: 13185
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev