AXI 突发计算
在 AXI 通道中,编号。单个突发中的数据传输次数称为节拍。
大小[2:0] - 否。一拍传输的字节数。 但这里实际总线大小 = 2 ^ 大小
例如:- 如果大小 = 100(二进制) 总线大小 = 2 ^ 4 = 16。
我还有 byte_count[15:0] - 总数。整个传输中要传输的字节数。
现在我有一个问题如何计算突发长度和数量。要发出的突发。 突发长度是没有。一次传输的节拍数。 公式是
没有。节拍数 = byte_count /
大小要发出的突发数量 = 数量。节拍数 / 16
16 - 因为在 1 次 AXI 突发中最多只能有 16 个节拍。
我正在用 verilog 进行编码。 这是针对 AXI Master 的,不支持未对齐传输。 任何硬件设计或公式都是可以接受的。
In AXI channel the no. of data transfers in a single burst are called as beats.
size[2:0] - no. of bytes to be transfered in one beat.
but here actual bus size = 2 ^ size
eg:- if size = 100(binary)
bus size = 2 ^ 4 = 16.
also I have byte_count[15:0] - total no. of bytes to be transferred in the entire transfer.
Now I have the issue how to calculate burst length and no. of bursts to be issued.
burst length is no. of beats transferred in one burst.
the formulas are
no. of beats = byte_count / size
no. of bursts to be issued = no. of beats / 16
16 - because in 1 AXI burst you can have at max 16 beats only.
I am doing the coding in verilog.
This is for AXI Master and unaligned transfers are not supported.
Any hardware design or a formula is acceptable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
假设这是一个大师,对您所拥有的内容进行一些评论:
您正在计算突发数量,而您可能不需要这样做。通常,您只会跟踪剩余的字节/字,以便在事务完成时传输和减少。请记住,您无法突破某些地址边界,这可能需要您拆分传输。
您基于使用 16 拍突发(最大长度)进行计算,但您可能无法假设这一点。虽然 AXI 要求从设备响应所有传输,但并不要求它们接受所有传输。例如,FIFO 接口的 AXI 从设备可能会拒绝未对齐的传输。如果目标系统可能包括您不知道其功能的从站或总线结构,则您需要处理一些可编程值。
A few comments on what you have, assuming this is a master:
You're calculating the number of bursts when you probably don't need to. Usually you would keep track of only the bytes/words remaining to transfer and decrement as transactions complete. Keep in mind you can't burst across certain address boundaries which may require you to split transfers.
You're basing calculations on using 16-beat bursts(maximum LENGTH) but you may not be able to assume this. While AXI requires that slaves respond to all transfers, it does not require that they accept all of them. For instance, an AXI slave for a FIFO interface may reject unaligned transfers. If the target system may include slaves or bus fabrics that you don't know the capabilities of, you'll need to handle some programmable values.
没有。节拍数 = 否。读或写传输,即
如果AWlen或ARlen为3,则Burst长度为awlen(或)arlen+1。
因此,AWlen+1=> 3+1=> 4 次转移或 4 次节拍。
AXI 协议中的最大节拍数为 16,突发长度大小为 4 位,因此仅出现的最大可能节拍数为 16。
希望您清楚计算节拍数的概念。节拍。
谢谢。
The no. of beats = no. of read or write transfers ie.,
if AWlen or ARlen is 3, then Burst length is awlen (or) arlen + 1.
Therefore, AWlen + 1 => 3 + 1 => 4 transfers or 4 beats.
Maximum no.of beats in AXI protocol are 16 burst length size is 4 bits so that only maximum possible beats occured are 16.
hope you cleared with the concept of calculation of no. of beats.
Thankyou.