© 2003 Xilinx, Inc. All Rights Reserved FPGA Design Techniques.

Slides:



Advertisements
Similar presentations
Basic HDL Coding Techniques
Advertisements

1 Lecture 16 Timing  Terminology  Timing issues  Asynchronous inputs.
Spartan-3 FPGA HDL Coding Techniques
Sumitha Ajith Saicharan Bandarupalli Mahesh Borgaonkar.
Lecture 11: Sequential Circuit Design. CMOS VLSI DesignCMOS VLSI Design 4th Ed. 11: Sequential Circuits2 Outline  Sequencing  Sequencing Element Design.
The 8085 Microprocessor Architecture
Leveraging Software to Enhance Timing Analysis for Actel RTAX-S Devices Johnny Chung Corporate Applications Engineering Actel Corporation MAPLD 2005.
© 2003 Xilinx, Inc. All Rights Reserved Architecture Wizard and PACE FPGA Design Flow Workshop Xilinx: new module Xilinx: new module.
1 Lecture 28 Timing Analysis. 2 Overview °Circuits do not respond instantaneously to input changes °Predictable delay in transferring inputs to outputs.
Sequential Logic 1 clock data in may changestable data out (Q) stable Registers  Sample data using clock  Hold data between clock cycles  Computation.
Synchronous Digital Design Methodology and Guidelines
1 Digital Design: State Machines Timing Behavior Credits : Slides adapted from: J.F. Wakerly, Digital Design, 4/e, Prentice Hall, 2006 C.H. Roth, Fundamentals.
RTL Hardware Design by P. Chu Chapter 161 Clock and Synchronization.
Assume array size is 256 (mult: 4ns, add: 2ns)
Kazi Spring 2008CSCI 6601 CSCI-660 Introduction to VLSI Design Khurram Kazi.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
ENGIN112 L28: Timing Analysis November 7, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 28 Timing Analysis.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 11 - Timing and Metastability.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 12 - Metastability.
TAP (Test Access Port) JTAG course June 2006 Avraham Pinto.
Achieving Timing Closure. Achieving Timing Closure - 2 © Copyright 2010 Xilinx Objectives After completing this module, you will be able to:  Describe.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic: Internal Organization of an FPGA José Nelson Amaral.
CS 151 Digital Systems Design Lecture 28 Timing Analysis.
Achieving Timing Closure. Objectives After completing this module, you will be able to: Describe a flow for obtaining timing closure Interpret a timing.
Global Timing Constraints. Objectives After completing this module you will be able to… Apply global timing constraints to a simple synchronous design.
Flip-Flops.
1 CSE370, Lecture 16 Lecture 19 u Logistics n HW5 is due today (full credit today, 20% off Monday 10:29am, Solutions up Monday 10:30am) n HW6 is due Wednesday.
03/30/031 ECE 551: Digital System Design & Synthesis Lecture Set 9 9.1: Constraints and Timing 9.2: Optimization (In separate file)
Global Timing Constraints FPGA Design Workshop. Objectives  Apply timing constraints to a simple synchronous design  Specify global timing constraints.
FPGA and ASIC Technology Comparison - 1 © 2009 Xilinx, Inc. All Rights Reserved Global Timing Constraints.
CS3350B Computer Architecture Winter 2015 Lecture 5.2: State Circuits: Circuits that Remember Marc Moreno Maza [Adapted.
Digital Design Strategies and Techniques. Analog Building Blocks for Digital Primitives We implement logical devices with analog devices There is no magic.
© 2003 Xilinx, Inc. All Rights Reserved Reading Reports Xilinx: This module was completely redone. Please translate entire module Some pages are the same.
© 2003 Xilinx, Inc. All Rights Reserved Answers DSP Design Flow.
© 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Xilinx Design Flow FPGA Design Flow Workshop.
Low Latency Clock Domain Transfer for Simultaneously Mesochronous, Plesiochronous and Heterochronous Interfaces Wade Williams Philip Madrid, Scott C. Johnson.
ECE Advanced Digital Systems Design Lecture 12 – Timing Analysis Capt Michael Tanner Room 2F46A HQ U.S. Air Force Academy I n t e g r i.
© 2003 Xilinx, Inc. All Rights Reserved FPGA Editor: Viewing and Editing a Routed Design.
© BYU 18 ASYNCH Page 1 ECEn 224 Handling Asynchronous Inputs.
© 2003 Xilinx, Inc. All Rights Reserved Synchronous Design Techniques.
This material exempt per Department of Commerce license exception TSU Reading Reports.
Synthesis Of Fault Tolerant Circuits For FSMs & RAMs Rajiv Garg Pradish Mathews Darren Zacher.
Lecture #26 Page 1 ECE 4110– Sequential Logic Design Lecture #26 Agenda 1.State Encoding 2.Pipelined Outputs 3.Asynchronous Inputs Announcements 1.n/a.
© 2003 Xilinx, Inc. All Rights Reserved Global Timing Constraints FPGA Design Flow Workshop.
Field Programmable Port Extender (FPX) 1 Modular Design Techniques for the FPX.
Introduction to FPGA Tools
This material exempt per Department of Commerce license exception TSU Synchronous Design Techniques.
© 2005 Xilinx, Inc. All Rights Reserved This material exempt per Department of Commerce license exception TSU Implementation Options.
© 2003 Xilinx, Inc. All Rights Reserved Answers DSP Design Flow.
CDA 4253 FPGA System Design RTL Design Methodology 1 Hao Zheng Comp Sci & Eng USF.
Tools - Analyzing your results - Chapter 7 slide 1 Version 1.5 FPGA Tools Course Analyzing your Results.
EE 466/586 VLSI Design Partha Pande School of EECS Washington State University
04/21/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Functional & Timing Verification 10.2: Faults & Testing.
Flip Flops Lecture 10 CAP
Achieving Timing Closure
FPGA Design Techniques
The 8085 Microprocessor Architecture
FIT Front End Electronics & Readout
FPGA Implementation of Multicore AES 128/192/256
FPGA Design Techniques I
Clock Domain Crossing Keon Amini.
The Xilinx Virtex Series FPGA
Timing Analysis 11/21/2018.
FPGA Tools Course Basic Constraints
FPGA Tools Course Answers
The 8085 Microprocessor Architecture
The Xilinx Virtex Series FPGA
FPGA Tools Course Timing Analyzer
Instructor: Michael Greenbaum
Presentation transcript:

© 2003 Xilinx, Inc. All Rights Reserved FPGA Design Techniques

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Objectives Increase design performance by duplicating flip-flops Increase design performance by adding pipeline stages Increase board performance by using I/O flip-flops Build reliable synchronization circuits After completing this module, you will be able to:

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Outline Duplicating Flip-flops Pipelining I/O Flip-Flops Synchronization Circuits Summary

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only DQ fn1 DQ DQ Duplicating Flip-Flops High-fanout nets can be slow and hard to route Duplicating flip-flops can fix both problems – Reduced fanout shortens net delays – Each flip-flop can fanout to a different physical region of the chip to help with routing Design tradeoffs – Gain routability and performance – Design area increases

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Duplicating Flip-Flops Example Source flip-flop drives two register banks that are constrained to different regions of the chip Source flip-flop and pad are not constrained PERIOD = 5 ns timing constraint Implemented with default options Longest path = ns – Fails to meet timing constraint

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Duplicating Flip-Flops Example Source flip-flop has been duplicated Each flip-flop drives a region of the chip – Each flip-flop can be placed closer to the register that it is driving – Shorter routing delays Longest path = ns – Meets timing constraint

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Tips on Duplicating Flip-Flops Name duplicated flip-flops _a, _b: NOT _1, _2 – Numbered flip-flops are mapped into the same slice by default – You, generally, want duplicated flip-flops to be separated Especially if the loads are spread across the chip Explicitly create duplicate flip-flops in your HDL code – Most synthesis tools have automatic fanout-control features However, they do not always pick the best division of loads Also, duplicated flip-flops will be named _1, _2 – Many synthesis tools will optimize-out duplicated flip-flops Tell your synthesis tool to keep redundant logic Do not duplicate flip-flops that are sourced by asynchronous signals – Synchronize the signal first – Feed the synchronized signal to multiple flip-flops

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Outline Duplicating Flip-Flops Pipelining I/O Flip-Flops Synchronization Circuits Summary

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Pipelining Concept DQ f MAX = n MHz f MAX  2n MHz two logic levels one level DQ DQDQDQ

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Pipelining Considerations Are enough flip-flops available? – Refer to the Map Report – You, generally, will not run out of Flip-Flops (FFs) Are there multiple logic levels between flip-flops? – If there is only one logic level between flip-flops, pipelining will not improve performance – Refer to the Post-Map Static Timing Report or Post-Place & Route Static Timing Report Can the system tolerate latency ?

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Latency in Pipelines Each pipeline stage adds one clock cycle of delay before the first output will be available – Also called “filling the pipeline” After the pipeline is filled, a new output is available every clock cycle

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Original circuit – Two logic levels between SOURCE_FFS and DEST_FF – f MAX = ~207 MHz Pipelining Example Q DEST_FF LUT DQ D SOURCE_FFS

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Pipelined circuit – One logic level between each set of flip-flops – f MAX = ~347 MHz Pipelining Example LUT DQ DQ DEST_FF LUT SOURCE_FFS DQ DQ DQ PIPE_FFS

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Given the original circuit, what is wrong with the pipelined circuit? How can the problem be corrected? Review Questions

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only What is wrong with the pipelined circuit? – Latency mismatch – Older data is mixed with newer data – Circuit output is incorrect How can the problem be corrected? – Add a flip-flop on SELECT – All data inputs now experience the same amount of latency Answers

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Outline Duplicating Flip-Flops Pipelining I/O Flip-Flops Synchronization Circuits Summary

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only I/O Flip-Flop Overview Each Virtex™-II I/O block contains six flip-flops – INFF on the input, OFF on the output, ENFF on the 3-state enable* – Single-data-rate or double-data-rate support I/O flip-flops provide guaranteed setup, hold, and clock-to-out times when the clock signal comes from a BUFG

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Accessing I/O Flip-Flops During synthesis – Timing-driven synthesis can force flip-flops into IOBs – Some tools support attributes or synthesis directives to mark flip-flops for placement in an IOB Xilinx Constraint Editor – Select the Misc tab, then specify registers that should be placed into IOBs Need to know the instance name of each register During the Map phase of implementation – Map Properties, Pack I/O Registers/Latches into IOBs is on by default – Timing-driven packing will also move registers into IOBs for critical paths Check the Map Report to confirm that IOB flip-flops have been used – IOB Properties section

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Outline Duplicating Flip-Flops Pipelining I/O Flip-Flops Synchronization Circuits Summary

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Synchronization Circuits What is a synchronization circuit? – Captures an asynchronous input signal and outputs it on a clock edge Why do I need synchronization circuits? – Prevent setup and hold time violations – End result is a more reliable design When do I need synchronization circuits? – Signals cross between unrelated clock domains Between related clock domains, relative PERIOD constraints are sufficient – Chip inputs that are asynchronous

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Violations occur when the flip-flop input changes too close to a clock edge Three possible results: – Flip-flop clocks in old data value – Flip-flop clocks in new data value – Flip-flop output becomes metastable Setup and Hold Time Violations

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Metastability Flip-flop output enters a transitory state – Neither a valid 0 nor a valid 1 May be interpreted as 0 by some loads and as 1 by others – Remains in this state for an unpredictable length of time before settling to a valid 0 or 1 Due to its statistical nature, the occurrence of metastable events can only be reduced, not eliminated Mean Time Between Failures (MTBF) is exponentially related to the length of time the flip-flop is given to recover – A few extra ns of recovery time can dramatically reduce the chances of a metastable event The circuits shown in this section allow a full clock cycle for metastable recovery

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Synchronization Circuit #1 Asynchronous input CLK Synchronized signal DQ DQ Guards against metastability FF2FF1 Use when input pulses will always be at least one clock period wide The “extra” flip-flops guard against metastability

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only D Synchronization Circuit #2 Use when input pulses may be less than one clock period wide – FF1 captures short pulses DQ CLR Asynchronous input CLK Synchronized signal DQ Guards against metastabilityVCC FF3FF2FF1 Q

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Capturing a Bus Leading edge detector – Input pulses must be at least one CLK period wide Synchronized bus inputs Asynchronous input Clk CLK One-shot enable D FF2FF1 DQ n bit bus DQ CE Sync_Reg Q DQ DQ DQ

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Leading edge detector – Input pulses may be less than one CLK period wide VCC Q Asynchronous Input Clk CLK One-shot enable DQ FF3 DQ FF2 D CLR FF1 n bit bus CE Synchronized bus inputs Capturing a Bus Sync_Reg DQ DQ

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Asynchronous Input Clk Asynchronous Input Clk Synchronization Circuit #3 Use a FIFO to cross domains Write Addr Data System Clk Read Addr Data BlockRAM PortA - Write Port PortB - Read Port Wr Rd System Clk Rd Wr FIFO Flags Full HalfFull AlmostFull Empty HalfEmpty AlmostEmpty

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Outline Duplicating Flip-Flops Pipelining I/O Flip-Flops Synchronization Circuits Summary

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Skills Check

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Review Questions High fanout is one reason to duplicate a flip-flop. What is another reason? Give an example of a time when you do not need to resynchronize a signal that crosses between clock domains What is the purpose of the “extra” flip-flop in the synchronization circuits shown in this module?

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Answers High fanout is one reason to duplicate a flip-flop. What is another reason? – Loads are divided between multiple locations on the chip Give an example of a time when you do not need to resynchronize a signal that crosses between clock domains – Well-defined phase relationship between the clocks – Example: Clocks are the same frequency, 180º out of phase – Use related PERIOD constraints to ensure that datapaths will meet timing What is the purpose of the “extra” flip-flop in the synchronization circuits shown in this module? – To allow the first flip-flop time to recover from metastability

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Summary You can increase circuit performance by: – Duplicating flip-flops – Adding pipeline stages – Using I/O flip-flops Some tradeoffs – Duplicating flip-flops increases circuit area – Pipelining introduces latency and increases circuit area Synchronization circuits increase reliability

FPGA Design Techniques © 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Where Can I Learn More? Data Book:  Documentation  Databook – Switching Characteristics – Detailed Functional Description  Input/Output Blocks (IOBs) Application Notes:  Documentation  App Notes – XAPP094: Metastability Recovery – XAPP225: Data to Clock Phase Alignment