Synchronous Sequential Logic. Logic and Digital System Design - CS 303 Erkay Savaş Sabanci University



Similar documents
Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

Memory Elements. Combinational logic cannot remember

Chapter 5. Sequential Logic

CHAPTER 11 LATCHES AND FLIP-FLOPS

Lesson 12 Sequential Circuits: Flip-Flops

Theory of Logic Circuits. Laboratory manual. Exercise 3

Engr354: Digital Logic Circuits

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

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

Sequential Logic Design Principles.Latches and Flip-Flops

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

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

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

ECE380 Digital Logic

CSE140: Components and Design Techniques for Digital Systems

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

Flip-Flops and Sequential Circuit Design

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

Lecture 8: Synchronous Digital Systems

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

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

Master/Slave Flip Flops

Counters and Decoders

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

BINARY CODED DECIMAL: B.C.D.

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

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

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

7. Latches and Flip-Flops

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

Chapter 9 Latches, Flip-Flops, and Timers

Chapter 8. Sequential Circuits for Registers and Counters

Module 3: Floyd, Digital Fundamental

Set-Reset (SR) Latch

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

Sequential Logic: Clocks, Registers, etc.

CHAPTER 3 Boolean Algebra and Digital Logic

Counters & Shift Registers Chapter 8 of R.P Jain

Modeling Latches and Flip-flops

Digital Logic Design Sequential circuits

CS311 Lecture: Sequential Circuits

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

Lecture-3 MEMORY: Development of Memory:

Combinational Logic Design Process

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

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

Asynchronous Counters. Asynchronous Counters

Fig1-1 2-bit asynchronous counter

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

Counters. Present State Next State A B A B

Binary Adders: Half Adders and Full Adders

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

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.

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Contents COUNTER. Unit III- Counters

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

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

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

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

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute. 2nd (Spring) term 2012/2013

Digital Electronics Detailed Outline

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

DEPARTMENT OF INFORMATION TECHNLOGY

Digital Fundamentals

Systems I: Computer Organization and Architecture

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

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

Advanced Logic Design Techniques in Asynchronous Sequential Circuit Synthesis

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

SN54/74LS192 SN54/74LS193

CpE358/CS381. Switching Theory and Logical Design. Class 10

Napier University. School of Engineering. Electronic Engineering A Module: SE42205 Digital Design

Gates, Circuits, and Boolean Algebra

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

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

The components. E3: Digital electronics. Goals:

Sequential Circuit Design

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

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

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

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

Logic Reference Guide

Design Verification & Testing Design for Testability and Scan

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

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

Layout of Multiple Cells

Upon completion of unit 1.1, students will be able to

ASYNCHRONOUS COUNTERS

Lecture 10: Sequential Circuits

Decimal Number (base 10) Binary Number (base 2)

Lecture 11: Sequential Circuit Design

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

DM7474 Dual Positive-Edge-Triggered D-Type Flip-Flops with Preset, Clear and Complementary Outputs

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

DM54161 DM74161 DM74163 Synchronous 4-Bit Counters

Cascaded Counters. Page 1 BYU

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

Transcription:

Synchronous Sequential Logic Logic and Digital System Design - S 33 Erkay Savaş Sabanci University

Sequential Logic Digital circuits we have learned, so far, have been combinational no memory, outputs are entirely defined by the current inputs However, many digital systems encountered everyday life are sequential (i.e. they have memory) the memory elements remember past inputs outputs of sequential circuits are not only dependent on the current input but also the state of the memory elements. 2

Sequential ircuits Model inputs ombinational ircuit outputs current state Memory Elements next state current state is a function of past inputs 3

lassification - Two types of sequential circuits. Synchronous Signals affect the memory elements at discrete instants of time. Discrete instants of time requires synchronization. Synchronization is usually achieved through the use of a common clock. A clock generator is a device that generates a periodic train of pulses. 4

lassification - 2. Synchronous The state of the memory elements are updated with the arrival of each pulse This type of logical circuit is also known as clocked sequential circuits. 2. Asynchronous No clock behavior of an asynchronous sequential circuits depends upon the input signals at any instant of time and the order in which the inputs change. Memory elements in asynchronous circuits are regarded as time-delay elements 5

locked Sequential ircuits Memory elements are flip-flops which are logic devices capable of storing one bit of information each. inputs ombinational ircuit outputs current state clock Flip-Flops next state 6

locked Sequential ircuits The outputs of a clocked sequential circuit can come from the combinational circuit, from the outputs of the flip-flops or both. The state of the flip-flops can change only during a clock pulse transition i.e. low-to-high and high-to-low clock edge When the clock is at logic-, the flip-flop output does not change The transition from one state to the other occurs at the clock edge. 7

Latches The most basic types of memory elements are not flip-flops, but latches. A latch is a memory device that can maintain a binary state indefinitely. Latches are, in fact, asynchronous devices and they usually do not require a clock to operate. Therefore, they are not directly used in clocked synchronous sequential circuits. They rather be used to construct flip-flops. 8

SR-Latch A circuit is made of cross-coupled NOR (or NAND) gates R S S R After S =, R = After S =, R = Undefined 9

Undefined State of SR-Latch S = R = may result in an undefined state the reason being is that the next state is unpredictable when both S and R goes to at the same time. It may oscillate Or the outcome state will depend on which of S and R goes to first. R it oscillates S

SR-Latches with NAND Gates S R Also known as S R -latch S R After S =, R = After S =, R = Undefined

SR-Latch with ontrol Input ontrol inputs allow the changes at S and R to change the state of the latch. S R S R X X No change No change = Reset state = Set state Indeterminate 2

D-Latch SR latches are seldom used in practice because the indeterminate state may cause instability Remedy: D-latches D S R This circuit guarantees that the inputs to the SR-latch is always complement of each other when =. 3

D-Latch D X Next state of No change = ; reset state = ; set state We say that the D input is sampled when = S S D R R SR-latch S R -latch D-latch 4

D-Latch as a Storage Unit D latches can be used as temporary storage The input of D-latch is transferred to the output when = When = the binary information is retained. We call latches level-sensitive devices. So long as remains at logic- level, any change in data input will change the state and the output of the latch. Level sensitive latches may suffer from a serious problem. A memory devices that are sensitive to the rising or falling edge of control input is called flipflops. 5

Need for Flip-Flops - Remember in a latch there is a feedback path from the output to the input of the circuit. When control input remains at logic- for a period of time The state transition occurs as soon as becomes The new state appears at the outputs of the latches This output is connected to the input Since the input changes again, the state of the latches may change again This may lead to a situation where the state of latches keeps changing so long as = This is why we need edge-sensitive devices. 6

Another problem Need for Flip-Flops - We want the states of the memory elements to change synchronously What we need is memory elements that should respond to the changes in input at certain points in time. This is the very characteristics of synchronous circuits. To this end, we use flip-flops that change states during a signal transition of control input (clock) 7

Edge-Triggered D Flip-Flop An edge-triggered D flip-flop can be constructed using two D latches D D D latch (master) Y D D latch (slave) clk clk clk Y = D Y does not change Negative edge-triggered D flip-flop clk = Y = D 8

Positive Edge-Triggered D Flip-Flop D clk D D latch (master) Y D D latch (slave) clk clk Y= D clk Y does not change = Y = D clk 9

Symbols for D Flip-Flops clk D D FF Positive edge-triggered D Flip-Flop clk D D FF Negative edge-triggered D Flip-Flop 2

Setup & Hold Times - Timing parameters are associated with the operation of flip-flops Recall gets the value of D in clock transition clk t s t h D t p, min t p, max 2

Setup & Hold Times - 2 Setup time, t s The change in the input D must be made before the clock transition. Input D must maintain this new value for a certain minimum amount time. If a change occurs at D less than t s second before the clock transition, then the output may not acquire this new value. It may even demonstrate unstable behavior. Hold time, t h, Similarly the value at D must be maintained for a minimum amount of time (i.e. t h ) after the clock transition. 22

Propagation Time Even if setup and hold times are achieved, it takes some time the circuit to propagate the input value to the output. This is because of the fact that flip-flops are made of logic gates that have certain propagation times. 23

Other Flip-Flops D flip-flop is the most common since it requires the fewest number of gates to construct. Two other widely used flip-flops JK flip-flops T flip-flops JK flip-flops Three FF operations. Set 2. Reset 3. omplement 24

JK Flip-Flops J K J K (t+) (t) next state no change Reset Set (t) omplement haracteristic Table haracteristic equation (t+) = J (t) + K (t) 25

T (Toggle) Flip-Flop omplementing flip-flop T T (t+) (t) next state no change (t) omplement haracteristic Table haracteristic equation (t+) = T (t) = T (t) + T (t) T J D K T 26

haracteristic Equations The logical properties of a flip-flop can be expressed algebraically using characteristic equations D flip-flop (t+) = D JK flip-flop (t+) = J (t) + K (t) T flip-flop (t+) = T (t) 27

Asynchronous Inputs of Flip-Flops They are used to force the flip-flop to a particular state independent of clock Preset (direct set) set FF state to lear (direct reset) set FF state to They are especially useful at startup. In digital circuits when the power is turned on, the state of flip-flops are unknown. Asynchronous inputs are used to bring all flip-flops to a known starting state prior to clock operation. 28

Asynchronous Inputs data D reset R R D X X Starting State 29

Analysis of locked Sequential ircuits Goal: to determine the behavior of clocked sequential circuits Behavior is determined from Inputs Outputs State of the flip-flops We have to obtain (state) table (state) diagram Boolean expression for next state and output They must include time sequence information 3

State Equations Also known as transition equations specify the next state as a function of the present state and inputs Example x A(t+) D A A B(t+) D B clk B y 3

Example: Output and State Equations Flip-Flop input (excitation) equations Same as state equations in D flip-flops A(t+) = x A(t) + x B(t) = xa + xb B(t+) = x A (t) = xa Output equation y(t) = [A(t) + B(t)] x = (A + B) x 32

33 Example: State (Transition) Table y B A x B A output Next state input Present state A sequential circuit with m FFs and n inputs needs 2 m+n rows in the transition table A(t+) = xa + xb B(t+) = xa y = (A + B) x

Example: State Diagram / / / / / / / / State diagram provides the same information as state table 34

Analysis with D Flip-Flops - x y clock D A reset z Flip-Flop input equation D A = xy + xa + ya (t+) = D A Output equation z = x y A 35

36 Analysis with D Flip-Flops - 2 output next state Inputs Present state z A y x A State Table

Analysis with D Flip-Flops - 3 /, /, / / / /, /, / It is a serial adder. 37

Analysis with JK Flip-Flops For a D flip-flop, the state equation is the same as the flip-flop input equation (t+) = D For JK flip-flops, situation is different Goal is to find state equations Method. determine flip-flop input equations 2. List the binary values of each input equation 3. Use the corresponding flip-flop characteristic table to determine the next state values in the state table 38

Example: Analysis with JK FFs J A J A x K A K clk J B JD K B K B Flip-flop input equations J A = B and K A = x B J B = x and K B = x A 39

4 Example: Analysis with JK FFs J A = B and K A = x B J B = x and K B = x A K B J B K A J A B A x B A FF inputs next state input present State (t+) = J (t) + K (t)

Example: Analysis with JK FFs haracteristic equations A(t+) = J A A + K A A B(t+) = J B B + K B B Input equations J A = B and K A = x B J B = x and K B = x A State equations A(t+) = BA + (x B) A = BA + (x + B )A = BA + AB + Ax B(t+) = x B + (x A) B = x B + xab + x A B 4

State Diagram 42