You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// File: warning_example.sv// Must turn on -Wall while linting.modulewarning_example(
outputlogic [5:0] dout, inputlogic [5:0] din
);
logic [5:0] areg, b, c;
assign c = din;
assign b = c;
endmodule
I got such warnings from Verilator (with -Wall flag):
$ verilator --lint-only -Wall warning_example.sv
%Warning-UNDRIVEN: warning_example.sv:6:24: Signal is not driven: 'dout'
: ... In instance warning_example
6 | output logic [5:0] dout, input logic [5:0] din
| ^~~~
... For warning description see https://verilator.org/warn/UNDRIVEN?v=4.202
... Use "/* verilator lint_off UNDRIVEN */" and lint_on around source to disable this message.
%Warning-UNUSED: warning_example.sv:9:13: Signal is not driven, nor used: 'areg'
: ... In instance warning_example
9 | logic [5:0] areg, b, c;
| ^~~~
%Warning-UNUSED: warning_example.sv:9:19: Signal is not used: 'b'
: ... In instance warning_example
9 | logic [5:0] areg, b, c;
| ^
%Error: Exiting due to 3 warning(s)
$
I added "verilog.linting.iverilog.arguments": "-Wall" in my VS code config to see all warnings.
However, the warning message shows as the following in my VS Code:
In the above picture, every warning message has been marked from the correct starting position to the end of the line. I hope the message position can be correctly shown.
I have probably located the problem in the following position. It simply uses the max number to indicate the end of the message.
I think we can use marks like ^~~~ to indicate the correct ending position of the warning message.
Sorry that I don't know how to debug TypeScript, so I don't know how to fix it at this moment.
The text was updated successfully, but these errors were encountered:
qrqiuren
changed the title
[Bug] Incorrect Diagnose Message Range of Verilator Linter
[BUG] Incorrect Diagnose Message Range of Verilator Linter
Jun 5, 2021
For the following source code:
I got such warnings from Verilator (with
-Wall
flag):I added
"verilog.linting.iverilog.arguments": "-Wall"
in my VS code config to see all warnings.However, the warning message shows as the following in my VS Code:
In the above picture, every warning message has been marked from the correct starting position to the end of the line. I hope the message position can be correctly shown.
I have probably located the problem in the following position. It simply uses the max number to indicate the end of the message.
vscode-verilog-hdl-support/src/linter/VerilatorLinter.ts
Line 108 in d559604
I think we can use marks like
^~~~
to indicate the correct ending position of the warning message.Sorry that I don't know how to debug TypeScript, so I don't know how to fix it at this moment.
The text was updated successfully, but these errors were encountered: