Commit 4832414
committed
sail_sv_backend: swap element ordering for unpacked array
In SystemVerilog, unpacked arrays are typically in the form of
`[0:LEN-1]` instead of `[LEN-1:0]` (which is the convention for packed
arrays). In fact, commonly people just use `[LEN]` and this is a
shorthand for `[0:LEN-1]`.
Currently sail_sv_backend always use `[LEN-1:0]` even for unpacked
arrays; this causes the whole array to be flipped even the user passed
in an array declared with `[LEN]`.1 parent 3f31706 commit 4832414
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
| 472 | + | |
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| |||
0 commit comments