Jump to content

labrota

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. I implemented the customized sc_channel struct T { sc_uint<2> a; sc_uint<2> b; }; class write_me : virtual public sc_interface { public: virtual void write(T &d) = 0; }; class read_me : virtual public sc_interface { public: virtual T read() = 0; }; class channel_me : public sc_channel, public write_me, public read_me { public: channel_me (sc_module_name name) : sc_channel(name) {} void write(T &d) {data = d;} T read(){ return T(data);} private: T data; }; in my module, I have one SC_METHOD(comb) as below sc_port<read_me> rd; sc_signal< sc_uint<2> > s_a; sc_signal< sc_uint<2> > s_b; void comb() { s_a.write( rd.read().a); s_b.write(rd.read().b); } But then there is one such warning. I understand it is complaining "sensitive << rd;" but there is no sensitive list for rd. Is there any one who has better suggestions? Warning: (W116) channel doesn't have a default event In addition, I think my aim is to implement the same thing in the thread https://forums.accellera.org/topic/5956-why-there-is-no-standard-interface-class-in-systemc/ Please do suggest what can be a better coding style.
×
×
  • Create New...