ECE 448 Lecture 10. VGA Display Part 1 VGA Synchronization

Similar documents
Lab # 9 VGA Controller

Lab 3: VGA Bouncing Ball I

ECE 448 Lecture 12. VGA Display Part 4 Text Generation

Flip-flop and Registers

Design and Implementation of an AHB VGA Peripheral

Eng. Mohammed Samara. Fall The Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department

VGA Port. Chapter 5. Pin 5 Pin 10. Pin 1. Pin 6. Pin 11. Pin 15. DB15 VGA Connector (front view) DB15 Connector. Red (R12) Green (T12) Blue (R11)

library IEEE; use IEEE.STD_LOGIC_1164.ALL;

Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems

ECE 448 Lecture 11. VGA Display Part 3 Animation

ECE 448 Lecture 11. VGA Display Part 3 Animation

Lab 6: Video Game PONG

Design of VGA Controller using VHDL for LCD Display using FPGA

Video. Prof. Stephen A. Edwards Columbia University Spring Video p.

Video. Prof. Stephen A. Edwards Columbia University Spring Video p. 1/2

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

Class 06 Sequential Logic: Flip-Flop

Design of VGA and Implementing On FPGA

Class 19 Sequential Logic: Flip-Flop

Block Diagram. dw*3 pixin (RGB) pixin_vsync pixin_hsync pixin_val pixin_rdy. clk_a. clk_b. h_s, h_bp, h_fp, h_disp, h_line

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

Lecture 14: Computer Peripherals

An Efficient SOC approach to Design CRT controller on CPLD s

TSIU03: Lab 3 - VGA. Petter Källström, Mario Garrido. September 10, 2018

Display Technology. Images stolen from various locations on the web... Cathode Ray Tube

ECE 3401 Lecture 11. Sequential Circuits

VGA 8-bit VGA Controller

VGA Pixel Buffer Stephen Just

CALIFORNIA STATE UNIVERSITY, NORTHRIDGE. Reconfigurable RGB Video Test Pattern Generator

VHDL test bench for digital image processing systems using a new image format

Display Technology. Images stolen from various locations on the web... Cathode Ray Tube

ACS College of Engineering. Department of Biomedical Engineering. HDL pre lab questions ( ) Cycle-1

7inch Resistive Touch LCD User Manual

Figure 1 Block diagram of a 4-bit binary counter

Spartan-II Development System

Section 4. Display Connector

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

L14 - Video. L14: Spring 2005 Introductory Digital Systems Laboratory

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Display Technology. Cathode Ray Tube. Images stolen from various locations on the web...

FPGA Laboratory Assignment 4. Due Date: 06/11/2012

Display Technology.! Images stolen from various locations on the web... Cathode Ray Tube

Digital Blocks Semiconductor IP

VGA Configuration Algorithm using VHDL

Feedback Sequential Circuits

Computer Graphics Hardware

ECE 3401 Lecture 12. Sequential Circuits (II)

Design Problem 4 Solutions

COE758 Xilinx ISE 9.2 Tutorial 2. Integrating ChipScope Pro into a project

Design and Implementation of SOC VGA Controller Using Spartan-3E FPGA

Using the XSV Board Xchecker Interface

AD9884A Evaluation Kit Documentation

Spartan-II Development System

Week 5 Dr. David Ward Hybrid Embedded Systems

EECS150 - Digital Design Lecture 12 - Video Interfacing. Recap and Outline

ECE 263 Digital Systems, Fall 2015

[Kadlag*, TECHNOPHILIA: February, 2016] ISSN: (I2OR), Publication Impact Factor: 3.785

VHDL 4 BUILDING BLOCKS OF A COMPUTER.

Video Graphics Array (VGA)

A CONTROL MECHANISM TO THE ANYWHERE PIXEL ROUTER

Bachelor Thesis. Augmented Reality using a Virtual Reality. R.J.A. Blokker & L.M. Noordam. Implementation on an FPGA device

GENERAL RULES FOR EE314 PROJECTS

Flip-Flops and Registers

Vending Machine. Keywords FSM, Vending Machine, FPGA, VHDL

Video Display Unit (VDU)

Video. Updated fir31.filtered on website Fall 2008 Lecture 12

VID_OVERLAY. Digital Video Overlay Module Rev Key Design Features. Block Diagram. Applications. Pin-out Description

Level and edge-sensitive behaviour

Revision: August 11, E Main Suite D Pullman, WA (509) Voice and Fax. 8 LEDs. Doc: page 1 of 9

Lancelot. VGA video controller for the Altera Nios II processor. V4.0. December 16th, 2005

Real-Time Digital Oscilloscope Implementation in 90nm CMOS Technology FPGA

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

DIGITAL SYSTEM DESIGN VHDL Coding for FPGAs Unit 7

ILI9322. a-si TFT LCD Single Chip Driver 320RGBx240 Resolution and 16.7M color. Datasheet Preliminary

Comp 410/510. Computer Graphics Spring Introduction to Graphics Systems

3. Displays and framebuffers

An FPGA Based Solution for Testing Legacy Video Displays

moome PRELIMINARY, SUBJECT TO CHANGE WITHOUT NOTICE IFB-FULLHD FULLHD V3 IFB-FULLHD V3 Datasheet V Feb

Module 1: Digital Video Signal Processing Lecture 3: Characterisation of Video raster, Parameters of Analog TV systems, Signal bandwidth

By Tom Kopin CTS, ISF-C KRAMER WHITE PAPER

Presented by: Amany Mohamed Yara Naguib May Mohamed Sara Mahmoud Maha Ali. Supervised by: Dr.Mohamed Abd El Ghany

From Synchronous to Asynchronous Design

Lab 4: Hex Calculator

AC334A. VGA-Video Ultimate BLACK BOX Remote Control. Back Panel View. Side View MOUSE DC IN BLACK BOX ZOOM/FREEZE POWER

Asynchronous & Synchronous Reset Design Techniques - Part Deux

TV Synchronism Generation with PIC Microcontroller

A Flexible FPGA communication

Reading. Displays and framebuffers. Modern graphics systems. History. Required. Angel, section 1.2, chapter 2 through 2.5. Related

Displays. History. Cathode ray tubes (CRTs) Modern graphics systems. CSE 457, Autumn 2003 Graphics. » Whirlwind Computer - MIT, 1950

FPGA 设计实例 基于 FPGA 的图形液晶显示面板应用. Graphic LCD panel. FPGAs make great video controllers and can easily control graphic LCD panels.

Synchronous Sequential Design

IMS B007 A transputer based graphics board

CP-1261D PC/HD to DVI Format Converter

PC/HDTV to PC/HDTV converter (CP-251F)

hochschule fu r angewandte wissenschaften hamburg Prof. Dr. B. Schwarz FB Elektrotechnik/Informatik

Testing Results for a Video Poker System on a Chip

4.3inch 480x272 Touch LCD (B) User Manual

Laboratory Exercise 7

Part 1: Introduction to computer graphics 1. Describe Each of the following: a. Computer Graphics. b. Computer Graphics API. c. CG s can be used in

ECE 545 Digital System Design with VHDL Lecture 2. Digital Logic Refresher Part B Sequential Logic Building Blocks

Transcription:

ECE 448 Lecture 10 VGA Display Part 1 VGA Synchronization George Mason University

Required Reading Old Edition of the Textbook 2008 (see Piazza) P. Chu, FPGA Prototyping by VHDL Examples Chapter 12, VGA Controller I: Graphic Source Code of Examples http://academic.csuohio.edu/chu_p/rtl/fpga_vhdl.html Basys 3 FPGA Board Reference Manual 7. VGA Port 2

Recommended Reading New Edition of the Textbook 2017: P. Chu, FPGA Prototyping by VHDL Examples Chapter 20 Introduction to the Video System Source Code of Examples http://academic.csuohio.edu/chu_p/rtl/fpga_mcs_vhdl.html 3

Basics 4

VGA Video Graphics Array Video display standard introduced in the late 1980 s Widely supported by PC graphics hardware and monitors Used initially with the CRT (cathode ray tube) monitors Later adopted for LCD (liquid-crystal display) monitors as well 5

VGA Characteristic Features Resolution: 640x480 Refresh Rate: 25Hz, 30Hz, 60Hz (frames / second) Display: up to 256 colors (8 bits) RGB: Red, Green and Blue analog signals 6

Operation of a CRT monitor 7

CRT Monitor Conceptual Diagram 8

CRT Monitor Scanning Pattern 9

CRT Monitor Horizontal Scan 10

VGA Controller 11

VGA Controller Simplified View 12

Three-bit VGA Color Combinations 13

VGA Synchronization 14

Horizontal Synchronization 15

Four regions of hsync Display: 0..639, width = 640 Right border (front porch): 640..655, width = 16 Retrace (horizontal flyback): 656..751, width=96 Left border (back porch): 752..799, width=48 16

Vertical Synchronization 17

Four regions of vsync Display: 0..479, width = 480 lines Bottom border (front porch): 480..489, width = 10 Retrace (vertical flyback): 490..491, width=2 Top border (back porch): 491..524, width=33 18

Pixel Rate p: the number of pixels in a horizontal scan line p = 800 pixels/line l: the number of horizontal lines in a screen l = 525 lines/screen s: the number of screens per second (refresh rate) s = 60 screens/second Pixel Rate = p l s = 25 Mpixels/second 19

VHDL Code of VGA Sync 20

Assumptions 50 MHz clock => 2 clock cycles per pixel => p_tick generated every second clock period used as an enable for the horizontal counter 21

VHDL Code of VGA Sync (1) library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity vga_sync is port( ); clk, reset: in std_logic; hsync, vsync: out std_logic; video_on, p_tick: out std_logic; pixel_x, pixel_y: out std_logic_vector (9 downto 0) end vga_sync; 22

VHDL Code of VGA Sync (2) architecture arch of vga_sync is -- VGA 640-by-480 sync parameters constant HD: integer:=640; --horizontal display area constant HF: integer:=16 ; --h. front porch constant HR: integer:=96 ; --h. retrace constant HB: integer:=48 ; --h. back porch constant VD: integer:=480; --vertical display area constant VF: integer:=10; --v. front porch constant VR: integer:=2; --v. retrace constant VB: integer:=33; --v. back porch 23

VHDL Code of VGA Sync (3) -- mod-2 counter signal mod2_reg, mod2_next: std_logic; -- sync counters signal v_count_reg, v_count_next: unsigned(9 downto 0); signal h_count_reg, h_count_next: unsigned(9 downto 0); -- output buffer signal v_sync_reg, h_sync_reg: std_logic; signal v_sync_next, h_sync_next: std_logic; -- status signal signal h_end, v_end, pixel_tick: std_logic; 24

pixel_tick and pixel_x generation pixel_x 25

HSC: horizontal sync counter (combinational logic) 26

pixel_x generation (alternative view) 27

VHDL Code of VGA Sync (4) process (clk, reset) begin if reset='1' then mod2_reg <= '0'; v_count_reg <= (others=>'0'); h_count_reg <= (others=>'0'); v_sync_reg <= '0'; h_sync_reg <= '0'; elsif (clk'event and clk='1') then mod2_reg <= mod2_next; v_count_reg <= v_count_next; h_count_reg <= h_count_next; v_sync_reg <= v_sync_next; h_sync_reg <= h_sync_next; end if; end process; 28

VHDL Code of VGA Sync (5) -- mod-2 circuit to generate 25 MHz enable tick mod2_next <= not mod2_reg; -- 25 MHz pixel tick pixel_tick <= '1' when mod2_reg='1' else '0'; -- status h_end <= -- end of horizontal counter '1' when h_count_reg=(hd+hf+hr+hb-1) else --799 '0'; v_end <= -- end of vertical counter '1' when v_count_reg=(vd+vf+vr+vb-1) else --524 '0'; 29

VHDL Code of VGA Sync (6) -- mod-800 horizontal sync counter process (h_count_reg, h_end, pixel_tick) begin if pixel_tick='1' then -- 25 MHz tick if h_end='1' then h_count_next <= (others=>'0'); else h_count_next <= h_count_reg + 1; end if; else h_count_next <= h_count_reg; end if; end process; 30

pixel_y generation 31

VSC: vertical sync counter (combinational logic) 32

pixel_y generation (alternative view) 33

VHDL Code of VGA Sync (7) -- mod-525 vertical sync counter process (v_count_reg, h_end, v_end, pixel_tick) begin if pixel_tick='1' and h_end='1' then if (v_end='1') then v_count_next <= (others=>'0'); else v_count_next <= v_count_reg + 1; end if; else v_count_next <= v_count_reg; end if; end process; 34

VHDL Code of VGA Sync (8) -- horizontal and vertical sync, buffered to avoid glitch h_sync_next <= 0' when (h_count_reg >= (HD+HF)) --656 1'; and (h_count_reg <= (HD+HF+HR-1)) else --751 v_sync_next <= 0' when (v_count_reg >= (VD+VF)) --490 and (v_count_reg <= (VD+VF+VR-1)) else --491 1'; -- video on/off video_on <= '1' when (h_count_reg<hd) and (v_count_reg<vd) else '0'; 35

h_sync, v_sync registers 36

h_sync_next logic 37

Horizontal Synchronization 38

Vertical Synchronization 39

VHDL Code of VGA Sync (9) -- output signal hsync <= h_sync_reg; vsync <= v_sync_reg; pixel_x <= std_logic_vector(h_count_reg); pixel_y <= std_logic_vector(v_count_reg); p_tick <= pixel_tick; end arch; 40

VGA Sync Testing Circuit (1) library ieee; use ieee.std_logic_1164.all; entity vga_test is port ( ); clk, reset: in std_logic; sw: in std_logic_vector(2 downto 0); hsync, vsync: out std_logic; rgb: out std_logic_vector(2 downto 0) end vga_test; architecture arch of vga_test is signal rgb_reg: std_logic_vector(2 downto 0); signal video_on: std_logic; 41

VGA Sync Testing Circuit (2) begin vga_sync_unit: entity work.vga_sync port map(clk=>clk, reset=>reset, process (clk, reset) begin if reset='1' then hsync=>hsync, vsync=>vsync, video_on=>video_on, p_tick=>open, pixel_x=>open, pixel_y=>open); rgb_reg <= (others=>'0'); elsif (clk'event and clk='1') then rgb_reg <= sw; end if; end process; rgb <= rgb_reg when video_on='1' else "000"; end arch; 42

VGA Controller Simplified View 43