From fd974a834c3094b171cd51b04bc7bdc59af4483d Mon Sep 17 00:00:00 2001 From: Ryszard Rozak Date: Wed, 30 Oct 2024 16:43:39 +0100 Subject: [PATCH] Extend vpi_escape with function and module names Signed-off-by: Ryszard Rozak --- test_regress/t/t_vpi_escape.v | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/test_regress/t/t_vpi_escape.v b/test_regress/t/t_vpi_escape.v index b575dc199c..6af4dd86c4 100644 --- a/test_regress/t/t_vpi_escape.v +++ b/test_regress/t/t_vpi_escape.v @@ -63,6 +63,8 @@ extern "C" int mon_check(); sub \mod.with_dot (.cyc(cyc)); + configure___0_ ___0_(clk); + initial begin `ifdef VERILATOR @@ -116,3 +118,32 @@ module sub ( wire redundant = subsig1 | subsig2 | \b.c ; `endif endmodule + +module configure___0_(input clk); + function void assert0; + endfunction + function void assert_0; + endfunction + // Scope with a __0 that should not be encoded as '\0' + function void assert__0_; + endfunction + // Scope with special characters + function void assert___0$; + endfunction + // Scope with characters resembling decoded '_' + function void assert___05F; + endfunction + // Scope with characters resembling decoded '_' and 0 after it + function void assert___05F0; + endfunction + + initial begin + assert0(); + assert_0(); + assert__0_(); + assert___0$(); + assert___05F(); + assert___05F0(); + $finish; + end +endmodule