u24c02
Advanced Member level 1
- Joined
- May 8, 2012
- Messages
- 404
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,298
- Activity points
- 4,101
Hi.
i made simple inverter by clock.
I trying to trace "popo_in", "popo_out". popo_in have normally transition and i checked from vcd.
But popo_out is not work(it's not having transition). what is wrong ?
Here's problems.
i made simple inverter by clock.
I trying to trace "popo_in", "popo_out". popo_in have normally transition and i checked from vcd.
But popo_out is not work(it's not having transition). what is wrong ?
Here's problems.
Code C++ - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 #include <systemc.h> class popo_clk_gen : public sc_module { public: sc_out<bool> popo_out; sc_in<bool> popo_in; SC_HAS_PROCESS(popo_clk_gen); void test() { int i=0; { popo_out = ~popo_in; } } popo_clk_gen(sc_module_name name) : sc_module(name) { SC_METHOD(test); sensitive(popo_out); } }; int sc_main (int, char *[]) { sc_signal<bool> popo_out; sc_signal<bool> popo_in; sc_clock clk1("clk1",10,SC_NS); popo_clk_gen pcg("pcg"); pcg.popo_out(popo_out); pcg.popo_in(clk1); sc_trace_file *tf = sc_create_vcd_trace_file("wave"); sc_trace(tf,clk1, "clock"); sc_trace(tf,pcg.popo_in, "in_clk"); sc_trace(tf,pcg.popo_out, "out_clk"); sc_start(50,SC_NS); sc_close_vcd_trace_file(tf); return 0; }
Last edited by a moderator: