veripool / verilog-perl

Verilog parser, preprocessor, and related tools for the Verilog-Perl package
https://www.veripool.org/verilog-perl
Artistic License 2.0
119 stars 33 forks source link

parameter follows a '%' does not get replaced with obfuscated string #1674

Closed BlueStar-WhiteBirds closed 2 years ago

BlueStar-WhiteBirds commented 2 years ago

signal map: sigren "WREP_E_MAX" "wcgmtr" sigren "DEPTH" "nlutbe" sigren "WREP" "lwmlpe"

Source code: parameter WREP_E_MAX = (WIDTH>=4096) ? 1 : (4096/WIDTH); localparam WREP = (DEPTH/WREP_E_MAX) + (((DEPTH%WREP_E_MAX)>0) ? 1 : 0);

Obfusated result: parameter wcgmtr = (WIDTH>=4096) ? 1 : (4096/WIDTH); localparam lwmlpe = (nlutbe/wcgmtr) + (((nlutbe%WREP_E_MAX)>0) ? 1 : 0);

This issue is seen at master branch with commit 465242251b06588c862afb22f76baadb51864ff8.

wsnyder commented 2 years ago

Please try the version in master. If that works and you want I can push a new revision out.

BlueStar-WhiteBirds commented 2 years ago

It worked at commit 8f8e6201f50276ee02ecdea1446d71438ad782f7. Thank you!