CE 433 Spring 2022
Lab 6: Basys 3 and VGA
Taylor Nakai
tsnakai@fortlewis.edu

Introduction:
In this lab, we were tasked with drawing a green line on a white background on the monitor, drawing an additional red bar on the monitor, moving the red bar to the right (horizontally) by 1 pixel for every 0.5 seconds, and bouncing the red bar back and forth between the green line and the x location of 600 with a speed of 0.01 s/pixels. Completeing these tasks gave us a better understanding of the VGA protocal, which is a very interesting topic.

Task 1:
In this task, we were tasked with creating a green line on a white background on the monitor. We needed to ensure that we used the 640 x 480 resolution, the width of the line is 4 pixels that starts from pixel 32 and ends at pixel 35, and it uses the Basys 3 board, a VGA cable, a monitor, gvim, and Vivado for each task. Figure 1 displays the code needed to create the green line. Figure 2 displays the green line on a white background.


Figure 1. Code needed to create the green line.


Figure 2. Displaying the green line on a white background.

Task 2:
In this task, we needed to create a green line in addition to a red bar on the monitor. We had to create the green line similar to task 1, and also include a red bar that had the boundaries of X: 600-605 and Y: 200-250. Figure 3 displays the code needed to create the green line and red bar. Figure 4 displays the green line and red bar on a white background.


Figure 3. Code needed to create the green line and red bar.


Figure 4. Displaying the green line and red bar on a white background.

Task 3:
In this task, we needed to move the red bar to the right (horizontally) by 1 pixel every 0.5 seconds. Figure 5 displays the code needed to create the green line and red bar with the red bar moving to the right (horizontally) by 1 pixel every 0.5 seconds. Figure 6 shows a demonstration of the green line and red bar on a white background, with the red bar moving to the right (horizontally) by 1 pixel every 0.5 seconds.


Figure 5. Code needed to create the green line and red bar with the red bar moving to the right (horizontally) by 1 pixel every 0.5 seconds.


Figure 6. Demonstration of the green line and red bar on a white background, with the red bar moving to the right (horizontally) by 1 pixel every 0.5 seconds.

Task 4:

In this task, we needed to bounce the red bar back and forth between the green line and the x location of 600. The pixel speed of 0.01 s/pixel. Figure 7 displays the code needed to create the green line and red bar with the red bar bouncing back and forth. Figure 8 shows a demonstration of the green line and red bar on a white background, with the red bar bouncing back and forth.


Figure 7 displays the code needed to create the green line and red bar with the red bar bouncing back and forth.


Figure 8. Demonstration of the green line and red bar on a white background, with the red bar bouncing back and forth.

Discussion:
By completing this lab, we were able to gain more comfortability working with verilog, vivado, and VGA. We were able to gain more experience with working with VGA and learing about all the different capabilities. I think that this lab was very beneficial as I got everything working and learned how to get a moving object on the screen. I believe that these skills will be useful in the future.  Overall, this lab was interesting and I can't wait to learn more.