Jump to content

viswanathb

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. My intention is to devise a clock multiplier or divider circuit based on a reference clock. //CLOCK DUT //clk_dut.h #include "systemc.h" SC_MODULE(clk_dut) { void gen() { double ref_clk =100; double clk1_div =10; double clk2_div=5; sc_clock refclk("refclk",ref_clk,SC_NS); sc_clock clk1("clk1",ref_clk/clk1_div,SC_NS); sc_clock clk2("clk2",ref_clk/clk2_div,SC_NS); } SC_CTOR(clk_dut) { SC_THREAD(gen); sensitive << refclk.pos() << clk1.pos() << clk2.pos(); } }; //TOP MODULE #include "systemc.h" #include "clk_dut.h" int sc_main(int argc,char *ar
  2. I have a sample systemc program wherein temp is declared as a sc_signal and the rest of the signals are declared as input/output ports. SC_MODULE(clk_dut) { sc_in clk_in; sc_in reset; sc_out clk_out; sc_signal temp; In sc_main() i have instantiated submodules made connections and created the sc_trace file sc_trace_file *fp; fp=sc_create_vcd_trace_file("wave"); sc_trace(fp,clock1,"clk_in"); sc_trace(fp,t_reset,"reset"); sc_trace(fp,t_clk_out,"clk_out"); But how do i trace an internal signal 'temp' created in the dut module of the cod
×
×
  • Create New...