Indexing order for 3D `integer_array_t` doesn't make sense
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- backend
Direzione di ricerca
Start with integer_array_pkg-body.vhd at the linked 3D and 2D get implementations, then inspect set and the reshape behavior mentioned in the issue. Determine the indexing order that preserves 2D consistency and gives sensible results after reshaping; done means the 3D indexing behavior is defined, tested, and documented. The issue has had no comments for 895 days.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The indexing order for the 3D version of integer_array_t doesn't make any sense. You can see the code for get here:
y is multiplied by both width and depth, x is only multiplied by depth, and z isn't multiplied by anything.
The indexing of get is consistent with set, which is why it hasn't been caught until now. The problem comes when you try to index after a reshape, which is how I discovered the problem. If you reshape a 3D array into a 2D array, you can't get results that make sense.
The "obvious" solution would be
< return get(arr.data, (y*arr.width + x)*arr.depth + z);
---
> return get(arr.data, (x*arr.width + y)*arr.depth + z);
But this solution would end up inconsistent with the 2D version of get:
I'm not really sure what to do here. It seems like the change that would be least likely to break existing code would be
return get(arr.data, (z*arr.depth + y)*arr.width + x);
since that is consistent with the existing indexing order for 2D arrays.
Has anyone ever decided whether integer_array_t stores data in row-major or column-major order? The indexing for 2D arrays suggests column-major, but that goes against C and Python. It seems like that is something that should be documented and guaranteed.
- Lingua principale
- VHDL
- Stelle
- 850
- Fork
- 305
- Merge medio
- 2g 10h
- PR unite (30g)
- 7
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di VUnit/vunit
-
KeyError in test scheduler when using TestBench.scan_tests_from_file()Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
GHDL: generics leak between configurations when `ghdl.sim_flags` is setForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
VUnit/vunit#1223 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
AXI slave VCs have identical stalling behaviorForse già presa @Lay007 l’ha presa 25 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
VUnit/vunit#1219 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
OpenSourceAWE/SymbolicAWEModels.jl#431 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100