Files
iverilog/ivtest/ivltests/module_nonansi_vec2.v
T
Lars-Peter Clausen ee81ac2f85 Add regression tests for module non-ANSI port declarations
Check that it is possible to define the data type of a non-ANSI module port
in a separate declaration from the port direction. Add tests for both the
type declared before the port direction and for the type declared after the
port direction.

Note that this doesn't work yet correctly for integer type module ports
yet, so there are no tests for this. This will be addressed in follow up
work.

Signed-off-by: Lars-Peter Clausen <[email protected]>
2022-03-16 09:17:55 +01:00

17 lines
338 B
Verilog

// Check that it is possible to declare the data type for a vector type module
// port before the direction for non-ANSI style port declarations.
module test(x);
reg [7:0] x;
output [7:0] x;
initial begin
if ($bits(x) == 8) begin
$display("PASSED");
end else begin
$display("FAILED");
end
end
endmodule