summaryrefslogtreecommitdiff
path: root/src/systemc/ext/core
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-09-14 00:04:22 -0700
committerGabe Black <gabeblack@google.com>2018-10-09 21:49:30 +0000
commit7bc110ce5c12f47105e851a1a54c26a83eba6b87 (patch)
tree67eaaf20063cffc51fbf4dbfb4156737382bfe2a /src/systemc/ext/core
parent8817e547e524cd81b5176cf277ef611920b0815a (diff)
downloadgem5-7bc110ce5c12f47105e851a1a54c26a83eba6b87.tar.xz
systemc: Refactor sensitivities.
Dynamic and Static sensitivities used to be represented by the same classes, even though they're (almost) disjoint in how they worked. Also timeouts, which can be used alongside dynamic sensitivities, were handled by the sensitivities themselves. That meant that the sensitivity mechanism had to mix in more types of behaviors, increasing complexity. Also, the non-standard timed_out function Accellera includes is harder to implement if the path for timeouts and regular sensitivities are mixed together. This change splits up dynamic and static sensitivities and splits out timeouts. It also immitates the ordering Accellera uses when going through sensitivities for an event. Static sensitivities are triggered first in reverse order (why?), and then dynamic sensitivities are triggered in what amounts to reverse order. To delete a sensitivity which has been handled, it's swapped with the one in the last position, and then the vector is truncated to drop it at the end. This has the net effect of stirring the dynamic sensitivities, and isn't easily immitated using a different approach, even if other approaches would be more straightforward. Double check addSensitivity for event.hh Change-Id: I1e73dce386b95f68e9d6737deb8bed70ef717e0d Reviewed-on: https://gem5-review.googlesource.com/c/12805 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/ext/core')
-rw-r--r--src/systemc/ext/core/sc_event.hh8
-rw-r--r--src/systemc/ext/core/sc_port.hh8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/systemc/ext/core/sc_event.hh b/src/systemc/ext/core/sc_event.hh
index e9748cb95..f70951d6a 100644
--- a/src/systemc/ext/core/sc_event.hh
+++ b/src/systemc/ext/core/sc_event.hh
@@ -41,8 +41,8 @@ namespace sc_gem5
{
class Event;
-class SensitivityEventAndList;
-class SensitivityEventOrList;
+class DynamicSensitivityEventAndList;
+class DynamicSensitivityEventOrList;
}
@@ -116,7 +116,7 @@ class sc_event_and_list
private:
friend class sc_event_and_expr;
- friend class sc_gem5::SensitivityEventAndList;
+ friend class sc_gem5::DynamicSensitivityEventAndList;
explicit sc_event_and_list(bool auto_delete);
@@ -148,7 +148,7 @@ class sc_event_or_list
private:
friend class sc_event_or_expr;
- friend class sc_gem5::SensitivityEventOrList;
+ friend class sc_gem5::DynamicSensitivityEventOrList;
explicit sc_event_or_list(bool auto_delete);
diff --git a/src/systemc/ext/core/sc_port.hh b/src/systemc/ext/core/sc_port.hh
index 88745cc2e..de26f5ae5 100644
--- a/src/systemc/ext/core/sc_port.hh
+++ b/src/systemc/ext/core/sc_port.hh
@@ -41,8 +41,8 @@ namespace sc_gem5
class BindInfo;
class Module;
-class PendingSensitivityPort;
-class PendingSensitivityFinder;
+class StaticSensitivityPort;
+class StaticSensitivityFinder;
};
@@ -87,8 +87,8 @@ class sc_port_base : public sc_object
virtual void end_of_simulation() = 0;
private:
- friend class ::sc_gem5::PendingSensitivityPort;
- friend class ::sc_gem5::PendingSensitivityFinder;
+ friend class ::sc_gem5::StaticSensitivityPort;
+ friend class ::sc_gem5::StaticSensitivityFinder;
friend class ::sc_gem5::Kernel;
void _gem5Finalize();