summaryrefslogtreecommitdiff
path: root/src/systemc/ext
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-08-29 23:02:21 -0700
committerGabe Black <gabeblack@google.com>2018-10-03 00:15:57 +0000
commit420ab42e02e2a7c0c5aace5b330717cc014bd178 (patch)
tree9e2034fad19bac973716bc563cd4384d23125f62 /src/systemc/ext
parent8fdda3b2d8eb12b3c26cce8f38ce6ea4f525fa69 (diff)
downloadgem5-420ab42e02e2a7c0c5aace5b330717cc014bd178.tar.xz
systemc: When sensitive to an event finder, find on all interfaces.
When a process is sensitive to an event finder and that finder is attached to a port which is bound to multiple interfaces, the process is supposed to be made sensitive to the event finder function's result when called on each interface, not just the first one. Change-Id: I92312e04e60fab7a7ea51c1ed687edabe9768205 Reviewed-on: https://gem5-review.googlesource.com/c/12444 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/ext')
-rw-r--r--src/systemc/ext/core/sc_event.hh3
-rw-r--r--src/systemc/ext/core/sc_port.hh2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/systemc/ext/core/sc_event.hh b/src/systemc/ext/core/sc_event.hh
index a5ac2d4f0..e9748cb95 100644
--- a/src/systemc/ext/core/sc_event.hh
+++ b/src/systemc/ext/core/sc_event.hh
@@ -64,6 +64,7 @@ class sc_event_finder
public:
// Should be "implementation defined" but used in the tests.
virtual const sc_event &find_event(sc_interface *if_p=NULL) const = 0;
+ virtual const sc_port_base *port() const = 0;
};
template <class IF>
@@ -80,6 +81,8 @@ class sc_event_finder_t : public sc_event_finder
virtual ~sc_event_finder_t() {}
+ const sc_port_base *port() const { return _port; }
+
const sc_event &
find_event(sc_interface *if_p=NULL) const override
{
diff --git a/src/systemc/ext/core/sc_port.hh b/src/systemc/ext/core/sc_port.hh
index b39235960..50c45dc0c 100644
--- a/src/systemc/ext/core/sc_port.hh
+++ b/src/systemc/ext/core/sc_port.hh
@@ -42,6 +42,7 @@ namespace sc_gem5
class BindInfo;
class Module;
class PendingSensitivityPort;
+class PendingSensitivityFinder;
};
@@ -85,6 +86,7 @@ class sc_port_base : public sc_object
private:
friend class ::sc_gem5::PendingSensitivityPort;
+ friend class ::sc_gem5::PendingSensitivityFinder;
friend class ::sc_gem5::Kernel;
void _gem5Finalize();