Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/11263

Change subject: systemc: Add the nonstandard, undocumented halt function.
......................................................................

systemc: Add the nonstandard, undocumented halt function.

Used in the tests.

Change-Id: I9b4f10600a50e0def1b5d55428cb4ad49e401295
---
M src/systemc/core/sc_module.cc
M src/systemc/ext/core/_using.hh
M src/systemc/ext/core/sc_module.hh
3 files changed, 22 insertions(+), 0 deletions(-)



diff --git a/src/systemc/core/sc_module.cc b/src/systemc/core/sc_module.cc
index 646916f..7e6b059 100644
--- a/src/systemc/core/sc_module.cc
+++ b/src/systemc/core/sc_module.cc
@@ -371,6 +371,13 @@


 void
+sc_module::halt()
+{
+    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
+
+void
 next_trigger()
 {
     warn("%s not implemented.\n", __PRETTY_FUNCTION__);
@@ -521,6 +528,12 @@
     warn("%s not implemented.\n", __PRETTY_FUNCTION__);
 }

+void
+halt()
+{
+    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
 const char *
 sc_gen_unique_name(const char *)
 {
diff --git a/src/systemc/ext/core/_using.hh b/src/systemc/ext/core/_using.hh
index 5f5a23a..32cbd70 100644
--- a/src/systemc/ext/core/_using.hh
+++ b/src/systemc/ext/core/_using.hh
@@ -87,6 +87,7 @@
 using sc_core::sc_module;
 using sc_core::next_trigger;
 using sc_core::wait;
+using sc_core::halt;
 using sc_core::sc_gen_unique_name;
 using sc_core::sc_behavior;
 using sc_core::sc_channel;
diff --git a/src/systemc/ext/core/sc_module.hh b/src/systemc/ext/core/sc_module.hh
index c83cf1d..931eb3a 100644
--- a/src/systemc/ext/core/sc_module.hh
+++ b/src/systemc/ext/core/sc_module.hh
@@ -186,6 +186,8 @@
     void wait(const sc_time &, const sc_event_and_list &);
     void wait(double, sc_time_unit, const sc_event_and_list &);

+    void halt();
+
     virtual void before_end_of_elaboration() {}
     virtual void end_of_elaboration() {}
     virtual void start_of_simulation() {}
@@ -236,6 +238,12 @@
 #define SC_THREAD(name) /* Implementation defined */
 #define SC_CTHREAD(name, clk) /* Implementation defined */

+// Nonstandard
+// Documentation for this is very scarce, but it looks like it's supposed to +// stop the currently executing cthread, or if a cthread isn't running report
+// an error.
+void halt();
+
 const char *sc_gen_unique_name(const char *);

 typedef sc_module sc_behavior;

--
To view, visit https://gem5-review.googlesource.com/11263
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I9b4f10600a50e0def1b5d55428cb4ad49e401295
Gerrit-Change-Number: 11263
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to