77
88// Defaults to 640x480 at 60 Hz
99
10- module display_timings #(
11- H_RES= 640 , // horizontal resolution (pixels)
12- V_RES= 480 , // vertical resolution (lines)
13- H_FP= 16 , // horizontal front porch
14- H_SYNC= 96 , // horizontal sync
15- H_BP= 48 , // horizontal back porch
16- V_FP= 10 , // vertical front porch
17- V_SYNC= 2 , // vertical sync
18- V_BP= 33 , // vertical back porch
19- H_POL= 0 , // horizontal sync polarity (0:neg, 1:pos)
20- V_POL= 0 // vertical sync polarity (0:neg, 1:pos)
21- )
22- (
10+ module display_timings (
2311 input wire i_pix_clk, // pixel clock
2412 input wire i_rst, // reset: restarts frame (active high)
2513 output wire o_hs, // horizontal sync
@@ -30,6 +18,17 @@ module display_timings #(
3018 output reg signed [15 :0 ] o_sy // vertical beam position (including blanking)
3119 );
3220
21+ parameter H_RES= 640 ; // horizontal resolution (pixels)
22+ parameter V_RES= 480 ; // vertical resolution (lines)
23+ parameter H_FP= 16 ; // horizontal front porch
24+ parameter H_SYNC= 96 ; // horizontal sync
25+ parameter H_BP= 48 ; // horizontal back porch
26+ parameter V_FP= 10 ; // vertical front porch
27+ parameter V_SYNC= 2 ; // vertical sync
28+ parameter V_BP= 33 ; // vertical back porch
29+ parameter H_POL= 0 ; // horizontal sync polarity (0:neg, 1:pos)
30+ parameter V_POL= 0 ; // vertical sync polarity (0:neg, 1:pos)
31+
3332 // Horizontal: sync, active, and pixels
3433 localparam signed H_STA = 0 - H_FP - H_SYNC - H_BP; // horizontal start
3534 localparam signed HS_STA = H_STA + H_FP; // sync start
0 commit comments