mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 06:13:31 +02:00
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]>
21 lines
365 B
Verilog
21 lines
365 B
Verilog
// Check that it is possible to declare the data type for a enum type module
|
|
// port before the direction for non-ANSI style port declarations.
|
|
|
|
typedef enum integer {
|
|
A, B
|
|
} T;
|
|
|
|
module test(x);
|
|
T x;
|
|
output x;
|
|
|
|
initial begin
|
|
if ($bits(x) == $bits(T)) begin
|
|
$display("PASSED");
|
|
end else begin
|
|
$display("FAILED");
|
|
end
|
|
end
|
|
|
|
endmodule
|