summaryrefslogtreecommitdiff
path: root/src/systemc/ext/core/sc_port.hh
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/sc_port.hh
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/sc_port.hh')
-rw-r--r--src/systemc/ext/core/sc_port.hh8
1 files changed, 4 insertions, 4 deletions
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();