3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-09 12:50:33 +00:00

Add support for packed multidimensional arrays

* Generalization of dimensions metadata (also simplifies $size et al.)
* Parsing and elaboration of multidimensional packed ranges
This commit is contained in:
Dag Lem 2024-01-25 07:28:15 +01:00 committed by Zachary Snow
parent ac0fb2e301
commit 39fea32c6e
7 changed files with 247 additions and 267 deletions

View file

@ -16,17 +16,17 @@ assert property ($size({3{x}}) == 3*4);
assert property ($size(y) == 6);
assert property ($size(y, 1) == 6);
assert property ($size(y, (1+1)) == 4);
assert property ($size(y[2], 1) == 4);
// This is unsupported at the moment
//assert property ($size(y[2], 1) == 4);
//assert property ($size(y[2][1], 1) == 1);
assert property ($size(z) == 6);
assert property ($size(z, 1) == 6);
assert property ($size(z, 2) == 8);
assert property ($size(z, 3) == 4);
// This is unsupported at the moment
assert property ($size(z[3], 1) == 8);
assert property ($size(z[3][3], 1) == 4);
// This is unsupported at the moment
//assert property ($size(z[3][3][3], 1) == 1);
// This should trigger an error if enabled (it does).
//assert property ($size(z, 4) == 4);