CSE140: Components and Design Techniques for Digital Systems



Similar documents
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

Engr354: Digital Logic Circuits

ECE380 Digital Logic

CHAPTER 11 LATCHES AND FLIP-FLOPS

7. Latches and Flip-Flops

Memory Elements. Combinational logic cannot remember

Sequential Logic Design Principles.Latches and Flip-Flops

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

Set-Reset (SR) Latch

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

Sequential Logic: Clocks, Registers, etc.

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

Theory of Logic Circuits. Laboratory manual. Exercise 3

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

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

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

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

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.

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

Chapter 5. Sequential Logic

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

Master/Slave Flip Flops

Chapter 9 Latches, Flip-Flops, and Timers

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

Flip-Flops and Sequential Circuit Design

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

BINARY CODED DECIMAL: B.C.D.

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

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

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

Module 3: Floyd, Digital Fundamental

CHAPTER 3 Boolean Algebra and Digital Logic

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

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

Lecture 8: Synchronous Digital Systems

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

CS311 Lecture: Sequential Circuits

Digital Logic Design Sequential circuits

Counters and Decoders

Lecture 11: Sequential Circuit Design

Combinational Logic Design Process

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

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

Modeling Latches and Flip-flops

Lecture 10: Sequential Circuits

Lecture-3 MEMORY: Development of Memory:

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

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

Chapter 8. Sequential Circuits for Registers and Counters

74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

Lecture 7: Clocking of VLSI Systems

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

Sequential Circuits. Combinational Circuits Outputs depend on the current inputs

Design Verification & Testing Design for Testability and Scan

ASYNCHRONOUS COUNTERS

Digital Fundamentals

Contents COUNTER. Unit III- Counters

Counters & Shift Registers Chapter 8 of R.P Jain

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

DM74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

Counters are sequential circuits which "count" through a specific state sequence.

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

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Logic Reference Guide

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

Asynchronous Counters. Asynchronous Counters

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Sequential Circuit Design

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

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

Admin. ECE 550: Fundamentals of Computer Systems and Engineering. Last time. VHDL: Behavioral vs Structural. Memory Elements

Fig1-1 2-bit asynchronous counter

Design: a mod-8 Counter

Sequential 4-bit Adder Design Report

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

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

The enable pin needs to be high for data to be fed to the outputs Q and Q bar.

CHAPTER 11: Flip Flops

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

DEPARTMENT OF INFORMATION TECHNLOGY

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

Digital Electronics Detailed Outline

Layout of Multiple Cells

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

路 論 Chapter 15 System-Level Physical Design

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

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

Counters. Present State Next State A B A B

Upon completion of unit 1.1, students will be able to

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

ECE124 Digital Circuits and Systems Page 1

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

DM74LS191 Synchronous 4-Bit Up/Down Counter with Mode Control

Two-level logic using NAND gates

A Lesson on Digital Clocks, One Shots and Counters

Transcription:

CE4: Components and esign Techniques for igital ystems Tajana imunic osing ources:

Where we are now What we ve covered so far (Chap -5, App. A& B) Number representations Boolean algebra OP and PO Logic minimization using K-maps Two and multi-level implementation Hazards AOI, PAL, PLA, OM implementation Mux and emux Adders, Multipliers and ALUs What comes next: equential circuits 2

K-maps, hazards, muxes & NO-only F(A,B,C,)= Π M(2, 3, 6, 8, 9, 2, 3, 4) A C B 3

emultiplexers as general-purpose logic F = A'BC' + A'B'C + ABC F2 = ABC'' + ABC F3 = (A' + B' + C' + ') Enable 4:6 EC A'B'C'' A'B'C' 2 A'B'C' 3 A'B'C 4 A'BC'' 5 A'BC' 6 A'BC' 7 A'BC 8 AB'C'' 9 AB'C' AB'C' AB'C 2 ABC'' 3 ABC' 4 ABC' 5 ABC A B C

PLA implementation 5

ALU bitslice design ALU Operations -A (Two s complement of A) -B (Two s complement of B) A-B A+B 6

CE4: Components and esign Techniques for igital ystems Latches and flip-flops Tajana imunic osing ources: 7

implest circuits with feedback "remember" "data" "load" "stored value" 8

Flight attendant call button 3.2 Flight attendant call button Press call: light turns on tays on after button released Press cancel: light turns off Logic gate circuit to implement this? Call Cancel latch works Call= : sets to and keeps at Cancel= : resets to Call button Cancel button Bit torage Blue light. Call button pressed light turns on Call button Cancel button Bit torage Blue light 2. Call button released light stays on a a Call but ton Call button Cancel button Bit torage Blue light Cancel but ton Blue light 3. Cancel button pressed light turns off 9

What if a kid presses both call and cancel? Call but ton Blue light = = t Cancel but ton = = t = = t t If = and = at the same time and then released, =? Can also occur also due to different delays of different paths may oscillate and eventually settle to or due to diff. path delay

tate diagram Theoretical - latch state behavior states: possible values transitions: changes based on inputs Hard to observe in the - state one of or usually changes first non-deterministic transition to state - or -; a "race condition ; on = goes to either or ' = = possible oscillation between states and ' = = = = = = = ' ' = = = hold unstable = ' = = =

- latch analysis Break feedback path (t) ' (t+ ) (t) (t+ ) hold reset set X not allowed X (t) X X characteristic equation (t+ ) = + (t) 2

Oscillation solution: Level-ensitive Latch Add input C Change C to only after and are stable Level-sensitive latch C

Clocks Freq GHz GHz GHz MHz MHz Period. ns. ns ns ns ns Clock -- Pulsing signal for enabling latches; ticks like a clock ynchronous circuit: sequential circuit with a clock Clock period: time btwn pulse starts Above signal: period = 2 ns Clock cycle: one such time interval Above signal shows 3.5 clock cycles Clock duty cycle: time clock is high 5% in this case Clock frequency: /period Above : freq = / 2ns = 5MHz; 4

Level-ensitive Latch C C latch C latch requires careful design so = never occurs latch relieves designer of that burden Inserted inverter ensures always opposite of 5

Problem with Level-ensitive Latch Y 2 2 3 3 4 4 C C2 C3 C4 Clk Clk_A Clk_B latch still has problem (as does latch) When C=, through how many latches will a signal travel? 6

Master-slave structure: Flip-Flop master stage slave stage P P CLK Break flow by alternating clocks (like an air-lock) use positive clock to latch inputs into one - latch use negative clock to change outputs with another - latch View pair as one basic unit output changes a few gate delays after the falling edge of clock but does not affect any cascaded flip-flops 7

Flip-Flop flip-flop Clk latch m m latch s s /m Cm Clk Cm master Cs s servant m/s Cs s Flip-flop: Bit storage that stores on clock edge, not level Master-slave design: o master loaded when C=, then slave when C= 8

Flip-Flop The triangle means clock input, edge triggered ymbol for rising-edge triggered flip-flop rising edges Clk ymbol for falling-edge triggered flip-flop Clk falling edges Internal design: Just invert servant clock rather than master 9

Flip-Flop Y 2 2 3 3 4 4 Two latches inside each flip-flop Clk Clk_A Clk_B olves problem of not knowing through how many latches a signal travels when C= 2

Comparison of latches and flip-flops CLK positive edge-triggered flip-flop CLK edge G CLK latch transparent (level-sensitive) latch 2

Flip-Flop Types 3.5 flip-flop: like latch, but edge triggered JK flip-flop: like ( J, K) But when JK=, toggles, T flip-flop: JK with inputs tied together Toggles on every rising clock edge Previously utilized to minimize logic outside flip-flop Today, minimizing logic to such extent is not as important flip-flops are thus by far the most common 22

Flip-Flop et, eset and Active Hi/Low Inputs clk cycle cycle 2 cycle 3 cycle 4 A A A A ynchronous reset: clears to on next clock edge ynchronous set: sets to on next clock edge Asynchronous reset: clear to immediately - see diagram Asynchronous set: set to immediately 23

eset (set state to ) Flip-flop features synchronous: new = ' old (when next clock edge arrives) asynchronous: doesn't wait for clock Preset or set (set state to ) (or sometimes P) synchronous: new = old + (when next clock edge arrives) asynchronous: doesn't wait for clock Both reset and preset (set and reset dominant) new = ' old + (set-dominant) new = ' old + ' (reset-dominant) elective input capability (input enable or load) L or EN multiplexor at input: new = L' + L old load may or may not override reset/set (usually / have priority) Complementary outputs and ' 24

Negative edge-triggered flip-flop Efficient solution: only 6 gates sensitive to inputs only near edge of clock signal (not while high) holds when clock goes low characteristic equation (t+) = Clk= negative edge-triggered flip-flop (-FF) 4-5 gate delays holds when clock goes low must respect setup and hold time constraints to successfully capture input 25

Non-Ideal Flip-Flop Behavior clk C latch C u 2 setup time u 3 4 7 clk 5 6 Can t change flip-flop input too close to clock edge etup time: time that must be stable before edge hold time Else, stable value not present at internal latch Hold time: time that must be held stable after edge Else, new value doesn t have time to loop around and stabilize in internal latch 26

Timing: efinitions data clock Clk T su.8 ns T h.5 ns T w 3.3 ns T su.8 ns T h.5 ns T w 3.3 ns T pd 3.6 ns. ns T pd 3.6 ns. ns etup time minimum time before the clocking event by which the input must be stable (Tsu) Hold time: minimum time after the clocking event until which the input must remain stable (Th) Propagation delay Amount of time for value to propagate from input to output (Tpd) 27

Bit torage Overview latch (set) (reset) Level-sensitive latch C C latch Clk latch mm Cm master flip-flop latch s s Cs s servant Feature: = sets to, = resets to. Problem: = yield undefined. Feature: and only have effect when C=. We can design outside circuit so = never happens when C=. Problem: avoiding = can be a burden. Feature: can t be if is stable before and while C=, and will be for only a brief glitch even if changes while C=. Problem: C= too long propagates new values through too many latches: too short may not enable a store. Feature: Only loads value present at rising clock edge, so values can t propagate to other flip-flops during same clock cycle. Tradeoff: uses more gates internally than latch, and requires more external gates than but gate count is less of an issue today. 28

Comparison of latches and flip-flops Type When inputs are sampled When output is valid unclocked always propagation delay from input change latch level-sensitive clock high propagation delay from input change latch (Tsu/Th around falling or clock edge (whichever is later) edge of clock) master-slave clock high propagation delay from falling edge flip-flop (Tsu/Th around falling of clock edge of clock) negative clock hi-to-lo transition propagation delay from falling edge edge-triggered (Tsu/Th around falling of clock flip-flop edge of clock) 29