Closed rkshthrmsh closed 6 months ago
I think the indexing issue may be a bug related to constants, will investigate that.
For the ordering, I'll have to revisit the design and see if I can figure out why it was reversed, it may be related to endianness and indexing often being reversed in the HDLs (e.g. verilog slicing 78:0]
) when compared to traditional programming language.
Actually going to keep this open to track that issue with indexing the constant and make sure it gets fixed before closing. Try out the new declaration/indexing order and see if it matches what you'd expect now
(This is probably better suited to be a discussion. Putting it here for now.)
As per the documentation, it appears that the shape tuple used to initialize Magma N-D arrays has reverse axis ordering compared to Numpy N-D arrays.
However, the indexing order follows that of Numpy.
Finally, the indexing syntax mentioned in the documentation doesn't seem to work with Magma N-D arrays: