omaima Posted September 23, 2020 Report Share Posted September 23, 2020 I'm trying to create vcd file for data gate and I got on this : Info: (I703) tracing timescale unit set: 1 ns (trace.vcd) Warning: (W571) no activity or clock movement for sc_start() invocation In file: ../../../src/sysc/kernel/sc_simcontext.cpp:1742 my cod: //andh.h file #include <systemc.h> SC_MODULE(andh){ sc_in<bool> a; sc_in<bool> b; sc_out<bool> o; void and_process(){ o.write(a.read()&&b.read()); } SC_CTOR(andh){ SC_METHOD(and_process); sensitive<<a<<b; } }; //////////////////////////////////////////////////////////////////////////////////// andh.cpp file #include<systemc.h> #include"andh.h" #define SC_MAKE_VERSION( x, y, z ) \ (((x)*10000) + ((y)*100) + (z)) int sc_main(int argc, char*argv[]) { andh and1("and1"); sc_signal<bool> A,B,O; and1.a(A); and1.b(B); and1.o(O); sc_start(SC_ZERO_TIME); sc_trace_file *tf=sc_create_vcd_trace_file("trace"); tf->set_time_unit(1,SC_NS); sc_trace(tf,A,"A"); sc_trace(tf,B,"B"); sc_trace(tf,O,"O"); A=0;B=0; sc_start(10,SC_MS); for(int i=0;i<10;i++){ A=((i& 0x1)!=0); B=((i& 0x2)!=0); sc_start(10,SC_NS); } sc_close_vcd_trace_file(tf); sc_start(); return 0; } /////////////////////////////////////////////////////////////////////////////////////////////// this is Warning message Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted September 23, 2020 Report Share Posted September 23, 2020 Hello @omaima, You probably want to replace the following lines: 31 minutes ago, omaima said: sc_close_vcd_trace_file(tf); sc_start(); with: sc_stop(); sc_close_vcd_trace_file(tf); Also, I would recommend that you go through the examples folder in the SystemC sources to try and understand various modelling techniques. Hope this helps. Regards, Ameya Vikram Singh Quote Link to comment Share on other sites More sharing options...
Eyck Posted September 23, 2020 Report Share Posted September 23, 2020 You also need to change the order of sc_start and trace file creation: sc_trace_file *tf=sc_create_vcd_trace_file("trace"); tf->set_time_unit(1,SC_NS); sc_trace(tf,A,"A"); sc_trace(tf,B,"B"); sc_trace(tf,O,"O"); sc_start(SC_ZERO_TIME); Afaik the kernel will not add traces once the simulation passed end of elaboration (which happens with the very first call of sc_start()) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.