Top Banner
ECE 429 – Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia Wang Department of Electrical and Computer Engineering Illinois Institute of Technology March 20, 2018 ECE 429 – Introduction to VLSI Design Spring 2018 1/16
26

ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Jul 29, 2018

Download

Documents

ngokhue
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

ECE 429 – Introduction to VLSI DesignLecture 18 Sequential Circuit Design I

Professor Jia WangDepartment of Electrical and Computer Engineering

Illinois Institute of Technology

March 20, 2018

ECE 429 – Introduction to VLSI Design Spring 2018 1/16

Page 2: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Outline

Overview: FSM and Ideal Flip-Flops

Setup Condition and Hold Condition

ECE 429 – Introduction to VLSI Design Spring 2018 2/16

Page 3: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Reading Assignment

I This lecture: 10.1–10.3, 10.6.1

I Next lecture: Final Project

ECE 429 – Introduction to VLSI Design Spring 2018 3/16

Page 4: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Outline

Overview: FSM and Ideal Flip-Flops

Setup Condition and Hold Condition

ECE 429 – Introduction to VLSI Design Spring 2018 4/16

Page 5: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Finite State Machine (FSM)

I A model to reason about computing systemsI StatesI State transitions

I Graph representationI States as verticesI States transitions as edgesI Quite intuitive when the system is small (tens of states or a

few bits of states)

I Functional representationI Define a current state for the machineI Represent next state and the outputs as functions of the

current state and inputsI Able to handle extremely large systems (how many states are

there in your computer?)

ECE 429 – Introduction to VLSI Design Spring 2018 5/16

Page 6: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Implementing FSMs as Sequential Circuits

I Implement the functional representation of FSMI Store the current state in the sequential elementsI The next state and the outputs are computed through

combinational circuitsI Also known as register transfer level (RTL)

I Synchronous circuit: a clock is introducedI Exact one state transition happens per clock cycleI Also known as cycle-accurate behavior

ECE 429 – Introduction to VLSI Design Spring 2018 6/16

Page 7: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Flip-Flops as Sequential Elements

I What is the desired functionality of the sequential elementsfor synchronous circuits?

I During the clock cycle, hold and provide the current state tothe combinational circuits to compute the next state and theoutputs

I At the end of the clock cycle (a time point), load thecomputed next state

I (Ideal) (Edge-triggered) Flip-flopsI Three terminals: input D, output Q, clock CLKI When the clock CLK turns from ‘0’ to ‘1’ (positive/rising

edge), the input D is loaded into the flip-flopI The loaded value is available at the output Q just after the

rising edge, and will stay there until the next rising edge comes.

ECE 429 – Introduction to VLSI Design Spring 2018 7/16

Page 8: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Timing for Ideal Flip-Flops

I Computing the next state and the output takes timeI We need to consider timing of combinational circuits

I Let the clock period be Tc

I Let the longest path (propagation) delay of the combinationalpaths be tpd

I Of all the paths computing the next state and the output

I The condition: tpd ≤ Tc

I Ensure the computation of the next state finises before thenext rising edge

I Same constraint applies to the output so you can connectmultiple sequential circuits driven by the same clock togetherdirectly.

ECE 429 – Introduction to VLSI Design Spring 2018 8/16

Page 9: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Outline

Overview: FSM and Ideal Flip-Flops

Setup Condition and Hold Condition

ECE 429 – Introduction to VLSI Design Spring 2018 9/16

Page 10: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Bistability and Metastability

(Fig. 10.42, Weste and Harris)

I Ideally, one flip-flop stores 1 bit of state, either ‘0’ or ‘1’I Feedbacks are necessary to compete with noise and leakageI Stable states: after small perturbations, the ball will return

back to the current positionI Bistability: 2 stable states, one for ‘0’, one for ‘1’

I However, feedbacks will result in Metastable stateI Any perturbation will cause the ball to move away from the

current positionI Not good for state storage because the state is unpredictable

ECE 429 – Introduction to VLSI Design Spring 2018 10/16

Page 11: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Bistability and Metastability

(Fig. 10.42, Weste and Harris)

I Ideally, one flip-flop stores 1 bit of state, either ‘0’ or ‘1’I Feedbacks are necessary to compete with noise and leakageI Stable states: after small perturbations, the ball will return

back to the current positionI Bistability: 2 stable states, one for ‘0’, one for ‘1’

I However, feedbacks will result in Metastable stateI Any perturbation will cause the ball to move away from the

current positionI Not good for state storage because the state is unpredictable

ECE 429 – Introduction to VLSI Design Spring 2018 10/16

Page 12: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Setup Time and Hold Time

I Flip-flops enter the metastable state only if the input D andthe rising clock edge come almost at the same time

I To avoid the metastable state, input D should be kept stablewhen the rising edge comes

I Setup time tsetupI Input D must have settled by tsetup time before the rising edgeI Known as setup condition or max-delay constraints

I Hold time tholdI Input D should not change until thold time after the rising edgeI Known as hold condition or min-delay constraints

ECE 429 – Introduction to VLSI Design Spring 2018 11/16

Page 13: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Setup Time and Hold Time

I Flip-flops enter the metastable state only if the input D andthe rising clock edge come almost at the same time

I To avoid the metastable state, input D should be kept stablewhen the rising edge comes

I Setup time tsetupI Input D must have settled by tsetup time before the rising edgeI Known as setup condition or max-delay constraints

I Hold time tholdI Input D should not change until thold time after the rising edgeI Known as hold condition or min-delay constraints

ECE 429 – Introduction to VLSI Design Spring 2018 11/16

Page 14: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Setup Time and Hold Time

I Flip-flops enter the metastable state only if the input D andthe rising clock edge come almost at the same time

I To avoid the metastable state, input D should be kept stablewhen the rising edge comes

I Setup time tsetupI Input D must have settled by tsetup time before the rising edgeI Known as setup condition or max-delay constraints

I Hold time tholdI Input D should not change until thold time after the rising edgeI Known as hold condition or min-delay constraints

ECE 429 – Introduction to VLSI Design Spring 2018 11/16

Page 15: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Setup Time and Hold Time

I Flip-flops enter the metastable state only if the input D andthe rising clock edge come almost at the same time

I To avoid the metastable state, input D should be kept stablewhen the rising edge comes

I Setup time tsetupI Input D must have settled by tsetup time before the rising edgeI Known as setup condition or max-delay constraints

I Hold time tholdI Input D should not change until thold time after the rising edgeI Known as hold condition or min-delay constraints

ECE 429 – Introduction to VLSI Design Spring 2018 11/16

Page 16: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Handle Setup and Hold Conditions

(Fig. 10.4, Weste and Harris)

I tpd : the longest path (propagation) delay of thecombinational paths

I tcd : the shortest path (contamination) delay of thecombinational paths

I The signal at the flip-flop input D is guaranteed to be stablesince tpd time in the current clock cycle until tcd time in thenext clock cycle

I We need to modify the condition tpd ≤ Tc to include setupand hold conditions

ECE 429 – Introduction to VLSI Design Spring 2018 12/16

Page 17: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Handle Setup and Hold Conditions

(Fig. 10.4, Weste and Harris)

I tpd : the longest path (propagation) delay of thecombinational paths

I tcd : the shortest path (contamination) delay of thecombinational paths

I The signal at the flip-flop input D is guaranteed to be stablesince tpd time in the current clock cycle until tcd time in thenext clock cycle

I We need to modify the condition tpd ≤ Tc to include setupand hold conditions

ECE 429 – Introduction to VLSI Design Spring 2018 12/16

Page 18: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Handle Setup and Hold Conditions

(Fig. 10.4, Weste and Harris)

I tpd : the longest path (propagation) delay of thecombinational paths

I tcd : the shortest path (contamination) delay of thecombinational paths

I The signal at the flip-flop input D is guaranteed to be stablesince tpd time in the current clock cycle until tcd time in thenext clock cycle

I We need to modify the condition tpd ≤ Tc to include setupand hold conditions

ECE 429 – Introduction to VLSI Design Spring 2018 12/16

Page 19: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Intrinsic Delays for Flip-Flops

(Fig. 10.4, Weste and Harris)

I The state of the flip-flop is not immediately available at theoutput Q

I tccq: clock-to-Q contamination delayI Output Q is stable and provides the previous state before tccq

time of the rising edge

I tpcq: clock-to-Q propagation delayI Output Q is stable and provides the current state after tpcq

time of the rising edge

ECE 429 – Introduction to VLSI Design Spring 2018 13/16

Page 20: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Intrinsic Delays for Flip-Flops

(Fig. 10.4, Weste and Harris)

I The state of the flip-flop is not immediately available at theoutput Q

I tccq: clock-to-Q contamination delayI Output Q is stable and provides the previous state before tccq

time of the rising edge

I tpcq: clock-to-Q propagation delayI Output Q is stable and provides the current state after tpcq

time of the rising edge

ECE 429 – Introduction to VLSI Design Spring 2018 13/16

Page 21: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Intrinsic Delays for Flip-Flops

(Fig. 10.4, Weste and Harris)

I The state of the flip-flop is not immediately available at theoutput Q

I tccq: clock-to-Q contamination delayI Output Q is stable and provides the previous state before tccq

time of the rising edge

I tpcq: clock-to-Q propagation delayI Output Q is stable and provides the current state after tpcq

time of the rising edge

ECE 429 – Introduction to VLSI Design Spring 2018 13/16

Page 22: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Setup Condition for Flip-Flops

(Weste and Harris)

I tpcq + tpd + tsetup ≤ Tc

I Ideally tpcq = tsetup = 0

ECE 429 – Introduction to VLSI Design Spring 2018 14/16

Page 23: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Setup Condition for Flip-Flops

(Weste and Harris)

I tpcq + tpd + tsetup ≤ Tc

I Ideally tpcq = tsetup = 0

ECE 429 – Introduction to VLSI Design Spring 2018 14/16

Page 24: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Hold Condition for Flip-Flops

(Weste and Harris)

I tccq + tcd ≥ tholdI Ideally tccq = thold = 0 and tcd is always not negative

ECE 429 – Introduction to VLSI Design Spring 2018 15/16

Page 25: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Hold Condition for Flip-Flops

(Weste and Harris)

I tccq + tcd ≥ tholdI Ideally tccq = thold = 0 and tcd is always not negative

ECE 429 – Introduction to VLSI Design Spring 2018 15/16

Page 26: ECE 429 Introduction to VLSI Design Lecture 18 …jwang/ece429-2018s/ece429-lec18.pdf · ECE 429 { Introduction to VLSI Design Lecture 18 Sequential Circuit Design I Professor Jia

Summary

I Setup condition and hold condition

ECE 429 – Introduction to VLSI Design Spring 2018 16/16