Chapter. Sequential Circuits

Similar documents
Combinational vs Sequential

Sequential Circuits: Latches & Flip-Flops

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

ECE 263 Digital Systems, Fall 2015

CS 261 Fall Mike Lam, Professor. Sequential Circuits

Lecture 7: Sequential Networks

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

Chapter. Synchronous Sequential Circuits

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

CHAPTER1: Digital Logic Circuits

MC9211 Computer Organization

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

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

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

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

DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY CS6201-DIGITAL PRINCIPLE AND SYSTEM DESIGN. I Year/ II Sem PART-A TWO MARKS UNIT-I

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.

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

Sequential Logic Basics

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 7 Memory and Programmable Logic

Sequential Logic Circuits

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

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

Logic Design. Flip Flops, Registers and Counters

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Chapter 4. Logic Design

S.K.P. Engineering College, Tiruvannamalai UNIT I

Experiment 8 Introduction to Latches and Flip-Flops and registers

DIGITAL ELECTRONICS MCQs

Flip-Flops and Sequential Circuit Design

Digital Logic Design I

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

Chapter 5: Synchronous Sequential Logic

CHAPTER 11 LATCHES AND FLIP-FLOPS

Synchronous Sequential Logic

CHAPTER 4: Logic Circuits

LAB #4 SEQUENTIAL LOGIC CIRCUIT

Registers and Counters

Chapter 11 Latches and Flip-Flops

Synchronous Sequential Logic

Introduction to Sequential Circuits

CPS311 Lecture: Sequential Circuits

VU Mobile Powered by S NO Group

CHAPTER 4: Logic Circuits

Counters

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

ELCT201: DIGITAL LOGIC DESIGN

Quiz #4 Thursday, April 25, 2002, 5:30-6:45 PM

Department of Electrical and Computer Engineering Mid-Term Examination Winter 2012

EET2411 DIGITAL ELECTRONICS

Registers and Counters


Department of Computer Science and Engineering Question Bank- Even Semester:

CS6201 UNIT I PART-A. Develop or build the following Boolean function with NAND gate F(x,y,z)=(1,2,3,5,7).

LATCHES & FLIP-FLOP. Chapter 7

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

L14: Quiz Information and Final Project Kickoff. L14: Spring 2004 Introductory Digital Systems Laboratory

Unit 11. Latches and Flip-Flops

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

Switching Circuits & Logic Design

IT T35 Digital system desigm y - ii /s - iii

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

CH 11 Latches and Flip-Flops

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

Digital Logic Design ENEE x. Lecture 19

Synchronous Sequential Logic. Chapter 5

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

EE292: Fundamentals of ECE

ECE 341. Lecture # 2

Read-only memory (ROM) Digital logic: ALUs Sequential logic circuits. Don't cares. Bus

Rangkaian Sekuensial. Flip-flop

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Memory, Latches, & Registers

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

Chapter 5 Synchronous Sequential Logic

Other Flip-Flops. Lecture 27 1

Hardware Design I Chap. 5 Memory elements

Flip-Flops and Registers

Microprocessor Design

WINTER 14 EXAMINATION

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

Handout 16. by Dr Sheikh Sharif Iqbal. Memory Interface Circuits 80x86 processors

VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall,

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

10.1 Sequential logic circuits are a type of logic circuit where the output of the circuit depends not only on

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

UNIT IV. Sequential circuit

Vignana Bharathi Institute of Technology UNIT 4 DLD

Module -5 Sequential Logic Design

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

First Name Last Name November 10, 2009 CS-343 Exam 2

ELCT201: DIGITAL LOGIC DESIGN

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

B. Sc. III Semester (Electronics) - ( ) Digital Electronics-II) BE-301 MODEL ANSWER (AS-2791)

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

I B.SC (INFORMATION TECHNOLOGY) [ ] Semester II CORE : DIGITAL COMPUTER FUNDAMENTALS - 212B Multiple Choice Questions.

Transcription:

Chapter Sequential Circuits

Circuits Combinational circuit The output depends only on the input Sequential circuit Has a state The output depends not only on the input but also on the state the circuit is in

Sequential circuit Constructed from standard gates, but with one or more feedback connections An unstable state is one that will change a few gate delays later because of the feedback connection A stable state is one that will persist indefinitely until the input changes

Figure. a b c d ( a) An unstable circuit. a b c ( b) A stable circuit.

SR Latch The SR latch has two stable states When SR =, output can be or depending on the state of the latch S = sets ouput to R = resets output to

Figure.2 R S

Figure.3 Time S R Stability Initial T g 2T g Stable Unstable Unstable Stable

Figure.4 Time S R Stability Initial Stable Stable

Figure.5 S R a b c d e

System clock Controls the state transitions of all the sequential circuits to happen at the same time Sequence of regularly spaced pulses with period T

Figure.6 T Ck

Clocked SR flip-flop Two AND gates that act as an enable Only when Ck is high can the S and R inputs affect the state of the flip-flop The effect is to digitize the time axis

Figure.7 R S Ck S R Ck ( a ) Block diagram. ( b) Implementation.

Figure.8 S R Ck a b c d e

The feedback problem Flip-flops are often used in circuits with feedback connections (in addition to the internal feetback in the latch) Therefore, unstable states are possible There are two design solutions to the feedback problem Edge-triggered flip-flops Master-slave flip-flops

Figure.9 Input Combinational circuit S Ck R Output

Master-slave SR flip-flop Solves the instability problem caused by possible external feedback Input goes to the master latch first, and then from the master to the slave, in four steps The threshold of a gate is the value of the input signal that causes the output to change Engineers can make gates with thresholds a little above or a little below the average value between and

S Ck R Figure. (a) Block diagram. Master Slave S Threshold V2 2 R2 R Threshold V2 2 S2 Ck Threshold V (b) Implementation.

Timing detail of a single Ck pulse t : Isolate slave from master t 2: Connect master to input t 3: Isolate master from input t 4: Connect slave to master

Figure. Clock signal V2 V t t 2 t 3 t 4 Time

Effect on timing The output changes on the falling edge of the Ck pulse and depends on the external SR input at that time

Figure.2 S R Ck

Characteristic table A truth table is not adequate to describe a flip-flop, because its output depends on more than its input Given the inputs at time t and the state at time t, the characteristic table shows the state at time t +, that is, after one clock pulse

Figure.3 S(t) R(t) (t) ( t + ) Condition No change Reset Set Not defined

Figure.4

Four common flip-flops SR JK D T Set/reset Set/reset/toggle Data or delay Toggle

Excitation table The excitation table is a design tool for constructing circuits from a given type of flip-flop Given the desired transition from (t) to (t +), what inputs are necessary to make the transition happen?

Figure.5 (t) (t + ) S(t) R(t)

JK flip-flop Resolves the undefined transition in the SR flip-flop When JK =, output can be or depending on the state of the latch J = sets ouput to (like S) K = resets output to (like R) JK = toggles from one state to the other

Figure.6 J(t) K(t) (t) (t + ) Condition No change J Ck Reset K Set Toggle (a) Block diagram. (b) Characteristic table.

JK flip-flop design Must design a three-input two-output combinational circuit Inputs J(t), K(t), (t) Outputs S(t), R(t)

Figure.9 Input Combinational circuit S Ck R Output

Design table Step : Given (t), J(t), and K(t), list the desired state after the transition (t + ) Step 2: Given (t) and (t + ), use the excitation table to list the required input for S(t) and R(t) Step 3: Use Karnaugh maps to design minimized two-level combinational circuits for S(t) and R(t)

S(t) R(t) (t + ) J(t) K(t) (t) Figure.7

Figure.8 JK JK (a) Karnaugh map for S. (b) Karnaugh map for R.

Figure.9 J K S Ck R Ck

D flip-flop The delay or data flip-flop Only one input, D Regardless of the current state (t), the state after the clock pulse (t + ) will be the same as D(t)

Figure.2 D(t) (t) (t + ) Condition D Delay Ck Delay (a) Block diagram. (b) Characteristic table. D Ck (c) A timing diagram.

Figure.2 (t) D(t) (t + ) S(t) R(t) (a) Design table. D D (b) Karnaugh map for S. (c) Karnaugh map for R.

Figure.22 D S Ck R Ck

T flip-flop The toggle flip-flop Only one input, T If T =, the state remains unchanged If T =, the state toggles from to or from to

Figure.23 T Ck (a) Block diagram. T(t) (t) (t + ) Condition No change Toggle (b) Characteristic table.

Flip-flop design Any given flip-flop can be constructed from any other flip-flop with the right combinational circuit Use the excitation table for the flip-flop from which you are constructing the given flip-flop

Figure.24 (t) (t + ) J(t) K(t) (t) (t + ) D(t) (a) The JK flip-flop. (b) The D flip-flop. (t) (t + ) T(t) (c) The T flip-flop.

General sequential circuits A general sequential circuit is an interconnection of gates and flip-flops The flip-flops are called state registers The current state and current input determine the current output The current state and current input determine the next state, that is, the state after one Ck clock pulse

Figure.25 Input Combinational circuit State registers Output Feedback

Figure.26 Input Sequential circuit? ( a) Analysis The input and sequential circuit are given. The output is to be determined. Input? Output ( b) Design The input and desired output are given. The sequential circuit is to be determined.

Sequential analysis Step : List all possible combinations of current state and current input in an analysis table Step 2: For each combination, compute the output and the current inputs to the state registers Step 3: From the characteristic table, determine the next state and construct the state transition table and diagram

Figure.27 X TA T FFA A Ck X2 TB T FFB B Ck B Y Ck

TA(t) TB(t) Y(t) A(t + ) B(t + ) X(t) X2(t) A(t) B(t) Figure.28

Figure.29 A(t) B(t) X(t) X2(t),,,,,,,,,,,,,,,, A(t + ) B(t + ), Y(t)

Figure.3 / / / / / / / / / / / / /, /, /, /

Asynchronous inputs An asynchronous input changes the state of a flip-flop immediately without regard to Ck Preset sets to Clear clears to Used to initialize the state of a machine

Figure.3 Preset S Ck R Clear

Sequential design Given the state transition diagram, the output, and the type of flip-flop to be used, design the combinational circuit Any unused input combinations or unused states are don t care conditions 2n states are possible with n flip-flops

Design steps Step : In a design table, list the initial state, input, and output, and from the transition diagram list the next state Step 2: Use the excitation table for the given type of flip-flop to determine the input required for the state registers Step 3: Use Karnaugh maps to design a minimized two-level circuit for each flip-flop input

Figure.32 / / / / / / / / / / / /

FFA Flip-flop input conditions FFB RB(t) SB(t) RA(t) SA(t) Next state Initial output Y(t) B(t + ) Initial Initial state input A(t) B(t) X2(t) X(t) A(t + ) Figure.33

Figure.34 X X2 X AB A B (a) SA = A X X2 (b) RA = A B X2 + A B X X2 X X X A B A B A B X2 X2 X2 (c) SB = B X (d) RB = B X + A X2 (e) Y = A X2 + A X X2

Figure.35 A B X2 A B X X2 B X A A X B X SA RA SB RB FFA S Ck R FFB S Ck R A A B B A X2 A X X2 Y X2 Ck

Register An example is the 6-bit accumulator in the Pep/8 CPU Constructed as an array of D flip-flops with a Load line that connects to each Ck input Data is clocked into the register in parallel

Figure.36 DataIn Load ( a) DataOut Block diagram. DataIn D D D D Ck Ck Ck Ck Load ( b) DataOut Implementation with D flip-flops.

Bus A bus is a group of wires connecting two subsystems With a unidirectional bus, data can flow in only one direction With a bidirectional bus, data can flow in both directions

Bidirectional bus Requires only half the number of wires between subsystems Problem: You can connect the inputs of two gates, but you cannot connect the outputs of two gates Solution: The tri-state buffer

Figure.37 Subsystem A Subsystem B 2 3 4 Bus

Figure.38 E a x Disconnected Disconnected

Figure.39 Subsystem A Subsystem B 2 3 4 E E Bus

Memory subsystems CS: Chip select, to enable or select the memory chip WE: Write enable, to write or store a memory word to the chip OE: Output enable, to enable the output buffer to read a word from the chip

Figure.4 A A A2 A3 A4 A5 D D D2 D3 D4 D5 D6 D7 A A A2 A3 A4 A5 A6 A7 A8 D CS WE OE CS WE OE (a) 64 8 bit memory chip. (a) 52 bit memory chip.

Memory access To store a word (memory write) Select chip by setting CS to Put data and address on the bus and set WE to To retrieve a word (memory read) Select chip by setting CS to Put address on the bus, set OE to, and read the data on the bus

D Ck D Ck Figure.4 Word D D Ck Ck A Word 2 4 decoder D D Ck Ck A Word 2 D D Ck Ck Word 3 WE MMV CS OE Read enable D Read enable D

Figure.4 (Expanded) D D Ck Ck Word 3 WE MMV CS OE Read enable D Read enable D

Figure.42 DW DR CS OE D

Figure.43 CS OE Operation Disconnected Disconnected Connect DR to D

Figure.44 Input Output Delay One shot

Memory types SRAM: Static random access memory DRAM: Dynamic RAM ROM: Read-only memory PROM: Programmable ROM EPROM: Erasable PROM EEPROM: Electrically erasable PROM Flash memory: A type of EEPROM

Constructing memory subsystems Two design problems How to combine several n m chips to make an n k module where k is greater than m How to combine several n m chips to make an l m module where l is greater than n the address decoding problem

Figure.45(a) A A D D D2 D3 D4 D5 D6 D7 CS WE OE (a) Block diagram.

Figure.45(b) A A A D A D A D A D A D A D A D A D CS WE OE D7 D6 D5 D4 D3 D2 D D (b) Implementation.

Address decoding An example with 8 address lines and four chips in an address space of 256 bytes 64-byte RAM at address 32-byte RAM at address 64 8-port I/O chip at address 28 32-byte ROM at address 224

Figure.46 32 64 96 28 6 92 224 256 RAM RAM ROM 8-port I/O chip

Figure.47 Device 64 8 RAM 32 8 RAM 8-port I/O 32 8 ROM Minimum address Maximum address General address xx xxxx x xxxx xxx x xxxx

Figure.48 A A A2 A3 A4 A5 A6 A7 CS A CS A CS A CS A A A A A A2 A2 A2 A2 A3 A3 A3 A4 A4 A4 A5 64 8 bit RAM 32 8 bit RAM 8-port I/O 32 8 bit ROM

Partial address decoding xx xxxx, 64 8 bit RAM x xxxx, 32 8 bit RAM xxx, 8-port I/O chip x xxxx, 32 8 bit ROM

Figure.49 A A A2 A3 A4 A5 A6 A7 CS A CS A CS A CS A A A A A A2 A2 A2 A2 A3 A3 A3 A4 A4 A4 A5 64 8 bit RAM 32 8 bit RAM 8-port I/O 32 8 bit ROM

Figure.5 32 64 96 28 6 92 224 256 RAM ROM RAM 8-port I/O chip

Two-port register bank Implementation of the registers (accumulator, index register, etc.) in the Pep/8 CPU The data buses are unidirectional instead of bidirectional There are two output ports instead of one

LoadCk C 5 B 5 A 5 A 2 X 3 4 SP 5 6 PC 7 8 IR 9 T 2 T2 3 4 T3 5 6 T4 7 8 T5 9 2 T6 2 22 x x x2 x3 x4 x8 xfa xfc xfe xff M 23 24 M2 25 26 M3 27 28 M4 29 3 M5 3 CPU registers CBus ABus BBus Figure.5

Figure.52 C LoadCk 5 5 A 5 32 decoder 3 8 32-input multiplexers ABus 5 B 8 32-input multiplexers BBus CBus

Figure.53

Figure.54

Figure.55