summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/systemc/core/process.hh9
-rw-r--r--src/systemc/ext/core/sc_event.hh3
-rw-r--r--src/systemc/ext/core/sc_port.hh2
3 files changed, 13 insertions, 1 deletions
diff --git a/src/systemc/core/process.hh b/src/systemc/core/process.hh
index 0d852afdb..2ec75dc06 100644
--- a/src/systemc/core/process.hh
+++ b/src/systemc/core/process.hh
@@ -37,6 +37,7 @@
#include "base/fiber.hh"
#include "sim/eventq.hh"
#include "systemc/core/bindinfo.hh"
+#include "systemc/core/event.hh"
#include "systemc/core/list.hh"
#include "systemc/core/object.hh"
#include "systemc/core/sched_event.hh"
@@ -259,7 +260,13 @@ class PendingSensitivityFinder : public PendingSensitivity
void
finalize(Sensitivities &s) override
{
- s.push_back(new SensitivityEvent(process, &finder->find_event()));
+ const ::sc_core::sc_port_base *port = finder->port();
+ int size = port->size();
+ for (int i = 0; i < size; i++) {
+ ::sc_core::sc_interface *interface = port->_gem5Interface(i);
+ const ::sc_core::sc_event *event = &finder->find_event(interface);
+ s.push_back(new SensitivityEvent(process, event));
+ }
}
};
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();