Lecture 3: Timing & Sequential Circuits

Slides:



Advertisements
Similar presentations
Introduction to Sequential Logic Design Latches. 2 Terminology A bistable memory device is the generic term for the elements we are studying. Latches.
Advertisements

Introduction to CMOS VLSI Design Sequential Circuits
Give qualifications of instructors: DAP
CS 151 Digital Systems Design Lecture 19 Sequential Circuits: Latches.
ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals.
Introduction to Sequential Logic Design Bistable elements Latches.
K-Maps, Timing Sequential Circuits: Latches & Flip-Flops Lecture 4 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier,
Circuits require memory to store intermediate data
Sequential Logic Flip-Flops and Related Devices Dr. Rebhi S. Baraka Logic Design (CSCI 2301) Department of Computer Science Faculty.
EECC341 - Shaaban #1 Lec # 13 Winter Sequential Logic Circuits Unlike combinational logic circuits, the output of sequential logic circuits.
CSE 140 Lecture 8 Sequential Networks Professor CK Cheng CSE Dept. UC San Diego 1.
CS 140 Lecture 8 Sequential Networks Professor CK Cheng CSE Dept. UC San Diego.
Fall 2007 L16: Memory Elements LECTURE 16: Clocks Sequential circuit design The basic memory element: a latch Flip Flops.
Sequential Logic Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer Organization and.
Copyright © 2007 Elsevier3- Ders-6: Ardışıl Mantık Devreleri Tasarımı.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Lecture 7: Sequential Networks CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer Science and Engineering.
COMP541 Sequential Circuits
Chapter 3 Computer System Architectures Based on
Copyright © 2007 Elsevier3- Sequential Logic Circuits Design.
Lecture 5. Sequential Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
CSE 140: Components and Design Techniques for Digital Systems Lecture 7: Sequential Networks CK Cheng Dept. of Computer Science and Engineering University.
Counters and registers Eng.Maha Alqubali. Registers Registers are groups of flip-flops, where each flip- flop is capable of storing one bit of information.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
Digital Design: Sequential Logic Principles
CSE 140 Lecture 8 Sequential Networks
Digital Design - Sequential Logic Design
Lecture 4. Sequential Logic #1
Lecture 3. Lateches, Flip Flops, and Memory
Lecture 10 Flip-Flops/Latches
Lecture 11: Sequential Circuit Design
Chapter 3 Digital Design and Computer Architecture, 2nd Edition
Lecture 7: Sequential Networks
Lecture #16: D Latch ; Flip-Flops
Chapter 3 Digital Design and Computer Architecture: ARM® Edition
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Chapter #6: Sequential Logic Design
Chapter 7 Designing Sequential Logic Circuits Rev 1.0: 05/11/03
Sequential circuit design with metastability
COMP541 Sequential Circuits
Lecture 8 Dr. Nermi Hamza.
Flip-FLops and Latches
Prof. Hsien-Hsin Sean Lee
Learning Outcome By the end of this chapter, students are expected to refresh their knowledge on sequential logic related to HDL.
Flip Flops.
CS1104 – Computer Organization
CISE204: Design of Digital Systems Lecture 18 : Sequential Circuits
Flip-FLops and Latches
Introduction to Sequential Logic Design
Flip-FLops and Latches
Introduction to CMOS VLSI Design Lecture 10: Sequential Circuits
332:437 Lecture 12 Finite State Machine Design
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
COMP541 Sequential Circuits
Elec 2607 Digital Switching Circuits
Lecture 7: Sequential Networks
Flip-FLops and Latches
Flip-FLops and Latches
CSE 370 – Winter Sequential Logic - 1
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
Flip-Flops.
CSC3050 – Computer Architecture
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Flip-FLops and Latches
SEQUENTIAL CIRCUITS __________________________________________________
Sequential Digital Circuits
Lecture 4: Finite State Machines
Presentation transcript:

Lecture 3: Timing & Sequential Circuits E85 Digital Design & Computer Engineering Lecture 3: Timing & Sequential Circuits

Lecture 3 Timing Sequential Circuits Latches and Flip-Flops Synchronous Logic Design

Introduction A logic circuit is composed of: Inputs Outputs Functional specification Timing specification

Timing Delay: time between input change and output changing How to build fast circuits?

Propagation & Contamination Delay Propagation delay: tpd = max delay from input to output Contamination delay: tcd = min delay from input to output

Propagation & Contamination Delay Delay is caused by Capacitance and resistance in a circuit Speed of light limitation Reasons why tpd and tcd may be different: Different rising and falling delays Multiple inputs and outputs, some of which are faster than others Circuits slow down when hot and speed up when cold

Critical (Long) & Short Paths Critical (Long) Path: tpd = 2tpd_AND + tpd_OR Short Path: tcd = tcd_AND

Example: 8-input OR Delay Find the minimum and maximum delay of this 8-input OR Cell Propagation Delay (ps) Contamination Delay (ps) OR2 20 15 OR3 25 19 OR4 35 28

Solution: 8-input OR Delay Find the minimum and maximum delay of this 8-input OR Annotate each node with earliest and latest arrivals Min = 15 ps from A7 to Y. Max = 140 ps from A0 to Y. Cell Propagation Delay (ps) Contamination Delay (ps) OR2 20 15 OR3 25 19 OR4 35 28

Example: Optimized 8-input OR Redesign the 8-input OR to be as fast as possible. Cell Propagation Delay (ps) Contamination Delay (ps) OR2 20 15 OR3 25 19 OR4 35 28

Example: Optimized 8-input OR Redesign the 8-input OR to be as fast as possible. Try various possibilities: Cell Propagation Delay (ps) Contamination Delay (ps) OR2 20 15 OR3 25 19 OR4 35 28

Solution: Optimized 8-input OR Redesign the 8-input OR to be as fast as possible. Annotate delays. OR3+OR3 is fastest (50 ps). Cell Propagation Delay (ps) Contamination Delay (ps) OR2 20 15 OR3 25 19 OR4 35 28

Sequential Logic Introduction Outputs of sequential logic depend on current and prior input values – it has memory. Some definitions: State: all the information about past inputs necessary to explain its future behavior Latches and flip-flops: state elements that store one bit of state Synchronous sequential circuits: combinational logic followed by a bank of flip-flops

Sequential Circuits Give sequence to events Have memory (short-term) Use feedback from output to input to store information

State Elements The state of a circuit influences its future behavior State elements store state Bistable circuit SR Latch D Latch D Flip-flop

Bistable Circuit Fundamental building block of other state elements Two outputs: Q, Q No inputs

Bistable Circuit Analysis Consider the two possible cases: Q = 0: then Q = 0, Q = 1 (consistent) Q = 1: then Q = 1, Q = 0 (consistent) Stores 1 bit of state in the state variable, Q (or Q) But there are no inputs to control the state

SR (Set/Reset) Latch SR Latch Consider the four possible cases:

SR Latch Analysis S = 1, R = 0: then Q = 1 and Q = 0 Set the output Reset the output 1

SR Latch Analysis S = 0, R = 0: then Q = Qprev Memory! S = 1, R = 1: Invalid State Q ≠ NOT Q 1

SR Latch Symbol SR stands for Set/Reset Latch Stores one bit of state (Q) Control what value is being stored with S, R inputs Set: Make the output 1 (S = 1, R = 0, Q = 1) Reset: Make the output 0 (S = 0, R = 1, Q = 0) Avoid invalid state (when S = R = 1)

D Latch Two inputs: CLK, D Function Avoids invalid case when Q ≠ NOT Q CLK: controls when the output changes D (the data input): controls what the output changes to Function When CLK = 1, D passes through to Q (transparent) When CLK = 0, Q holds its previous value (opaque) Avoids invalid case when Q ≠ NOT Q

D Latch Internal Circuit

D Flip-Flop Inputs: CLK, D Function Called edge-triggered Samples D on rising edge of CLK When CLK rises from 0 to 1, D passes through to Q Otherwise, Q holds its previous value Q changes only on rising edge of CLK Called edge-triggered Activated on the clock edge

D Flip-Flop Internal Circuit Two back-to-back latches (L1 and L2) controlled by complementary clocks When CLK = 0 L1 is transparent L2 is opaque D passes through to N1 When CLK = 1 L2 is transparent L1 is opaque N1 passes through to Q Thus, on the edge of the clock (when CLK rises from 0 1) D passes through to Q

D Latch vs. D Flip-Flop

Registers: Multi-bit Flip-Flop

Enabled Flip-Flops Inputs: CLK, D, EN Function The enable input (EN) controls when new data (D) is stored Function EN = 1: D passes through to Q on the clock edge EN = 0: the flip-flop retains its previous state

Resettable Flip-Flops Inputs: CLK, D, Reset Function: Reset = 1: Q is forced to 0 Reset = 0: flip-flop behaves as ordinary D flip-flop

Resettable Flip-Flops Two types: Synchronous: resets at the clock edge only Asynchronous: resets immediately when Reset = 1 Asynchronously resettable flip-flop requires changing the internal circuitry of the flip-flop Synchronously resettable flip-flop?

Resettable Flip-Flops Two types: Synchronous: resets at the clock edge only Asynchronous: resets immediately when Reset = 1 Asynchronously resettable flip-flop requires changing the internal circuitry of the flip-flop Synchronously resettable flip-flop

Settable Flip-Flops Inputs: CLK, D, Set Function: Set = 1: Q is set to 1 Set = 0: the flip-flop behaves as ordinary D flip-flop

Sequential Logic Sequential circuits: all circuits that aren’t combinational A problematic circuit: No inputs and 1-3 outputs Astable circuit, oscillates Period depends on inverter delay It has a cyclic path: output fed back to input

SystemVerilog Description module flop(input logic clk, d, output logic q); always_ff @(posedge clk) q <= d; endmodule Multi-input XOR: Odd parity

SystemVerilog Description module flopenr(input logic clk, en, reset, d, output logic q); always_ff @(posedge clk, posedge reset) if (reset) q <= 0; else if (en) q <= d; endmodule Multi-input XOR: Odd parity

SystemVerilog Description module flopenr #(parameter WIDTH = 4) (input logic clk, reset, en, input logic [WIDTH-1:0] d, output logic [WIDTH-1:0] q); always_ff @(posedge clk, posedge reset) if (reset) q <= 0; else if (en) q <= d; endmodule Multi-input XOR: Odd parity

Synchronous Sequential Logic Design Breaks cyclic paths by inserting registers Registers contain state of the system State changes at clock edge: system synchronized to the clock Rules of synchronous sequential circuit composition: Every circuit element is either a register or a combinational circuit At least one circuit element is a register All registers receive the same clock signal Every cyclic path contains at least one register Two common synchronous sequential circuits Finite State Machines (FSMs) Pipelines