3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-07 01:20:57 +00:00

Add test for non-contiguous memory init

Also negative memory addresses.
This commit is contained in:
Krystine Sherwin 2026-05-29 18:40:24 +12:00
parent aac7366862
commit ab5f25db9a
No known key found for this signature in database
2 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,13 @@
module top;
(* nomem2reg *)
logic [1:0] a3 [-2:-1][-1:1] = '{'{0, 1, 2}, '{1, 0, 3}};
always_comb begin
assert(a3[-2][-1] == 0);
assert(a3[-2][0] == 1);
assert(a3[-2][1] == 2);
assert(a3[-1][-1] == 1);
assert(a3[-1][0] == 0);
assert(a3[-1][1] == 3);
end
endmodule