diff --git a/src/V3EmitCModel.cpp b/src/V3EmitCModel.cpp index 2ceeafbde..25a7368c0 100644 --- a/src/V3EmitCModel.cpp +++ b/src/V3EmitCModel.cpp @@ -197,9 +197,11 @@ class EmitCModel final : public EmitCFunc { puts("/// Returns time at next time slot. Aborts if !eventsPending()\n"); puts("uint64_t nextTimeSlot();\n"); - puts("/// Trace signals in the model; called by application code\n"); - puts("void trace(" + v3Global.opt.traceClassBase() - + "C* tfp, int levels, int options = 0);\n"); + if (v3Global.opt.trace() || !optSystemC()) { + puts("/// Trace signals in the model; called by application code\n"); + puts("void trace(" + v3Global.opt.traceClassBase() + + "C* tfp, int levels, int options = 0);\n"); + } if (v3Global.opt.trace() && optSystemC()) { puts("/// SC tracing; avoid overloaded virtual function lint warning\n"); puts("void trace(sc_trace_file* tfp) const override { " diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 69c8cccb4..05b4c2ed9 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -2245,6 +2245,7 @@ sub files_identical { $l1[$l] =~ s/CPU Time: +[0-9.]+ seconds[^\n]+/CPU Time: ###/mig; $l1[$l] =~ s/\?v=[0-9.]+/?v=latest/mig; # warning URL $l1[$l] =~ s/_h[0-9a-f]{8}_/_h########_/mg; + $l1[$l] =~ s!%Error: \./!%Error: !mg; # clang gives ./ while GCC does not $l1[$l] =~ s/ \/[^ ]+\/verilated_std.sv/ verilated_std.sv/mg; if ($l1[$l] =~ s/Exiting due to.*/Exiting due to/mig) { splice @l1, $l+1; # Trunc rest