diff options
author | Gabe Black <gabeblack@google.com> | 2018-08-08 02:02:25 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-09-20 01:42:51 +0000 |
commit | de45562a8abae66ada57a3fc06078fadbd9f625b (patch) | |
tree | 7624047d4e5e96c42d826e3df5a741191d3333c9 /src/systemc/core/kernel.cc | |
parent | 3c9da9cdfb1612062f7a7537de00b819cc4300b6 (diff) | |
download | gem5-de45562a8abae66ada57a3fc06078fadbd9f625b.tar.xz |
systemc: Track the module in the end_of_elaboration callback.
sc_objects constructed during that callback are considered children of
the module the callback belongs to.
Change-Id: I164863a10beef6d0e2c6d9c5e8f2642d80769dca
Reviewed-on: https://gem5-review.googlesource.com/12076
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/kernel.cc')
-rw-r--r-- | src/systemc/core/kernel.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/systemc/core/kernel.cc b/src/systemc/core/kernel.cc index 3e3bdbdde..4eb0bb765 100644 --- a/src/systemc/core/kernel.cc +++ b/src/systemc/core/kernel.cc @@ -64,8 +64,11 @@ void Kernel::init() { status(::sc_core::SC_BEFORE_END_OF_ELABORATION); - for (auto m: sc_gem5::allModules) + for (auto m: sc_gem5::allModules) { + callbackModule(m); m->sc_mod()->before_end_of_elaboration(); + } + callbackModule(nullptr); if (stopAfterCallbacks) stopWork(); |