Timing Issues In FPGA Synchronous Circuit Design

1y ago
4 Views
1 Downloads
536.17 KB
33 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Javier Atchley
Transcription

ECE 428 Programmable ASIC Design Timing Issues in FPGA Synchronous Circuit Design Haibo Wang ECE Department Southern Illinois University Carbondale, IL 62901 1-1

FPGA Design Flow Schematic capture HDL coding Design Entry Function Simulation Implementation Synthesis, Technology mapping placement and routing Timing Verification Download 1-2

Introduction to Synchronous Circuits What are synchronous circuits? — In synchronous circuits, latching data in to memory elements (D flip-flops) are synchronized by a number of clocks. DFF Comb. logic DFF Comb. logic DFF CLK Why synchronous design? — Well developed design methodologies — Easy to design, debug, and testing — Currently, most ASICs are synchronous circuits 1-3

D Flip-Flop Timing Parameters D Q CLK CLK D tS setup time tH hold time Q tclkÆQ clock to Q propagation delay 1-4

Critical Path in Combinational Circuits Critical path Critical Path: The signal path that has the longest propagation delay — Assume that each gate has the same delay d — The delay of the critical path in the above circuit is 3 d 1-5

Determine Maximum Clock Frequency DFF Comb. Logic 1 DFF Comb. Logic 2 DFF clk The delays of the critical paths in comb. logic 1 and comb. Logic 2 are d1 and d2, respectively. In addition, d1 d2 Minimum clock period T tCLKÆQ d1 tS tCLKÆQ T d1 tS 1-6

Slow Combinational Logic Clock period is selected. The propagation delay of Comb. Logic 2 is too large DFF Comb. Logic 1 DFF Comb. Logic 2 DFF clk tCLKÆQ T d1 tS Set-up time violation 1-7

Too Fast Combinational Logic Clock period is selected. The propagation delay of Comb. Logic 2 is too small Comb. Logic 1 DFF DFF Comb. Logic 2 DFF clk Thold Old Data Old Data tCLKÆQ d1 Timing to guarantee correct data latched in DFF New Data New Data Hold time violation 1-8

Clock Skew Due to interconnect delay, the same clock signal may switch at different time depending on the distance from the clock source. This effect is called clock skew. Comb. Logic 1 DFF clk1 3ns DFF 1ns Comb. Logic 2 clk2 DFF 2ns Propagation delay caused by interconnect CLK clk1 clk1 clk2 clk2 tCLKÆQ d1 tS Signal propagation Without clock skew tCLKÆQ d1 tS Signal propagation With clock skew Setup time violation 1-9

Clock Skew DFF Comb. Logic 1 clk1 1ns Comb. Logic 2 DFF 5ns clk2 DFF 2ns Propagation delay caused by interconnect CLK clk1 clk1 clk2 clk2 thold tCLKÆQ thold dl Without clock skew tCLKÆQ dl With clock skew Hold time violation 1-10

Techniques to Reduce Clock Skew Use global buffers to distribute clock signals to minimize clock skew. — Modern FPGAs normally contain dedicated buffers (global buffers) to distribute clock signals around FPGA chips. — The global buffers are connected through specially balanced routing resources to minimize clock skew. — Use symbol BUFG to indicate the use of global buffers in schematic entry. Most synthesis tools can automatically use global buffers for clock signals — In latest FPGAs, more sophisticated circuit techniques, such as Phase-Locked Loop (PLL), are used to minimize clock skew . 1-11

Timing Constraints in Synchronous Circuits Shortest path tds DFF DFF Longest path tdl tsk clock To avoid setup time violation tclk Q t dl t setup Tclk t sk To avoid hold time violation tclk Q t ds t hold t sk 1-12

Techniques to Avoid Timing Violations Insert delay elements on clock path to avoid setup time violations data DFF Comb. Logic DFF clock Insert delay elements on data path to avoid hold time violations data DFF Comb. Logic DFF clock 1-13

Specifying Timing Constraints in ASIC Design Timing constraints are used to specify delay of circuit paths The end points of paths can be D flip-flops, Latches, Input or Output pads, and Memories Path from IPAD to DFF IPAD logic Path between DFFS FF logic Path from DFF to OPAD OPAD FF IPAD logic IPAD OPAD Path from IPAD to OPAD 1-14

Period Constraint Period constraints specify delay of paths between synchronous elements that are clocked by the same clock — Period constraint is also called register-to-register delay — Synchronous elements include D flip-flops, latches, and synchronous Rams — In the following example, the period constraint specify delay of a path between two D flip-flops Path between DFFS IPAD logic FF logic OPAD FF IPAD logic IPAD OPAD The delay of the path tdl T - tCLKÆQ - tS 1-15

Offset Constraint Offset constraints specify delays of paths: — From input pads to synchronous elements. The constraints for this type paths are called as offset in constraints. For the input paths, external setup time and external hold time have to be considered — From synchronous elements to output pads. The constraints for this type paths are called as offset out constraints. Offset In Constraints IPAD IPAD logic Offset Out Constraints FF logic FF logic OPAD logic 1-16

External Setup Time tDATA IPAD IPAD logic tS : DFF setup time FF logic FF logic OPAD logic tCLK Worst case setup time for input occurs when input is DELAYED relative to CLK. Means clock edge arrives early, requiring input to be ready sooner. External setup time tS tDATA(max) – tCLK(min) 1-17

External Hold Time tDATA IPAD IPAD logic tH : DFF hold time FF logic FF logic OPAD logic tCLK Worst case hold time for input occurs when CLK is DELAYED relative to input. Means clock edge arrives late, requiring input to hold its value longer. External hold time tH tCLK(max) – tDATA(min) 1-18

Pad-to-Pad Time Constraint IPAD logic FF logic OPAD FF IPAD logic IPAD OPAD Pad-to-Pad time constraint It specifies delays for paths that are from input pads to output pads Purely combinatorial delay paths do not contain any synchronous elements 1-19

Specifying Time Constraints in Xilinx Tools Example circuit A B O clk 1-20

Specifying Time Constraints in Xilinx Tools 1-21

Report from Static Timing Analysis Asterisk (*) preceding a constraint indicates it was not met. This may be due to a setup or hold violation. ---Constraint Requested Actual Logic Levels ---TS CLK PERIOD TIMEGRP "CLK" 20 nS HI 20.000ns 3.568ns 1 GH 50.000000 % ---COMP "A" OFFSET IN 10 nS BEFORE COMP " 10.000ns 1.788ns 2 CLK" --* COMP "B" OFFSET IN 1000 pS BEFORE COMP 1.000ns 1.334ns 2 "CLK" -COMP "O" OFFSET OUT 10 nS AFTER COMP " 10.000ns 9.352ns 1 CLK" --- 1-22

Flow for Achieving Timing Closure Modify circuit or HDL coding style Schematic capture Design Entry HDL coding Increase P&R effort level Implementation Timing Verification Done Yes Meet timing Constraints? No Are constraints realistic? 1-23

What Affect Circuit Timing Performance Environmental factors Commercial Products are expected to work in the following environment — Supply voltage varies 10% — Temperature from 0 to 85 C Fast Corner (circuits have small delay) — Supply voltage: VDD VDD 10%; Temperature: 0 C Slow Corner (circuits have large delay) — Supply voltage: VDD - VDD 10%; Temperature: 85 C Perform timing analysis at fast corner to check hold time violations and perform timing analysis at slow corner to check setup time violations 1-24

What Else Affect Circuit Timing Performance Process variations NFET (fast, slow, typical) PFET (fast, slow, typical) Interconnect (fast, slow, typical) Due to process variations and other factors, including operating voltage, circuit design, etc, devices from the same family can achieve different operating speeds: Source: www.xilinx.com 1-25

Example on Calculating Timing Parameters Calculate timing parameters 1-26

Calculating Timing Parameters Maximum register to register delay U2 Tc2q U3 Tpd U1 Tsu 5 8 3 16 ns. External setup time Tsu A2D Tpd max - Clk Tpd min 3 (8 1) - 2 10 ns External hold time Thd Clk Tpd max - A2D Tpd min 4 2 - (7 1) -2 ns Clock to Out Delay U8 Tpd U2 Tc2q U5 Tpd U6 Tpd 2 5 9 6 22 ns Pad to pad Delay U7 Tpd U5 Tpd U6 Tpd 1 9 6 16 ns 1-27

Interface with Asynchronous Inputs Q1 Asynchronous signal Q2 logic FF CLK FF Synchronous circuit 1 Asynchr. Signal CLK Q1 Undefined region 0 Metastable state 1 0 If the asynchr. input is in undefined region when the DFF latches it, the DFF output will be possibly in metastable state. The DFF output will eventually settle to logic 1 or 0. However, this process must complete with a certain period. Otherwise, it will be a failure. 1-28

Potential Problems of Metastability Due to metastability, the same signal may be treated as having different logic values in different part of the circuit 1-29

Metastability Analysis Mean Time Between Failure: MTBF tr eτ MTBF T0 f in f clock Where, 1. tr is metastability resolution time, maximum time the output can remain metastable without causing synchronizer failure. 2. T0 and τ are constants that depend on the electrical characteristics of the flip-flop. 3. fin is the frequency of the asynchronous input 4. fclock is the frequency of the sampling clock 1-30

Increasing MTBF Mean Time Between Failure: MTBF D Q D Asynchronous signal Q Synchronous circuit CLK Synchronizer The use of synchronizer can significantly reduce Main-Time-Between-Failure (MTBF) 1-31

ASIC with Multiple Clock Domains A group of circuits that are clocked by the same signal is referred to as a clock domain Clock domain 1 ADATA FLOP FLOP FLOP D D D Q Q Q OUT1 CLK1 BUFG FLOP D Q Clock domain 2 FLOP D Q OUT2 BUS [7.0] CLK2 CDATA Combinatorial Logic 1-32

Communication Between Different Clock Domains Methods for different clock domain communication 9 Using synchronizer 9 Using FIFO 9 Using handshaking protocols Synchronizer clk2 Clock domain 1 FIFO Clock domain 2 Handshaking 1-33

Specifying Timing Constraints in ASIC Design Timing constraints are used to specify delay of circuit paths The end points of paths can be D flip-flops, Latches, Input or Output pads, and Memories FF FF logic logic logic IPAD IPAD IPAD OPAD OPAD Path from IPAD to DFF Path from DFF to OPAD Path between DFFS Path from IPAD to OPAD

Related Documents:

timing pulleys timing pulleys with pilot bore type mxl - xl - l - h - xh page 4 export timing pulleys type xl - l - h page 20 taper-lock timing pulleys type l - h page 29 htd timing pulleys with pilot bore type 3m - 5m - 8m - 14m page 38 htd taper lock timing pulleys type 5m - 8m - 14m page 54 gt timing pulleys type 3mr - 5mr page 65 poly chain gt timing pulleys

In this thesis, FPGA-based simulation and implementation of direct torque control (DTC) of induction motors are studied. DTC is simulated on an FPGA as well as a personal computer. Results prove the FPGA-based simulation to be 12 times faster. Also an experimental setup of DTC is implemented using both FPGA and dSPACE. The FPGA-based design .

FPGA ASIC Trend ASIC NRE Parameter FPGA ASIC Clock frequency Power consumption Form factor Reconfiguration Design security Redesign risk (weighted) Time to market NRE Total Cost FPGA vs. ASIC ü ü ü ü ü ü ü ü FPGA Domain ASIC Domain - 11 - 18.05.2012 The Case for FPGAs - FPGA vs. ASIC FPGAs can't beat ASICs when it comes to Low power

Step 1: Replace ASIC RAMs to FPGA RAMs (using CORE Gen. tool) Step 2: ASIC PLLs to FPGA DCM & PLLs (using architecture wizard), also use BUFG/IBUFG for global routing. Step 3: Convert SERDES (Using Chipsync wizard) Step 4: Convert DSP resources to FPGA DSP resources (using FPGA Core gen.)

- Removes FPGA hold-time violations - Reduces complexity of clock trees, which speeds up FPGA place and route - Faster P&R times - better quality of results Benefits: - No hold-time violations in user clock domains - Removes any FPGA-specific clock limitations - Improves FPGA timing closure - Accelerates FPGA P&R times

With advancements in FPGA architectures and technology, FPGA designs are getting more and more complex. The growing prevalence of high-speed interfaces, mixed-signal blocks and usage of 3rd-party Intellectual Property (IP) blocks are some of the factors that have exponentially increased the difficulties of FPGA timing closure.

Drive Belt Tensioner Drive Belt Tensioner Damper M/T Air Cleaner Duct Oil Filler Cap No.3 Timing Belt Cover Gasket No.2 Timing Belt Cover No.5 Air Hose Water Pump Pulley Drive Belt Camshaft Timing Pulley Drive Belt Tensioner Hold-Down Clamp Idler Pulley Battery Insulator Battery Tray Battery Timing Belt Gasket No.1 Timing Belt Cover Crankshaft .

practices for timing closure in FPGA designs to resolve any timing violations that exist in the FPGA core. 1 If you are using the Quartus II software version 9.1 SP1 or earlier,Altera strongly recommends upgrading to the latest software version.Achieving timing closure is