AXI4 Increase burst / wrap burst/ fix burst 和 narrow transfer

AXI (Advanced extensible Interface) 协议是ARM公司提出的AMBA(Advanced Microcontroller Bus Architecture)4.0协议中最重要的部分,是一种面向高性能、高带宽、低延迟的片内总线。
Increase / wrap / fix 是AXI协议中read/write data burst 传输的三种类型,burst传输就是master发1个request,但可以携带或需求(write request or read request) 比较大的数据量,这些数据量在总线上传输时需要占用多拍(多 beat)。
AxSIZE:每一个transfer中的byte个数,也就是传输的数据位宽。3bit,计算方式2的幂次方,最多128个byte (2^7),1024bit。如果AXI BUS比AxSIZE大,应该由interface来决定有效的byte lanes。写操作strb信号,读操作无操作。
AxLEN:burst传输的长度,transfer的个数。计算方式AxLEN + 1。wrap类型的burst只能是2,4,8,16。对于AXI3,incr类型的burst从1-16;对于AXI4,从1-256。
AxBURST:表示burst的type,决定burst传输过程中每拍的address。

比如一个request 128byte,数据位宽32byte,则 AxSIZE = 5,AxLEN =3,数据传输需要4拍。
假设request的 start address (也就是收到上级模块的地址) 为 0x80,Fixed burst type下每次的address相同。则4拍address 都是 0x80。而INCR burst type下,address依次增加,以SIZE的byte数为单位。则4拍address依次为 0x80 , 0xa0, 0xc0, 0xe0。INCR burst是最常见的burst方式。
WRAP burst:比如,从上级模块收到的start address 是0xc0,则4拍地址依次是0xc0 , 0xe0, 0x80, 0xa0,也即是地址 从中间开始,达到upper boundary后,又绕回到 lower boundary。
upper boundary和 lower boundary address的计算方式如下,其中 dtsize 是整个request的byte总数(2^ AxSIZE) * (AxLEN +1) ,128byte 。
dtsize = Number_Bytes * Burst_Length; // Maximum total data transaction size
Lower_Wrap_Boundary = (INT(addr/dtsize) * dtsize);
// addr must be aligned for a wrapping burst
Upper_Wrap_Boundary = Lower_Wrap_Boundary + dtsize;
WRAP burst的优势:比如 LLC 的cacheline size 为128byte,收到的request start address为 0xc0, len = 32byte,DDR 收到的依然是 len = 128byte的read request,但如果支持WRAP,那么当DDR 把0xc0 这32byte的数据传输回来的时候,LLC 就可以返回data 给上级模块了,而不必等到收齐 4 beat 数据。 在这里插入图片描述

WLAST/RLAST:表示一个transaction中的最后一个transfer,只W 和R 通道 有。
Aligned address 是 以 总线位宽 为对齐单位的,比如上述例子,address 需要 0x20 对齐
在这里插入图片描述

参考 https://blog.csdn.net/l471094842/article/details/92798620

Narrow transfer 窄传输,应用场景是write request。当master的位宽 (2^ AxSIZE) 小于 总线的数据位宽时,此时数据在总线上传输的拍数 依然是 AxLEN + 1,但每拍 总线位宽 只传输 (2^ AxSIZE)的数据,也就是有些 总线 lane是闲置的,那每拍 哪些lane闲置 由WSTRB (write strobes )来标示。
AXI4 Spec 对narrow transfer的表述如下:
When a master generates a transfer that is narrower than its data bus, the address and control information determine
which byte lanes the transfer uses:
• in incrementing or wrapping bursts, different byte lanes are used on each beat of the burst
• in a fixed burst, the same byte lanes are used on each beat.

The WSTRB[n:0] signals when HIGH, specify the byte lanes of the data bus that contain valid information. There is one write strobe for each eight bits of the write data bus, therefore WSTRB[n] corresponds to WDATA[(8n)+7: (8n)].
对应spec中的实例,总线位宽32 bit ,master发出的write request 位宽为8bit, AWSIZE = 0 (1byte), AWLEN=4,传输需要5beat。第1拍传输,WSTRB = 4’b0001 使用总线的lane0-7; 第2拍,WSTRB=4’b0010 …
在这里插入图片描述

参考 https://blog.csdn.net/gegeBaby/article/details/109780004

https://www.cnblogs.com/lybinger/p/12966692.html 这个页面 对 wrap 的地址描述 是错误的。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

123axj

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值