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: 
Visitor pocero
Visitor
2,988 Views
Registered: ‎12-02-2009

How to use the external memory in the best way

Jump to solution

I'm working on an EDK project in which I have to use the external memory.

 

Currently, the external DDR memory is mapped like this (in EDK addresses tab):

Instance: DDR_SDRAM, Base name: C_MPMC_BASEADDR, Base Address = 0x80000000, High Address = 0x81FFFFFF, Size = 32M

 

The problem is that I want to use that memory for several purposes:

1) To load the program (elf) into external memory

2) To use the external memory as a video memory for xps_tft IP

3) To use the xil_mfs system into the external memory

 

I set the base address to the video memory, so when loading the program into external memory, I should manually edit the Linker Script file to avoid overlapping. For example (from the linker script):

MEMORY
{
   ilmb_cntlr_dlmb_cntlr : ORIGIN = 0x00000050, LENGTH = 0x00003FB0
   DDR_SDRAM_MPMC_BASEADDR : ORIGIN = 0x80000000, LENGTH = 0x001FFFFF --> I edit the length here
   PROGRAM_MEM : ORIGIN = 0x81000000, LENGTH = 0X00020000 --> I add this line
}

 

Finally, to initialize the file system (xil_mfs_init instruction), I also have to insert the address manually.

 

What I would like to know is a better way to define those memory segments from EDK, for example to define:

2 MB for video memory

2 MB for program (elf)

4 MB for file system

(all of them from the same external DDR memory) then to have a parameter for each memory segment (for example VIDEO_BASEADDR, FILE_BASEADDR...) and to know that they won't overlap.

 

Thanks.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
3,774 Views
Registered: ‎08-12-2007

Re: How to use the external memory in the best way

Jump to solution
Your current method is correct and good enough.

It takes more time to make the tool generate your expected format automatically than edit it manually if you did well comment in your code.
0 Kudos
2 Replies
Highlighted
Explorer
Explorer
3,775 Views
Registered: ‎08-12-2007

Re: How to use the external memory in the best way

Jump to solution
Your current method is correct and good enough.

It takes more time to make the tool generate your expected format automatically than edit it manually if you did well comment in your code.
0 Kudos
Visitor pocero
Visitor
2,967 Views
Registered: ‎12-02-2009

Re: How to use the external memory in the best way

Jump to solution

OK, I thought that was not the right method to do it.

 

Thank you very much.

0 Kudos