Unaligned access to AXI read slave yields incorrect data
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- backend
Direzione di ricerca
Start with the loop at line 116 in axi_read_slave.vhd and trace how address, burst.size, and self.data_size determine byte indices across beats. Reproduce the reported 32-bit, address-1, two-beat case and inspect the related tests. Done when later beats return bytes from the expected addresses and the first beat's bytes below the start address follow the configured drive_invalid behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When doing multi-beat accesses to AXI read slave with an unaligned start address, every beat except the first one will yield wrong data due to the address offsetting
Line 116 in axi_read_slave.vhd:
for j in 0 to burst.size-1 loop
idx := (address + j) mod self.data_size;
rdata(8*idx+7 downto 8*idx) <= std_logic_vector(to_unsigned(read_byte(axi_slave.p_memory, address+j), 8));
end loop;
Example:
Bus width: 32 bits
Address: 1
Burst length: 2 beats, 7 bytes
For the first beat, due to the modulo operation, the byte with index 1, 2 and 3 will be correctly, set. However the byte with index with index 0 will be fetched from memory index 4. For the first beat, this does not matter, since that address is "invalid" anyway.
But for the second beat and onwards, the same will occur, byte with address 4 (and index 0) will be fetched from address 8.
In the case of unallocated data this will fail the allocation check, but otherwise this will return the wrong data.
This should be relatively easily fixed by looping over address the address to the next aligned address and also aligning all subsequent addresses. This fix will also yield undefined data (if this is configured via generic) on the bytes of the first beat which are "below" the starting address, which is probably a good thing since those bytes are not of interest, should the user decide to configure the drive_invalid generic.
I will post a patch later.
- 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 26 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 72/100
CLIMADA-project/climada_python#1337 ·
I maintainer di solito rispondono entro 3 giorni
-
client.HTTPFetcher doesn't close non-200 response bodies, so connections leakForse già presa @grempe l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
transparency-dev/tessera#1245 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
mattpolzin/harmony#435 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
kristoff-it/ziggy#87 ·
-
listFeatures/getFeatureExamples never return Kotlin examples for Android or server Kotlin SDKsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
appwrite/mcp-for-docs#23 · 1 commento ·