summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-06-15 18:43:14 -0700
committerGabe Black <gabeblack@google.com>2018-08-22 01:07:24 +0000
commit60228015726d89122e92278bde2f34c2dbbec1e3 (patch)
tree3a1a60d594509562ddde44fd0b3ae9fbd77c6e82
parent8bc2186369d5981f0ef5826fad355c4b9663a78c (diff)
downloadgem5-60228015726d89122e92278bde2f34c2dbbec1e3.tar.xz
systemc: Add some nonstandard cthread related sc_module functions.
Change-Id: I73f9868b80f9b75e7bd90df6e894daea60a203a1 Reviewed-on: https://gem5-review.googlesource.com/11268 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
-rw-r--r--src/systemc/core/sc_module.cc48
-rw-r--r--src/systemc/ext/core/sc_module.hh16
2 files changed, 64 insertions, 0 deletions
diff --git a/src/systemc/core/sc_module.cc b/src/systemc/core/sc_module.cc
index 7e6b05976..a461022a3 100644
--- a/src/systemc/core/sc_module.cc
+++ b/src/systemc/core/sc_module.cc
@@ -376,6 +376,30 @@ sc_module::halt()
warn("%s not implemented.\n", __PRETTY_FUNCTION__);
}
+void
+sc_module::at_posedge(const sc_signal_in_if<bool> &)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
+void
+sc_module::at_posedge(const sc_signal_in_if<sc_dt::sc_logic> &)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
+void
+sc_module::at_negedge(const sc_signal_in_if<bool> &)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
+void
+sc_module::at_negedge(const sc_signal_in_if<sc_dt::sc_logic> &)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
void
next_trigger()
@@ -534,6 +558,30 @@ halt()
warn("%s not implemented.\n", __PRETTY_FUNCTION__);
}
+void
+at_posedge(const sc_signal_in_if<bool> &)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
+void
+at_posedge(const sc_signal_in_if<sc_dt::sc_logic> &)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
+void
+at_negedge(const sc_signal_in_if<bool> &)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
+void
+at_negedge(const sc_signal_in_if<sc_dt::sc_logic> &)
+{
+ warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+}
+
const char *
sc_gen_unique_name(const char *)
{
diff --git a/src/systemc/ext/core/sc_module.hh b/src/systemc/ext/core/sc_module.hh
index 931eb3a86..25053dfa1 100644
--- a/src/systemc/ext/core/sc_module.hh
+++ b/src/systemc/ext/core/sc_module.hh
@@ -36,6 +36,13 @@
#include "sc_sensitive.hh"
#include "sc_time.hh"
+namespace sc_dt
+{
+
+class sc_logic;
+
+} // namespace sc_dt
+
namespace sc_core
{
@@ -186,7 +193,12 @@ class sc_module : public sc_object
void wait(const sc_time &, const sc_event_and_list &);
void wait(double, sc_time_unit, const sc_event_and_list &);
+ // Nonstandard
void halt();
+ void at_posedge(const sc_signal_in_if<bool> &);
+ void at_posedge(const sc_signal_in_if<sc_dt::sc_logic> &);
+ void at_negedge(const sc_signal_in_if<bool> &);
+ void at_negedge(const sc_signal_in_if<sc_dt::sc_logic> &);
virtual void before_end_of_elaboration() {}
virtual void end_of_elaboration() {}
@@ -243,6 +255,10 @@ void wait(double, sc_time_unit, const sc_event_and_list &);
// stop the currently executing cthread, or if a cthread isn't running report
// an error.
void halt();
+void at_posedge(const sc_signal_in_if<bool> &);
+void at_posedge(const sc_signal_in_if<sc_dt::sc_logic> &);
+void at_negedge(const sc_signal_in_if<bool> &);
+void at_negedge(const sc_signal_in_if<sc_dt::sc_logic> &);
const char *sc_gen_unique_name(const char *);