HW 7 VGA Discs

Objective

In this project students will explicitly implement a computational finite-state machine, utilize manual rescheduling to distribute multiplications, and resource sharing. Students will become familiar with the concept of using and use an on-chip clock manager. Students will utilize the faster clock to implement computations in a serial fashion. In this HW students will display a discs onscreen, examine timing analysis and utilization reports, and modify synthesis options.

Due Dates

Description

1. Start with a working VGA display project

2. Build a design with Generated Clocks with New Frequencies using a Clocking Wizard

DO NOT SUBMIT REPORTS FOR THIS DESIGN ITSELF. Submit the mentioned sections of clock, timing analysis, and utilizations for the following implemenations.

3. Implement Discs rather than a rectangle

A disc (filled cirle) of radius 100 at (xC,yC) can be implemented with the following function: (pixel_h_pos-xC)^2 + (pixel_v_pos-yC)^2 < 10000
Instead of drawing a rectangle, draw discs using this formula.

Modify the vga_rectangle to be vga_dics so that is has a case-statement-based computational state-machine that tests if a pixel is within a certain distance of three center points. Your state-machine should use the single-always-block style and must have the calculations embedded in the sate machine code (no separate datapath).

Requirement: there should be no more than one multiplcation per cycle so as to facilitate resource sharing. To assist resource sharing, decide a variable name that will have a multiplication result assigned to it every clock cycle. Propagate that result into a register in each cycle as appropriate.

Implement this vga_dics as a PARAMETERIZED module that can draw 3 filled discs.
Your module should be implemented with 6 redifinable parameters (use keyword parameter): 3 X-center, 3 Y-center, and 3 radii.

Demonstrate the following three discs by instantiating your module in the top.sv using parameter “override” in the instatation.

Explore Resource Utilization and Resource Sharing

Submission

Appendix

blackboard post

The version of vga_sync found in the link posted in the HW 7 is this one: http://web.mit.edu/6.111/www/f2005/code/jtag2mem_6111/vga_sync.v.html
It is desiged to work with a 50 MHz input clock.
Some of you have been using a modified version to work with a 100 MHz input clock. You should revert to the version in the link posted this HW.

Modified for 100 MHz clk:

reg    [1:0] pcount;          // used to generate pixel clock
wire   en = (pcount == 0);
always @ (posedge clk) pcount <= pcount + 1; 

Version in posted link designed for 50 MHz clock:

// pixel clock: 25Mhz = 40ns (clk/2)
reg 		pcount;		 // used to generate pixel clock
wire 	en = (pcount == 0);
always @ (posedge clk) pcount <= ~pcount;
assign 	pix_clk = en;

HW 7 VGA Discs

Description

Appendix