summaryrefslogtreecommitdiff
path: root/src/systemc/core/sc_export.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-08-15 23:35:38 -0700
committerGabe Black <gabeblack@google.com>2018-09-20 01:50:03 +0000
commitf9298649bb4d1f20b244a6e0930bb82be5ec7397 (patch)
tree28a7d86e1e7b26313f674407993b56e7306364fc /src/systemc/core/sc_export.cc
parent82958266d412e82c910b2ce35ac2a72e6c9fe358 (diff)
downloadgem5-f9298649bb4d1f20b244a6e0930bb82be5ec7397.tar.xz
systemc: Track exports and prim channels, and call their callbacks.
Also call the callbacks on the ports which were already being tracked. Change-Id: I5ba8ea366e87fc48b58712f35b93c27bccf92cb3 Reviewed-on: https://gem5-review.googlesource.com/12210 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/sc_export.cc')
-rw-r--r--src/systemc/core/sc_export.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/systemc/core/sc_export.cc b/src/systemc/core/sc_export.cc
index 8340cf9c6..383552b1a 100644
--- a/src/systemc/core/sc_export.cc
+++ b/src/systemc/core/sc_export.cc
@@ -28,12 +28,17 @@
*/
#include "base/logging.hh"
+#include "systemc/core/module.hh"
#include "systemc/ext/core/sc_export.hh"
namespace sc_core
{
-sc_export_base::sc_export_base(const char *n) : sc_object(n) {}
+sc_export_base::sc_export_base(const char *n) : sc_object(n)
+{
+ ::sc_gem5::Module *m = ::sc_gem5::currentModule();
+ m->exports.push_back(this);
+}
sc_export_base::~sc_export_base() {}
} // namespace sc_core