Altera_Forum
Honored Contributor
15 years agoFrame Reader - How has some experience?
Dear all,
I understand the Frame reader VIP suite component is a kinda new comp so it is difficult to find some examples on web. But i see from posts on this forum some folks have already tried to use it. I've started my development and not able to run it. Just wounder how everything should be organized. In the SOPC builder I simply have: Nios, oncip_mem, jtag, timer - this is Avalon-MM. Avalon-ST is only Frame Reader-> Clocked video output. Previously I used Test Pattern Generator instead of the Frame Reader and i can see the image on the monitor. i use only one clock - vip_clk. I just want to write a small picture (40x40) to the on_chip memory and see it on the monitor. 1. What is the simpler way to write raw picture to the on-chip memory? I have a program called GIMP2 which is able to convert from jpg, bmp to rgb, and i can create a C++ array of the rgb bits. I'm not a C specialist so it is good if it is possible just simply to copy an array of rgb from a file to the memory. Does anyone can give a simple C code and picture for my reference? 2. What parameters should I specify for the VIP frame reader component? I have progressive video (DVI), 3 colors in parallel, 8-bit color. Master port width - 64. Picture is 40x40 Now I have the following but this doesn't work for me:
IOWR(ALT_VIP_VFR_0_BASE, 0x3, 0x0);
//
IOWR(ALT_VIP_VFR_0_BASE, 0x4, DISPLAY_MEMORY_BASE);
// frame address in the on chip memory
// 800/1600 - they are the values which work
IOWR(ALT_VIP_VFR_0_BASE, 0x5, 800);
// numbers of reads from master port for whole frame= 40*40*3*8/48 =800 !!!
IOWR(ALT_VIP_VFR_0_BASE, 0x6, 1600);
// number of pixel
IOWR(ALT_VIP_VFR_0_BASE, 0x8, 40);
//
IOWR(ALT_VIP_VFR_0_BASE, 0x9, 40);
//
IOWR(ALT_VIP_VFR_0_BASE, 0x0, 0x1);
// start frame reader
frame_reader_status = IORD(ALT_VIP_VFR_0_BASE, 0x1);
Maybe the problem is in how i write the picture to the memory? i appreciate if somebody can give me some suggestions. Thanks, U.