Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
1175 Discussions

VGA resolution problem

Altera_Forum
Honored Contributor II
1,097 Views

Hello all, 

 

I am using the University program media computer and this works. 

 

As I see how it is set up the VGA pixel buffer is 320x240 and then it's scaled to 640x480. 

 

But I want to have a native resolution of 640x480 (or even 800x600), but how to achieve this? 

 

I removed the scaler and connected the resampler straight to the Alpha blender, but the monitor becomes all fuzzy and it looks like a timing problem. 

 

in the C code I couldn't detect anything where I had to change the resolutions, even the basic draw a box doesn't work.
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
347 Views

Nobody has an idea?? I assumed there were some people from Altera on this board.

0 Kudos
Altera_Forum
Honored Contributor II
347 Views

Where is the video buffer stored? I think by default it is in the 512kB SRAM. 

 

If you have 640x320 (x 2 bytes per pixel) = 600kB  

 

You can't fit that resolution in the memory size.
0 Kudos
Altera_Forum
Honored Contributor II
347 Views

You are correct, the SRAM is 512kB, but why would the Altera university program make the option for 640x480? 

 

Problem is that the image at the moment is going through a scaler which scales the send out 320x240 up to 640x480, thus showing this on the screen (not sure if these buffer gets updated). 

 

When I remove the scaler and write directly to the buffer the image gets distorted. It might be the problem that the buffer is using high and low bytes?
0 Kudos
Altera_Forum
Honored Contributor II
347 Views

I am confused about what you are trying to achieve. It seems that you want a buffer of resolution 640x480. As I said, the SRAM is not large enough to hold a buffer of that size. 

 

You asked why altera would have the option? 

 

You can type in any resolution you want (I assume there are limits) but the buffer will need to be in a memory large enough to hold it.
0 Kudos
Altera_Forum
Honored Contributor II
347 Views

 

--- Quote Start ---  

When I remove the scaler and write directly to the buffer the image gets distorted.  

--- Quote End ---  

 

 

If you remove the scaler, it will output 320x240. Are you sure your monitor supports this resolution? 

 

What do you mean 'write directly to the buffer'? You always write to the buffer whether the scaler core is there or not.
0 Kudos
Altera_Forum
Honored Contributor II
347 Views

At the moment I hook up the pixelbuffer to the resampler then to the scaler, which is hooked to the alpha blender and then to the controller. 

 

When I remove the scaler I set the resolution of the pixelbuffer to 640x480 but I suppose that's where the culprit is. I can then only write about half of the screen, the bottom half is then a repeat of the top (indicating an overflow with reading the memory perhaps?). 

 

I checked again today through the documentation but it doesn't anywhere mention that I can write to a 640x480 buffer, so I guess no luck with the IP cores.
0 Kudos
Altera_Forum
Honored Contributor II
347 Views

You could try hooking the pixel buffer to the dram instead...that way you would have more space. Haven't done it before though...

0 Kudos
Reply