Jump to content

ehsanullah

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Hi everybody.. Well i am new with systemC and working for the first time on it... I have tried to implement a basic D Flip Flop circuit. The aim is to connect two D-Flip Flop in series to form a Johnson counter. (But right now i am trying to test only 1 flip flop) The code is as follows: SC_MODULE(dff){ sc_in_clk clk; sc_in<bool>d; sc_out<bool> q; void dff::pro_dff() {q=d;} SC_CTOR(dff){ SC_METHOD(pro_dff); sensitive<<clk.pos();} }; SC_MODULE(my_mod){ sc_in_clk clk; sc_in<bool>a; sc_out<bool>b; dff *d1; void do_pro() { while (true) { d1->
×
×
  • Create New...