Hi,
I'm trying to read files (i.e. JPEG file) from the compactflash card on the vertex II multimedia board. I know I have to use the sysace controller and its library. I use the following code to conplie:
#include "xparameters.h" #include "xutil.h" #include "sysace_stdio.h"
char *Filename = "winter.jpg"; int main (void) {
FILE *fp; DWORD X_image, Y_image; BYTE *our_image_buffer; printf("starting....\r\n"); if ((fp = fopen(Filename, "r")) == NULL) { printf("\r\nCan't open file: %s \r\n", Filename); return 0; } return 0;
}Here is my MHS for the sysace driver:
BEGIN opb_sysace PARAMETER INSTANCE = system_ace_compactflash PARAMETER HW_VER = 1.00.b PARAMETER C_BASEADDR = 0x81000000 PARAMETER C_HIGHADDR = 0x81FFFFFF BUS_INTERFACE SOPB = mb_opb PORT OPB_Clk = sys_clk_s PORT SysACE_MPA = MPA PORT SysACE_CLK = sysace_clk PORT SysACE_MPD = MPD END
I can complie the above code but the program freezes when I download bitstream to the borad and run it through XMD debugger. Would you please take a look at my code to see if it's correct? I have no experience using the sysace driver to read files. Also, let me know the right configuration for the port connection of sysace core and the right way using C to read file.
Thanks a lot. Yongjie