UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer ruckman_slac
Observer
3,083 Views
Registered: ‎07-14-2015

AXI Write: Narrow transfer & wstrb

Jump to solution

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?

0 Kudos
1 Solution

Accepted Solutions
Voyager
Voyager
4,282 Views
Registered: ‎06-24-2013

Re: AXI Write: Narrow transfer & wstrb

Jump to solution

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

-------------- Yes, I do this for fun!
0 Kudos
3 Replies
Voyager
Voyager
4,283 Views
Registered: ‎06-24-2013

Re: AXI Write: Narrow transfer & wstrb

Jump to solution

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

-------------- Yes, I do this for fun!
0 Kudos
Observer ruckman_slac
Observer
3,060 Views
Registered: ‎07-14-2015

Re: AXI Write: Narrow transfer & wstrb

Jump to solution

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

0 Kudos
Voyager
Voyager
3,055 Views
Registered: ‎06-24-2013

Re: AXI Write: Narrow transfer & wstrb

Jump to solution

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 ...

  • The write strobes are wired the wrong way or not active at all.
  • The data-bus is wired the wrong way (MSB vs LSB).
  • There are actually two 32bit transfers happening where one is overwriting the other.

Here some ideas to shed more light on it ...

  • Use a clear and unique pattern like for example "11101110" for each byte in your data.
  • Try with single write strobes and make sure to alternate the pattern.
  • Use the AXI analyzer to investigate the transfers.

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos