systemc: Add an elaboration_done method to sc_simcontext.
authorGabe Black <gabeblack@google.com>
Tue, 11 Dec 2018 07:19:56 +0000 (23:19 -0800)
committerGabe Black <gabeblack@google.com>
Wed, 9 Jan 2019 01:33:55 +0000 (01:33 +0000)
The TLM headers rely on this non-standard function.

Change-Id: Iaedec35f1f363dcf3e1fcdb58a74eb2cdc05ddc0
Reviewed-on: https://gem5-review.googlesource.com/c/15061
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

src/systemc/core/sc_simcontext.cc
src/systemc/ext/core/sc_simcontext.hh

index f8cf3eb44fd5118b816ab4b5290976b20b0cddbf..4e1303890fd8e29083f6fb2c3f7af19121f68ab4 100644 (file)
@@ -77,6 +77,12 @@ sc_simcontext::next_object()
         return nullptr;
 }
 
+bool
+sc_simcontext::elaboration_done()
+{
+    return ::sc_gem5::scheduler.elaborationDone();
+}
+
 sc_simcontext *
 sc_get_curr_simcontext()
 {
index 4beb8b73e0fc34b10a91a690a44e46a4cd4a651e..ce4e8f8306351eaa601d2373efcac2a4cd5e1e69 100644 (file)
@@ -44,6 +44,9 @@ class sc_simcontext
     sc_curr_proc_handle get_curr_proc_info();
     sc_object *first_object();
     sc_object *next_object();
+
+    // Used by TLM.
+    bool elaboration_done();
 };
 
 sc_simcontext *sc_get_curr_simcontext();