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

Similar documents
EECS150 - Digital Design Lecture 13 - Project Description, Part 3 of? Project Overview

EECS150 - Digital Design Lecture 10 - Interfacing. Recap and Topics

Design and Implementation of an AHB VGA Peripheral

Lecture 14: Computer Peripherals

NOW Handout Page 1. Traversing Digital Design. EECS Components and Design Techniques for Digital Systems. Lec 13 Project Overview.

EECS150 - Digital Design Lecture 12 Project Description, Part 2

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

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

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)

Design of VGA Controller using VHDL for LCD Display using FPGA

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

Lab # 9 VGA Controller

DT3162. Ideal Applications Machine Vision Medical Imaging/Diagnostics Scientific Imaging

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

Video Graphics Array (VGA)

The Project & Digital Video. Today. The Project (1) EECS150 Fall Lab Lecture #7. Arjun Singh

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

Types of CRT Display Devices. DVST-Direct View Storage Tube

A Low-Power 0.7-V H p Video Decoder

Digilent Nexys-3 Cellular RAM Controller Reference Design Overview

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

Pivoting Object Tracking System

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Transitioning from NTSC (analog) to HD Digital Video

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

TV Character Generator

Video Output and Graphics Acceleration

Spartan-II Development System

VHDL Design and Implementation of FPGA Based Logic Analyzer: Work in Progress

EZwindow4K-LL TM Ultra HD Video Combiner

Checkpoint 2 Video Interface

Hitachi Europe Ltd. ISSUE : app084/1.0 APPLICATION NOTE DATE : 28/04/99

Lossless Compression Algorithms for Direct- Write Lithography Systems

Stimulus presentation using Matlab and Visage

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

An FPGA Based Solution for Testing Legacy Video Displays

Sandia Project Document.doc

A CONTROL MECHANISM TO THE ANYWHERE PIXEL ROUTER

Checkpoint 2 Video Encoder

From Synchronous to Asynchronous Design

EDA385 Bomberman. Fredrik Ahlberg Adam Johansson Magnus Hultin

Design and implementation (in VHDL) of a VGA Display and Light Sensor to run on the Nexys4DDR board Report and Signoff due Week 6 (October 4)

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

Chapter 7 Memory and Programmable Logic

Why FPGAs? FPGA Overview. Why FPGAs?

SignalTap Plus System Analyzer

Module 7. Video and Purchasing Components

Computer Graphics. Raster Scan Display System, Rasterization, Refresh Rate, Video Basics and Scan Conversion

Sequential Logic. Introduction to Computer Yung-Yu Chuang

Display Interfaces. Display solutions from Inforce. MIPI-DSI to Parallel RGB format

EECS150 - Digital Design Lecture 2 - CMOS

L14: Final Project Kickoff. L14: Spring 2006 Introductory Digital Systems Laboratory

DLP Pico Chipset Interface Manual

ECE532 Digital System Design Title: Stereoscopic Depth Detection Using Two Cameras. Final Design Report

CSE140L: Components and Design Techniques for Digital Systems Lab. CPU design and PLDs. Tajana Simunic Rosing. Source: Vahid, Katz

Multimedia Systems Video I (Basics of Analog and Digital Video) Mahdi Amiri April 2011 Sharif University of Technology

EEM Digital Systems II

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

PMC-704 Dual Independent Graphics Input/Output PMC

Lab Assignment 2 Simulation and Image Processing

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

Design of VGA and Implementing On FPGA

Group 1. C.J. Silver Geoff Jean Will Petty Cody Baxley

An Efficient SOC approach to Design CRT controller on CPLD s

Digital Blocks Semiconductor IP

Project Final Report. Z8 Arcade! 4/25/2006 James Bromwell,

Block Diagram. 16/24/32 etc. pixin pixin_sof pixin_val. Supports 300 MHz+ operation on basic FPGA devices 2 Memory Read/Write Arbiter SYSTEM SIGNALS

AN-ENG-001. Using the AVR32 SoC for real-time video applications. Written by Matteo Vit, Approved by Andrea Marson, VERSION: 1.0.0

L14: Final Project Kickoff. L14: Spring 2007 Introductory Digital Systems Laboratory

VGA Controller. Leif Andersen, Daniel Blakemore, Jon Parker University of Utah December 19, VGA Controller Components

To discuss. Types of video signals Analog Video Digital Video. Multimedia Computing (CSIT 410) 2

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

EAN-Performance and Latency

Display Technologies CMSC 435. Slides based on Dr. Luebke s slides

Lab 3: VGA Bouncing Ball I

L13: Final Project Kickoff. L13: Spring 2005 Introductory Digital Systems Laboratory

7inch Resistive Touch LCD User Manual

CONTENTS. Section 1 Document Descriptions Purpose of this Document... 2

Dell Wyse 5030 PCoIP Zero Client

FPGA Design. Part I - Hardware Components. Thomas Lenzi

IMS B007 A transputer based graphics board

SingMai Electronics SM06. Advanced Composite Video Interface: HD-SDI to acvi converter module. User Manual. Revision 0.

Section 14 Parallel Peripheral Interface (PPI)

Part 1: Introduction to Computer Graphics

4 x 4 VGA Matrix Switch

SHARE CONVERTER P/N SHARE PRODUCT HIGHLIGHTS EASY! No drivers required. Dual Uncompressed 1080p Video & Audio Capture Ideal for Video streaming and

Hardware Implementation of Block GC3 Lossless Compression Algorithm for Direct-Write Lithography Systems

Tearing Effect with Solomon SSD1963 Display Controller

Introduction to Computer Graphics

Nutaq. PicoDigitizer-125. Up to 64 Channels, 125 MSPS ADCs, FPGA-based DAQ Solution With Up to 32 Channels, 1000 MSPS DACs PRODUCT SHEET. nutaq.

EECS145M 2000 Midterm #1 Page 1 Derenzo

Week 5 Dr. David Ward Hybrid Embedded Systems

Sundance Multiprocessor Technology Limited. Capture Demo For Intech Unit / Module Number: C Hong. EVP6472 Intech Demo. Abstract

Sundance Multiprocessor Technology Limited. Capture Demo For Intech Unit / Module Number: C Hong. EVP6472 Intech Demo. Abstract

Monitor and Display Adapters UNIT 4

The World Leader in High Performance Signal Processing Solutions. Section 15. Parallel Peripheral Interface (PPI)

Video Display Unit (VDU)

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Mahdi Amiri. April Sharif University of Technology

Logic Analysis Basics

Transcription:

EECS150 - Digital Design Lecture 12 - Video Interfacing Oct. 8, 2013 Prof. Ronald Fearing Electrical Engineering and Computer Sciences University of California, Berkeley (slides courtesy of Prof. John Wawrzynek) http://www-inst.eecs.berkeley.edu/~cs150 Page Fall 2013 1 Recap and Outline Last time: Xilinx Distributed RAM (1.2 M bits) and Block RAM (5.3 Mbits) A a Din a WE a A b Din b WE b Dual-port Memory Dout a Dout b 2 1

Outline ZBT SRAM Video input on ML505 Video output on ML505 video frame buffer 3 XUP Board External SRAM ZBT synchronous SRAM, 9 Mb on 32- bit data bus, with four parity bits 256K x 36 bits (located under the removable LCD) More generally, how does software interface to I/O devices? *ZBT (ZBT stands for zero bus turnaround) the turnaround is the number of clock cycles it takes to change access to the SRAM from write to read and vice versa. The turnaround for ZBT SRAMs or the latency between read and write cycle is zero. Fall 2013 EECS150 - Lec11-sram Page 4 2

256K x 36 SRAM 5 Feature Tracking Project USB WebCam SRAM Host PC VGA Frame Buffer DVI Feature Detector serial interface micro Blaze CPU Xilinx FPGA DDRAM (program+ data memory) 6 3

VGA In DVI Out Subsystem SRAM USB WebCam Host PC VGA Frame Buffer DVI 7 Pixel Array: Video Display A digital image is represented by a matrix of values where each value is a function of the information surrounding the corresponding point in the image. A single element in an image matrix is a picture element, or pixel. A pixel includes info for all color components. Common standard is 8 bits per color (Red, Green, Blue) The pixel array size (resolution) varies for different applications, device, & costs, e.g. common value is 1024 X 768 pixels. Frames: The illusion of motion is created by successively flashing still pictures called frames. Frame rates vary depending on application. Usually in range of 25-75 fps. We will use 75 fps (frames per second). Fall 2013 Page 8 4

Video Display Images are generated on the screen of the display device by drawing or scanning each line of the image one after another, usually from top to bottom. Early display devices (CRTs) required time to get from the end of a scan line to the beginning of the next. Therefore each line of video consists of an active video portion and a horizontal blanking interval interval. A vertical blanking interval corresponds to the time to return from the bottom to the top. In addition to the active (visible) lines of video, each frame includes a number of non-visible lines in the vertical blanking interval. Fall 2013 Page 9 Video Display Display Devices, CRTs, LCDs, PDP, etc. Devices come in a variety of native resolutions and frame rates, and also are designed to accommodate a wide range of resolutions and frame rates. Pixels values are sent one at a time through either an analog or digital interface. formerly, display devices had limited persistence, therefore frames were repetitively sent, to create a stable image. Display devices don t typically store the image in memory. Repetitively sending the image allows motion. For a typical resolution and frame rate: Pixels per frame = 800x600 = 480,000 Pixel rate = 75fps X 480,000 = 36,000,000 pixels/sec with blank: 75fps x 1056 x 625 = 49,500,000 pixels/sec Samsung LCD with analog interface. Note: in this example, we use a pixel clock rate of 49.5 MHz to account for blanking intervals http://commons.wikimedia.org/wiki/file:crt_color.png Fall 2013 Page 10 5

pixel clock = 49.5 MHz VGA Specs- 800x600@75 Hz 1 line = 21.33 micro sec 800 px 816 px 896 px 1056 px 600 lines 601 lines 604 lines 625 lines http://www.xess.com/blog/vga-the-rest-of-the-story/ http://www.tinyvga.com/vga-timing/800x600@75hz Fall 2013 11 Example timing 800x600@75 Hz Screen refresh rate Horizontal sweep Pixel freq. 75 Hz 46.875 khz 49.5 MHz Scanline part Pixels Time [µs] Visible area 800 16.161616161616 Front porch 16 0.32323232323232 Sync pulse 80 1.6161616161616 Back porch 160 3.2323232323232 Whole line 1056 21.333333333333 horizontal timing Frame part Lines Time [ms] Visible area 600 12.8 Front porch 1 0.021333333333333 Sync pulse 3 0.064 Back porch 21 0.448 Whole frame 625 13.333333333333 vertical timing http://www.tinyvga.com/vga-timing/800x600@75hz Fall 2013 12 6

XUP Board VGA Input CODEC More generally, how does software interface to I/O devices? Fall 2013 EECS150 - Lec11-sram Page 13 Analog Devices AD9980 Display Fall 2013 14 7

Analog Devices AD9980 Display 15 VGA In DVI Out Subsystem SRAM USB WebCam Host PC VGA Frame Buffer DVI 16 8

Memory Mapped Framebuffer A range of memory addresses correspond to the display. Write: VGA In, MicroBlaze, Read: DVI Out, MicroBlaze (# of ports?, # of clocks?, WB) CPU writes to memory location pixel values to change display. No handshaking required. Independent process reads pixels from memory and sends them to the display interface at the required rate. example MicroBlaze address map 800 pixels/line X 600 lines 0xFFFFFFFF 0x801D4BFC 0x80000000 0 Frame buffer (0,0) External SRAM (800, 600) Display Origin: Increasing X values to the right. Increasing Y values down. 8Mbits / 480000 = 17.5 bits/pixel max! If we choose 16 bits/pixel? { Red[4:0] ; Green[5:0] ; Blue[4:0] } Fall 2013 Page 17 Framebuffer Details Four 8 bit pixel values per 32 bit memory word. example MicroBlaze address map 600 lines, 800 pixels/line 0xFFFFFFFF 0x801D4BFC 0x80000000 0 Frame buffer 800 800 800 800 31 Note, that we assign four 8 bit pixels per memory address.. = 480,000 memory locations XUP SRAM memory capacity: ~8 Mbits (in external SRAM). 8Mbits / 480000 = 17.5 bits/pixel max! We choose 8 bits/pixel- gray scale 3 2 1 0 Four pixel address map to one address in the SRAM (it is 32bits wide). 0 WB Fall 2013 Page 18 9

Framebuffer Implementation Framebuffer like a quad-ported memory. Four independent processes access framebuffer: CPU reads/writes pixel locations. Could be in random order, e.g. drawing an object, or sequentially, e.g. clearing the screen. 2 Frame buffer Video In continuously writes locations in scan-line order. (75 Hz?) Video Out continuously reads pixel locations in scan-line order and sends to physical display. (72 Hz?) How big is this memory and how do we implement it? For us: 2 Frames x 800 x 600 pixels/frame x 8 bits/pixel Fall 2013 Page 19 Frame Buffer Implementation Which XUP memory resource to use? Memory Capacity Summary: LUT RAM 110 kb Block RAM: 0.8 MB External SRAM: 8 MB External DRAM: 256 MB DDRAM bandwidth: rated at 400 MHz Fall 2013 Page 20 20 10

XUP Board External SRAM ZBT synchronous SRAM, 9 Mb on 32- bit data bus, with four parity bits 256K x 36 bits (located under the removable LCD) More generally, how does software interface to I/O devices? *ZBT (ZBT stands for zero bus turnaround) the turnaround is the number of clock cycles it takes to change access to the SRAM from write to read and vice versa. The turnaround for ZBT SRAMs or the latency between read and write cycle is zero. Fall 2013 Page 21 What frame buffer configuration is possible? Page 22 11

23 24 12

VGA In DVI Out Subsystem SRAM USB WebCam Host PC VGA Frame Buffer DVI 25 Frame Buffer Physical SRAM Hub : arbitrates among multiple SRAM users. CPU SRAM Controller / Hub FPGA Video Processor Side: provides a memory mapped programming interface to video display. More generally, how does software interface to I/O devices? Video Block: accepts pixel values from FB, streams pixels values and control signals to physical device. Fall 2013 Page 26 13

DVI connector: accommodates analog and digital formats Physical Video DVI Transmitter Chip, Chrontel 7301C. Implements standard signaling voltage levels for video monitors. Digital to analog conversion for analog display formats. Fall 2013 Page 27 2 way Video Details Physical : Tri-state Buffers Address Mux Xilinx I/O buffer Spring 2010 EECS150 - Lec15-proj4 Page 28 14

Timing: 2 way Video Details Store Buffer FIFO 80MHz 99MHz 49.5 MHz (?) 1 2 3 4 1 2 RD WR WR WR WR RD WR All CPU frame buffer writes go through FIFO (and crosses clock domain boundary). Store Buffer writes to SRAM 3/4 SRAM cycles. Can Store Buffer fill up? What if CPU runs at lower clock rate? ~49.5 Mpixels/sec 4 pixels/read Spring 2010 EECS150 - Lec15-proj4 Page 29 2 way Video Details Address Translation: Stored in pixel number order, 4 per address Random writes using frame buffer addresses: Y[9:0], X[9:0] CPU writes need translation to convert from 20-bit frame buffer address to 19-bit SRAM address: Reads in pixel number order: 0... 480000 PN = X + 800*Y (or do in HLL) WB 800 = 0x320 = 512 + 256 + 32 Use SRAM Byte Write Enables How to do this on FPGA? How do we write a single pixel? Spring 2010 EECS150 - Lec15-proj4 Page 30 15

example MicroBlaze Clear Routine // 1024K bytes = 256K 32 bit words // 600 lines by 800 pixels/line #include <stdio.h> long *frame_buffer1, *frame_buffer2; #define BLACK4 = 0x00000000 void clear_frame() { int row, col; frame_buffer1 = (long *) 0x80000000; // check addressing frame_buffer2 = (long *) 0x80020000; // check addressing for(row =0; row < 600; row++) for(col=0; col < 200; col++) { *(frame_buffer1 + 800 * row + col) = BLACK4; *(frame_buffer2 + 800 * row + col)= BLACK4; } }. Fall 2013 Page 31 Conclusion VGA video timing, input/output CODEC Frame Buffer overview 32 16