Latches and Flip-Flops Discussion D4.1 Appendix J.

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.
Edge Triggered Flip Flops (extended slides). Level-Sensitive Flip-Flop Level-sensitive flip-flop (also called a latch) Q changes whenever clock is high.
Computer Science 210 Computer Organization Clocks and Memory Elements.
Latches CS370 –Spring 2003 Section 4-2 Mano & Kime.
ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 12 Basic (NAND) S – R Latch “Cross-Coupling” two NAND gates gives the S -R Latch:
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /23/2013 Lecture 7: Computer Clock & Memory Elements Instructor: Ashraf Yaseen DEPARTMENT OF MATH &
Sequential Logic Latches and Flip-Flops. Sequential Logic Circuits The output of sequential logic circuits depends on the past history of the state of.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
 Seattle Pacific University EE Logic System DesignLatches-1 Feedback Circuits Two inverters, with feedback If the first input is 0, a 0 gets fed.
Sequential logic circuits. 2 Outline Sequential Circuit Models –Asynchronous –Synchronous Latches Flip-Flops.
ReturnNext  Latch : a sequential device that watches all of its inputs continuously and changes its outputs at any time, independent of a clocking signal.
1 CS 151: Digital Design Chapter 5: Sequential Circuits 5-3: Flip-Flops I.
Latches and Flip-Flops Discussion D8.1 Section 13-9.
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
Sequential circuit Digital electronics is classified into combinational logic and sequential logic. In combinational circuit outpus depends only on present.
Edge-Triggered D Flip-Flops Discussion D4.2 Example 26.
Latches and Flip-Flops
Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
Logic Design Fundamentals - 3 Discussion D3.2. Logic Design Fundamentals - 3 Basic Gates Basic Combinational Circuits Basic Sequential Circuits.
Latches Module M10.1 Section 7.1. Sequential Logic Combinational Logic –Output depends only on current input Sequential Logic –Output depends not only.
EECC341 - Shaaban #1 Lec # 13 Winter Sequential Logic Circuits Unlike combinational logic circuits, the output of sequential logic circuits.
Simple Sequential Circuits in VHDL. Contents Sequential circuit examples: - SR latch in dataflow style - D flip-flop in behavioral style - shift register.
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
Latches Section 4-2 Mano & Kime. Sequential Logic Combinational Logic –Output depends only on current input Sequential Logic –Output depends not only.
Logic Design Review – 3 Basic Sequential Circuits Lecture L14.3 Verilog.
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
Latches Lecture L8.1 Section 7.1 – Book Sect. 8.1– Handout.
Sequential Circuits. 2 Sequential vs. Combinational Combinational Logic:  Output depends only on current input −TV channel selector (0-9) Sequential.
Flip-Flops Lecture L8.2 Section 7.1 – Book Sect. 8.1– Handout.
Flip-Flops Section 4.3 Mano & Kime. D Latch Q !Q CLK D !S !R S R X 0 Q 0 !Q 0 D CLK Q !Q Note that Q follows D when the clock in high, and.
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.
Flip Flops. Clock Signal Sequential logic circuits have memory Output is a function of input and present state Sequential circuits are synchronized by.
ETE Digital Electronics Latches and Flip-Flops [Lecture:12] Instructor: Sajib Roy Lecturer, ETE, ULAB.
Lecture #23 Page 1 ECE 4110– Sequential Logic Design Lecture #23 Agenda 1.Latches and Flip-Flops Review Announcements 1.HW #11assigned.
Latch Flip flop.
Introduction to Sequential Logic Design Flip-flops.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 9 Sequential.
ENG241 Digital Design Week #6 Sequential Circuits (Part A)
D Latch Delay (D) latch:a) logic symbolb) NAND implementationc) NOR implementation.
ENG2410 Digital Design LAB #6 LAB #6 Sequential Logic Design (Flip Flops)
Unit 11 Latches and Flip-Flops Fundamentals of Logic Design By Roth and Kinney.
CS 151: Digital Design Chapter 5: Sequential Circuits 5-3: Flip-Flops II.
Sequential Logic Combinatorial components: the output values are computed only from their present input values. Sequential components: their output values.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
CE1110: Digital Logic Design Sequential Circuits.
Feb. 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 12: State Elements, Registers, and Memory * Jeremy R. Johnson Mon. Feb.
VHDL Discussion Sequential Sytems. Memory Elements. Registers. Counters IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology.
Chapter 10 Flip-Flops and Registers 1. Objectives You should be able to: Explain the internal circuit operation of S-R and gated S-R flip-flops. Explain.
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
CEC 220 Digital Circuit Design Latches and Flip-Flops Monday, March 03 CEC 220 Digital Circuit Design Slide 1 of 19.
Sequential logic circuits
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
5 Chapter Synchronous Sequential Circuits 1. Logic Circuits- Review 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates.
Chapter 6 – Digital Electronics – Part 1 1.D (Data) Flip Flops 2.RS (Set-Reset) Flip Flops 3.T Flip Flops 4.JK Flip Flops 5.JKMS Flip Flops Information.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
July 2, 2001Systems Architecture I1 Systems Architecture II (CS 282) Lab 3: State Elements, Registers, and Memory * Jeremy R. Johnson Monday July 2, 2001.
A latch is a temporary storage device that has two stable states (bistable). It is a basic form of memory. The S-R (Set-Reset) latch is the most basic.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
CENG 241 Digital Design 1 Lecture 7 Amirali Baniasadi
Latches-1 Feedback Circuits Two inverters, with feedback If the first input is 0, a 0 gets fed back into it If the first input is 1, a 1 gets fed back.
Dept. of Electrical Engineering
7. Latches and Flip-Flops Digital Computer Logic.
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
LAB #6 Sequential Logic Design (Flip Flops, Shift Registers)
Flip Flops.
1) Latched, initial state Q =1
(Sequential-Circuit Building Blocks)
Presentation transcript:

Latches and Flip-Flops Discussion D4.1 Appendix J

Latches and Flip-Flops Latches –SR Latch –Clocked SR Latch –D Latch Flip-Flops –Edge-Triggered D Flip-Flop

Sequential Logic Combinational Logic –Output depends only on current input Sequential Logic –Output depends not only on current input but also on past input values –Need some type of memory to remember the past input values

Cross-coupled Inverters State 1 State 2

Latches and Flip-Flops Latches –SR Latch –Clocked SR Latch –D Latch Flip-Flops –Edge-Triggered D Flip-Flop

SR Latch S' R' Q Q' X Y nand

X Y nand SR Latch S' R' Q Q'

X Y nand SR Latch S' R' Q Q'

X Y nand 1 0 Set SR Latch S' R' Q Q'

X Y nand 1 0 Set 1 0 Store SR Latch S' R' Q Q'

X Y nand 1 0 Set 1 0 Store SR Latch S' R' Q Q'

X Y nand 1 0 Set 1 0 Store SR Latch S' R' Q Q'

X Y nand 1 0 Set 1 0 Store 0 1 Reset SR Latch S' R' Q Q'

X Y nand 1 0 Set 1 0 Store 0 1 Reset SR Latch S' R' Q Q'

X Y nand 1 0 Set 1 0 Store 0 1 Reset 1 1 Disallowed Q 0 Q 0 ' SR Latch S' R' Q Q'

X Y nand 1 0 Set 1 0 Store 0 1 Reset 1 1 Disallowed Q 0 Q 0 ' To close or lock with or as if with a latch, To catch or fasten SR Latch S' R' Q Q'

R-S Latch R S Q Q is set to 1 when S is asserted, and remains unchanged when S is disasserted. Q is reset to 0 when R is asserted, and remains unchanged when R is disasserted. Assertions can be active HIGH or active LOW

library IEEE; use IEEE.STD_LOGIC_1164.all; entity rslatch is port( R : in STD_LOGIC; S : in STD_LOGIC; Q : out STD_LOGIC ); end rslatch; architecture rslatch of rslatch is begin process(R,S) begin if S = '1' and R = '0' then Q <= '1'; elsif S = '0' and R = '1' then Q <= '0'; end if; end process; end rslatch; R-S Latch R S Q Active HIGH

R-S Latch -- Active High

library IEEE; use IEEE.STD_LOGIC_1164.all; entity rslatch is port( R : in STD_LOGIC; S : in STD_LOGIC; Q : out STD_LOGIC ); end rslatch; architecture rslatch of rslatch is begin process(R,S) begin if S = '0' and R = '1' then Q <= '1'; elsif S = '1' and R = '0' then Q <= '0'; end if; end process; end rslatch; R-S Latch R S Q Active LOW

R-S Latch -- Active Low

How can you make this R-S latch from gates? R-S Latch R S Q Q is set to 1 when S is asserted, and remains unchanged when S is disasserted. Q is reset to 0 when R is asserted, and remains unchanged when R is disasserted. Assertions can be active HIGH or active LOW

R S Q Q R-S Latch R S Q Q is set to 1 when S is asserted (1), and remains unchanged when S is disasserted (0). Q is reset to 0 when R is asserted (1), and remains unchanged when R is disasserted (0). R SQ Q = R'Q + R'S + SQ store set reset store

R S Q Q store set reset store R-S Latch R S Q RS Latch Q = R'Q + R'S + SQ

library IEEE; use IEEE.STD_LOGIC_1164.all; entity rslatchgates is port( R : in STD_LOGIC; S : in STD_LOGIC; Q : out STD_LOGIC ); end rslatchgates; architecture rslatchgates of rslatchgates is signal Q1: std_logic; begin Q1 <= (not R and Q1) or (not R and S) or (S and Q1); Q <= Q1; end rslatchgates; Q1

Latches and Flip-Flops Latches –SR Latch –Clocked SR Latch –D Latch Flip-Flops –Edge-Triggered D Flip-Flop

Clocked SR Latch S' R' Q Q' S R CLK S R CLK S' R' Q Q' Q 0 Q 0 ' Store Reset Set Disallowed X X Q 0 Q 0 ' Store

Latches and Flip-Flops Latches –SR Latch –Clocked SR Latch –D Latch Flip-Flops –Edge-Triggered D Flip-Flop

D Latch D EN Q Q follows D when EN is high, and remains unchanged when EN is low..

library IEEE; use IEEE.STD_LOGIC_1164.all; entity dlatch is port( D : in STD_LOGIC; EN : in STD_LOGIC; Q : out STD_LOGIC ); end dlatch; architecture dlatch of dlatch is begin process(D,EN) begin if EN = '1' then Q <= D; end if; end process; end dlatch; D Latch D EN Q

D Latch

Q Q' EN D S' R' S R S R EN Q Q' Q 0 Q 0 ' Store Reset Set Disallowed X X 0 Q 0 Q 0 ' Store X 0 Q 0 Q 0 ' D EN Q Q'

D Latch X 0 Q 0 Q 0 ' D EN Q Q' Note that Q follows D when EN in high, and is latched when EN goes to zero. Q Q' EN D S' R' S R

Latches and Flip-Flops Latches –SR Latch –Clocked SR Latch –D Latch Flip-Flops –Edge-Triggered D Flip-Flop

D Flip-Flop X 0 Q 0 Q 0 ' D clk Q Q' D gets latched to Q on the rising edge of the clock. Positive edge triggered if rising_edge(clk) then Q <= D; end if; Behavior clk D Q Q'

Master-Slave D Flip-Flop

Recall the SR Latch X Y nand 1 0 Set 1 0 Store 0 1 Reset 1 1 Disallowed Q 0 Q 0 ' S' R' Q Q'

Edge-triggered D Flip-flop

Edge-triggered D Flip-flop with asynchronous set and reset

D Flip-Flop X 0 Q 0 ~Q 0 D CLK Q ~Q D gets latched to Q on the rising edge of the clock. Positive edge triggered

Spartan 3 CLB slices