diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/systemc/core/sc_main.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/systemc/core/sc_main.cc b/src/systemc/core/sc_main.cc index 5e1cd4fe6..735fb0c1b 100644 --- a/src/systemc/core/sc_main.cc +++ b/src/systemc/core/sc_main.cc @@ -226,6 +226,16 @@ sc_get_stop_mode() void sc_stop() { + static bool stop_called = false; + if (stop_called) { + static bool stop_warned = false; + if (!stop_warned) + SC_REPORT_WARNING("(W545) sc_stop has already been called", ""); + stop_warned = true; + return; + } + stop_called = true; + if (::sc_gem5::Kernel::status() == SC_STOPPED) return; |