Skip to content

Commit

Permalink
Verilog: KNOWNBUG test for inout port connected to variable
Browse files Browse the repository at this point in the history
An inout port must not be connected to a variable.
  • Loading branch information
kroening committed Apr 29, 2024
1 parent 458793a commit 60e412b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions regression/verilog/modules/inout_and_variable.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
KNOWNBUG
inout_and_variable.v

^file .* line 4: symbol `some_var' is declared both as input and as register$
^EXIT=2$
^SIGNAL=0$
--
--
The use of a variable with an inout port should be rejected.
12 changes: 12 additions & 0 deletions regression/verilog/modules/inout_and_variable.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module sub(inout some_port);

endmodule

module main;
// 1800-2017 6.5
// "Variables cannot be connected to either side of an inout port"
reg my_var;

sub sub(my_var);

endmodule

0 comments on commit 60e412b

Please sign in to comment.