Skip to content
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

[BUG] Verilator linting include paths broken on v1.11.7 #421

Closed
darrylring opened this issue Jun 8, 2023 · 0 comments · Fixed by #422
Closed

[BUG] Verilator linting include paths broken on v1.11.7 #421

darrylring opened this issue Jun 8, 2023 · 0 comments · Fixed by #422
Labels

Comments

@darrylring
Copy link
Contributor

This change breaks Verilator linting (at least with Verilator 5.010 on Linux).

It adds double quotes to the include paths passed to Verilator, but also adds a space between -I and the quoted path. Verilator interprets these paths as module names instead of include paths.

As a simple test:

$ cat test.v
module test;
endmodule
$ verilator --lint-only -I/tmp test.v
$ echo $?
0
$ verilator --lint-only -I /tmp test.v
%Error: //usr/share/verilator/include/verilated_std.sv:28:9: Redeclaring the 'std' package is not allowed
   28 | package std;
      |         ^~~
        /usr/share/verilator/include/verilated_std.sv:2:1: ... note: In file included from verilated_std.sv
%Error: Cannot find file containing module: /tmp
        ... Looked in:
             //tmp
             //tmp.v
             //tmp.sv
             /tmp
             /tmp.v
             /tmp.sv
             obj_dir//tmp
             obj_dir//tmp.v
             obj_dir//tmp.sv
%Error: Exiting due to 2 error(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant