mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-02 23:38:58 +02:00
Check that when port direction and data type are declared separately that an error is reported if the port direction has an explicit range specification, but the data type has not. This should even be the case if the data type has an implicit range, e.g `int` or a struct type. For vector types also check that it is an error if the ranges are not identical. Signed-off-by: Lars-Peter Clausen <[email protected]>
22 lines
423 B
Verilog
22 lines
423 B
Verilog
// Check that it is an error to declare a non-ANSI task port with implicit
|
|
// packed dimensions if it is later redeclared as a packed struct typed
|
|
// variable. Even if the size of the packed dimensions matches that of the size
|
|
// of the struct.
|
|
|
|
typedef struct packed {
|
|
reg [31:0] x;
|
|
reg [7:0] y;
|
|
} T;
|
|
|
|
module test;
|
|
|
|
task t;
|
|
input [47:0] x;
|
|
T x;
|
|
$display("FAILED");
|
|
endtask
|
|
|
|
initial t(10);
|
|
|
|
endmodule
|