Aug 3, 2006 #1 Y yeewang Full Member level 2 Joined Feb 4, 2002 Messages 128 Helped 7 Reputation 14 Reaction score 2 Trophy points 1,298 Activity points 1,042 systemc question what 's the easiest way to convert and connect sc_clock to sc_in<sc_logic> port. eg. sc_clock clk; .... .... inst *a; a = new inst("instance"); a->clk( ***** ); // in a, clk is declared as sc_in<sc_logic> I need to connect sc_clock to this a->clk but due to the different types, the compile forbids me from doing that. any ideas? THX
systemc question what 's the easiest way to convert and connect sc_clock to sc_in<sc_logic> port. eg. sc_clock clk; .... .... inst *a; a = new inst("instance"); a->clk( ***** ); // in a, clk is declared as sc_in<sc_logic> I need to connect sc_clock to this a->clk but due to the different types, the compile forbids me from doing that. any ideas? THX
Aug 3, 2006 #2 N nand_gates Advanced Member level 3 Joined Jul 19, 2004 Messages 899 Helped 175 Reputation 350 Reaction score 53 Trophy points 1,308 Activity points 7,037 Re: systemc question Your statement itself Code: sc_clock clk; is wrong! It should be something like Code: sc_clock clk ("clk", 10, SC_NS, 0.5); Checkout this and let us know!
Re: systemc question Your statement itself Code: sc_clock clk; is wrong! It should be something like Code: sc_clock clk ("clk", 10, SC_NS, 0.5); Checkout this and let us know!
Aug 3, 2006 #3 Y yeewang Full Member level 2 Joined Feb 4, 2002 Messages 128 Helped 7 Reputation 14 Reaction score 2 Trophy points 1,298 Activity points 1,042 systemc question sorry, i just typed in an example, the sc_clock constructor is NOT complete.... in the real code, I did use the code piece like you wrote. that's not what my question is about.
systemc question sorry, i just typed in an example, the sc_clock constructor is NOT complete.... in the real code, I did use the code piece like you wrote. that's not what my question is about.
Aug 3, 2006 #4 N nand_gates Advanced Member level 3 Joined Jul 19, 2004 Messages 899 Helped 175 Reputation 350 Reaction score 53 Trophy points 1,308 Activity points 7,037 Re: systemc question Can you post ur complete code here ??