diff options
Diffstat (limited to 'src/systemc/core/kernel.cc')
-rw-r--r-- | src/systemc/core/kernel.cc | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/src/systemc/core/kernel.cc b/src/systemc/core/kernel.cc index dc5a86148..ca99e1932 100644 --- a/src/systemc/core/kernel.cc +++ b/src/systemc/core/kernel.cc @@ -75,15 +75,8 @@ Kernel::init() fatal("Simulation called sc_stop during elaboration.\n"); status(::sc_core::SC_BEFORE_END_OF_ELABORATION); - for (auto m: sc_gem5::allModules) { - callbackModule(m); - m->sc_mod()->before_end_of_elaboration(); - for (auto p: m->ports) - p->before_end_of_elaboration(); - for (auto e: m->exports) - e->before_end_of_elaboration(); - } - callbackModule(nullptr); + for (auto m: sc_gem5::allModules) + m->beforeEndOfElaboration(); for (auto c: sc_gem5::allChannels) c->sc_chan()->before_end_of_elaboration(); } @@ -100,15 +93,8 @@ Kernel::regStats() p->_gem5Finalize(); status(::sc_core::SC_END_OF_ELABORATION); - for (auto m: sc_gem5::allModules) { - callbackModule(m); - m->sc_mod()->end_of_elaboration(); - for (auto p: m->ports) - p->end_of_elaboration(); - for (auto e: m->exports) - e->end_of_elaboration(); - } - callbackModule(nullptr); + for (auto m: sc_gem5::allModules) + m->endOfElaboration(); for (auto c: sc_gem5::allChannels) c->sc_chan()->end_of_elaboration(); } catch (...) { @@ -131,14 +117,8 @@ Kernel::startup() try { status(::sc_core::SC_START_OF_SIMULATION); - for (auto m: sc_gem5::allModules) { - m->sc_mod()->start_of_simulation(); - for (auto p: m->ports) - p->start_of_simulation(); - for (auto e: m->exports) - e->start_of_simulation(); - } - callbackModule(nullptr); + for (auto m: sc_gem5::allModules) + m->startOfSimulation(); for (auto c: sc_gem5::allChannels) c->sc_chan()->start_of_simulation(); } catch (...) { @@ -167,14 +147,8 @@ Kernel::stopWork() { status(::sc_core::SC_END_OF_SIMULATION); try { - for (auto m: sc_gem5::allModules) { - m->sc_mod()->end_of_simulation(); - for (auto p: m->ports) - p->end_of_simulation(); - for (auto e: m->exports) - e->end_of_simulation(); - } - callbackModule(nullptr); + for (auto m: sc_gem5::allModules) + m->endOfSimulation(); for (auto c: sc_gem5::allChannels) c->sc_chan()->end_of_simulation(); } catch (...) { |