1 Flip Flops, Registers Today: Latches, Flip FlipsFirst Hour: Types of Latches, Flip Flips –Section 6.1.4-6.1.6 of Katz’s Textbook –In-class Activity #1.

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

1 Lecture 14 Memory storage elements  Latches  Flip-flops State Diagrams.
ECE C03 Lecture 81 Lecture 8 Memory Elements and Clocking Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
1 Sequential Ckts, Latches and Timing Issues Today: Sequential Circuits, LatchesFirst Hour: Sequential Circuits, Latches –Section of Katz’s Textbook.
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
Digital Logic Chapter 5 Presented by Prof Tim Johnson
Announcements Assignment 7 posted, due Friday 18 th All project components ordered Dates –Thursday 12/1 review lecture –Tuesday 12/6 project demonstrations.
Chapter #6: Sequential Logic Design
Page 1 Sequential Logic Basic Binary Memory Elements.
Dr. ClincyLecture1 Appendix A – Part 2: Logic Circuits Current State or output of the device is affected by the previous states Circuit Flip Flops New.
EET 1131 Unit 10 Flip-Flops and Registers
EKT 124 / 3 DIGITAL ELEKTRONIC 1
Sequential circuit Digital electronics is classified into combinational logic and sequential logic. In combinational circuit outpus depends only on present.
Digital Logic Design Lecture 23. Announcements Homework 8 due Thursday, 11/20 Exam 3 coming up on Tuesday, 11/25.
1 Review: Counters and Registers CS 231 Review October 26, 2007 By Joshua Smith Please note the NOTES in the PPT file for help with the examples.
Sequential Logic Flip-Flops and Related Devices Dr. Rebhi S. Baraka Logic Design (CSCI 2301) Department of Computer Science Faculty.
Lecture 9 Memory Elements and Clocking
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
11/15/2004EE 42 fall 2004 lecture 321 Lecture #32 Registers, counters etc. Last lecture: –Digital circuits with feedback –Clocks –Flip-Flops This Lecture:
Sequential Circuits. 2 Sequential vs. Combinational Combinational Logic:  Output depends only on current input −TV channel selector (0-9) Sequential.
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Flip-Flop Types.
ECE C03 Lecture 101 Lecture 10 Registers, Counters and Shifters Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
Chapter #6: Sequential Logic Design 6.2 Timing Methodologies
ECE C03 Lecture 91 Lecture 9 Registers, Counters and Shifters Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Sequential Switching Networks.
ELEC 256 / Saif Zahir UBC / 2000 Sequential Logic Design Sequential Networks Simple Circuits with Feedback R-S Latch J-K Flipflop Edge -Triggered Flip-Flops.
Introduction Flip-flops are synchronous bistable devices. The term synchronous means the output changes state only when the clock input is triggered. That.
Chapter 3: Sequential Logic Circuit EKT 121 / 4 ELEKTRONIK DIGIT 1.
Lecture 21 Overview Counters Sequential logic design.
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
1 CSE370, Lecture 14 Lecture 14 u Logistics n Midterm 1: Average 90/100. Well done! n Midterm solutions online n HW5 due date delayed until this Friday.
Registers and Counters
Digital Computer Design Fundamental
COE 202: Digital Logic Design Sequential Circuits Part 1
Introduction to Sequential Logic Design Flip-flops.
Flip Flop
1 Random-Access Memory (RAM) Note: We’re skipping Sec 7.5 Today: First Hour: Static RAM –Section 7.6 of Katz’s Textbook –In-class Activity #1 Second Hour:
No. 7-1 Chapter #7: Sequential Logic Case Studies.
Chap 4. Sequential Circuits
CENT-113 Digital Electronics 1 Flip Flops TI Type 502 Flip Flop: 1st production IC in 1960.
Introduction to Sequential Logic Design Flip-flops FSM Analysis.
Introduction to Sequential Logic Design Flip-flops.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
FLIP FLOP By : Pn Siti Nor Diana Ismail CHAPTER 1.
Topic: Sequential Circuit Course: Logic Design Slide no. 1 Chapter #6: Sequential Logic Design.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Registers Page 1. Page 2 What is a Register?  A Register is a collection of flip-flops with some common function or characteristic  Control signals.
Sequential logic circuits
ECE C03 Lecture 81 Lecture 8 Memory Elements and Clocking Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
6-1 Programmable and Steering Logic Chapter #6: Sequential Logic Design.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2007.
EKT 121 / 4 ELEKTRONIK DIGIT I
Flip Flops, Registers Today: First Hour: Types of Latches, Flip Flips
Chapter5: Synchronous Sequential Logic – Part 1
Flip-Flop Flip-flops Objectives Upon completion of this chapter, you will be able to :  Construct and analyze the operation of a latch flip-flop made.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
Digital Design: Sequential Logic Principles
Sequential Logic Design
LATCHED, FLIP-FLOPS,AND TIMERS
Chapter #6: Sequential Logic Design
Registers and Counters
Sequential Logic.
ECE Digital logic Lecture 16: Synchronous Sequential Logic
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
Registers and Counters
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
Registers and Counters
Presentation transcript:

1 Flip Flops, Registers Today: Latches, Flip FlipsFirst Hour: Types of Latches, Flip Flips –Section of Katz’s Textbook –In-class Activity #1 Second Hour: Storage and Shift Registers Section 7.1 of Katz’s Textbook –In-class Activity #2

2 State Diagrams for Latches State Behavior of R-S Latch Truth Table Summary of R-S Latch Behavior

3 State Diagram: R-S Latch Theoretical R-S Latch State Diagram

4 Observed R-S Behavior Very difficult to observe R-S Latch in the 1-1 state Ambiguously returns to state 0-1 or 1-0 A so-called "race condition"

5 Making Other Latches J K Q Q + HOLD HOLD RESET RESET SET SET TOGGLE TOGGLE NEXT STATE TABLE Simplify by coupling inputs i.e., one input determines the other

6 D Latch J K Q Q + HOLD HOLD RESET RESET SET SET TOGGLE TOGGLE NEXT STATE TABLE D Q Q + RESET 0 0 0RESET SET 1 0 1SET Let J = D, K = D D Also called D flip-flop if edge-triggered

7 T Latch J K Q Q + HOLD HOLD RESET RESET SET SET TOGGLE TOGGLE NEXT STATE TABLE Let J = T, K = T T Q Q + HOLD 0 0 0HOLD TOGGLE 1 0 1TOGGLE NEXT STATE TABLE T Also called T flip-flop if edge-triggered

8 R-S Clocked Latch: used as storage element in narrow width clocked systems its use is not recommended! however, fundamental building block of other flipflop types J-K Flipflop: versatile building block can be used to implement D and T FFs usually requires least amount of logic to implement ƒ(In,Q,Q+) but has two inputs with increased wiring complexity because of 1's catching, never use master/slave J-K FFs edge-triggered varieties exist D Flipflop: minimizes wires, much preferred in VLSI technologies simplest design technique best choice for storage registers T Flipflops: don't really exist, constructed from J-K FFs usually best choice for implementing counters Preset and Clear inputs highly desirable!! Comparison of FFs

9 Timing issues revisited Timing issues revisited Set Reset Toggle Problem: Keeps toggling! R S Q Q Latch Q Q J K

10 Master section - clock high J-K inputs generate P outputs Master section - clock high J-K inputs generate P outputs Slave section - clock low Ps are unchanging and generate Qs Slave section - clock low Ps are unchanging and generate Qs J-K Master/Slave F-F Two-stage memory element Two-stage memory element Two-phase clock operation - Feedback has no effect until next time clock is high

11 Timing: master-slave Master Stage Slave Stage Sample inputs while clock high Sample inputs while clock low Uses time to break feedback path from outputs to inputs! Correct Toggle Operation

12 Edge-triggered FFs 1's Catching problem: - a glitch on the J or K inputs leads to a state change! - I.e. If input 1 any time during the clock period, it will be interpreted as a 1 for computing output => forces designer to use hazard-free logic Solution: edge-triggered logic called “Flip-flops” Negative Edge-Triggered D flipflop Schematic when clock is high: R=S=0 I.e. Hold state

13 Step-by-Step Analysis Edge-triggered Flipflops Negative edge-triggered D FF when clock goes high-to-low new data (D) is latched Negative edge-triggered D FF when clock remains low data is held

14 Latches vs Flip-Flops Input/Output Behavior of Latches and Flipflops Type When Inputs are Sampled When Outputs are Valid unclocked always propagation delay from latch input change level clock high propagation delay from sensitive (Tsu, Th around input change latch falling clock edge) positive edge clock lo-to-hi transition propagation delay from flipflop (Tsu, Th around rising edge of clock rising clock edge) negative edge clock hi-to-lo transition propagation delay from flipflop (Tsu, Th around falling edge of clock falling clock edge) master/slave clock hi-to-lo transition propagation delay from flipflop (Tsu, Th around falling edge of clock falling clock edge)

15 TTL schematics Bubble here for negative edge triggered device Timing Diagram: Behavior the same unless input changes while the clock is high Edge triggered device sample inputs on the event edge Transparent latches sample inputs as long as the clock is asserted

16 Do Activity #1 Now Q Q D Clk R S D’ D D D D Holds D when clock goes low Holds D when clock goes low Edge-triggered D-flipflop J K Q Q + HOLD HOLD RESET RESET SET SET TOGGLE TOGGLE J-K NEXT STATE TABLE

17 Sequential Logic Components Flipflops:Flipflops: most primitive "packaged" sequential circuits More complex sequential building blocks: –Storage registers, Shift registers, Counters – Available as components in the TTL Catalog –Registers »Store a word (4 to 64 bits) »E.g.: Pentium has several registers –Counters »Count thru a sequence of states »E.g., the seconds display on a clock. –Both of these have many variations.

18 Storage Registers Storage registersStorage registers store data, without changing it. –A D F/F is a 1-bit storage register. A Register FileA Register File stores a group of words of data. –You specify which word to read or write. Random-Access MemoryA Random-Access Memory is like a large register file. It may store 32MB of data or more.

19 Multibit Storage Registers Clocks in 4 bits in parallel, or resets to 0. use D F/Fs in groups to make a multibit register

Quadruple D F/F with Clear This stores 4 bits in parallel No bubble indicates positive edge triggered The /CLR clears all 4 bits Triangle indicates clock input

21 Register Variants Sometimes there’s also a LOAD input. –When LOAD is false, the F/F doesn’t change. –When LOAD is true during the clock edge, the F/F updates itself. Sometimes the outputs are 3-state or open collector. –This allows several registers to be connected to the same output wire

Octal D F/Fs with Enable Stores an 8 bit number Positive edge triggered... but only when /EN is active LO

Octal D F/Fs with 3-State Outputs Stores an 8 bit number Positive edge triggered /OE is active LO output enable Determines when register contents are visible at the outputs /OE is active LO output enable Determines when register contents are visible at the outputs Note: LW uses different labels from the 377, and from Katz!

24 Register Files You read or write one word at a time by-4 Register File with 3-State Outputs 4 words of 4 bits each Data in: D1,D2,D3,D4Data out: Q1,Q2,Q3,Q4 Read selects: RB,RAWrite selects: WB,WA Active low Active low read enable /GR, write enable /GW Can read and write simultaneously. No clock. Read or write when enables asserted. Watch out for glitches! To write Word 1, set GW = 0 and (WB, WA) to (0,1) To read Word 2, set GR = 0 and (RB, RA) to (1,0) To write Word 1, set GW = 0 and (WB, WA) to (0,1) To read Word 2, set GR = 0 and (RB, RA) to (1,0) Store several words

25 Random Access Memories Same idea as a register file, but optimized for very many words. Small RAM: bit words. Larger RAM: 4 million 8-bit words. More details later.

26 Shift Registers Some registers are designed to change their stored data. Shift registers shift their bits left or right. For example, right shift: Original contents1000 Shift right:0100 Shift again:0010 …and again:0001 … once more, wrapping:1000 Application: send a word to a modem bit-by-bit. We need some way to initialize the shift register.

27 Input and Output Serial inputSerial input The shift register doesn’t wrap around from right to left. Instead, the user provides the new leftmost bit. Parallel inputParallel input You can specify the whole word at once. Serial outputSerial output The bit just shifted off the right is visible at a pin. Parallel outputParallel output Every stored bit is visible at an output pin. This uses more pins, which can be a problem.

more- 4 bit bidirectional universal shift register 4 modes set by S1,S0 00:hold data (QA,QB,QC,QD) 01:shift right (SR,QA,QB,QC) 10:shift left (QB,QC,QD,SL) 11:parallel load 4 modes set by S1,S0 00:hold data (QA,QB,QC,QD) 01:shift right (SR,QA,QB,QC) 10:shift left (QB,QC,QD,SL) 11:parallel load Positive edge triggered SL (aka LSI): left shift input SR (aka RSI): right shift input SL (aka LSI): left shift input SR (aka RSI): right shift input /CLR: asynchronous clear

continued Notation conflicts: –LogicWorks uses SL, SR. Katz uses LSI, RSI. –LW uses A,B,C,D for inputs and QA,QB,QC,QD for outputs. –Motorola uses P0,P1,P2,P3 for inputs, Q0,Q1,Q2,Q3 for outputs and D SR & D SL for serial inputs. NoteNote that the normal LW convention is that A is the lo-order bit. This is the way you normally connect the hex keyboard and the hex display. For the 194, A and QA are the hi-order bits. It's confusing. Right shift in more detail. All together on the rising clock: SR  QA, QA  QB, QB  QC, QC  QD, QD is lost. Connecting QD to SR makes a circular shift register. Left shift in more detail. SL  QD, QD  QC, QC  QB, QB  QA, QA is lost.

30 Do Activity #2 Now Due: End of Class Today RETAIN THE LAST PAGE (#3)!! For Next Class: Bring Randy Katz Textbook, & TTL Data Book Required Reading: – Sec 7.2, 7.3 of Katz This reading is necessary for getting points in the Studio Activity!