Jump to content

rfajardo

Members
  • Content Count

    4
  • Joined

  • Last visited


Reputation Activity

  1. Like
    rfajardo got a reaction from maehne in VCD File Timescale - VCD Trace set_time_unit()   
    I'd say it does not.
    Below you can see an example. I tried to attach it. But I am not allowed to.
    Raul

    #include <systemc.h> SC_MODULE(Testbench) { sc_trace_file * traceFile; sc_signal<bool> toggle_o; void toggle(); SC_CTOR(Testbench) { toggle_o = 0; traceFile = sc_create_vcd_trace_file("testbench"); traceFile->set_time_unit(10, SC_US); sc_trace(traceFile, toggle_o, "toggle_o"); SC_THREAD(toggle); } ~Testbench() { sc_close_vcd_trace_file(traceFile); } }; void Testbench::toggle() { while(true) { toggle_o = !toggle_o; wait(100, SC_US); } } int sc_main(int argc, char * argv[]) { Testbench testbench("Testbench"); sc_start(500, SC_US); //simulate for 500 microseconds return 0; }
×