From e07f7efb75f0f7322d752608eb1cb1e1145b4a98 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 7 Oct 2018 05:23:49 -0700 Subject: systemc: Switch to using predefined messages for channels. Create and use predefined messages for channels which match the ones Accellera uses. Change-Id: I179214838bbd83604e50225926cdc6b5b1b16923 Reviewed-on: https://gem5-review.googlesource.com/c/13330 Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/systemc/core/sc_export.cc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (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 9123a2553..a2cee316c 100644 --- a/src/systemc/core/sc_export.cc +++ b/src/systemc/core/sc_export.cc @@ -30,6 +30,7 @@ #include "base/logging.hh" #include "systemc/core/module.hh" #include "systemc/core/scheduler.hh" +#include "systemc/ext/channel/messages.hh" #include "systemc/ext/core/sc_export.hh" #include "systemc/ext/core/sc_main.hh" @@ -57,21 +58,17 @@ reportError(const char *id, const char *add_msg, sc_export_base::sc_export_base(const char *n) : sc_object(n) { if (sc_is_running()) { - reportError("(E121) insert sc_export failed", "simulation running", - name(), kind()); - } - if (::sc_gem5::scheduler.elaborationDone()) { - reportError("(E121) insert sc_export failed", "elaboration done", + reportError(SC_ID_INSERT_EXPORT_, "simulation running", name(), kind()); } + if (::sc_gem5::scheduler.elaborationDone()) + reportError(SC_ID_INSERT_EXPORT_, "elaboration done", name(), kind()); auto m = sc_gem5::pickParentModule(); - if (!m) { - reportError("(E122) sc_export specified outside of module", - nullptr, name(), kind()); - } else { + if (!m) + reportError(SC_ID_EXPORT_OUTSIDE_MODULE_, nullptr, name(), kind()); + else m->exports.push_back(this); - } } sc_export_base::~sc_export_base() {} -- cgit v1.2.3