From f9298649bb4d1f20b244a6e0930bb82be5ec7397 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 15 Aug 2018 23:35:38 -0700 Subject: 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 Maintainer: Gabe Black --- src/systemc/core/sc_export.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/systemc/core/sc_export.cc') 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 -- cgit v1.2.3