赞
踩
再看AMBA协议时有些问题,模糊的地方,记在这里反复看看,时刻提醒。好多问题和解答都是转自amba社区!
1问:
Regarding AMBA AXI4 Write Strobe port
Hi All,
I am completely new to AMBA AXI4 protocol. I am unclear about exact functionality of Write Strobe (WSTRB) port in write data channel. According to Specification,
we are calculating Lower_Byte_Lane and Upper_Byte_Lane (on page A3-47) to identify valid bytes present on write data bus (WDATA).
For Example, if we have aligned address 0x00, transfer size = 32 bits and data bus of 64-bits, we have valid data present on WDATA[31:0] and WDATA[63:32] will
be ignored during first transfer in a burst. So in this case, Master should drive 0x0F on WSTRB port as we are expecting data on lower 32-bits according to Lower_Byte_Lane
and Upper_Byte_Lane calculation.
My question is that we are determining valid byte lanes based on Lower_Byte_Lane and Upper_Byte_Lane calculation. So what is the significance of WSTRB port?
When we have to consider WSTRB port value in AXI4 slave? And at the same time, do we need to ignore Lower_Byte_Lane and Upper_Byte_Lane values?
One more query: During read data phase, do we need to send read data in particular byte lanes on RDATA bus depedning upon Lower_Byte_Lane and
Upper_Byte_Lane values? Please confirm.
Thanks & Regards,
Tejas
1答:
Hi All,
I am completely new to AMBA AXI4 protocol. I am unclear about exact functionality of Write Strobe (WSTRB) port in write data channel. According to Specification,
we are calculating Lower_Byte_Lane and Upper_Byte_Lane (on page A3-47) to identify valid bytes present on write data bus (WDATA).
For Example, if we have aligned address 0x00, transfer size = 32 bits and data bus of 64-bits, we have valid data present on WDATA[31:0] and WDATA[63:32] will
be ignored during first transfer in a burst. So in this case, Master should drive 0x0F on WSTRB port as we are expecting data on lower 32-bits according to Lower_Byte_Lane
and Upper_Byte_Lane calculation.
My question is that we are determining valid byte lanes based on Lower_Byte_Lane and Upper_Byte_Lane calculation. So what is the significance of WSTRB port?
Page A3-49 of the AXI4 protocol describes "There is one write strobe for each eight bits of the write data bus, therefore WSTRB[n] corresponds to WDATA[(8n)+7:(8n)].", i.e., WSTRB[7] validates WDATA[63:56], and is the most significant bit; WSTRB[0] validates WDATA[7:0], and is the least significant bit.
Moreover, although the master could signal a 32 bit transfer on AWSIZE, the WSTRB info then tells you if all 4 bytes of the 32-bit transfer will contain valid data. For example AWSIZE=3'b010 would signal a 32 bit transfer on this 64-bit data bus, and WSTRB could signal 8'b00001001, indicating only WDATA[31:24] and WDATA[7:0] would contain valid bytes to be transferred.
When we have to consider WSTRB port value in AXI4 slave? And at the same time, do we need to ignore Lower_Byte_Lane and Upper_Byte_Lane values?
The slave needs to know both the AWSIZE and WSTRB information. WSTRB tells the slave the byte lanes containing active data (something it couldn't work out solely based on the AWADDR/AWSIZE/AWBURST combination), but AWSIZE (and AWADDR/AWBURST) is still needed to tell the slave how much the address should increment by for subsequent transfers in a burst.
One more query: During read data phase, do we need to send read data in particular byte lanes on RDATA bus depedning upon Lower_Byte_Lane and
Upper_Byte_Lane values? Please confirm.
Yes correct. Lower_Byte_Lane or Upper_Byte_Lane depend on the first transfer in a burst, i.e. the read address is 32-bit aligned or 64-bit aligned to your 64-bit data bus.
Thanks & Regards,
Tejas
2问:
In AXI4 the burst length is increased from 16 to 256.
If burst type is WRAP, do this mean we can do wrap burst of 2,4,8,16,32,64,128 & 256 ?
Also if the burst type is FIXED can the burst length be more than 16 ?
2答Could you plz share some info on the USER & REGION sideband signals, viz. their usage and signal widths ?
Also can write data width and read width be different or is it always the same ?
3答The USER signals are optional 'sideband' signals that can accompany each AXI channel. The width of them is completely user-defined, as is their purpose. Since their functionality is not defined by the protocol, the use of User signals is generally not recommended as this can lead to interoperability issues if two components use the same User signals in an incompatible manner.
The AWREGION/ARREGION signals are both 4 bits wide and can be used to indicate which 'region' of a slave a transaction is targeted at.This high-level explanation is probably better clarified with a simple example of how they could be used; if a slave has (for example) an area of control registers, and a separate area of data registers, a master could indicate that a transaction is for the data area using the appropriate AxREGION signal, and the slave will not have as much decoding to do as a result.
Your last question is an interesting one because (as far as I'm aware) nothing in the protocol specification says that read and write data widths have to be the same. It would however need to be a pretty unusual design to actually benefit from doing this, and it would likely increase the complexity of working with existing components/interconnects as this isn't something that I've heard of as being supported.
In AXI 3/4, let us assume a transaction has 4 transfers.
for example 1st transfer of write transaction address location is 2000 with data of 20.
2nd transfer of write transaction address location is also 2000(as per Spec) with data of 40.
Here My Question is that 1st transfer data is overwrite by 2nd transfer of write transaction i,e in 2000 address location data 40 only available. Is it correct?
After sending two transfers of write transaction to the same address location, Can i read data of 1st transfer of write transaction by using same address location?
In Fixed Burst we need to do write transfer first and read transfer immediately then only operation will be fine. Is it correct?
Whether we can do continuous write transfers first and then continuous read transfers in fixed burst?
In the above case(continuous write & continuous reads) i will have only last write transfer of transaction in address location that can be readed multiple times. Is it correct?
6答You're correct about what the FIXED burst does (multiple reads or writes to the same address). The question is why it would be a useful thing to do. The typical example is the on I mentioned in the other thread - accessing a FIFO.
Imagine you had a piece of hardware that acted as a message queue. Every time you write to it you push another message onto the queue. Every time you read from it you pop the next message off the queue. You could use a FIXED write to push multiple message onto the queue, or use a FIXED read to pop multiple messages off the queue.
AXI总线,burst操作,不能跨4K边界问题! 在Master_A设计中,假如Master_A只操作一块64M SDRAM(此Master_A不操作任何其他Slave),读写的数据量远远大于4K。因此其中某个Burst的操作可能 会出现在4K边界上。 请问: 在这样的情况下,Master_A设计的Burst操作是否需要遵守4k边界的约定。 |
9问
如果初始地址不对齐(即最低位不和size对齐),发第一次的data时:用到上一个size对齐的所有strobe位,还是只是第一次与意义的位数?
9答
应该是后者,第一次只是有意义的位,看下图。第二次之后又开始对齐,没什么好说的。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。