Skip to content

Commit fb45835

Browse files
committed
Add note on change in repo name.
Revert parameter definition location change.
1 parent 696e1c2 commit fb45835

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The design aims to be as generic as possible but does make use of Xilinx Series
88

99
For tutorials and further information, visit [projectf.io](https://projectf.io).
1010

11-
_NB. Pixel coordinates are now signed values and have been renamed; see module documentation for [display timings](doc/modules.md#display-timings)._
11+
_NB. This repository was renamed in August 2019 to **display_controller** (with an underscore) to match Verilog's module naming conventions. See [Changing a remote's URL](https://help.github.com/en/articles/changing-a-remotes-url) if you want to update an existing clone._
1212

1313
## Contents
1414

rtl/display_clocks.v

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@
77

88
// Defaults to 25.2 and 126 MHz for 640x480 at 60 Hz
99

10-
module display_clocks (
10+
module display_clocks #(
11+
MULT_MASTER=31.5, // master clock multiplier (2.000-64.000)
12+
DIV_MASTER=5, // master clock divider (1-106)
13+
DIV_5X=5.0, // 5x clock divider (1-128)
14+
DIV_1X=25, // 1x clock divider (1-128)
15+
IN_PERIOD=10.0 // period of i_clk in ns (100 MHz = 10.0 ns)
16+
)
17+
(
1118
input wire i_clk, // input clock
1219
input wire i_rst, // reset (active high)
1320
output wire o_clk_1x, // pixel clock
1421
output wire o_clk_5x, // 5x clock for 10:1 DDR SerDes
1522
output wire o_locked // clock locked? (active high)
1623
);
1724

18-
parameter MULT_MASTER=31.5; // master clock multiplier (2.000-64.000)
19-
parameter DIV_MASTER=5; // master clock divider (1-106)
20-
parameter DIV_5X=5.0; // 5x clock divider (1-128)
21-
parameter DIV_1X=25; // 1x clock divider (1-128)
22-
parameter IN_PERIOD=10.0; // period of i_clk in ns (100 MHz = 10.0 ns)
23-
2425
wire clk_fb; // internal clock feedback
2526

2627
MMCME2_BASE #(

rtl/display_timings.v

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@
77

88
// Defaults to 640x480 at 60 Hz
99

10-
module display_timings (
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+
(
1123
input wire i_pix_clk, // pixel clock
1224
input wire i_rst, // reset: restarts frame (active high)
1325
output wire o_hs, // horizontal sync
@@ -18,17 +30,6 @@ module display_timings (
1830
output reg signed [15:0] o_sy // vertical beam position (including blanking)
1931
);
2032

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-
3233
// Horizontal: sync, active, and pixels
3334
localparam signed H_STA = 0 - H_FP - H_SYNC - H_BP; // horizontal start
3435
localparam signed HS_STA = H_STA + H_FP; // sync start

0 commit comments

Comments
 (0)