Skip to content

Commit

Permalink
Commentary (verilator#4930)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsnyder committed Mar 4, 2024
1 parent 3f0d434 commit 5dc8fb5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/guide/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,13 @@ How do I generate waveforms (traces) in C++?

See also the next question for tracing in SystemC mode.

A. Pass the :vlopt:`--trace` option to Verilator, and in your top-level C
code, call ``Verilated::traceEverOn(true)``. Then you may use
``$dumpfile`` and ``$dumpvars`` to enable traces, the same as with any
Verilog simulator. See ``examples/make_tracing_c`` in the distribution.
A. Pass the :vlopt:`--trace` option to Verilator. Then you may use ``$dumpfile`` and
``$dumpvars`` to enable traces, the same as with any Verilog simulator,
although Verilator ignores the arguments to ``$dumpvars``. See
``examples/make_tracing_c`` in the distribution.

If writing the top-level C code, call ``Verilated::traceEverOn(true)``;
this is done for you if using :vlopt:`--binary`.

B. Or, for finer-grained control, or C++ files with multiple Verilated
modules, you may also create the trace purely from C++. Create a
Expand Down

0 comments on commit 5dc8fb5

Please sign in to comment.