mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 01:33:07 +02:00
Check that it is possible to define the data type of a non-ANSI task 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. Signed-off-by: Lars-Peter Clausen <[email protected]>
23 lines
395 B
Verilog
23 lines
395 B
Verilog
// Check that it is possible to declare the data type for an enum type task port
|
|
// before the direction for non-ANSI style port declarations.
|
|
|
|
module test;
|
|
|
|
typedef enum integer {
|
|
A, B
|
|
} T;
|
|
|
|
task t;
|
|
T x;
|
|
input x;
|
|
if (x == B && $bits(x) == $bits(T)) begin
|
|
$display("PASSED");
|
|
end else begin
|
|
$display("FAILED");
|
|
end
|
|
endtask
|
|
|
|
initial t(B);
|
|
|
|
endmodule
|