how to calculate the value of strobe signal in axi?
but how to calculate that strobe if my burst_size is = 4 and length = 4
If the burst_size is 4, do you mean that you are indicating 128-bit width transfers, and is this on a 128-bit data bus ?
If yes, that would mean you would have a 16-bit WSTRB bus (one bit for each byte of the data bus).
As David said in his reply 4 years ago, the master drives each WSTRB bit depending on whether that byte lane contains valid data for this transfer, so how you drive those 16 bits of WSTRB depends on what the master is trying to transfer.
And then if you have a burst of 4 transfers, the WSTRB value can be different for each of the 4 transfers in this burst.
Does that help answer your question, or can you explain with more detail what you are trying to do ?
Hi,
Is it possible to re-calculate the WSTRB at the slave end for comparing against the WSTRB received from master. What are the parameters needed? Also what could be an algorithm (suitable for hardware implementation, i.e. one using muxes, shifters and not going for floor/ceil functions)? Note: Our slave calculates each of the beat addresses as a part of the application. Not sure whether the algorithm in A 3.4.1 of spec is suitable for hardware realization . Also any example illustration available to understand the equations in algorithm?
What if the size and len is 4 each and the data bus width is 256 bit ?? Kindly let me know the bits in strobe in this case. Basically I want to ask whether the strobe width depends on data width of the master or axsize?
The slave could theoretically check whether the WSTRBs send are legal (i.e. whether they're consistent with AxSIZE, AxADDR), but it couldn't always rely on recalculating it's own WSTRBs for legal combinations. If a master sends a sparse write (e.g. WSTRBs = 0b0101), then there's no way for the slave to reconstruct this using other attributes.
I don't think you would implement these functions exactly as they are described in the Specification, but you would implement equivalent functionality in hardware.
I'm not sure if there are any diagrams of this, but there's someone online AXI training material that is available at https://developer.arm.com/support/training
Yes, the WSTRB width directly relates to the data width. WSTRB Width = Data Bus Width (bits) / 8
The value of the WSTRBs also depend on the signalled AWSIZE. From A3.4.3 of the Spec - "A master must ensure that the write strobes are HIGH only for byte lanes that contain valid data." This means that if the AWSIZE indicates that access is narrower than the data bus width, then the strobes must not indicate more bytes are being transferred than AWSIZE indicates.
So with an example. If we have a 64 bit bus, and AWSIZE = 0x001 (2 bytes).
This means that the WSTRB width = 8. If AWADDR[2:0] = 0x0, then the only legal WSTRB values are: 0x00, 0x01, 0x02 and 0x03, as only the bottom two bytes can be valid.
Note AWADDR matters due to narrow transfers, as described in Section A3.4.3.