09-16-2017 09:40 AM
I have a 64-bit AXI bus. I would like to write 0x1234 at address = 0x4 ("single 32-bit transfer"). After reading "section 9.3 Narrow transfers" of the AMBA spec, it clear to me of the following ....
axiWrite.last = 0x1
axiWrite.address = 0x4
axiWrite.data = 0x12340000
But what's not clear to me is what wstrb should be. Should "axiWrite.wstrb = 0x0F" or "axiWrite.wstrb = 0xF0" for this AXI transaction?
09-16-2017 11:03 AM
Hey @ruckman_slac,
From the AMBA AXI Specification ...
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)].
So for the 0x12340000 [assumed to be 64bit in total] the strobe bits would be 0x0F.
Note that 0x1234 typically is 16bit and 0x12340000 is 32bit.
Hope this clarifies,
Herbert
09-16-2017 11:03 AM
Hey @ruckman_slac,
From the AMBA AXI Specification ...
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)].
So for the 0x12340000 [assumed to be 64bit in total] the strobe bits would be 0x0F.
Note that 0x1234 typically is 16bit and 0x12340000 is 32bit.
Hope this clarifies,
Herbert
09-16-2017 11:45 AM
Hi Herbert,
Yeah, that was a mistake on my side when defining the 64-bit condition. I meant to say ....
axiWrite.last = 0x1
axiWrite.address = 0x4
axiWrite.data = 0x0000123400000000
If I want to write 0x00001234 at address = 0x4 ("single 32-bit transfer"), then wstrb = 0x0F or wstrb = 0xF0?
Based on the AMBA AXI specs that you pointed out, wstrb = 0xF0 would appear to be the correct setting. However,I working with the AXI GEN3 PCIe IP core and doing "wstrb = 0x0F" does works, which seems like it shouldn't work with respect to the AMBA AXI specs that you pointed out.
Thanks for the help by the way,
Larry
09-16-2017 12:21 PM
Hey Larry,
However, I working with the AXI GEN3 PCIe IP core and doing "wstrb = 0x0F" does works ...
So you are writing to the AXI GEN3 PCIe IP and observing the memory on the other end of the PCIe?
which seems like it shouldn't work with respect to the AMBA AXI specs that you pointed out.
If the write strobes are honored and the transfer is treated as 64bit then no, it shouldn't work, i.e. it should transfer a single 32bit zero. But there are a number of situations where it might work, like ...
Here some ideas to shed more light on it ...
Hope this helps,
Herbert