EITF35: Introduction to Structured VLSI Design

Similar documents
2.6 Reset Design Strategy

Clock Domain Crossing. Presented by Abramov B. 1

EE178 Spring 2018 Lecture Module 5. Eric Crabill


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

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

Asynchronous & Synchronous Reset Design Techniques - Part Deux

EE241 - Spring 2005 Advanced Digital Integrated Circuits

Combinational vs Sequential

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall,

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

Glitches/hazards and how to avoid them. What to do when the state machine doesn t fit!

IT T35 Digital system desigm y - ii /s - iii

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers

Chapter 2 Clocks and Resets

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

Asynchronous inputs. 9 - Metastability and Clock Recovery. A simple synchronizer. Only one synchronizer per input

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Feedback Sequential Circuits

Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic.

Sequential Circuit Design: Principle

DEDICATED TO EMBEDDED SOLUTIONS

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

Synchronous Sequential Logic

11. Sequential Elements

Lecture 13: Clock and Synchronization. TIE Logic Synthesis Arto Perttula Tampere University of Technology Spring 2017

Modeling Latches and Flip-flops

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

EECS 373 Design of Microprocessor-Based Systems

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

Two types of state machine as classified by output formation

Lecture 12: Clock and Synchronization. TIE Logic Synthesis Arto Perttula Tampere University of Technology Spring 2018

Lecture 11: Sequential Circuit Design

Metastability Analysis of Synchronizer

ECEN454 Digital Integrated Circuit Design. Sequential Circuits. Sequencing. Output depends on current inputs

Introduction to Sequential Circuits

Chapter 3 Unit Combinational

Level and edge-sensitive behaviour

data and is used in digital networks and storage devices. CRC s are easy to implement in binary

Counters

System IC Design: Timing Issues and DFT. Hung-Chih Chiang

Digital System Design

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

ELCT201: DIGITAL LOGIC DESIGN

Asynchronous (Ripple) Counters

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

CHAPTER 6 DESIGN OF HIGH SPEED COUNTER USING PIPELINING

Basis of sequential circuits: the R-S latch

Bubble Razor An Architecture-Independent Approach to Timing-Error Detection and Correction

Sequential Circuits. Sequential Logic. Circuits with Feedback. Simplest Circuits with Feedback. Memory with Cross-coupled Gates.

Lecture 8: Sequential Logic

Flip-Flops and Registers

Asynchronous IC Interconnect Network Design and Implementation Using a Standard ASIC Flow

Momentary Changes in Outputs. State Machine Signaling. Oscillatory Behavior. Hazards/Glitches. Types of Hazards. Static Hazards

Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

! Two inverters form a static memory cell " Will hold value as long as it has power applied

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

P U Q Q*

Sequential Logic. Sequential Circuits. ! Timing Methodologies " Cascading flip-flops for proper operation " Clock skew

Synchronizing Multiple ADC08xxxx Giga-Sample ADCs

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

Review of digital electronics. Storage units Sequential circuits Counters Shifters

Clock - key to synchronous systems. Lecture 7. Clocking Strategies in VLSI Systems. Latch vs Flip-Flop. Clock for timing synchronization

EEC 118 Lecture #9: Sequential Logic. Rajeevan Amirtharajah University of California, Davis Jeff Parkhurst Intel Corporation

Clock - key to synchronous systems. Topic 7. Clocking Strategies in VLSI Systems. Latch vs Flip-Flop. Clock for timing synchronization

Modeling Latches and Flip-flops

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

VLSI Clock Domain Crossing

EL302 DIGITAL INTEGRATED CIRCUITS LAB #3 CMOS EDGE TRIGGERED D FLIP-FLOP. Due İLKER KALYONCU, 10043

Chapter 5 Flip-Flops and Related Devices

Experiment 8 Introduction to Latches and Flip-Flops and registers

Unit 11. Latches and Flip-Flops

Electrical & Computer Engineering ECE 491. Introduction to VLSI. Report 1

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Synchronous Sequential Design

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Chapter 3 :: Sequential Logic Design

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

CPE/EE 427, CPE 527 VLSI Design I Sequential Circuits. Sequencing

Note that none of the above MAY be a VALID ANSWER.

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

D Latch (Transparent Latch)

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

A Low Power Delay Buffer Using Gated Driver Tree

Digital Circuits ECS 371

CSE140: Components and Design Techniques for Digital Systems. More D-Flip-Flops. Tajana Simunic Rosing. Sources: TSR, Katz, Boriello & Vahid

MC9211 Computer Organization

Chapter 5 Synchronous Sequential Logic

CPS311 Lecture: Sequential Circuits

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Module for Lab #16: Basic Memory Devices

Gated Driver Tree Based Power Optimized Multi-Bit Flip-Flops

Use of Low Power DET Address Pointer Circuit for FIFO Memory Design

Sequential Circuit Design: Part 1

Sequential circuits. Same input can produce different output. Logic circuit. William Sandqvist

Transcription:

EITF35: Introduction to Structured VLSI Design Part 4.2.1: Learn More Liang Liu liang.liu@eit.lth.se 1

Outline Crossing clock domain Reset, synchronous or asynchronous? 2

Why two DFFs? 3

Crossing clock domain Multiple clock is needed in case: Inherent system requirement Different clocks for sampling and processing Chip size limitation Clock skew increases with the # FFs in a system Domain #1 Domain #2 4

Multiple Clocks: Problems We have been setting very strict rules to make our digital circuits safe: using a forbidden zone in both voltage and time dimensions Digital Values: distinguishing voltages representing 1 from 0 Digital Time: setup and hold time rules 5

Metastability With asynchronous inputs, we have to break the rules: we cannot guarantee that setup and hold time requirements are met at the inputs! What happens after timing violation? clk setup hold D Q? 6

Metastability in Digital Logic Metastability 7

Mechanical Metastability State A Launch a golf up a hill, 3 possible outcomes: Hit lightly: Rolls back Hit hard: Goes over Or: Stalls at the apex State A State B That last outcome is not stable: A gust of wind Brownian motion Can you tell the eventual state? 8

Metastability in Digital Logic Our hill is related to the VTC (Voltage Transfer Curve). The higher the gain thru the transition region The steeper the peak of the hill The harder to get into a metastable state. We can decrease the probability of getting into the metastable state, but we can t eliminate it 9

Metastability in Digital Logic Fixed clock edge Change the edge of inputs The input edge is moved in steps of 100ps and 1ps The behavior of outputs Three possible states Will exit metastability How long it takes to exit Metastability? 10

Exit Metastability Define a fixed-point voltage, V M, (always have) such that V IN = V M implies V OUT = V M Assume the device is sampling at some voltage V 0 near V M The time to settle to a stable value depends on (V 0 -V M ); its theoretically infinite for V 0 = V M 11

Exit Metastability The time to exit metastability depends logarithmically on (V 0 -V M ) The probability of remaining metastable at time T is Voltage Log(V-V M ) Time (ns) 12

MTBF: The probability of being metastable at time S? Two conditions have to be met concurrently An FF enters the metastable state An FF cannot resolve the metastable condition within S The rate of failure T W : time window around sampling edge incurring metastability F C : clock rate (assuming data change is uniformly distributed) F D : input change rate (input may not change every cycle) Mean time between failures (MTBF) 13

MTBF (Mean Time Between Failure) Let s calculate an ASIC for 28nm CMOS process τ: 10ps (different FFs have different τ) T W =20ps, F C =1GHz Data changes every ten clock cycles Allow 1 clock cycle to resolve metastability, S=T C MTBF=4 10 29 year! [For comparison: Age of oldest hominid fossil: 5x10 6 years Age of earth: 5x10 9 years] 14

The Two-Flip-Flop Synchronizer Asynchronous input FF1 FF2 Da D Q D Q Ds? CLK Synchronized signal Global low-skew clock S=T C 15

The Two-Flip-Flop Synchronizer Possible Outcomes 16

The Two-Flip-Flop Synchronizer Possible Outcomes Open Question: What is the limitation? 17

The Two-Flip-Flop Synchronizer Problems Just ensures that the receiving system does not enter a metastable state Not guarantee the function of the received signal Uncertainty Remains: Q2 goes high either one or two cycles later than the input D1 mush stay high for at least two cycles. How about data bus (multiple bits) crossing clock domain? Some bits may pass through the synchronizer after one cycle while others may take two cycles. 18

A Complete Synchronizer The sender place data on the bus The sender sends Req, Req gets synchronized by the top synchronization circuits The receiver gets data and sends back ACK Ack gets synchronized by the sender, and only then is the sender allowed to start a new cycle again. 19

FIFO FIFO (first in first out) Buffer Elastic storage between two subsystems 20

Circular FIFO How to Implement a FIFO? Circular queue implementation Use two pointers and a generic storage Write pointer: point to the empty slot before the head of the queue Read pointer: point to the tail of the queue 21

Circular FIFO (f) 5 6 4 22

FIFO Implementation Overall Architecture Storage Elements Reg. file FIFO Controller Read and write pointers: 2 counters Status circuit: full, empty 23

FIFO Implementation: Controller Augmented binary counter: Increase the counter by 1 bits Use LSBs for as register address Use MSB to distinguish full or empty 0000 0001 0011 0010 0110 0111 0101 0100 1100 1101 1111 1110 1010 1011 1001 1000 24

A Complete Synchronizer Control signals are synchronized, data pass through storage elements Assertion delay, it takes two clock cycles for the control signal passing through synchronizer Usually available in libraries The key question, how large the RAM should be? When in doubt, double it 25

Outline Crossing clock domain Reset, synchronous or asynchronous? 26

Reset Design Strategy Force the SoC into a known state for stable operations In general, every flip-flop in an SoC (ASIC) should be resetable whether or not it is required by the system Reset might be eliminated for high-performance pipeline FFs Many design issues must be considered before choosing a reset strategy for an ASIC design 27

General Coding Style: FFs Coding for synchronous and asynchronous reset architecture rtl of goodffstyle is signal q1 : std_logic; begin process (clk, rst_n) begin if (clk'event and clk = '1') then if (rst_n = '0') then q1 <= '0'; else q1 <= d; end if; end if; end process; end rtl; architecture rtl of goodffstyle is signal q1 : std_logic; begin process (clk) begin if (clk'event and clk = '1') then if (rst_n = '0') then q1 <= '0'; else q1 <= d; end if; end if; end process; end rtl; 28

Synchronous vs. Asynchronous Reset 29

Synchronous vs. Asynchronous Reset 80% designs using synchronous reset (investigation by Sunburst Design, Inc) we all know that the best way to do resets in an ASIC is to strictly use synchronous resets asynchronous resets are bad and should be avoided There are both advantages and disadvantages to using either synchronous or asynchronous resets. The designer must use an approach that is appropriate for the design. 30

Synchronous Reset reset is not part of the sensitivity list. reset is part of the input path 31

Synchronous Reset: one problem Synthesis tool may not easily distinguish the reset signal from any other data signal The synthesis tool could alternatively have produced the circuit If synthesis tool can distinguish reset, it will put reset as close to FFs as possible What If load=x Only a problem in simulation 32

Synchronous Reset Advantage Generally insure that the circuit is 100% synchronous. Will synthesize to smaller flip-flops Ensure that reset can only occur at an active clock edge. The clock works as a filter for small reset glitches. Disadvantage May need a pulse stretcher to guarantee a reset pulse width wide enough to ensure reset is present during an active edge of the clock Will require a clock in order to reset the circuit, e.g., if you have a gated clock to save power, the clock may be disabled 33

Asynchronous Reset reset is part of the sensitivity list. reset is not part of the input path 34

Asynchronous Reset Advantage The data path is guaranteed to be clean designs that are pushing the limit for data path timing, cannot afford to have added gates and additional net delays in the data path due to synchronous resets The most obvious advantage favoring asynchronous resets is that the circuit can be reset with or without a clock present Disadvantage If the asynchronous reset is released at or near the active clock edge of a flip-flop, the output of the flip-flop could go metastable and thus the reset state of the SoC could be lost. Spurious resets due to noise or glitches on the board or system reset 35

Reset Timing 36

Reset Removal Problem Reset recovery time: Time between when reset is de-asserted and the time that the clock signal goes high again. Synchronous reset, both the leading and trailing edges of the reset must be away from the active edge of the clock. 37 Active high reset

Reset Removal Problem Reset removal traversing different clock cycles Cause some registers or flip-flops to exit the reset state before others Reset Buffer Tree 38

Reset Removal Problem Reset removal traversing different clock cycles Cause some registers or flip-flops to exit the reset state before others Especially for high-rate clock and big chip Reset Buffer Tree 39 Active high reset

But Does it really matter? Single pipeline stage? After a few cycles, the entire pipeline will be operational Any incorrect data will be flushed out of the system In fact, there is little point in having a reset at all 40

But Does it really matter? Parallel pipeline Pipeline with feedback 41

Reset Synchronizer An external reset signal asynchronously resets a pair of master reset flip-flops, which in turn drive the master reset signal asynchronously Take advantage of the best of both asynchronous and synchronous reset styles. Takes two rising clock edges after reset removal to synchronize removal of the master reset. No metastability problems on the second flip-flop when reset is removed 42 Active low reset

Reset Glitch Filter Any input wide enough to meet the minimum reset pulse width for a flip-flop will cause the flip-flop to reset 43 Active low reset

Reset Glitch Filter Any input wide enough to meet the minimum reset pulse width for a flip-flop will cause the flip-flop to reset Delay line: Vendors provide a delay hard macro that can be hand instantiated Instantiate a slow buffer in a module 44 Active low reset

Xilinx Reset 45

Xilinx Reset: covering 99.99% of cases Initialization after configuration (power-on reset) Has the same effect as a global reset It also initializes all RAM cells All program and data areas are defined even before the processor executes the first instruction 46

Xilinx Reset: Strategy for the 0.01% of Cases 47

Reference Readings Simulation and Synthesis Techniques for Asynchronous FIFO Design Synchronous Resets? Asynchronous Resets? I am so confused! How will I ever know which to use? Get Smart About Reset: Think Local, Not Global http://www.xilinx.com/support/documentation/white_pa pers/wp272.pdf Get your Priorities Right Make your Design Up to 50% Smaller http://www.xilinx.com/support/documentation/white_papers/wp275.pdf 48

Lecture No lecture tomorrow Sept. 28 th Monday (8.15-10.00) Design for Test (DFT) Erik Larsson Associate Professor Sept. 29 th Tuesday (8.30-10.00) Igor Tasevski 49