Embedded Systems
Spring 2024
HW 6 VGA Name: Mason
Brady Email:
mrbrady1@fortlewis.edu
HW 6
Introduction:
This homework is an introduction to VGA ports
Materials:
gvim, vivado
1) Repeat section 2
I copied the code from the website. I'm just going to copy it below
because I'm going to overwrite it for the next step and this makes it
easier for me to come back to it if I need it. This code is pretty
straight forward and had no major issues.
Part 2)
For part two we had to write our own clock divider. Here I ran into
some issues because I accidentally put my clkout assignment inside the
if statement which broke everything but this was also pretty
straightforward. I'm trying to learn to use more advanced assingment
techniques to get used to them so I used this one line variable case
statement that we went over before. Another way to do it would to just
be to encapsulate it in an if else.
Figure 2. Clock
Divider 1/4.
The display when you mess this up is just black but otherwise looks
identical to the one above in Figure 1.
Part 3)
For part 3 we had to display solid colors. My monitor was
too fancy for the VGA and refused to downscale to 640x480 so I just
changed the sx and sy limits to 640 and 480 respectively.I'm still
confused why this yielded a horizontal rectangle and not a vertical one
but it works for this purpose. I then removed the RGB assingments in
the code above and replaced them with a case statement. For the first
demo color remained constant and for the second demo I just incremented
color by one every 25000000 counts (1 second) and reset back to 1 (not
0 since that's white).
Figure 3. Case
statement for color switching.
For the
first demo I just kept color = 2'b0; which just set it to white. For
the second demo I added this code above it.
Figure 4. Color
incrementing for changing colors
Discussion: This
weeks work was pretty fun didn't mind this one at all.