summaryrefslogtreecommitdiff
path: root/src/systemc/ext
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-06-25 20:37:58 -0700
committerGabe Black <gabeblack@google.com>2018-09-05 06:02:08 +0000
commitaaf0c47c972d3811314db93f0fe1ababf4c408f1 (patch)
treed2b604ce0ffdfc74f758d178dbe9cb6d965af953 /src/systemc/ext
parent9bd3bb7bc804a16b2f0de03fa6d3d9d0928f38a2 (diff)
downloadgem5-aaf0c47c972d3811314db93f0fe1ababf4c408f1.tar.xz
systemc: Implement some basic plumbing in sc_module.hh.
Take care of some low hanging fruit as far as wrapper methods and the sc_bind_proxy class. Change-Id: I7f55a37eeaa82338bd608218c0261fbc39e65fc2 Reviewed-on: https://gem5-review.googlesource.com/11612 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_module.hh21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/systemc/ext/core/sc_module.hh b/src/systemc/ext/core/sc_module.hh
index 82b48ab16..fd4a802b1 100644
--- a/src/systemc/ext/core/sc_module.hh
+++ b/src/systemc/ext/core/sc_module.hh
@@ -43,6 +43,13 @@ class sc_logic;
} // namespace sc_dt
+namespace sc_gem5
+{
+
+class Module;
+
+} // namespace sc_gem5
+
namespace sc_core
{
@@ -62,9 +69,15 @@ class sc_module_name;
class sc_bind_proxy
{
+ private:
+ const sc_interface *_interface;
+ const sc_port_base *_port;
+
+ friend class sc_module;
+
public:
- sc_bind_proxy(const sc_interface &interface);
- sc_bind_proxy(const sc_port_base &port);
+ sc_bind_proxy(const sc_interface &_interface);
+ sc_bind_proxy(const sc_port_base &_port);
};
extern const sc_bind_proxy SC_BIND_PROXY_NIL;
@@ -74,7 +87,7 @@ class sc_module : public sc_object
public:
virtual ~sc_module();
- virtual const char *kind() const;
+ virtual const char *kind() const { return "sc_module"; }
void operator () (const sc_bind_proxy &p001,
const sc_bind_proxy &p002 = SC_BIND_PROXY_NIL,
@@ -213,6 +226,8 @@ class sc_module : public sc_object
virtual void end_of_simulation() {}
private:
+ sc_gem5::Module *_gem5_module;
+
// Disabled
sc_module(const sc_module &) : sc_object() {};
sc_module &operator = (const sc_module &) { return *this; }