Switching Circuits & Logic Design

Similar documents
Switching Circuits & Logic Design

UNIT 11 LATCHES AND FLIP-FLOPS

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

CHAPTER 11 LATCHES AND FLIP-FLOPS

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS)

CH 11 Latches and Flip-Flops

Unit 11. Latches and Flip-Flops

12/31/2010. Overview. 12-Latches and Flip Flops Text: Unit 11. Sequential Circuits. Sequential Circuits. Feedback. Feedback

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

Latches and Flip-Flops UNIT 11 LATCHES AND FLIP-FLOPS. How to Remember the Past? Recap: Two Types of Switching Circuits. Iris Hui-Ru Jiang Spring 2010

INTRODUCTION TO SEQUENTIAL CIRCUITS

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Sequential Circuits: Latches & Flip-Flops

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

Logic Design. Flip Flops, Registers and Counters

ELCT201: DIGITAL LOGIC DESIGN

Introduction to Sequential Circuits

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

Flip-Flops and Sequential Circuit Design

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

ELCT201: DIGITAL LOGIC DESIGN

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Engr354: Digital Logic Circuits

RS flip-flop using NOR gate

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.

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

Lecture 8: Sequential Logic

Experiment 8 Introduction to Latches and Flip-Flops and registers

RS flip-flop using NOR gate

6. Sequential Logic Flip-Flops

Chapter 11 Latches and Flip-Flops

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

3 Flip-Flops. The latch is a logic block that has 2 stable states (0) or (1). The RS latch can be forced to hold a 1 when the Set line is asserted.

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

LATCHES & FLIP-FLOP. Chapter 7

Asynchronous (Ripple) Counters

The NOR latch is similar to the NAND latch

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

Introduction to Microprocessor & Digital Logic

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time.

Chapter. Synchronous Sequential Circuits

Fundamentals of Computer Systems

ELE2120 Digital Circuits and Systems. Tutorial Note 7

Combinational vs Sequential

Advanced Digital Logic Design EECS 303

PRE J. Figure 25.1a J-K flip-flop with Asynchronous Preset and Clear inputs

CHAPTER 1 LATCHES & FLIP-FLOPS

D Latch (Transparent Latch)

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

Sequential Design Basics

Chapter 5 Flip-Flops and Related Devices

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

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

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).

Sequential Logic Circuits

EET2411 DIGITAL ELECTRONICS

Digital Fundamentals: A Systems Approach

Sequential Logic and Clocked Circuits

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

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

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

Fundamentals of Computer Systems

Chapter 5 Synchronous Sequential Logic

Latches, Flip-Flops, and Registers. Dr. Ouiem Bchir

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

Fundamentals of Computer Systems

Other Flip-Flops. Lecture 27 1

Flip-Flops and Related Devices. Wen-Hung Liao, Ph.D. 4/11/2001

Counters

EEE2135 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과

CPS311 Lecture: Sequential Circuits

EKT 121/4 ELEKTRONIK DIGIT 1

Digital Integrated Circuits EECS 312

Chapter 5: Synchronous Sequential Logic

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

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

ECE 341. Lecture # 2

Logic Circuits. A gate is a circuit element that operates on a binary signal.

UNIT IV. Sequential circuit

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

EE292: Fundamentals of ECE

Lecture 7: Sequential Networks

Final Exam review: chapter 4 and 5. Supplement 3 and 4

SEQUENTIAL CIRCUITS THE RELAY CIRCUIT

ESE 570 STATIC SEQUENTIAL CMOS LOGIC CELLS. Kenneth R. Laker, University of Pennsylvania, updated 25Mar15

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

Synchronous Sequential Logic

MC9211 Computer Organization

Slide Set 7. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Logic Design II (17.342) Spring Lecture Outline

Introduction to Digital Logic Missouri S&T University CPE 2210 Flip-Flops

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

Rangkaian Sekuensial. Flip-flop

Combinational / Sequential Logic

COSC 243. Sequential Logic. COSC 243 (Computer Architecture) Lecture 5 - Sequential Logic 1

FLIP-FLOPS AND RELATED DEVICES

Transcription:

Switching Circuits & Logic Design Jie-Hong oland Jiang 江介宏 Department of Electrical Engineering National Taiwan University Fall 22

Latches and Flip-Flops http://www3.niaid.nih.gov/topics/malaria/lifecycle.htm 2

Outline Introduction Set-reset latch Gated D latch Edge-triggered D flip-flop S- flip-flop J-K flip-flop T flip-flop Flip-flops with additional inputs Summary 3

Introduction Combinational circuits Output is a function depending on the present input, but not past inputs Given an arbitrary input, a combinational circuit produces only one possible output (after certain delay) Not necessarily acyclic (without feedback) Sequential circuits Output is a function depending on the past sequence of inputs Must be cyclic (with feedback) Synchronous sequential circuits With memory devices (registers, latches) Asynchronous sequential circuits Without memory devices 4

Introduction Combinational circuits (without memory) x x 2 x 3 f z = f(x,x 2,x 3 ) Sequential circuits (with memory) x s mem f g z = f(x,s) s + = g(x,s) time index z = f(x,s ) z = f(x,g(x,s )) z2 = f(x2,g(x,g(x,s))) 5

Introduction To construct a system (e.g., circuit, neural network, etc.) that remembers something about the past history of the inputs Need feedback! Closed loops formed in a circuit connection 6

Introduction Memory devices Memory devices Latches and flip-flops can assume one of two stable output states, and have one or more inputs that can cause the output state to change Latch Have no clock input Flip-flip Change output state in response to a clock input, but not a data input 7

Introduction Feedback Unstable Oscillator Feedback X X Inverter with feedback Oscillation at inverter output Stable Memory (-bit) 8

9 Set-eset Latch S- latch S P S P S P S P (a) Stable: = (b) Set: S: : (b) eset: : : (a) Stable: =

Set-eset Latch Cross-coupled form S- latch symbol ' ' L S S eset Set eset Set directly above S (different from the cross-coupled form)

Set-eset Latch Improper S- latch operation When S = =, the circuit is unstable Disallow S = = for S- latch S P

Set-eset Latch Timing diagram S ' є є t t 2 t 3 t 4 t S t +є t 3 +є : two NO-gate delay The duration of the S (or ) input pulse must normally be no less than in order for a change in the state of to occur 2

Set-eset Latch Operation Next-state equation (or characteristic equation): + = S+' (S=, i.e., S== disallowed) Present (or current) state The state of the output of the latch or flip-flop at the time the input signals are applied (or changed) Next state + The state of the output after the latch or flip-flop has reacted to these input signals S(t) (t) (t) (t+ ) - - hold reset set prohibited S(t) (t) (t) (t+є)=s(t)+'(t)(t) 3

Set-eset Latch Application Switch debouncing Note: only work for a double throw switch, switching between two contacts (but not for a single throw switch) why? +V b a S S Switch at a Bounce at a Switch between a and b Bounce at b Switch at b 4

Set-eset Latch Alternative Implementation S- latch S- latch using NAND gates S S + S S ' - - hold reset set prohibited L ' Inputs S and are active low 5

Gated D Latch Gated D latch G D S D G L ' Truth table Symbol D L G D + hold ( + = ) GD G ' transparent ( + = D) + = G'+GD 6

Edge-Triggered D Flip-Flop Unlike D latch, D flip-flip output changes only in response to the clock, not to a change in D rising (or positive) edge triggered (-to- transition on clock) falling (or negative) edge triggered (-to- transition on clock) ' Ck FF D ' Ck FF D D + + = D ising-edge trigger Falling-edge trigger Truth table 7

Edge-Triggered D Flip-Flop Timing diagram (falling-edge trigger) D Ck 8

Edge-Triggered D Flip-Flop Implementation D flip-flop (rising-edge trigger) Composed of two gated D latches CLK D D L G P D 2 2 L 2 G 2 Time analysis CLK=G 2 L 2 hold L hold L 2 hold If L starts following D before L 2 takes on P, the FF will not function properly G D P 9

Edge-Triggered D Flip-Flop Setup Time and Hold Time Propagation delay: t p The time between the active edge of the clock and the resulting change in the output Setup time: t su The amount of time D must be stable before the active edge Hold time: t h The amount of time D must hold the same value after the active edge t su t h D allowed to change D Ck t p t p 2

Edge-Triggered D Flip-Flop Determine Minimum Clock Period Simple flip-flop circuit example (t p 5ns, t su 3ns, inverter delay 2ns) CLK t su t p D D inv delay CLK Setup time not satisfied t su t su t p t p extra 5ns inv delay inv delay Setup time satisfied Minimum clock period 2

S- Flip-Flop Similar to S- latch but with clock input Same truth table and characteristic equation Interpretation of + is different Latch: + is the value of after the propagation delay through the latch FF: + is the value that assumes after the active clock edge S- flip-flop S Operation summary: Ck ' changes at clock edges S== S=,= S=,= S== no state change set to (after active Ck edge) reset to (after active Ck edge) not allowed 22

S- Flip-Flop Implementation S- flip-flop (master-slave flip-flop) Composed of two S- latches Only allow the S and inputs to change while CLK is high S S P S CLK Master 2 Slave P' ' 2 ' Time analysis CLK CLK S P t t 2 t 3 t 4 t 5 ising-edge-triggered FF: Inputs can change while CLK is low Master-slave FF: Incorrect if inputs change while CLK is low 23

J-K Flip-Flop J-K flip-flop is an extended version of S- flip-flop + = J'+K' J corresponds to S (Jump to ); K corresponds to (Klear to ) State toggled when J=K= Clk J-K flip-flop ' K FF CK J J K J K + t p t p t p Hold t t 2 t 3 Clear to Jump to Toggle CLK J K S Master P P' S 2 Slave ' 2 ' 24

T Flip-Flop T flip-flop ' Ck FF T T + hold toggle + = T'+T' = T T = + = T = + = ' Ck T t p t p t t 2 t 3 t 4 25

T Flip-Flop Implementation Conversion of J-K to T Connect J and K inputs of a J-K FF together + =J'+K' + =T'+T' Conversion of D to T Let D = T + =D + = T ' ' K CK J Ck D Clk T Clk T 26

Flip-Flops with Additional Inputs Asynchronous Clear and Preset Flip-flops often have additional inputs to set the flip-flops to an initial state independent of the clock Ck D PreN ClrN + ClrN ' Ck D PreN x x x,, x x x x (not allowed) (no change) ClrN and PreN are asynchronous clear and preset inputs (they override the Ck and D inputs) ClrN and PreN are active low signals When ClrN=PreN=, the FF is in normal operation should not be applied to ClrN and PreN simultaneously 27

Flip-Flops with Additional Inputs Asynchronous Clear and Preset Timing diagram for D flip-flop with asynchronous clear and preset CLK D ClrN PreN t t 2 t t 3 4 28

Flip-Flops with Additional Inputs Clock Enable D flip-flop with clock enable (CE) D-CE symbol D CE Ck ' Implementation : gating the clock Clk En D Ck ' Implementation 2: no clock gating Loss of synchronization when ) clock arrive at some FFs at different times 2) En changes at the wrong time CE + = D = (CE)' + D in (CE) D in D No synchronization problem Clk Ck ' 29

Summary Latch (w/o clock input) vs. flip-flop (w/ clock input) Propagation delay, setup time, hold time Present (current) state, next state Characteristic (next-state) equations + = S+' (S=) (S- latch or flip-flop) + = GD+G' (gated D latch) + = D (D flip-flop) + = D CE+ CE' (D-CE flip-flop) + = J'+K' (J-K flip-flop) + = T = T'+T' (T flip-flop) estrictions For S- latch/flip-flop, S and can not be simultaneously For master-slave S- flip-flop, S and should not change during the half clock cycle preceding the active edge Setup and hold time constraints 3