Sorry, you need to enable JavaScript to visit this website.

Run program from DDR

Unsolved
6 posts / 0 new
amirzed's picture
amirzed
Junior(0)
Run program from DDR

Hi,

When I generate the linker script and load the program in the SRAM, the code runs properly. But when I use the DDR the program can not be run. Does anyone know why this is happening and how I can resolve the issue?

I've seen another topics here, but I didn't understand what exactly I need to do.

Thanks

TroutChaser's picture
TroutChaser
Moderator(18)
little more information

Hi Amir,
 
You don't mention which Xilinx tool suite you are using, Vivado or ISE/PlanAhead, or the version but there are reference designs for many of the versions here: http://zedboard.org/design/1521/11 . The Zynq Concepts, Tools and Techniques tutorials all have examples executing out of the DDR memory.
 
The first thing you might want to check is that you have implemented the DDR interface in your design. An easy way to check is to open the system.xml file in the SDK and see if 'ps7_ddr_0' is listed under the 'Address Map for processor ps7_corexa9_0' and that the listed address range matches the memory you are trying to execute from. If the system.xml file did not open automatically in SDK you can find it under 'hw_plantform_0' in the Project Explorer pane on the left.

amirzed's picture
amirzed
Junior(0)
Thanks for the reply. I am

Thanks for the reply. I am using PlanAhead 14.4.

I followed what you have said. I have the 'ps7_ddr_0' and the range is 0x00100000-0x3fffffff.

Where should I define the memory address to execute program from? (I don't have a linux program. It is just a simple hello world)

Thanks

TroutChaser's picture
TroutChaser
Moderator(18)
In the linker script

In your linker script (lscript.ld under your 'hello_world' > src) you should see something like 'ps7_ddr_0_S_AXI_BASEADDR' under the available memory regions. In the 'Section to Memory Region Mapping' set the 'Memory Region' to this selection from the drop down menu for each of the Sections. Save the lscript.ld file. This should target your application to run in DDR memory.
 
I would right click on your 'hello world' project in the Project Explorer pane on the left and then click on 'Clean Project' to make sure it picks up your changes. Then, if it does not build automatically (the default setting), right click on 'Hello World' again and click on 'Build Project' to complete the process.
 
-Gary

amirzed's picture
amirzed
Junior(0)
Thanks Gary for your reply.

Thanks Gary for your reply.

But I think it is already the address of the DDR for all the section. It still doesn't work

TroutChaser's picture
TroutChaser
Moderator(18)
Try the Zynq CTT tutorial

As mentioned before, you could perform the experiments in the Zynq Concepts, Tools and Techniques tutorial for the ZedBoard: http://zedboard.org/design/1521/11 . If there are issues with executing the tutorial example from DDR memory you might want to follow the steps in the ZedBoard Quick Start or Getting Started Guide to run the Linux demo that came installed on the SD Card to verify that the DDR memory is functioning correctly on your board.
 
-Gary