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 saby
Visitor
5,247 Views
Registered: ‎11-02-2011

Stored jpg color Image in board memory using XMD

Hi

 

I want to download my jpg color image  to the DDR SDRAM before the program starts by using the XMD.

In searching, I find these command lines:

1. Under EDK, start the EDK shell and type xmd.

2. Once you are connected with the FPGA board use the usual commands to find the dierctory where your file with data resides. I have to notice that (at least in my case), in order to create a proper file that xmd wil download in DDR as is, I used in C language the fopen function to create my file in binary mode (e.g. FILE *fp=fopen("myfile.dat","wb"); ). To write data in the file I used the fwrite function. Also be careful with the endianess of the processors when you use a x86 processor to write the data and then read them with the PowerPC!

3. In XMD type dow -data myfile.dat 0x<DDR starting address> to download the file in the DDR starting address.

4. If you want, verify that all data are written in DDR, by typing in XMD mrd 0x<DDR address> to check the data.

5. Download your design normally through EDK. If everything is ok, then your design will use the data that are already written in DDR.

 

the problem is that I don't know the format of my file that I download to DDR. Is IT the jpg format or i would write image pixels in a data file ?

 

Kind regards,

 

0 Kudos
5 Replies
Advisor eilert
Advisor
5,232 Views
Registered: ‎08-14-2007

Re: Stored jpg color Image in board memory using XMD

Hi,

do you mean you dont know what format the file on your harddisk has, (try the file command on unix, or open the file properties on Win$)  or do you have doubts about the format that needs to be written to the DDR-Ram?

 

Well, in the secend case it depends on yourt design. Does it have an JPEG decoder in it? If so you can put a JPEG file into your ram, other wise you need the decoded raw image data.

 

But only you know what your design does.

 

Have a nice synthesis

  Eilert

0 Kudos
Visitor saby
Visitor
5,231 Views
Registered: ‎11-02-2011

Re: Stored jpg color Image in board memory using XMD

Hi, 

Thanks for your replay

I use for my project a Virtex5 ML507 and I suppose that it don't have a JPEG decoder .

I decod My image with MATLAB and I can copy the pixels values in a data file (.dat)

I would like to know, in order to written in DDR, if I must copy all the pixels values in the same File, or  I associate for each values (Red ,Green and Blue) a file ?

 

Kind regards,

0 Kudos
Teacher rcingham
Teacher
5,224 Views
Registered: ‎09-09-2010

Re: Stored jpg color Image in board memory using XMD

"I would like to know, in order to written in DDR, if I must copy all the pixels values in the same File, or I associate for each values (Red ,Green and Blue) a file?"

Well, in DDR, they aren't files, as you don't have a file-system.
Surely the 'dow' command documentation will dictate the organisation of the data in the DDR memory.

------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos
Advisor eilert
Advisor
5,223 Views
Registered: ‎08-14-2007

Re: Stored jpg color Image in board memory using XMD

Hi,

what means you "suppose"?

The FPGA on the ML507 board definitely has no JTAG decoder.

But your design may implement one on the FPGA.

 

Do you know what your design does?

 

The association of the data in RAM to the pixel position and color is also defined by your design.

What the design requires is the way you need to deploy the data in the ram.

Only you can know your design.

 

Have a nice synthesis

  eilert

 

0 Kudos
Observer munaq2005
Observer
5,156 Views
Registered: ‎11-18-2011

Re: Stored jpg color Image in board memory using XMD

Hi

 

I want to ask about type of the file that is used with 'dow' command in xmd.

for example data2mem utility needs a file with extension 'mem' and includes hex values seperated by space.

dow command is used in xapp433- web server ' dow –data image.mfs 0x2c000000' and file with type mfs image.

.dat and .bin extensions are supported?

 

regards

 

Tags (1)
0 Kudos