Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions regression/verilog/modules/unconnected_ports1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
KNOWNBUG
unconnected_ports1.v
--bound 0
^EXIT=0$
^SIGNAL=0$
--
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a sentence stating what is going wrong here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

--
This fails an assertion.
25 changes: 25 additions & 0 deletions regression/verilog/modules/unconnected_ports1.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module my_module(input [31:0] x, y, z = 5);

endmodule

module main();

my_module m1(.x(1), .y(), .z());

// 1800-2017 23.3.3.2 says
// "If left unconnected, the port shall have the default
// initial value corresponding to the data type."
// This is 'x for logic types.
// However, Icarus Verilog, VCS, Questa, Xcelium use 'z.

initial assert (m1.x == 1);
initial assert (m1.y === 'z);
initial assert (m1.z == 5);

my_module m2(/* blank */, 1, /* blank */);

initial assert (m2.x === 'z);
initial assert (m2.y == 1);
initial assert (m2.z == 5);

endmodule
Loading