Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

VCD issue

Added by Stephen Henry over 1 year ago

Has something changed recently w.r.t to waveform creation? Using version 3.920 with a simple example:

SV:
module foo (output logic y, input a, input b);
  always_comb y  = a | b;
endmodule // foo
CC:
#include <iostream>
#include <systemc>
#include "verilated_vcd_sc.h" 
#include "obj_dir/Vfoo.h" 

SC_MODULE(bar) {
  SC_CTOR(bar) : foo("foo") {
    Verilated::traceEverOn(true);
    v = new VerilatedVcdSc;
    foo.trace(v, 99);
    v->open("bar.vcd");

    foo.y(y);
    foo.a(a);
    foo.b(b);

    SC_THREAD(t);
    SC_METHOD(m);
    sensitive << a.posedge_event();
    dont_initialize();
  }
  void m() { std::cout << "TICK\n"; }
  void t() {
    wait(1000, sc_core::SC_US);
    v->flush();
    v->close();
    delete v;
    sc_core::sc_stop();
  }
  sc_core::sc_signal<bool> y;
  sc_core::sc_clock a, b;
  Vfoo foo;
  VerilatedVcdSc * v;
};

int sc_main (int argc, char **argv) {
  bar b("b");
  sc_core::sc_start();
  return 0;
}
Command line:
verilator --trace --exe --sc foo.sv foo.cc
make -f Vfoo.mk -Cobj_dir
./obj_dir/Vfoo

I receive the following VCD:

$version Generated by VerilatedVcd $end
$date Tue Mar 13 23:55:36 2018
 $end
$timescale   1ps $end

 $scope module b.foo $end
  $scope module foo $end
   $var wire  1 $ a $end
   $var wire  1 % b $end
   $var wire  1 # y $end
  $upscope $end
 $upscope $end
$enddefinitions $end

Try as I may, I cannot obtain actual waveform data in the VCD. Previously (I believe) this would have worked fine. This is on OS X 10.13, using both GIT master and the installation in Brew (both 3.920).

I do note the following in the Trace__Slow.cpp file:

// Tracing: y // Ignored: Verilator trace_off at foo.sv:1
// Tracing: a // Ignored: Verilator trace_off at foo.sv:1
// Tracing: b // Ignored: Verilator trace_off at foo.sv:1

(although I have never explicitly disabled tracing for these signals). I do not see any calls to any tracing routines in the Vfoo::_eval method, I assume that there should.

Help appreciated.

Steve


Replies (2)

RE: VCD issue - Added by Wilson Snyder over 1 year ago

Using 3.920 or git head this works for me on Ubuntu 16.04 and SystemC 2.3.1, although it seemed to TICK for a long time, are you sure you used this exact example? Sorry but I don't have a OS X system to try it on, though it would be strange if the result was different.

RE: VCD issue - Added by Stephen Henry over 1 year ago

Reverting back to SystemC 2.3.1 the problem has resolved. Just rebuilt 2.3.2 from source and linked against the new library in a temporary location and the I can no longer reproduce the failure. Same code otherwise. Must have been an installation issue on my side; apologies.

    (1-2/2)