systemc: Track the module who's end_of_elaboration callback we're in.
authorGabe Black <gabeblack@google.com>
Wed, 29 Aug 2018 07:05:23 +0000 (00:05 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 3 Oct 2018 00:14:45 +0000 (00:14 +0000)
Change-Id: Ib5fe3232cfea26df0c3396c583fd80da429cbdd5
Reviewed-on: https://gem5-review.googlesource.com/c/12442
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/core/kernel.cc

index 24d9f22b2d8ee851d1a4b107a122a296012f3251..fd51b4c525d16afc2efd7bc3c2814abc6348985d 100644 (file)
@@ -103,12 +103,14 @@ Kernel::regStats()
 
     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 c: sc_gem5::allChannels)
         c->sc_chan()->end_of_elaboration();