C
chewkean
Guest
Hi,
Does anybody know if the following is allowed?
module tmp ();
bit sig_a [1:0][1:0];
bit b, c;
initial begin
sig_a[0][0] = 1'b0;
sig_a[0][1] = 1'b0;
sig_a[1][0] = 1'b1;
sig_a[1][1] = 1'b1;
c = 1'b0;
end
assign b = sig_a[0][~c];
endmodule
My simulation seems to be encountering issues with ~c as the second
dimension. It works fine when it assign ~c to an intermediate variable
and use that as the index. Its probably a bug with the software. I just
want to confirm my understanding that ~c is allowed as an index. Thanks.
Does anybody know if the following is allowed?
module tmp ();
bit sig_a [1:0][1:0];
bit b, c;
initial begin
sig_a[0][0] = 1'b0;
sig_a[0][1] = 1'b0;
sig_a[1][0] = 1'b1;
sig_a[1][1] = 1'b1;
c = 1'b0;
end
assign b = sig_a[0][~c];
endmodule
My simulation seems to be encountering issues with ~c as the second
dimension. It works fine when it assign ~c to an intermediate variable
and use that as the index. Its probably a bug with the software. I just
want to confirm my understanding that ~c is allowed as an index. Thanks.