Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/10851
Change subject: systemc: Add some missing sc_signal template
specializations.
......................................................................
systemc: Add some missing sc_signal template specializations.
There are supposed to be two template specializations for the sc_signal
class, one for bool and one for sc_dt::sc_logic. These were
accidentally ommitted from the sc_signal.hh header.
Change-Id: Id046bb00c71422004e85f0db903a9c353f3cc137
---
M src/systemc/ext/channel/sc_signal.hh
1 file changed, 260 insertions(+), 0 deletions(-)
diff --git a/src/systemc/ext/channel/sc_signal.hh
b/src/systemc/ext/channel/sc_signal.hh
index 3e70f83..569dd3c 100644
--- a/src/systemc/ext/channel/sc_signal.hh
+++ b/src/systemc/ext/channel/sc_signal.hh
@@ -149,6 +149,266 @@
return os;
}
+template <sc_writer_policy WRITER_POLICY>
+class sc_signal<bool, WRITER_POLICY> :
+ public sc_signal_inout_if<bool>, public sc_prim_channel
+{
+ public:
+ sc_signal()
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+ explicit sc_signal(const char *)
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+ virtual ~sc_signal()
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+
+ virtual void
+ register_port(sc_port_base &, const char *)
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+
+ virtual const bool &
+ read() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(const bool *)nullptr;
+ }
+ operator const bool &() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(const bool *)nullptr;
+ }
+
+ virtual sc_writer_policy
+ get_writer_policy() const
+ {
+ return WRITER_POLICY;
+ }
+ virtual void
+ write(const bool &)
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+ sc_signal<bool, WRITER_POLICY> &
+ operator = (const bool &)
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *this;
+ }
+ sc_signal<bool, WRITER_POLICY> &
+ operator = (const sc_signal<bool, WRITER_POLICY> &)
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *this;
+ }
+
+ virtual const sc_event &
+ default_event() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(sc_event *)nullptr;
+ }
+
+ virtual const sc_event &
+ value_changed_event() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(sc_event *)nullptr;
+ }
+ virtual const sc_event &
+ posedge_event() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(sc_event *)nullptr;
+ }
+ virtual const sc_event &
+ negedge_event() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(sc_event *)nullptr;
+ }
+
+ virtual bool
+ event() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return false;
+ }
+ virtual bool
+ posedge() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return false;
+ }
+ virtual bool
+ negedge() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return false;
+ }
+
+ virtual void
+ print(std::ostream & =std::cout) const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+ virtual void
+ dump(std::ostream & =std::cout) const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+ virtual const char *kind() const { return "sc_signal"; }
+
+ protected:
+ virtual void
+ update()
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+
+ private:
+ // Disabled
+ sc_signal(const sc_signal<bool, WRITER_POLICY> &) :
+ sc_signal_inout_if<bool>(), sc_prim_channel("")
+ {}
+};
+
+template <sc_writer_policy WRITER_POLICY>
+class sc_signal<sc_dt::sc_logic, WRITER_POLICY> :
+ public sc_signal_inout_if<sc_dt::sc_logic>, public sc_prim_channel
+{
+ public:
+ sc_signal()
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+ explicit sc_signal(const char *)
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+ virtual ~sc_signal()
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+
+ virtual void
+ register_port(sc_port_base &, const char *)
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+
+ virtual const sc_dt::sc_logic &
+ read() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(const sc_dt::sc_logic *)nullptr;
+ }
+ operator const sc_dt::sc_logic &() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(const sc_dt::sc_logic *)nullptr;
+ }
+
+ virtual sc_writer_policy
+ get_writer_policy() const
+ {
+ return WRITER_POLICY;
+ }
+ virtual void
+ write(const sc_dt::sc_logic &)
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+ sc_signal<sc_dt::sc_logic, WRITER_POLICY> &
+ operator = (const sc_dt::sc_logic &)
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *this;
+ }
+ sc_signal<sc_dt::sc_logic, WRITER_POLICY> &
+ operator = (const sc_signal<sc_dt::sc_logic, WRITER_POLICY> &)
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *this;
+ }
+
+ virtual const sc_event &
+ default_event() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(sc_event *)nullptr;
+ }
+
+ virtual const sc_event &
+ value_changed_event() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(sc_event *)nullptr;
+ }
+ virtual const sc_event &
+ posedge_event() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(sc_event *)nullptr;
+ }
+ virtual const sc_event &
+ negedge_event() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return *(sc_event *)nullptr;
+ }
+
+ virtual bool
+ event() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return false;
+ }
+ virtual bool
+ posedge() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return false;
+ }
+ virtual bool
+ negedge() const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ return false;
+ }
+
+ virtual void
+ print(std::ostream & =std::cout) const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+ virtual void
+ dump(std::ostream & =std::cout) const
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+ virtual const char *kind() const { return "sc_signal"; }
+
+ protected:
+ virtual void
+ update()
+ {
+ sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ }
+
+ private:
+ // Disabled
+ sc_signal(const sc_signal<sc_dt::sc_logic, WRITER_POLICY> &) :
+ sc_signal_inout_if<sc_dt::sc_logic>(), sc_prim_channel("")
+ {}
+};
+
} // namespace sc_core
#endif //__SYSTEMC_EXT_CHANNEL_SC_SIGNAL_HH__
--
To view, visit https://gem5-review.googlesource.com/10851
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: Id046bb00c71422004e85f0db903a9c353f3cc137
Gerrit-Change-Number: 10851
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