11-02-2011 02:24 PM
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 ?
11-03-2011 12:48 AM
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
11-03-2011 02:29 AM
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 ?
11-03-2011 03:25 AM
11-03-2011 04:16 AM
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
05-11-2012 10:13 AM
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?