summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-06-15 20:17:21 -0700
committerGabe Black <gabeblack@google.com>2018-08-28 21:17:13 +0000
commit8622fbf982ab6f54b171efbcccebfcfb4c2cadbe (patch)
treef79fcd35d6edfa9ee9ea1d600fc748dc90933553
parent663f5f6976e7d6732399409fc9cb0b1fcefe586d (diff)
downloadgem5-8622fbf982ab6f54b171efbcccebfcfb4c2cadbe.tar.xz
systemc: Add an sc_event_finder::find_event method.
The guts of sc_event_finder are supposed to be implementation defined, but the tests reach in and call this particular method on that class. Change-Id: I21c18fa68ccce7bc1a13122ee3b452ecb81b713a Reviewed-on: https://gem5-review.googlesource.com/11274 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
-rw-r--r--src/systemc/ext/core/sc_event.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/systemc/ext/core/sc_event.hh b/src/systemc/ext/core/sc_event.hh
index 8eb1283c1..0b901ff1e 100644
--- a/src/systemc/ext/core/sc_event.hh
+++ b/src/systemc/ext/core/sc_event.hh
@@ -40,6 +40,7 @@ namespace sc_core
class sc_event;
class sc_event_and_expr;
class sc_event_or_expr;
+class sc_interface;
class sc_object;
class sc_port_base;
@@ -47,6 +48,10 @@ class sc_event_finder
{
protected:
void warn_unimpl(const char *func) const;
+
+ public:
+ // Should be "implementation defined" but used in the tests.
+ virtual const sc_event &find_event(sc_interface *if_p=NULL) const = 0;
};
template <class IF>
@@ -58,6 +63,13 @@ class sc_event_finder_t : public sc_event_finder
{
warn_unimpl(__PRETTY_FUNCTION__);
}
+
+ const sc_event &
+ find_event(sc_interface *if_p=NULL) const override
+ {
+ warn_unimpl(__PRETTY_FUNCTION__);
+ return *(const sc_event *)nullptr;
+ }
};
class sc_event_and_list