New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lint: DECLFILENAME warning is picking up a blackboxed module inside the actual module #2430
Comments
Verilator makes internal notfiundmodules for modules like this. Probably that warning doesn't disable with that (when 'VN_IS(nodep, NotFoundModule)'). Perhaps you could attempt a pull request to fix this with a failing test that it fixes? |
I actually wanted to look into a fix for quite a while but didn't find time for it. At least this issue now gives someone else the chance to beat me to it 😄 |
Increasing the pressure by assigning to @imphil ;) |
When running Verilator lint with blackboxed modules, we get warnings like the ones below: ``` %Warning-DECLFILENAME: ../../../vendor/lowrisc_ip/prim_xilinx/rtl/prim_xilinx_clock_gating.sv:12:10: Filename 'prim_xilinx_clock_gating' does not match NOTFOUNDMODULE name: 'BUFGCE' 12 | BUFGCE u_bufgce ( | ^~~~~~~~ ... Use "/* verilator lint_off DECLFILENAME */" and lint_on around source to disable this message. %Warning-DECLFILENAME: ../../../vendor/lowrisc_ip/prim_xilinx/rtl/prim_xilinx_clock_mux2.sv:17:11: Filename 'prim_xilinx_clock_mux2' does not match NOTFOUNDMODULE name: 'BUFGMUX' 17 | BUFGMUX bufgmux_i ( | ^~~~~~~~~ %Warning-DECLFILENAME: ../../../vendor/lowrisc_ip/prim_xilinx/rtl/prim_xilinx_pad_wrapper.sv:36:9: Filename 'prim_xilinx_pad_wrapper' does not match NOTFOUNDMODULE name: 'IOBUF' 36 | IOBUF i_iobuf ( | ^~~~~~~ ``` This is due to verilator/verilator#2430. Until the issue is fixed, disable this lint error. Signed-off-by: Philipp Wagner <phw@lowrisc.org>
When running Verilator lint with blackboxed modules, we get warnings like the ones below: ``` %Warning-DECLFILENAME: ../../../vendor/lowrisc_ip/prim_xilinx/rtl/prim_xilinx_clock_gating.sv:12:10: Filename 'prim_xilinx_clock_gating' does not match NOTFOUNDMODULE name: 'BUFGCE' 12 | BUFGCE u_bufgce ( | ^~~~~~~~ ... Use "/* verilator lint_off DECLFILENAME */" and lint_on around source to disable this message. %Warning-DECLFILENAME: ../../../vendor/lowrisc_ip/prim_xilinx/rtl/prim_xilinx_clock_mux2.sv:17:11: Filename 'prim_xilinx_clock_mux2' does not match NOTFOUNDMODULE name: 'BUFGMUX' 17 | BUFGMUX bufgmux_i ( | ^~~~~~~~~ %Warning-DECLFILENAME: ../../../vendor/lowrisc_ip/prim_xilinx/rtl/prim_xilinx_pad_wrapper.sv:36:9: Filename 'prim_xilinx_pad_wrapper' does not match NOTFOUNDMODULE name: 'IOBUF' 36 | IOBUF i_iobuf ( | ^~~~~~~ ``` This is due to verilator/verilator#2430. Until the issue is fixed, disable this lint error. Signed-off-by: Philipp Wagner <phw@lowrisc.org>
Have a look at this file:
https://github.com/lowRISC/opentitan/blob/master/hw/ip/prim_xilinx/rtl/prim_xilinx_clock_mux2.sv
Simplified:
BUFGMUX
is a Xilinx-provided module which is effectively a black-box for Verilator.This file is always compiled, but not used for Verilator (an implementation is selected through a generate if/else block).
When running this through Verilator lint, I get:
I'm not sure what happens here, but the message is strange: the filename of the module has nothing to do with the BUFGMUX module, which is instantiated inside it. And the actual module name prim_xilinx_clock_mux2 matches the file name prim_xilinx_clock_mux2.sv.
(A recent master.)
The text was updated successfully, but these errors were encountered: