how to calculate the value of strobe signal in axi?
The AXI write strobe signal is used to indicate which bytes of the write data bus are valid for each transfer of data. By using them you can perform sparse data transfers.
For example; when performing a write transaction on a 32 bit data bus, you will have a WSTRB signal that's 4 bits wide. Each bit of this WSTRB signal indicates whether or not the corresponding byte of the WDATA signal contains valid data that should be updated in memory for this transfer. The table below illustrates how each bit of the write strobe corresponds to a byte (8 bits) of the data signal, and will therefore indicates whether or not it is valid or not by being set to 1 or 0:
It's important to note that this write strobe signal can change for each item of data written in a write burst transaction.
I hope my explanation has clarified the purpose of this signal so you'll be able to successfully work out the value it should take, however if you need further clarification then please feel free to ask.
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 ?
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?
View all questions in Embedded forum