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: 
1,909 Views
Registered: ‎02-05-2018

ZYNQMP configuration for access PS-DDR from PL

I have created an AXI-Master which writes data to the PS DDR4 memory. The only thin I want is to write certain data from the PL to the DRAM and then read it back and compare it. I don't want the PS to modify any of it. Is there any software for the PS necessary besides the FSBL to load the bitstream from QSPI? I would appreciate any help since I'm new to this. 

my_design.png
19 Replies
Highlighted
Explorer
Explorer
1,894 Views
Registered: ‎01-09-2012

Re: ZYNQMP configuration for access PS-DDR from PL

@sebastian.schmutz

 

Looks like a performance test for the DDR4 SDRAM, which I had to do as well few month ago... by the way, what for do you need smartconnect_0?

 

Cheers

Goran

0 Kudos
1,888 Views
Registered: ‎02-05-2018

Re: ZYNQMP configuration for access PS-DDR from PL

The smartconnect was inserted automatically if I remember right. I"m not sure if this is needed to translate form the AXI4 Lite master. 

0 Kudos
Explorer
Explorer
1,883 Views
Registered: ‎01-09-2012

Re: ZYNQMP configuration for access PS-DDR from PL

I see. Let's still assume you would like to to performance tests: Just remember that the PS part is internally using an AXI v3 interconnect and we firmware developer tend to use the AXI v4. Hence whatever you are doing in your test RTL you have to restrict yourself in the firmware to the supported common transfers. Maybe the AXI interconnect you added will do this for you. In addition if you want to do performance tests then consider the axi performance monitors in the PS part... they show the read and write bandwidth, which is very handy for getting a better understanding on the interface and memory access performance in general. 

 

Have fun

Cheers

Goran

0 Kudos
1,875 Views
Registered: ‎02-05-2018

Re: ZYNQMP configuration for access PS-DDR from PL

Actually I really just want to do basic accesses from the PL. I'm not a firmware developer. I'm an ASIC designer who is now trying to solve a particular problem. I don't want the processor doing something. All the accesses are just done by the PL. What firmware is necessary to have?

0 Kudos
Explorer
Explorer
1,862 Views
Registered: ‎01-09-2012

Re: ZYNQMP configuration for access PS-DDR from PL

@sebastian.schmutz

 

I guess you have to have the processor part running as well, since the software called FSBL (first stage bool loader) initializes the PS part. Hence if you try to access the SDRAM controller (and other stuff as well) it has to be configured fist, before you are able to use it. However may be there is anther way by some PS default setup which is added to your firmware and which allows you to use this PL ONLY access... but I have no idea how this should work.

 

Sorry and cheers

Goran

0 Kudos
1,850 Views
Registered: ‎02-05-2018

Re: ZYNQMP configuration for access PS-DDR from PL

I have the FSBL running, but still I'm not able to get the expected results. Do I have to specify a .elf file for the "destination_cpu"? Are there any restricted areas in the DRAM?

0 Kudos
Explorer
Explorer
1,843 Views
Registered: ‎01-09-2012

Re: ZYNQMP configuration for access PS-DDR from PL

@sebastian.schmutz

 

Hello Sebastian,

 

Check the memory content by means of the software debugger.... here is a memory view available in SDK which allows you to see what you were writing to the memory. The other thing you may do is to see if your AXI master does what it was intended to do by adding in firmware an integrated bus analyzer... like I did in my performance tests for the Zynq Ultrascale+:

 

Capture.JPG

 

In the block diagram you see that I am using the "AXI traffic generator" which does most likely what your AXI_test_top does.

And you see the System ILAs which I am able to check the AXI transaction and wee what I'm writing and reading.

Basically my proposal to you is to have 3 debug possibilities:

1. the write by AXI by means of the System ILA

2. the accessibility by means of memory read/write in SDK

3. the read by AXI by means of the System ILA

 

Then you can localize where your test fails.

 

Cheers

Goran

1,817 Views
Registered: ‎02-05-2018

Re: ZYNQMP configuration for access PS-DDR from PL

Hello, 

 

as far as I can see the AXI protocol is generated correctly by the master, address and data seem to be ok. This is confirmed with the ILA. However when I read the written memory locations with the SDK I don't see the correct data there. Also the date received by the master during read, as far as I can tell from the ILA waveforms don't match the data read at the memory address by the SDK. 

I'm not sure what I am missing and would appreciate help.


Sebastian

0 Kudos
Explorer
Explorer
1,788 Views
Registered: ‎01-09-2012

Re: ZYNQMP configuration for access PS-DDR from PL

@sebastian.schmutz

 

Can you put some pictures of your ILA showing the AXI bus and of the SDK memory view to the forum?

 

Cheers

Goran

0 Kudos
1,512 Views
Registered: ‎02-05-2018

Re: ZYNQMP configuration for access PS-DDR from PL

Hi Goran,

 

I did some further debugging and figured out that reading from the PS is ok, expected data can be verified by ILA. Writing to the PS seems to be the problem. I see the correct data written at wrong addresses. I attached some pictures from the ILA. Data read via SDK shows an address offset of 0x5c and address is apparently masked with  0x07F. This would explain the behavior. By the way, I replaced the smartconnect block with an AXI interconnect.

0 Kudos
Explorer
Explorer
1,503 Views
Registered: ‎01-09-2012

Re: ZYNQMP configuration for access PS-DDR from PL

@sebastian.schmutz

 

Your ILA screenshots look like internal signals from your component... However you could as well post us the signals on the AXI connected on the diagram top (like in my example), then we could see if your component messes up the AXI bus... there is one thing about the AXI implementation from Xilinx: It does not forgive and forget! If you did a mess up with the AXI protocol the AXI may behave strangely. I saw this when a colleague of mine did a AXI master which locked up when an error happened and the AXI did not terminate properly.

You can check that manually using the ILA (and the AXI spec) or in combination with the AXI protocol checker from Xilinx... give them a try. They are good tools for power users.

 

Cheers and have fun

Goran

 

0 Kudos
1,496 Views
Registered: ‎02-05-2018

Re: ZYNQMP configuration for access PS-DDR from PL

The first of the two pictures show the AXI outputs of my component. The addresses and the response seem to be ok in that case. I will see that I can deliver a picture of the AXI bus output of the interconnect block.

0 Kudos
Explorer
Explorer
1,475 Views
Registered: ‎01-09-2012

Re: ZYNQMP configuration for access PS-DDR from PL

@sebastian.schmutz

 

Dont forget to add the AXI protocol checker from Xilinx.

 

Cheers

Goran

0 Kudos
1,469 Views
Registered: ‎02-05-2018

Re: ZYNQMP configuration for access PS-DDR from PL

Hi Goran,

 

I have attached the waveform files form the ILA blocks and the protocol checkers. Apparently there is an violation indicated by the checker. Bit 9 and bit 19 are set in the checker. I find that strange that there are protocol violations since the simulations show no errors. 

 

Regards,

 

Sebastian

0 Kudos
Explorer
Explorer
1,463 Views
Registered: ‎01-09-2012

Re: ZYNQMP configuration for access PS-DDR from PL

@sebastian.schmutz

 

So we are on tracking down slowly our problem. Next step is to find out what the protocol checker identifies as a problem? What does he say about the bit 9 and 19?

 

Cheers

Goran

0 Kudos
1,458 Views
Registered: ‎02-05-2018

Re: ZYNQMP configuration for access PS-DDR from PL

Hi Goran

 

Bit 9:

AXI_ERRM_AWADDR_STABLE:

Handshake Checks: AWADDR must remain stable when AWVALID is asserted and AWREADY Low.

 

Bit 19:

AXI_ERRM_AWVALID_STABLE

Handshake Checks: Once AWVALID is asserted, it must remain asserted until AWREADY is High

0 Kudos
Explorer
Explorer
1,449 Views
Registered: ‎01-09-2012

Re: ZYNQMP configuration for access PS-DDR from PL

@sebastian.schmutz

 

I see. Please check the AXI spec AMBA® AXI Protocol Specification on page 1-8 figure 1-6

There you see how your AXI write request has to look like.

 

Cheers

Goran

0 Kudos
Explorer
Explorer
1,349 Views
Registered: ‎01-09-2012

Re: ZYNQMP configuration for access PS-DDR from PL

@sebastian.schmutz

 

Hello Sebastian... did it work?

 

Cheers

Goran

0 Kudos
1,342 Views
Registered: ‎02-05-2018

Re: ZYNQMP configuration for access PS-DDR from PL

Yes, I got it running. Thanks for the hint!

0 Kudos