These match error checks which are already in, for instance, the
sc_port constructor.
Change-Id: I8dfb4ce37bf0e59c6fa879f0afda5112af78b40b
Reviewed-on: https://gem5-review.googlesource.com/c/13290
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
sc_module::sc_module() :
sc_object(sc_gem5::newModuleChecked()->name()),
_gem5_module(sc_gem5::currentModule())
-{}
+{
+ if (sc_is_running()) {
+ SC_REPORT_ERROR("(E529) insert module failed", "simulation running");
+ std::cout << "Running!\n";
+ }
+ if (::sc_gem5::scheduler.elaborationDone()) {
+ SC_REPORT_ERROR("(E529) insert module failed", "elaboration done");
+ std::cout << "Elaboration done!\n";
+ }
+}
sc_module::sc_module(const sc_module_name &) : sc_module() {}
sc_module::sc_module(const char *_name) : sc_module(sc_module_name(_name))