You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Project F Display Controller
1
+
# Project F Display Controller
2
2
3
3
The Project F display controller makes it easy to add video output to FPGA projects. It's written in Verilog and supports VGA, DVI, and HDMI displays. It includes full configuration for 640x480, 800x600, 1280x720, and 1920x1080, as well as the ability to define custom resolutions. This design and its documentation are licensed under the MIT License.
4
4
@@ -22,12 +22,12 @@ This design supports displays using VGA, DVI, and HDMI.
22
22
23
23
**VGA** support is straightforward; you can see an example in the [VGA demo](hdl/demo/display_demo_vga.v). If you're building your own hardware, then [Retro Ramblings](http://retroramblings.net/?p=190) has a good example of creating a register ladder DAC. If you're looking for a ready-made VGA output, then the [VGA Pmod](https://reference.digilentinc.com/reference/pmod/pmodvga/start) is a good option for around $10.
24
24
25
-
**DVI** & **HDMI** use [transition-minimized differential signalling](https://en.wikipedia.org/wiki/Transition-minimized_differential_signaling) (TMDS) to transmit video over high-speed serial links. HDMI provides extra functionality over DVI, including audio support, but all HDMI displays should accept a standard DVI signal without issue.
25
+
**DVI** & **HDMI** use [transition-minimized differential signalling](https://en.wikipedia.org/wiki/Transition-minimized_differential_signaling) (TMDS) to transmit video over high-speed serial links. HDMI provides extra functionality over DVI, including audio support, but all HDMI displays should accept a standard DVI signal without issue.
26
26
27
-
The display controller offers two types of TMDS generation:
27
+
The display controller offers two types of TMDS generation:
28
28
29
29
* Direct generation on FPGA
30
-
*[Black Mesa Labs DVI Pmod](https://blackmesalabs.wordpress.com/2017/12/15/bml-hdmi-video-for-fpgas-over-pmod/)
30
+
*[Black Mesa Labs DVI Pmod](https://blackmesalabs.wordpress.com/2017/12/15/bml-hdmi-video-for-fpgas-over-pmod/)
31
31
32
32
Direct TMDS generation on FPGA requires high-frequency clocks (742.5 MHz for 720p60) and SerDes but allows full control of the signal including HDMI features. HDMI support is currently via backwards compatibility with DVI: any standard HDMI display should accept DVI signals. However, this display controller lacks support for audio or advanced HDMI features at present.
33
33
@@ -36,14 +36,14 @@ The Black Mesa Labs (BML) Pmod is based on the Texas Instruments [TFP410](http:/
36
36
37
37
## Display Resolution Support
38
38
The following four display resolutions are tested and included by default (all at 60 Hz refresh rate):
39
-
40
-
Resolution Ratio Clock
39
+
40
+
Resolution Ratio Clock
41
41
640 x 480 4:3 25.20 MHz [1]
42
42
800 x 600 4:3 40.00 MHz
43
-
1280 x 720 16:9 74.25 MHz
44
-
1920 x 1080 16:9 148.50 MHz [2]
43
+
1280 x 720 16:9 74.25 MHz
44
+
1920 x 1080 16:9 148.50 MHz [2]
45
45
46
-
You can easily add timings for other resolutions; see [demos](#demos) for how to do this.
46
+
You can easily add timings for other resolutions; see [demos](#demos) for how to do this.
47
47
48
48
_[1] The canonical clock for 640x480 60Hz is 25.175 MHz, but 25.2 MHz is within VESA spec and easier to generate._
49
49
@@ -91,9 +91,9 @@ We haven't formally verified the design yet, but plan to do this for the display
91
91
92
92
93
93
## TMDS Encoder Model
94
-
The display controller includes a simple [Python model](model/tmds.py) to help with TMDS encoder development.
94
+
The display controller includes a simple [Python model](model/tmds.py) to help with TMDS encoder development.
95
95
96
-
There are two steps to TMDS encoding: applying XOR or XNOR to the bits to minimize transitions and keeping the overall number of 1s and 0s similar to ensure DC balance. The first step depends only on the current input value, so it is easy to test. However, balancing depends on the previous values, which makes testing harder; this is where the model is particularly useful.
96
+
There are two steps to TMDS encoding: applying XOR or XNOR to the bits to minimize transitions and keeping the overall number of 1s and 0s similar to ensure DC balance. The first step depends only on the current input value, so it is easy to test. However, balancing depends on the previous values, which makes testing harder; this is where the model is particularly useful.
97
97
98
98
By default, the Python model encodes all 256 possible 8-bit values in order, but it's easy to change the script to handle other combinations. `A0, A1, B0, or B1` show which of the four balancing options was taken: you can see what they do in the [Python source](model/tmds.py) or [Verilog design](hdl/tmds_encoder_dvi.v).
99
99
@@ -115,7 +115,7 @@ You can also see the full output from the [Python model](model/tmds-test-python.
115
115
116
116
117
117
## Resource Utilization
118
-
The display controller is lightweight, fitting into even the smallest FPGA:
118
+
The display controller is lightweight, fitting into even the smallest FPGA:
Copy file name to clipboardExpand all lines: doc/modules.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ See [README](/README.md) for more documentation.
10
10
## Contents
11
11
12
12
-**[Architecture](#architecture)**
13
-
-**[Display Clocks](#display-clocks)** ([hdl](/hdl/display_clocks.v)) - pixel and high-speed clocks for TMDS
13
+
-**[Display Clocks](#display-clocks)** ([hdl](/hdl/display_clocks.v)) - pixel and high-speed clocks for TMDS
14
14
-**[Display Timings](#display-timings)** ([hdl](/hdl/display_timings.v)) - generates display timings, including horizontal and vertical sync
15
15
-**[DVI Generator](#dvi-generator)** ([hdl](/hdl/dvi_generator.v)) - uses `serializer_10to1` and `tmds_encode_dvi` to generate a DVI signal
16
16
@@ -84,7 +84,7 @@ The display timings generator turns timing parameters into appropriately timed s
84
84
*`i_pixclk` - pixel clock
85
85
*`i_rst` - reset (active high)
86
86
87
-
The pixel clock must be suitable for the timings given in the parameters (see display clocks, above).
87
+
The pixel clock must be suitable for the timings given in the parameters (see display clocks, above).
88
88
89
89
### Outputs
90
90
@@ -97,7 +97,7 @@ The pixel clock must be suitable for the timings given in the parameters (see di
97
97
*`o_x [15:0]` - horizontal screen position (active pixels)
98
98
*`o_y [15:0]` - vertical screen position (active pixels)
99
99
100
-
The positional outputs `(h,v)` and `(x,y)` allow you to determine the current pixel AKA "beam position". The values provided by `h` & `v `include the blanking interval, while `x` & `y` only include valid on-screen positions. For simple drawing or bitmap display you can use `(x,y)` and safely ignore `(h,v)`. However, if you're doing calculations in real time "racing the beam", then you'll want to perform actions in the blanking interval, which is where (h,v) comes in.
100
+
The positional outputs `(h,v)` and `(x,y)` allow you to determine the current pixel AKA "beam position". The values provided by `h` & `v `include the blanking interval, while `x` & `y` only include valid on-screen positions. For simple drawing or bitmap display you can use `(x,y)` and safely ignore `(h,v)`. However, if you're doing calculations in real time "racing the beam", then you'll want to perform actions in the blanking interval, which is where (h,v) comes in.
101
101
102
102
Project F considers blanking intervals to occur _before_ active pixels. At the start of a frame (indicated by the `o_frame` signal), you have the blanking intervals in which to work before active pixel drawing occurs. The following sketch this for 1280x720p60 (other resolutions work in the same way):
103
103
@@ -109,8 +109,8 @@ Horizontal and vertical sync may be active high or low depending on the display
109
109
110
110
### Parameters
111
111
112
-
*`H_RES` - active horizontal resolution in pixels
113
-
*`V_RES` - active vertical resolution in lines
112
+
*`H_RES` - active horizontal resolution in pixels
113
+
*`V_RES` - active vertical resolution in lines
114
114
*`H_FP` - horizontal front porch length in pixels
115
115
*`H_SYNC` - horizontal sync length in pixels
116
116
*`H_BP` - horizontal back porch length in pixels
@@ -138,7 +138,7 @@ DVI generator instantiates two other modules to do the actual work: one for [TMD
138
138
*`i_data_ch0 [7:0]` - 8-bit blue colour data (TMDS channel 0)
139
139
*`i_data_ch1 [7:0]` - 8-bit green colour data (TMDS channel 1)
140
140
*`i_data_ch2 [7:0]` - 8-bit red colour data (TMDS channel 2)
141
-
*`i_ctrl_ch0 [1:0]` - channel 0 control data; set to `{v_sync, h_sync}` from [display timings](#display-timings)
141
+
*`i_ctrl_ch0 [1:0]` - channel 0 control data; set to `{v_sync, h_sync}` from [display timings](#display-timings)
142
142
*`i_ctrl_ch1 [1:0]` - channel 1 control data; set to `2'b00`
143
143
*`i_ctrl_ch2 [1:0]` - channel 2 control data; set to `2'b00`
144
144
@@ -153,7 +153,7 @@ The output is the four TMDS encoded serial channels ready for output as differen
153
153
154
154
You can use these signals with `OBUFDS`, for example:
Copy file name to clipboardExpand all lines: doc/porting.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Porting the Display Controller
1
+
# Porting the Display Controller
2
2
3
3
We strive to create generic HDL designs where possible. However, vendor-specific components are critical to certain functionality, such as high-speed clock generation. The display controller uses three Xilinx-specific components: all display options use the `MMCM` for clock generation, while TMDS encoding on the FPGA requires `OSERDESE2` and `OBUFDS`. Expanded hardware support will be available in future, but in the meantime, we offer the following advice:
0 commit comments