From 4e951d414e1ffc8e17aa4935b2a6421f4fbc1e22 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 7 Oct 2018 00:42:04 -0700 Subject: systemc: Switch to using predefined messages for core. Create and use predefined messages for core which match the ones Accellera uses. Change-Id: I05b1398933f753946d5917f39d0f39c7cb45ed9f Reviewed-on: https://gem5-review.googlesource.com/c/13323 Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/systemc/core/scheduler.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/systemc/core/scheduler.cc') diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc index 969e40155..ec91c795a 100644 --- a/src/systemc/core/scheduler.cc +++ b/src/systemc/core/scheduler.cc @@ -33,6 +33,7 @@ #include "base/logging.hh" #include "sim/eventq.hh" #include "systemc/core/kernel.hh" +#include "systemc/ext/core/messages.hh" #include "systemc/ext/core/sc_main.hh" #include "systemc/ext/utils/sc_report.hh" #include "systemc/ext/utils/sc_report_handler.hh" @@ -112,10 +113,8 @@ Scheduler::initPhase() if (p->dontInitialize()) { if (!p->hasStaticSensitivities() && !p->internal()) { - SC_REPORT_WARNING( - "(W558) disable() or dont_initialize() called on " - "process with no static sensitivity, it will be " - "orphaned", p->name()); + SC_REPORT_WARNING(sc_core::SC_ID_DISABLE_WILL_ORPHAN_PROCESS_, + p->name()); } } else { p->ready(); @@ -484,11 +483,15 @@ reportifyException() } catch (const ::sc_core::sc_unwind_exception &) { panic("Kill/reset exception escaped a Process::run()"); } catch (const std::exception &e) { - SC_REPORT_ERROR("uncaught exception", e.what()); + SC_REPORT_ERROR( + sc_core::SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_, e.what()); } catch (const char *msg) { - SC_REPORT_ERROR("uncaught exception", msg); + SC_REPORT_ERROR( + sc_core::SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_, msg); } catch (...) { - SC_REPORT_ERROR("uncaught exception", "UNKNOWN EXCEPTION"); + SC_REPORT_ERROR( + sc_core::SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_, + "UNKNOWN EXCEPTION"); } } catch (const ::sc_core::sc_report &r) { ::sc_core::sc_report_handler::set_handler(old_handler); -- cgit v1.2.3