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; };
×
×
  • Create New...