summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-12-10 23:19:56 -0800
committerGabe Black <gabeblack@google.com>2019-01-09 01:33:55 +0000
commitb890b471812ffef669e9bb059ee5bcddd04ba0b1 (patch)
tree6c076d55f6c7b1721b9fe7bd9ed34afb2adb2fc3
parent32e20b3ceb3bc5066b94af845f489b10c7e68c36 (diff)
downloadgem5-b890b471812ffef669e9bb059ee5bcddd04ba0b1.tar.xz
systemc: Add an elaboration_done method to sc_simcontext.
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>
-rw-r--r--src/systemc/core/sc_simcontext.cc6
-rw-r--r--src/systemc/ext/core/sc_simcontext.hh3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/systemc/core/sc_simcontext.cc b/src/systemc/core/sc_simcontext.cc
index f8cf3eb44..4e1303890 100644
--- a/src/systemc/core/sc_simcontext.cc
+++ b/src/systemc/core/sc_simcontext.cc
@@ -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()
{
diff --git a/src/systemc/ext/core/sc_simcontext.hh b/src/systemc/ext/core/sc_simcontext.hh
index 4beb8b73e..ce4e8f830 100644
--- a/src/systemc/ext/core/sc_simcontext.hh
+++ b/src/systemc/ext/core/sc_simcontext.hh
@@ -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();