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: 
Explorer
Explorer
8,508 Views
Registered: ‎10-01-2007

Program executing from DDR

Jump to solution

Hello.

I need to load my Application to DDR because BRAM is not enought.

In my project address of DDR RAM begins at 0x8c000000. In this topic I found my way to solve it

http://forums.xilinx.com/xlnx/board/message?board.id=Virtex&message.id=168

so, i need to to use BRAM for stack/heap, and then I load my generated ace file into DDR RAM with this command:

xmd -tcl genace.tcl -jprog -hw implementation/download.bit -ace rev0.ace -board ml402 -target mdm -elf TestApp_Memory/executable.elf -data -start_address 0x8c000000

This is  right way?

Maybe should I change settings in "Generate Linker script" ? There all fields are in ilmb_cntrl_dlmb memory...it is possible to change to DDR

Thanks!

 

Best Regards,
Vytautas
0 Kudos
1 Solution

Accepted Solutions
Observer fventrone
Observer
10,581 Views
Registered: ‎02-26-2009

Re: Program executing from DDR

Jump to solution

Just an FYI, I could never get mine to work without specifying the -start_address option. So, when creating the ace file, if it doesn't find the start_address automatically, as it should, then specifing it on the command line should fix that.

 

Also, if you are just trying to run/debug your code, generating the ace file is a bit cumbersome, although, it is not a bad exercise if you are just trying to learn how to create the ACE file. You can just use the debugger built into EDK. You specify the memory where you want your code to go in the linker script as you mentioned earlier. That should be a quicker way to test your code. I don't use the ACE file until I have something stable.

 

Fred

0 Kudos
7 Replies
Xilinx Employee
Xilinx Employee
8,506 Views
Registered: ‎08-07-2007

Re: Program executing from DDR

Jump to solution

Hi,

 

You don't need -data option if you have no data file to be loaded, which seems to be the case.

 

You can link your code to which ever memory you want if you are using SystemACE solution.

 

-XF

0 Kudos
Explorer
Explorer
8,492 Views
Registered: ‎10-01-2007

Re: Program executing from DDR

Jump to solution

Thanks,

so, with option  -start_address 0x8c000000 program will be loaded into DDR RAM (with BASE DDR Address 0x8c000000), yes?

Best Regards,
Vytautas
0 Kudos
Xilinx Employee
Xilinx Employee
8,481 Views
Registered: ‎08-07-2007

Re: Program executing from DDR

Jump to solution

Hi,

 

You don't need -start_address 0x8c000000 as well.

 

The ELF file contains the debugging information. The systemace will be able to interrept it and download it into what ever memory that it should goes.

 

-XF

0 Kudos
Explorer
Explorer
8,458 Views
Registered: ‎10-01-2007

Re: Program executing from DDR

Jump to solution

Thank you for the answer.

I removed -start_address option from command.

Also, I made some changes in Generate Linker Script dialog:

in Section view field two sections (.text and /data) was changed from ilmd_cntrl_dlmb to DDR_SDRAM.

So, it means that generated .ace file after loading it from Flash will allocate all Initialized data (.data) and Program Code (.text) to external DDR memory?

Best Regards,
Vytautas
0 Kudos
Observer fventrone
Observer
10,582 Views
Registered: ‎02-26-2009

Re: Program executing from DDR

Jump to solution

Just an FYI, I could never get mine to work without specifying the -start_address option. So, when creating the ace file, if it doesn't find the start_address automatically, as it should, then specifing it on the command line should fix that.

 

Also, if you are just trying to run/debug your code, generating the ace file is a bit cumbersome, although, it is not a bad exercise if you are just trying to learn how to create the ACE file. You can just use the debugger built into EDK. You specify the memory where you want your code to go in the linker script as you mentioned earlier. That should be a quicker way to test your code. I don't use the ACE file until I have something stable.

 

Fred

0 Kudos
Explorer
Explorer
8,419 Views
Registered: ‎10-01-2007

Re: Program executing from DDR

Jump to solution

Thanks for advices!

Now my program works, i downoad bitsream to fpga, load elf file, but however i found some strange places:

because my purpose is to read several 10KB size wav files from SD flash to DDR memory. So, i have changed memory of .text, .data and .bss sections from ilmbd_cntrl to DDR_RAM.

By this scenario i understand that  (found in this pdf) some sections of codes from my c file go to different sections:

int main (void) {
    short *ddr_ptr;                       //BSS section

    int a;                                //BSS section  

    xil_printf("%c[2J",27);               //TEXT section

      in_file = sysace_fopen("a:\\input.txt" ,"r" );
    failoDydis = sysace_fread(ddr_ptr, 1, 54160, in_file); 

it means that all information whick was read from SD card or predifined variables (like int a) have to be written automaticaly to DDR ram (because in "Generate Linker Script" .bss and .data sections was changed to DDR)?

 But no! I make one experimen: just write to RS232 console address of variable a or ddr_ptr and se, that address is not in range of DDR.

 

I found solution to write this string (it means to define address of pointer):

ddr_ptr = (short *)DDR_BASEADDR;

but i don't like it...

How to solve that mentioned sections would be written to DDR without specifying address?a

 

 

Best Regards,
Vytautas
0 Kudos
Highlighted
Visitor roketroket
Visitor
6,340 Views
Registered: ‎05-28-2012

Re: Program executing from DDR

Jump to solution

Hi,

I'm using Raggedstone 2 board http://enterpoint.co.uk/products/spartan-6-development-boards/raggedstone-2/

which has a Spartan 6 and 1 Gbit, X16, DDR3 SDRAM on it. I made a Microblaze design which has a PLB bus and an external memory controller in it to use the Micron DDR3 RAM on the board. I made the necessary process flows in XPS and ISE Project Navigator and succcessfully generated the bitstream, and then export HW to SDK.

 

I generate the linkerscript, build peripheral_test sample project with the correct HW, but when i try to debug, it says check if the memory is working properly.

 

Is it about pin assignment of the memory controller or something wrong with the embedded (XPS) structure?

Or can it be due to the fact that im doing wrong with the memory controller's settings for the DDR3 on the board? (for example timing or frequency settings)

Attached is my .mhs file.

 

Any help is welcome.

 

Thanks in advance.

 

0 Kudos