• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

VGA out from an FPGA

jmcoreymv

Diamond Member
I'm trying to make a simple game (Pong) using an FPGA (Spartan 3). The game works, but there is a problem with the video output. Every other horizontal line is slightly shifted to the right from the ones above and below it. I checked the sync pulses and they are all constant and with the correct timing. I also registered the RGB outputs. Any ideas?
 
time from leading and trailing edge of hor pulse to first occurance of r/g/b info is constant?
must be able to scope and see with the right trigger...
 
so it is like this

******
_******
******
_******

If so i would think one of the counters that sets the RGB is going for one extra clock. for example if your vertical counter for getting pixel info increment one clock before the horizontal then the last horizontal black pixel from the porch will output on the line line. But then again why doesn't it do the following

*****
_*****
__*****
___*****

So it might not be that. I had a hell of a time implements the correct pixel data aligned the screen and i was only doing text, nothing moving real time like a ball, just when i type on a keyboard 🙂 But the project required a lot of trail and error of changing counters for the displaying and accessing the memory for pixels.. Such a bug would be easier to find if you have a LSA, which i don't have one at home.

Oh and the counters i talk about above is not for the Sync counters as the vga signaling was completely correct, the other counter were the problem.
 
Originally posted by: Lord Banshee
so it is like this

******
_******
******
_******

If so i would think one of the counters that sets the RGB is going for one extra clock. for example if your vertical counter for getting pixel info increment one clock before the horizontal then the last horizontal black pixel from the porch will output on the line line. But then again why doesn't it do the following

*****
_*****
__*****
___*****

So it might not be that. I had a hell of a time implements the correct pixel data aligned the screen and i was only doing text, nothing moving real time like a ball, just when i type on a keyboard 🙂 But the project required a lot of trail and error of changing counters for the displaying and accessing the memory for pixels.. Such a bug would be easier to find if you have a LSA, which i don't have one at home.

Oh and the counters i talk about above is not for the Sync counters as the vga signaling was completely correct, the other counter were the problem.

I'll check the code again and the simulations, but I don't see why the boundary conditions would be different for every other horizontal pulse.
 
I'll probably be doing some similar game for me final project this year in FPGA design, so I'll be interested in this answer too.
 
Back
Top