Comments (12)
Well, ostensibly it should work, but I don't test every possible combination of parameters, so it's possible there is some sort of a bug. I'll take a look at it and see if I can figure out what's going on.
from verilog-axi.
So, after running the testbench for a while, I haven't seen any issues yet (at 256 bits it takes quite a long time to run). Can you share any details on exactly what issue you're running in to? A screenshot of the simulation or a waveform dump that I can open in gtkwave would be helpful.
from verilog-axi.
Thank you for your quick reply.
I use VCS for simulation, and I upload a waveform graph. (32bit-to-8bit config)
the Op is: I read data starting from 0xa2c0. Arsize is 2, Arlen is 0, i.e. No burst. especially, the increase of addr is 1, not 4. Because I need to test the (uint_8* ptr) case in a 32-bit MCU.
Namely, read 4 bytes at 0xa2c0, then, read 4 bytes at 0xa2c1, then read 4 bytes at 0xa2c2, then...........
But the waveform shows that the addr suddenly jumps into 0xa2c5 from 0xa2c1, which should be 0xa2c2 (I guess).
I am debugging my code. Maybe this is a master-port bug in my design, not yours.
BTW, in the waveform, the first (a2*) at line #1 is 0xa2c0,the second (a2*) is 0xa2c1.
Due to the resolution problem, I cannot zoom it out.
The upper half of the waveform is input to the adapter module (32-bit bus), and the lower half is output (8-bit bus).
from verilog-axi.
Oh, so you're seeing an issue with 32 to 8, not 256 to 8. Yeah, there definitely is a bug in there somewhere, let me check the spec to see exactly what the issue is. It looks like we both might have bugs.
First burst: read 4 bytes starting at 0xa2c0 - arsize 2 for 4 bytes, arlen 0 for 1 cycle. This one is converted to a 4 cycle burst starting at 0xa2c0 - arsize 0 for 1 byte, arlen 3 for 4 cycles.
Second burst: read 3 bytes starting at 0xa2c1 - arsize 2 for 4 bytes, arlen 0 for 1 cycle. I need to check the spec for what is allowed with the LSBs, but if you want to read 4 bytes starting at an unaligned address, you actually need to specify arlen=1 for a 2 cycle burst since it is an unaligned operation and you effectively need to read 8 bytes starting at 0xa2c0 and then discard the extra bytes. What you specified is actually a burst read of length 3, and my width converter is getting tripped up by the nonzero LSBs and is generating a burst with length 4 followed by a burst of length 256, which is definitely wrong.
from verilog-axi.
Alex,
Thank you very much. I solved my problem according to your suggestion at 32-to-8 case. I just slightly changed my C code. Now it works!! Now, I replace uint_8* with uint_32* and shifter op. Also, I think standard AXI-4 can support unaligned addr function. Specifying arlen=1 for a 2 cycle burst seems to be a little redundant.
Besides, in 256-to-8 case, I met another problem. In this case, all the addresses are aligned. However, the axi bus is getting stuck around the final burst transmission in write channel.
I am debugging this problem. Maybe this is because some mismatches between my code and yours. But 256-to-32 case functions well. Once I fix it, I will let you know.
from verilog-axi.
Hello, Alex.
I debugged my project, and know why my project cannot pass 256-to-8 case.
The reason is that I narrow so many bits that some FIFOs in some modules are easy to reach to 'full' state, which means some data is lost during the transmission.
I just increase the depth of FIFOs to remedy this situation. Now, my project can pass the test bench.
You project is perfect. Thank you very much.
Let me close this issue.
Again, many thanks for your project~
from verilog-axi.
Well, I think there still is a bug on my end, those partial reads with nonzero address LSBs are definitely not being handled correctly. I'm actually thinking part of the problem is my AXI simulation model, I think it always sets the LSBs of the address to 0, but this is not always going to be the case. I think a stop-gap solution is to simply mask off the LSBs based on awsize/arsize, then I can work on a more proper solution when I have time.
from verilog-axi.
Got it. Hope you can solve this bug and share a new releasing. lol...
from verilog-axi.
Alright, I think I have that fixed. I had to update the AXI master model first to actually drive the unaligned address so I could replicate the issue and address it properly. Feel free to update and see if it works in your setup with unaligned operations. I also rewrote some of the conditions and moved a few things around, so the new version might also be a little bit better in terms of area and timing.
from verilog-axi.
Hi Alex,
Just now, I tested this new releasing. I used int8* pointer to access the memory data via your axi adapter with 32-to-8 configuration. This releasing goes well. Thank you for your contribution.
from verilog-axi.
Excellent, good to hear! I guess the question now for you is which method is more performant (if that matters) or more readable (if performance doesn't matter).
from verilog-axi.
Thanks~ I am gonna integrate your code into my SoC for an ASIC design. Hope I can make it.
from verilog-axi.
Related Issues (20)
- AXI Reset Signal
- AXI Lite interconnect in N to 1 configuration HOT 2
- axi_interconnect Synthesis HOT 1
- Why assume packet smaller than max burst size when AXI_MAX_BURST_SIZE >=4096? HOT 10
- awready and wready set high in master without slave value
- I met a question about simulation, please some one help me? HOT 2
- about AXI_VFIFO HOT 3
- Q: Do axi_dma_rd and axi_dma_wr support out of order transactions? HOT 2
- about axi_ram design specification
- Q: is there any component for read data out of standard ram/fifo and then transfer the data to axi master HOT 4
- Will unprocessed awvalid signals be stored in AXI Crossbar? HOT 6
- Axi DMA consistently returns DECERR HOT 6
- Timing issues with `axi_dma_wr`
- About width missmatch HOT 2
- about tb HOT 1
- About the solution for deadlocks HOT 14
- Failed to run test for AXI RAM with DATA_WIDTH=64 and ADDR=64 HOT 4
- AXI_Register hangs when SIM=verilator HOT 3
- about axi_ram HOT 2
- About AXI_FULL_CDC HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from verilog-axi.