Jump to content

ehsanullah

Members
  • Content count

    2
  • Joined

  • Last visited

  1. Thanks Alan.I got your point.. That link helped a lot....
  2. 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->d(a); d1->q(; wait(); } } SC_CTOR(my_mod){ d1 = new dff("My_dff"); d1->clk(clk); SC_THREAD(do_pro); sensitive<<clk.pos(); } }; But when i run this program in sc_main it gives port binding error. what is wrong with the port binding?... and also please tell me that is the correct port binding method in systemC. I am using systemc v 2.1. The error message is as follows.. Error:<E109> complete binding failed: port not bound: port 'TEST_UNIT.My_dff.port_2' <sc_out> In file: ....\systemc-2.1.v1\src\sysc\communication\sc_port.cpp196 Please help me to resolve this problem.. thanks in Advance.
×