Comments (8)
Not sure what the issue is. If max burst size is larger than 4096, then the only thing that can split a burst is a 4kb address boundary. If I remove that check, then the only line in the lower block that gets hit would be when a 4kb boundary is crossed, and this is handled by the top block in exactly the same way so doing a separate check based on the burst length is not necessary.
from verilog-axi.
Think about it like this: this code is splitting the requested transfer into valid bursts. The burst must end either 1. when the configured max burst size is met, 2. when a 4 kb address boundary is reached, or 3. at the end of the transfer.
The max burst size is checked first (op_word_count_reg <= AXI_MAX_BURST_SIZE - (addr_reg & OFFSET_MASK)
). If this check passes, then the requested transfer should fit into one burst. Then, the 4k boundary crossing is checked (addr_reg[12] != addr_plus_max_burst[12]
). But here's the thing: if AXI_MAX_BURST_SIZE
is 4096 or greater, the transfer will either fit into a burst or it will cross a 4kb address boundary, so in this case the max burst size check can be skipped completely because the 4kb address boundary check will ensure that the burst size is capped at 4096, which can only happen when the transfer starts on a 4kb address boundary.
If I remove || AXI_MAX_BURST_SIZE >= 4096
, then when AXI_MAX_BURST_SIZE
is 4096 or larger and the op_word_count_reg <= AXI_MAX_BURST_SIZE - (addr_reg & OFFSET_MASK)
check fails, addr_reg[12] != addr_plus_max_burst[12]
will also be true and the burst will end on the address boundary. The line tr_word_count_next = AXI_MAX_BURST_SIZE - (addr_reg & OFFSET_MASK);
is unreachable. The whole point of || AXI_MAX_BURST_SIZE >= 4096
is to save some logic resources by removing the redundant op_word_count_reg <= AXI_MAX_BURST_SIZE - (addr_reg & OFFSET_MASK)
comparison.
from verilog-axi.
Here is the problematic waveform:
AXI_MAX_BURST_SIZE = 4096
len = 0xfb1c
DATA_WIDTH = 128bit (16Bytes)
Starting Address = 0 (I have appended several higher bits)
There should be 15 full 4K bursts and 1 'end of the transfer'.
However, only two ARVALID were sent and the second ARLEN was wrong.
from verilog-axi.
Alright, it looks like my 'optimized' check for 4k boundary crossings is problematic. I will rework that.
from verilog-axi.
Try replacing
if (addr_reg[12] != addr_plus_count[12]) begin
with
if (((addr_reg & 13'hfff) + (op_word_count_reg & 13'hfff)) >> 12 != 0 || op_word_count_reg >> 12 != 0) begin
and let me know what happens.
from verilog-axi.
I just committed those changes to the repo, try it out and see if that bug is fixed.
from verilog-axi.
Yes, It has been fixed. Thank you Alex!
from verilog-axi.
Good to hear!
from verilog-axi.
Related Issues (20)
- About priority_encoder HOT 4
- 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
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.