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: 
Observer sudeep5star
Observer
17,126 Views
Registered: ‎12-04-2009

Writing data in DDR Ram

Hello all,

 

I'm writing an application of image processing on Virtex 2 pro university board (XUV2P). The board has a DDR ram memory. The application is to send data from the PC via RS232 link and echo it back (i'm just testing the memory capability here). I have used a two dimensional array of image size i.e (800 x 600 pixels). But the program does not work beyond array size of 100 x 200 bytes. My code is

 

#include "xparameters.h" //#include "xgpio.h" #include "xutil.h" #include "xuartlite_l.h" #include "stdio.h" #define height 100 #define length 200 unsigned char receive (void); int main() { int i,j; unsigned char b[height][length]; xil_printf("snd\n"); for(i = 0;i < height;i++) for(j = 0;j < length; j++) { b[i][j] = receive(); } for(i = 0;i < height; i++) for(j = 0;j < length; j++) { xil_printf("%c",b[i][j]); } return 0; } unsigned char receive (void) { unsigned char a; a = 0; while(XUartLite_mIsReceiveEmpty (XPAR_RS232_UART_1_BASEADDR)); a = XUartLite_RecvByte (XPAR_RS232_UART_1_BASEADDR) ; return a; }

 Beyond the array size of 100 x 200, the data "snd" does not appear on hyperterminal nor any other image data gets stored in the array.

 

 

 

My question is

Has some one faced problem writing data onto memory?

Is there some other way to write data onto DDR memory, am i missing something?

 

Thanks for your reply in advance.

Regards,

Sudeep K C
0 Kudos
9 Replies
Observer sudeep5star
Observer
17,116 Views
Registered: ‎12-04-2009

Re: Writing data in DDR Ram

Ok.. One more update. I am not able to run TestApp_Peripheral code from EDK. The program is loaded onto DDR ram (selected via BSB generator). The program compiles, but no response is seen in the hyperterminal. Any ideas?
Regards,

Sudeep K C
0 Kudos
Adventurer
Adventurer
17,111 Views
Registered: ‎07-10-2009

Re: Writing data in DDR Ram

Hi

 

Which DDR SDRAM do u have ??

writing and reading the data from a ddr is pretty different from a normal block ram as it need proper initialization process and has specific way of writing.

do study the datasheet completely and u will be able to write properly. also do look into the MIG tool in the CORE GENERATOR

 

regards

Mohsin 

0 Kudos
Observer sudeep5star
Observer
17,104 Views
Registered: ‎12-04-2009

Re: Writing data in DDR Ram

Hi qureshi031,

 

Thanks for your reply.

 

DDR SDRAM i am using is from Kingston, KVR266X64C25/256, one recommended by Xilinx (tool recognizes it). Well, in data sheet they haven't specified any thing about writing data using c file. The DDR SDRAM is working properly, this i have confirmed by running TestApp_Memory application which comes with EDK. What i wanted to know is how to write data like an image to the external memory. Is there any key word like xdata (like in Keil) or does the compiler automatically takes data onto external ram?

Regards,

Sudeep K C
0 Kudos
Adventurer
Adventurer
17,103 Views
Registered: ‎07-10-2009

Re: Writing data in DDR Ram

HI

 

i dont have any idea about that ... i am just a beginner in this field

hope u get some help regarding your problem

 

Regards

Mohsin 

0 Kudos
Observer sudeep5star
Observer
17,085 Views
Registered: ‎12-04-2009

Re: Writing data in DDR Ram

Hi Mohsin,

 

Thank you for your reply, 

 

I too am a beginner for EDK. So exploring the tool and its features.

 

 

Regards,

Sudeep K C
0 Kudos
Observer sudeep5star
Observer
17,024 Views
Registered: ‎12-04-2009

Re: Writing data in DDR Ram

Hi all,

 

I finally found out how to write in DDR RAM.

 

I dont think its a logical solution, probably Xilinx people may answer this more appropriately.

 

I just declared the array as global and it started working. 

 

Ofcourse, except the boot section (.boot0) all were mapped to DDR RAM (256 MB) and it worked well.

 

Thanks for your support guys.

 

 

Regards,

Sudeep K C
0 Kudos
Newbie rishabh225
Newbie
16,721 Views
Registered: ‎02-13-2010

Re: Writing data in DDR Ram

Hey hiee....

 

i am a beginner to this virtex II Pro family.. I have to do image processing on FPGA.

 

For this i have to send image data from my pc to DDR Ram through RS232 and then read data from the Ram for Image Processing from the verilog code 

 

Can You please help me in this regard?

 

I need two things :

 

1. writng image data to DDR Ram using SART RS232

2. access those data from verilog/vhdl code for image processing

 

regards,

Ranjan

Tags (1)
0 Kudos
Observer sudeep5star
Observer
16,716 Views
Registered: ‎12-04-2009

Re: Writing data in DDR Ram

Hi. Virtex 2 Pro is not ideally suited for image processing (At least not real time, from what i could do). but you can test your algorithms for good. Use EDK to create Computer - FPGA interface for RS 2332 interface. later link the hardware core you have generated to the microblaze/power pc processor through FSL link. That should work fine.

 

Regards,

Sudeep K C
0 Kudos
Visitor zeshanali
Visitor
16,337 Views
Registered: ‎03-24-2010

Re: Writing data in DDR Ram

Hello dear i have the same problem , how write the image in DD RAM,

you found the solution  can you explore your solution , i am newbi .

 

Thanks Advance for sharing:

0 Kudos