In video memory, all 640x480 pixels must be stored.
Each line start address will be 4 x (1024 x i); where integer i varies from 0 to 143.Each pixel is represented as 32-bit word in the memory. So, the 176x144 frame should be written as given below.
Suppose the memory address starts from 0xa000_0000:
1st line of the frame should be stored at 0xa000_0000 to 0xa000_02BC (0 to 175)
2nd line of the frame should be stored at 0xa000_1000 to 0xa000_12BC (4x1024=4096d=1000Hex)
:
:
:
144th line of the frame should be stored at 0xa008_F000 to 0xa008_F2BC (143x1024x4=8F000 Hex)
The application can fill the memory as per details given below.
for ( i=0; i <= 143; i++)
{
j=0;
for ( j=0; j <= 175; j++)
{
n Memory update
XIo_Out32((Xuint32*)0xa0000000+((i*1000)+j), File_pixel_data);
}
}