Skip to content

Commit

Permalink
Extend vpi_escape with function and module names
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Oct 30, 2024
1 parent 98cea05 commit fd974a8
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test_regress/t/t_vpi_escape.v
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ extern "C" int mon_check();

sub \mod.with_dot (.cyc(cyc));

configure___0_ ___0_(clk);

initial begin

`ifdef VERILATOR
Expand Down Expand Up @@ -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

0 comments on commit fd974a8

Please sign in to comment.