Slide Set 7. Latches and Clocking

Similar documents
Lecture 7: Clocking of VLSI Systems

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

Latch Timing Parameters. Flip-flop Timing Parameters. Typical Clock System. Clocking Overhead

Topics of Chapter 5 Sequential Machines. Memory elements. Memory element terminology. Clock terminology

Lecture 10: Sequential Circuits

Lecture 11: Sequential Circuit Design

Clocking. Figure by MIT OCW Spring /18/05 L06 Clocks 1

ECE124 Digital Circuits and Systems Page 1

Timing Methodologies (cont d) Registers. Typical timing specifications. Synchronous System Model. Short Paths. System Clock Frequency

Lecture 10 Sequential Circuit Design Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010

Topics. Flip-flop-based sequential machines. Signals in flip-flop system. Flip-flop rules. Latch-based machines. Two-sided latch constraint

Sequential Logic Design Principles.Latches and Flip-Flops

Sequential Circuits. Combinational Circuits Outputs depend on the current inputs

ECE380 Digital Logic

Sequential Circuit Design

A New Paradigm for Synchronous State Machine Design in Verilog

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Counters and Decoders

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

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

Lesson 12 Sequential Circuits: Flip-Flops

Lecture-3 MEMORY: Development of Memory:

Alpha CPU and Clock Design Evolution

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 16 Timing and Clock Issues

路 論 Chapter 15 System-Level Physical Design

CHAPTER 11 LATCHES AND FLIP-FLOPS

Memory Elements. Combinational logic cannot remember

Lecture 10: Latch and Flip-Flop Design. Outline

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Design Verification & Testing Design for Testability and Scan

CSE140: Components and Design Techniques for Digital Systems

Master/Slave Flip Flops

Sequential 4-bit Adder Design Report

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

Power Reduction Techniques in the SoC Clock Network. Clock Power

Sequential Logic: Clocks, Registers, etc.

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Digital Design Verification

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

Engr354: Digital Logic Circuits

Registers & Counters

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

CHAPTER 3 Boolean Algebra and Digital Logic

Chapter 8. Sequential Circuits for Registers and Counters

Module 3: Floyd, Digital Fundamental

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

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

Combinational Logic Design Process

GETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8

Modeling Latches and Flip-flops

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Weste07r4.fm Page 183 Monday, January 5, :39 AM. 7.1 Introduction

Set-Reset (SR) Latch

7. Latches and Flip-Flops

Digital Logic Design Sequential circuits

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

Asynchronous counters, except for the first block, work independently from a system clock.

Flip-Flops, Registers, Counters, and a Simple Processor

Counters. Present State Next State A B A B

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Measuring Metastability

LOW POWER DESIGN OF DIGITAL SYSTEMS USING ENERGY RECOVERY CLOCKING AND CLOCK GATING

Chapter 5. Sequential Logic

Layout of Multiple Cells

S. Venkatesh, Mrs. T. Gowri, Department of ECE, GIT, GITAM University, Vishakhapatnam, India

ECE 451 Verilog Exercises. Sept 14, James Barnes

EE552. Advanced Logic Design and Switching Theory. Metastability. Ashirwad Bahukhandi. (Ashirwad Bahukhandi)

2 : BISTABLES. In this Chapter, you will find out about bistables which are the fundamental building blocks of electronic counting circuits.

Decimal Number (base 10) Binary Number (base 2)

Traffic Light Controller. Digital Systems Design. Dr. Ted Shaneyfelt

Clock Distribution in RNS-based VLSI Systems

DM74LS373/DM74LS374 3-STATE Octal D-Type Transparent Latches and Edge-Triggered Flip-Flops

Chapter 9 Latches, Flip-Flops, and Timers

IE1204 Digital Design F12: Asynchronous Sequential Circuits (Part 1)

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

Design: a mod-8 Counter

CS311 Lecture: Sequential Circuits

Counters & Shift Registers Chapter 8 of R.P Jain

Lecture 8: Synchronous Digital Systems

Introduction to CMOS VLSI Design

Theory of Logic Circuits. Laboratory manual. Exercise 3

Manchester Encoder-Decoder for Xilinx CPLDs

Contents COUNTER. Unit III- Counters

ASYNCHRONOUS COUNTERS

Aims and Objectives. E 3.05 Digital System Design. Course Syllabus. Course Syllabus (1) Programmable Logic

True Single Phase Clocking Flip-Flop Design using Multi Threshold CMOS Technique

CHAPTER 11: Flip Flops

Wiki Lab Book. This week is practice for wiki usage during the project.

DM74LS112A Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flop with Preset, Clear, and Complementary Outputs

Fairchild Solutions for 133MHz Buffered Memory Modules

A 2-Slot Time-Division Multiplexing (TDM) Interconnect Network for Gigascale Integration (GSI)

Transcription:

Slide Set 7 Latches and Clocking Steve Wilton Dept. of ECE University of British Columbia stevew@ece.ubc.ca Slide Set 7 Page 1

Overview Reading: Wolf, Chapter 5 In this section, we will talk about charge storage, registers, and clocking schemes. We will talk about 2-phase clocking, one of the safest clocking methods around, and the one we will use in this class. We ll also talk about less safe methods (edge-triggered design or latch design using clock and clock_b). These are less safe, but they are well understood. We will start by talking about charge storage which is fundamental to the operation of some of these latches. Slide Set 7 Page 2

Why have Clocks? The whole reason that we need clocks is that we want the outputs to depend on more than just the inputs -- we want them to depend on previous outputs too. These previous outputs are encoded in the state bits of a state machine, and are the signals that cause lots of problems. The state bits cause problems because we now need some sort of policy to define what previous and next mean. This is almost always done with the help of a clock, to provide reference points in time. Build state machine from combinational logic (next state logic) and latches, FF (storage elements) to store the state information Clock prev this next Control latches and FF with a clock; unfortunately we can have fast/slow signals (delay) and fast/slow clocks (skew) Slide Set 7 Page 3

Latch vs. Flip-Flop Latch (transparent) When the clock is high it passes In value to Output When the clock is low, it holds value In had when clock fell Flip-Flop (non transparent) On the rising edge of clock, it transfers the value of In to Out It holds the value at all other times. In Clk Out In Out In Clk Out In Out Latch always@(clk In) if( Clk ) Out = In; Flip-Flop always@(posedge Clk) Out = In; Slide Set 7 Page 4

Board Notes: - Dynamic Storage - Latches

Layout of a dynamic latch: source: David Bayer, OSU

How do we use these flip-flop/latches in a system? We will see two methods: 1. Edge-Triggered Clocking - Use the single clock flip-flop we just saw - Easy, and most industrial designs use this - But, there are a few things you have to watch out for 2. Two-Phase Clocking - Use the two-clock latch we just saw - More flexible timing, but a but tricky. Slide Set 7 Page 7

Edge-Triggered Systems INPUTS Combinational Logic N D Q N CLK State is stored in the edge-triggered flip-flops Let s talk a bit about the timing of this type of circuit Slide Set 7 Page 8

Clocking Overhead Flip-Flops have setup and hold times that must be satisfied: Din Clk Qout Slide Set 7 Page 9

Clocking Overhead Flip-Flops have setup and hold times that must be satisfied: Tsetup Thold Don t change data in here Din Clk Qout Slide Set 7 Page 10

Clocking Overhead Flip-Flops have setup and hold times that must be satisfied: Tsetup Thold Din Clk Qout Tclk-q Slide Set 7 Page 11

So, for correct operation Timing Constraints 1. The clock period must be long enough for the flip-flop outputs (current state) to feed-back through the combinational logic, and arrive back at the inputs of the flip-flops Time to do this: Tclk-q + Td + Tsetup setup time of destination flip-flop clock to output delay of source flip-flop delay of combinational logic block For correct operation: Tclk > Tclk-q + Td + Tsetup Slide Set 7 Page 12

Clock Skew D Q D Q Combinational Logic Even though these are the same clock there may be skew. Skew is the difference in arrival times of the clock signals. Skew is due to unequal routing delays in the clock distribution network Slide Set 7 Page 13

Clock Skew D Q D Q Combinational Logic Late Early Increase clock period to account for worst-case skew: For correct operation: Tclk > Tclk-q + Td + Tsetup + Tskew Slide Set 7 Page 14

Clock Skew D Q D Q Combinational Logic Early Late The part will fail if Tclk-q + Td < Tskew + Thold Note: if the circuit fails, we can t just adjust the clock speed until it works! Slide Set 7 Page 15

Clock Skew D Q D Q Combinational Logic So there is a two-sided timing constraint for correct operation: Tclk > Tclk-q + Td + Tsetup + Tskew Tclk-q + Td > Tskew + Thold Skew is a very real problem. Clock distribution networks are important, and we will talk about them soon. Slide Set 7 Page 16

Clock Distribution CLOCK H-Tree Network Observe: Only Relative Skew is Important Prentice Hall Slide Set 7 Page 17

Example: DEC Alpha 21164 Clock Frequency: 300 MHz - 9.3 Million Transistors Total Clock Load: 3.75 nf Power in Clock Distribution network : 20 W (out of 50) Uses Two Level Clock Distribution: Single 6-stage driver at center of chip Secondary buffers drive left and right side clock grid in Metal3 and Metal4 Total driver size: 58 cm! Prentice Hall Slide Set 7 Page 18

Clock Drivers Prentice Hall

Clock Skew in Alpha Processor Prentice Hall Slide Set 7 Page 20

Two-Phase Clocking Separate flip-flop into two latches: What s new here? 1. Use latches, not FF s 2. Use two nonoverlapping clocks Φ1 Φ2 t cycle Slide Set 7 Page 21

Can break up logic into two pieces:: Two-Phase Clocking Combinational Logic D Q 1 Q D Combinational Logic 2 Slide Set 7 Page 22

Clocking Overhead Latches also have setup and hold times that must be satisfied: Din Clk Qout Slide Set 7 Page 23

Latches (Clocking Overhead) Latches also have setup and hold times that must be satisfied: Tsetup Thold Din Clk Qout Slide Set 7 Page 24

Latches (Clocking Overhead) Latches also have setup and hold times that must be satisfied: Tsetup Thold Din Clk Qout Td-q Slide Set 7 Page 25

Two-Phase Clocking Use different edges for latching the data and changing the output Φ1 Φ2 t cycle There are 4 different time periods, all under user control: F1 high F1 falling to F2 rising F2 high F2 falling to F1 rising Can be small Slide Set 7 Page 26

Two-Phase Clocking Look at shift register : Φ2 DQ DQ DQ DQ Φ1 Ld Ld Ld Ld Data Φ2 Φ1 Φ2 x Φ1 w/ skew If there is a large skew on the Φ2x clock, then the spacing between Φ1 and Φ2 can be increased to make sure that even with the skew, the Φ2 latch closes before the Φ1 latch lets the new data pass. New problem: should I use a Φ1 or a Φ2 latch at the output of my combinational block? How can I make sure that I don t make a mistake because I have two different types of latches? Slide Set 7 Page 27

Board Notes: - A Naming Convention for Signals: _s, _v, _q

Clocking Types: Summary The following summarizes the clocking types we have discussed: Φ1 Φ2 _s2 _v1 Control_s1 _q1 Slide Set 7 Page 29

Verilog Coding Rules If you decide to use 2-phase clocking, be sure to label every signal with one of _s1, _s2, _v1, _v2, _q1, _q2 - For weird timing-types, use _w Standard Verilog Latch: always @(Phi1 or Data_s1) if (Phi1) Q_s2 = Data_s1 Remember: - Combinational logic does not change timing types - Combining a valid and stable signal gives a signal - Combining a stable signal and a clock gives a signal - Combinational logic should not have both _s1 and _s2 inputs Slide Set 7 Page 30

Disadvantages of 2-Phase Clocks Need four clocks in general Need true and complement of both clocks Still need low skew for good performance The skew increases the cycle time of the machine Need low skew between all the clocks for good performance Want to have Φ1 and Φ2 close to coincident Many systems use clock and its complement instead of 2 phases Needless to say they are very careful about clock skew For these systems it is still useful to maintain 2 phase timing types, since it ensures you connect all logic to the right latches Call Clk - Φ1 and Clk\ - Φ2, and go from there. (Note in this class we will use Φ1 and Φ2 for clocks) Slide Set 7 Page 31

Advantages of Latches over Flops Why not just go back to flops? Many people do Most designs in industry are based on flops Very easy to verify timing Each path between flops must be less than cycle time Tools check for skew and hold time violations Short paths are padded (buffers are added to slow down the signals) Skew in flop based systems affects the critical path Latch designs are more flexible than a flop design Need to CAD tools to make sure it works properly Can borrow time to allow a path to be longer than clock period (see text for details) Can always slow down clock until the circuit works Slide Set 7 Page 32