Files
iverilog/ivtest/ivltests/package_vec_part_select.v
T
Lars-Peter Clausen 41b4ce5f8c Add regression test for part select on vector declared in package
Check that it is possible to do a part select on a vector declared in a
package.

Signed-off-by: Lars-Peter Clausen <[email protected]>
2022-03-05 15:29:34 +01:00

21 lines
390 B
Verilog

// Check that it is possible to do a part select on a vector declared in
// package
package P;
reg [7:0] x = 8'h5a;
reg [1:0][7:0] y = 16'h5af0;
endpackage
module test;
initial begin
if (P::x[3:0] == 4'ha && P::x[7:4] == 4'h5 &&
P::y[0] == 8'hf0 && P::y[1] == 8'h5a) begin
$display("PASSED");
end else begin
$display("FAILED");
end
end
endmodule