diff --git a/src/V3EmitCFunc.h b/src/V3EmitCFunc.h index 45f863d21..d7ff08772 100644 --- a/src/V3EmitCFunc.h +++ b/src/V3EmitCFunc.h @@ -876,7 +876,7 @@ public: } void visit(AstPrintTimeScale* nodep) override { puts("VL_PRINTTIMESCALE("); - putsQuoted(protect(nodep->name())); + putsQuoted(protect(nodep->prettyName())); puts(", "); putsQuoted(nodep->timeunit().ascii()); puts(", vlSymsp->_vm_contextp__);\n"); diff --git a/test_regress/t/t_timescale_unit.out b/test_regress/t/t_timescale_unit.out index 6f3bba3f0..dca44f779 100644 --- a/test_regress/t/t_timescale_unit.out +++ b/test_regress/t/t_timescale_unit.out @@ -1,4 +1,4 @@ -Time scale of __024unit is 10ps / 10ps +Time scale of $unit is 10ps / 10ps Time scale of from_unit is 10ps / 10ps Time scale of t is 100ps / 10ps *-* All Finished *-*