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

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

Design and Implementation of an AHB VGA Peripheral

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

EECS150 - Digital Design Lecture 12 Project Description, Part 2

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

EECS150 - Digital Design Lecture 3 Synchronous Digital Systems Review. Announcements

EE178 Lecture Module 4. Eric Crabill SJSU / Xilinx Fall 2005

Why FPGAs? FPGA Overview. Why FPGAs?

EE178 Spring 2018 Lecture Module 5. Eric Crabill

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

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Outline. EECS150 - Digital Design Lecture 27 - Asynchronous Sequential Circuits. Cross-coupled NOR gates. Asynchronous State Transition Diagram

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

Digilent Nexys-3 Cellular RAM Controller Reference Design Overview

Spartan-II Development System

EECS150 - Digital Design Lecture 18 - Circuit Timing (2) In General...

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

FPGA Design with VHDL

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

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

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

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Single Channel LVDS Tx

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

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

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

EDA385 Bomberman. Fredrik Ahlberg Adam Johansson Magnus Hultin

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

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

L11/12: Reconfigurable Logic Architectures

L12: Reconfigurable Logic Architectures

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)

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

EECS150 - Digital Design Lecture 2 - CMOS

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

Laboratory 4. Figure 1: Serdes Transceiver

Lab Assignment 2 Simulation and Image Processing

CAD for VLSI Design - I Lecture 38. V. Kamakoti and Shankar Balachandran

Logic Analysis Basics

Logic Analysis Basics

TV Character Generator

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

ESE534: Computer Organization. Today. Image Processing. Retiming Demand. Preclass 2. Preclass 2. Retiming Demand. Day 21: April 14, 2014 Retiming

Modeling Digital Systems with Verilog

EEM Digital Systems II

4 of 40. Multi-ASIC reset synchronization Good Multi-Flip-Flop. Synthesis issues with reset nets. 3 of 40. Synchronous Resets? Asynchronous Resets?

ESE (ESE534): Computer Organization. Last Time. Today. Last Time. Align Data / Balance Paths. Retiming in the Large

AbhijeetKhandale. H R Bhagyalakshmi

Lecture 6: Simple and Complex Programmable Logic Devices. EE 3610 Digital Systems

Digital Blocks Semiconductor IP

Sub-LVDS-to-Parallel Sensor Bridge

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

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

An FPGA Based Solution for Testing Legacy Video Displays

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)

Day 21: Retiming Requirements. ESE534: Computer Organization. Relative Sizes. Today. State. State Size

Lecture 14: Computer Peripherals

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

Authentic Time Hardware Co-simulation of Edge Discovery for Video Processing System

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

Design of VGA Controller using VHDL for LCD Display using FPGA

Module 7. Video and Purchasing Components

CAD FOR VLSI DESIGN - I Lecture 32. V. Kamakoti and Shankar Balachandran

Registers and Counters

FPGA Design. Part I - Hardware Components. Thomas Lenzi

VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

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

DLP Pico Chipset Interface Manual

Self-Test and Adaptation for Random Variations in Reliability

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

DEDICATED TO EMBEDDED SOLUTIONS

Lab 3: VGA Bouncing Ball I

Reconfigurable Architectures. Greg Stitt ECE Department University of Florida

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

Design and analysis of microcontroller system using AMBA- Lite bus

2.6 Reset Design Strategy

CS184a: Computer Architecture (Structures and Organization) Last Time

LFSRs as Functional Blocks in Wireless Applications Author: Stephen Lim and Andy Miller

Contents Circuits... 1

Digital Electronics II 2016 Imperial College London Page 1 of 8

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Chapter 9 MSI Logic Circuits

7inch Resistive Touch LCD User Manual

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

CS 61C: Great Ideas in Computer Architecture

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

EECS150 - Digital Design Lecture 3 - Timing

Section 14 Parallel Peripheral Interface (PPI)

Lossless Compression Algorithms for Direct- Write Lithography Systems

Modeling Latches and Flip-flops

Block Diagram. deint_mode. line_width. log2_line_width. field_polarity. mem_start_addr0. mem_start_addr1. mem_burst_size.

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

EZwindow4K-LL TM Ultra HD Video Combiner

IMS B007 A transputer based graphics board

Chapter. Sequential Circuits

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

HDMI-UVC/HDMI-Parallel converter [SVO-03 U&P]

Chapter 4: One-Shots, Counters, and Clocks

A Fast Constant Coefficient Multiplier for the XC6200

SHENZHEN H&Y TECHNOLOGY CO., LTD

Transcription:

EECS150 - Digital Design Lecture 13 - Project Description, Part 3 of? March 3, 2009 John Wawrzynek Spring 2009 EECS150 - Lec13-proj3 Page 1 Project Overview A. MIPS150 pipeline structure B. Memories, project memories and FPGAs C. Project specification and grading standard D.Video subsystem E. Line Drawing F. Bit Shifters Spring 2009 EECS150 - Lec13-proj3 Page 2

Adding Ports to Primitive Memory Blocks Adding a read port to a simple dual port (SDP) memory. Example: given 1Kx8 SDP, want 1 write & 2 read ports. Spring 2009 EECS150 - Lec13-proj3 Page 3 Adding Ports to Primitive Memory Blocks How to add a write port to a simple dual port memory. Example: given 1Kx8 SDP, want 1 read & 2 write ports. Spring 2009 4 EECS150 - Lec13-proj3 Page

Verilog Synthesis Notes Block RAMS and LUT RAMS all exist as primitive library elements (similar to FDRSE). However, it is much more convenient to use inference. Depending on how you write your verilog, you will get either a collection of block RAMs, a collection of LUT RAMs, or a collection of flip-flops. The synthesizer uses size, and read style (synch versus asynch) to determine the best primitive type to use. It is possible to force mapping to a particular primitive by using synthesis directives. However, if you write your verilog correctly, you will not need to use directives. The synthesizer has limited capabilities (eg., it can combine primitives for more depth and width, but is limited on porting options). Be careful, as you might not get what you want. See Synplify User Guide, and XST User Guide for examples. Spring 2009 EECS150 - Lec13-proj3 Page 5 Inferring RAMs in Verilog // 64X1 RAM implementation using distributed RAM module ram64x1 (clk, we, d, addr, q); input clk, we, d; input [5:0] addr; output q; reg [63:0] temp; always @ (posedge clk) if(we) temp[addr] <= d; assign q = temp[addr]; endmodule Verilog reg array used with always @ (posedge... infers memory array. Asynchronous read infers LUT RAM Spring 2009 EECS150 - Lec13-proj3 Page 6

Dual-read-port LUT RAM // // Multiple-Port RAM Descriptions // module v_rams_17 (clk, we, wa, ra1, ra2, di, do1, do2); input clk; input we; input [5:0] wa; input [5:0] ra1; input [5:0] ra2; input [15:0] di; output [15:0] do1; output [15:0] do2; reg [15:0] ram [63:0]; always @(posedge clk) begin if (we) ram[wa] <= di; end assign do1 = ram[ra1]; assign do2 = ram[ra2]; endmodule Multiple reference to same array. Spring 2009 EECS150 - Lec13-proj3 Page 7 Block RAM Inference // // Single-Port RAM with Synchronous Read // module v_rams_07 (clk, we, a, di, do); input clk; input we; input [5:0] a; input [15:0] di; output [15:0] do; reg [15:0] ram [63:0]; reg [5:0] read_a; always @(posedge clk) begin if (we) ram[a] <= di; read_a <= a; end assign do = ram[read_a]; endmodule Synchronous read (registered read address) infers Block RAM Spring 2009 EECS150 - Lec13-proj3 Page 8

Block RAM initialization module RAMB4_S4 (data_out, ADDR, data_in, CLK, WE); output[3:0] data_out; input [2:0] ADDR; input [3:0] data_in; input CLK, WE; reg [3:0] mem [7:0]; reg [3:0] read_addr; initial begin $readmemb("data.dat", mem); end always@(posedge CLK) read_addr <= ADDR; data.dat contains initial RAM contents, it gets put into the bitfile and loaded at configuration time. (Remake bits to change contents) assign data_out = mem[read_addr]; always @(posedge CLK) if (WE) mem[addr] = data_in; endmodule Spring 2009 EECS150 - Lec13-proj3 Page 9 Dual-Port Block RAM module test (data0,data1,waddr0,waddr1,we0,we1,clk0, clk1, q0, q1); parameter d_width = 8; parameter addr_width = 8; parameter mem_depth = 256; input [d_width-1:0] data0, data1; input [addr_width-1:0] waddr0, waddr1; input we0, we1, clk0, clk1; reg [d_width-1:0] mem [mem_depth-1:0] reg [addr_width-1:0] reg_waddr0, reg_waddr1; output [d_width-1:0] q0, q1; assign q0 = mem[reg_waddr0]; assign q1 = mem[reg_waddr1]; always @(posedge clk0) begin if (we0) mem[waddr0] <= data0; reg_waddr0 <= waddr0; end always @(posedge clk1) begin if (we1) mem[waddr1] <= data1; reg_waddr1 <= waddr1; end endmodule Spring 2009 EECS150 - Lec13-proj3 Page 10

Processor Design Considerations (1/2) Register File: Consider distributed RAM (LUT RAM) Size is close to what is needed: distributed RAM primitive configurations are 32 or 64 bits deep. Extra width is easily achieved by parallel arrangements. LUT-RAM configurations offer multi-porting options - useful for register files. Asynchronous read, might be useful by providing flexibility on where to put register read in the pipeline. Instruction / Data Memories : Consider Block RAM Higher density, lower cost for large number of bits A single 36kbit Block RAM implements 1K 32-bit words. Configuration stream based initialization, permits a simple boot strap procedure. Spring 2009 EECS150 - Lec13-proj3 Page 11 Video Display Pixel Array: 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 and costs. For our application we will use 1024 X 768 pixels. Frames: The illusion of motion is created by successively flashing still pictures called frames. From rates vary depending on application. Usually in range of 25-75 fps. We will use 75 fps. Spring 2009 EECS150 - Lec13-proj3 Page 12

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 nonvisible lines in the vertical blanking interval. Spring 2009 EECS150 - Lec13-proj3 Page 13 Video Display Display Devices, CRTs, LCDs, 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. Display devices have limited persistence, therefore frames must be repetitively sent, to create a stable image. Display devices don t typically store the image in memory. Repetitively sending the image also allows motion. For our resolution and frame rate: Pixels per frame = 1024 X 768 = 786432 Pixel rate = 75fps X 786432 = 58,982,400 pixels/sec Note: in our application, we use a pixel clock rate of 78.75 MHz to account for blanking intervals Samsung LCD with analog interface. Spring 2009 EECS150 - Lec13-proj3 Page 14

MIPS150 Video Subsystem Gives software ability to display information on screen. Equivalent to standard graphics cards: Processor can directly write the display bit map Graphics acceleration 2D line drawing (only). Spring 2009 EECS150 - Lec13-proj3 Page 15 DVI connector: accommodates analog and digital formats Physical Video Interface DVI Transmitter Chip, Chrontel 7301C. Implements standard signaling voltage levels for video monitors. Digital to analog conversion for analog display formats. Spring 2009 EECS150 - Lec13-proj3 Page 16

Video Interface CPU Frame Buffer: provides a memory mapped programming interface to video display. You do! FPGA Frame Buffer / Cmap Video Interface Video Interface Block: accepts pixel values from FB/CM, streams pixels values and control signals to More generally, how does physical software device. interface to I/O devices? We do! Spring 2009 EECS150 - Lec13-proj3 Page 17 Memory Mapped Framebuffer A range of memory addresses correspond to the display. CPU writes (using sw instruction) 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. MIPS address map 0xFFFFFFFF 1024 pixels/line X 768 lines (0,0) 0x803FFFFC 0x80000000 Frame buffer (1023, 767) Display Origin: Increasing X values to the right. Increasing Y values down. 0 Spring 2009 EECS150 - Lec13-proj3 Page 18

Framebuffer Details One pixel value per memory location. MIPS address map 0xFFFFFFFF 0x803FFFFC 0x80000000 0 Frame buffer 768 lines, 1K pixels/line. 1K 1K 1K 1K = 786,432 memory locations Virtex-5 LX110T memory capacity: 5,328 Kbits (in block RAMs). (5,328 X 1024 bits) / 786432 = 6.9 bits/pixel max! We choose 4 bits/pixel Note, that with only 4 bits/pixel, we could assign more than one pixel per memory location. Ruled out by us, as it complicated software. Spring 2009 EECS150 - Lec13-proj3 Page 19 Color Map 4 bits per pixel, allows software to assign each screen location, one of 16 different colors. However, physical display interface uses 8 bits / pixel-color. Therefore entire pallet is 2 24 colors. Color Map converts 4 bit pixel values to 24 bit colors. 24 bits pixel value from framebuffer 16 entries R G B. R G B R G B R G B pixel color to video interface Color map is memory mapped to CPU address space, so software can set the color table. Addresses: 0x8040_0000 0x8040_003C, one 24-bit entry per memory address. Spring 2009 EECS150 - Lec13-proj3 Page 20

Video Subsystem Continuously reads framebuffer data making mapped pixel values available to Video Interface. CPU Interface Requests mapped pixels and sends along with control signals to DVI Chip. Spring 2009 EECS150 - Lec13-proj3 Page 21 Processor Design Considerations (2/2) Video Memory (Frame buffer) : Consider Block RAM Built-in cascade logic permits 64K deep (X 1), efficiently. Dual-porting allows independent processor and video display access. Independent port clocking, permits separate clock for CPU and video. Video Memory (color map) : Consider LUT RAM Depth is 1/2 of native LUT RAM depth, but more cost efficient than separate flip-flops. LUT-RAM single-dual-port nature, perfect for this application. Asynchronous read, might be useful by providing flexibility on where to put color map video display pipeline. Spring 2009 EECS150 - Lec13-proj3 Page 22

MIPS150 CPU Memory Map Summary MIPS convention: 0x0000_0000 0x0040_0000 reserved 0x0040_0000 0x1001_0000 text segment 0x1001_0000 0x7fff_ffff data segment 0x8000_0000 0xffff_ffff I/O The stack starts at 0x7fff_ffff and grows towards smaller addresses. EECS150MIPS: 0x0040_0000 0x0040_0ffc 0x1001_0000 0x1001_0ffc 0x7fff_f000 0x7fff_fffc 0x8000_0000 0x803f_fffc 0x8040_0000 0x8040_003c 0xffff_0000 0xffff_000c I-Memory (1K words) Data Memory (heap) (1K words for heap) Data Memory (stack) (1K words for stack) Framebuffer (1M addresses) (Only 786432 are needed) Color Map (16 word addresses) Serial Interface (4 word addresses) I-Memory, Framebuffer, ColorMap are all write-only by CPU. Spring 2009 EECS150 - Lec13-proj3 Page 23