forked from verilator/verilator
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better error recovery (verilator#5493)
Signed-off-by: Arkadiusz Kozdra <[email protected]>
- Loading branch information
Showing
6 changed files
with
82 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
%Error: t/t_source_sync_bad.v:17:16: syntax error, unexpected IDENTIFIER | ||
17 | Invalid1 invalid1; | ||
| ^~~~~~~~ | ||
%Error: t/t_source_sync_bad.v:20:16: syntax error, unexpected IDENTIFIER | ||
20 | Invalid2 invalid2; | ||
| ^~~~~~~~ | ||
%Error: t/t_source_sync_bad.v:24:22: syntax error, unexpected IDENTIFIER, expecting "'{" | ||
24 | pkg::cls::defi invalid; | ||
| ^~~~~~~ | ||
%Error: t/t_source_sync_bad.v:30:14: syntax error, unexpected /*verilator clocker*/, expecting ',' or ';' | ||
30 | logic clk /*verilator clocker*/ ; | ||
| ^~~~~~~~~~~~~~~~~~~~~ | ||
%Error: t/t_source_sync_bad.v:34:1: syntax error, unexpected endmodule | ||
34 | endmodule | ||
| ^~~~~~~~~ | ||
%Error: Exiting due to |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// DESCRIPTION: Verilator: Verilog Test module | ||
// | ||
// This file ONLY is placed under the Creative Commons Public Domain, for | ||
// any use, without warranty, 2020 by Dan Petrisko. | ||
// SPDX-License-Identifier: CC0-1.0 | ||
|
||
package pkg; | ||
class cls; | ||
typedef unknown defu; | ||
typedef int defi; | ||
endclass | ||
endpackage | ||
|
||
module t; | ||
task tsk; | ||
begin | ||
Invalid1 invalid1; // invalid declaration | ||
pkg::cls::defi valid1; // valid declaration | ||
pkg::cls::defu valid2; // valid declaration | ||
Invalid2 invalid2; // invalid declaration | ||
|
||
valid1 = 5; // valid statement | ||
|
||
pkg::cls::defi invalid; // invalid statement | ||
end | ||
endtask | ||
endmodule | ||
|
||
typedef struct packed { | ||
logic clk /*verilator clocker*/; | ||
logic data; | ||
} ss_s; | ||
|
||
endmodule |