HOME       UP       PREV       |ENDOFPACK|

SystemC Plotting and GUI

We can plot to industry standard VCD files and view with gtkwave (or modelsim).

      sc_trace_file *tf = sc_create_vcd_trace_file("tracefile");

      // Now call:
      // sc_trace(tf, , );

      sc_signal < int > foo;
      float bar;
      sc_trace(tf, foo);
      sc_trace(tf, bar, "bar"); // Give name if anon constuctor

      sc_start(1000, SC_NS);  // Simulate for one microsecond
      sc_close_vcd_trace_file(tr);
      return 0; 


Waveform view plotted by gtkwave.

VCD can be viewed with gtkwave or in modelsim.

There are various other commercial interactive viewer tools...

»Try-it-yourself on PWF


16: (C) 2008-12, DJ Greaves, University of Cambridge, Computer Laboratory.