VGA Lab
Noah
Smith
This lab is
tackling more advanced VGA problems.
1. Draw a green line on a white background on the monitor. (25
points)
This was a simple matter of defining
the pixel range, and then making it green.
2. Draw an additional red bar on the monitor (25 points)
The concept of this is the same as the
green bar. Define the pixel range, color it red. Due
to my monitor being 1920x1080 resolution, the 640x480 resolution of the VGA
code leaves the normal range of the red bar out of view. To get around this I put
the red bar much farther over horizontally so that it would show up. This range
can be seen in the code.
3. Move the red bar to the right (horizontally) by 1 pixel for every 0.5
second. (25 points)
To achieve this, a range “counter” is added, every time 500000 clk cycles go by, or every .5 seconds, the range is incremented.
This small bit of code is seen below, the display code is relitevlty
the same, the only edit is the horizontal range of the red bar must be changed from
pixel numbers to the range counter. Once again, because of my display
resolution, this range is artificially shortened and I chose to move the bar to
the left, instead of right, as I had more display that direction.
4. Bounce it back and forth between the green line and the X location of
600. The speed is 0.01s/pixel. (25 points)
This was similar to
the last problem, I only needed to flip the range counter every time the range
counter hit 35 or 100. This can be seen in the code. If the range is flipped it then decrements instead of increments every clk cycle.