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 > a;
      float b;
      sc_trace(trace_file, a, "MyA");
      sc_trace(trace_file, b, "MyB");

      sc_start(1000, SC_NS);  // Simulate for one microsecond
      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-11, DJ Greaves, University of Cambridge, Computer Laboratory.