Chapter 5 Sequential Logic Circuits Part II Hiroaki Kobayashi 7/11/2011

Similar documents
Chapter 5 Sequential Logic Circuits Part II Hiroaki Kobayashi 6/30/2008

UNIT II: Clocked Synchronous Sequential Circuits. CpE 411 Advanced Logic Circuits Design 1

Computer Architecture: Part II. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Module -18 Flip flops

Chapter 4: FLIP FLOPS. (Sequential Circuits) By: Siti Sabariah Hj. Salihin ELECTRICAL ENGINEERING DEPARTMENT EE 202 : DIGITAL ELECTRONICS 1


Digital Logic Circuits

DIGITAL ELECTRONICS QUESTION BANK

Brought to you by. Priti Srinivas Sajja. PS01CMCA02 Course Content. Tutorial Practice Material. Acknowldgement References. Website pritisajja.

COMPUTER ORGANIZATION & ARCHITECTURE DIGITAL LOGIC CSCD211- DEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF GHANA

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING SEMESTER TWO EXAMINATION 2017/2018

logic system Outputs The addition of feedback means that the state of the circuit may change with time; it is sequential. logic system Outputs

Lecture 02: Digital Logic Review

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) SUMMER-16 EXAMINATION Model Answer

Winter 14 EXAMINATION Subject Code: Model Answer P a g e 1/28

Number system: the system used to count discrete units is called number. Decimal system: the number system that contains 10 distinguished

Fan in: The number of inputs of a logic gate can handle.

Java Bread Board Introductory Digital Electronics Exercise 2, Page 1

Digital Electronics Course Objectives

HAZARDS AND PULSE MODE SEQUENTIAL CIRCUITS

Written exam IE1204/5 Digital Design Friday 13/

EECS-140/141 Introduction to Digital Logic Design Lecture 7:Sequential Logic Basics

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Objective Questions. (a) Light (b) Temperature (c) Sound (d) all of these

CMOS Digital Integrated Circuits Lec 11 Sequential CMOS Logic Circuits

EECS 150 Homework 4 Solutions Fall 2008

Electronics. Digital Electronics

PWM System. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

First Name: Last Name: Lab Cover Page. Teaching Assistant to whom you are submitting

Page 1. Last time we looked at: latches. flip-flop

Electronic Instrumentation

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

LOGIC DIAGRAM: HALF ADDER TRUTH TABLE: A B CARRY SUM. 2012/ODD/III/ECE/DE/LM Page No. 1

Practical Workbook Logic Design & Switching Theory

Controller Implementation--Part I. Cascading Edge-triggered Flip-Flops

Adder Comparator 7 segment display Decoder for 7 segment display D flip flop Analysis of sequential circuits. Sequence detector

Project Board Game Counter: Digital

Digital Electronic Concepts

EC O4 403 DIGITAL ELECTRONICS

IES Digital Mock Test

CMOS Digital Integrated Circuits Analysis and Design

Exercises: Fundamentals of Computer Engineering 1 PAGE: 1

ENGG1015: lab 3. Sequential Logic

Serial Addition. Lecture 29 1

Digital Circuits Laboratory LAB no. 12. REGISTERS

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-378:

Computer Architecture and Organization:

Module-20 Shift Registers

EXPERIMENT #5 COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

SRV ENGINEERING COLLEGE SEMBODAI RUKMANI VARATHARAJAN ENGINEERING COLLEGE SEMBODAI

Spec. Instructor: Center

LIST OF EXPERIMENTS. KCTCET/ /Odd/3rd/ETE/CSE/LM

Classification of Digital Circuits

DIGITAL ELECTRONICS: LOGIC AND CLOCKS

CHAPTER 5 DESIGNS AND ANALYSIS OF SINGLE ELECTRON TECHNOLOGY BASED MEMORY UNITS

DIGITAL LOGIC COMPUTER SCIENCE

ENGIN 112 Intro to Electrical and Computer Engineering

Linear & Digital IC Applications (BRIDGE COURSE)

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700:

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700:

ECE 2300 Digital Logic & Computer Organization

Department of Electronics and Communication Engineering

Lecture 20: Several Commercial Counters & Shift Register

B.E. SEMESTER III (ELECTRICAL) SUBJECT CODE: X30902 Subject Name: Analog & Digital Electronics

Learning Outcomes. Spiral 2 3. DeMorgan Equivalents NEGATIVE (ACTIVE LO) LOGIC. Negative Logic One hot State Assignment System Design Examples

GATE Online Free Material

COURSE LEARNING OUTCOMES AND OBJECTIVES

EE 42/100 Lecture 24: Latches and Flip Flops. Rev A 4/14/2010 (8:30 PM) Prof. Ali M. Niknejad

HW D2: Sequential Logic, Counters, Debounce

6.111 Lecture # 19. Controlling Position. Some General Features of Servos: Servomechanisms are of this form:

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700:

COLLEGE OF ENGINEERING, NASIK

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

Sequential Logic Circuits

ELECTRONICS ADVANCED SUPPLEMENTARY LEVEL

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 5

Types of Control. Programmed Non-programmed. Program Counter Hardwired

E-Tec Module Part No

DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

Lecture 3: Logic circuit. Combinational circuit and sequential circuit

Sequential Logic Circuits

! Sequential Logic. ! Timing Hazards. ! Dynamic Logic. ! Add state elements (registers, latches) ! Compute. " From state elements

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

Digital Electronics. A. I can list five basic safety rules for electronics. B. I can properly display large and small numbers in proper notation,

Positive and Negative Logic

Design of low-power, high performance flip-flops

Chapter 3 Digital Logic Structures

CHAPTER 16 SEQUENTIAL CIRCUIT DESIGN. Click the mouse to move to the next page. Use the ESC key to exit this chapter.

UNIVERSITI MALAYSIA PERLIS

1 Q' 3. You are given a sequential circuit that has the following circuit to compute the next state:

! Is it feasible? ! How do we decompose the problem? ! Vdd. ! Topology. " Gate choice, logical optimization. " Fanin, fanout, Serial vs.

3.1 There are three basic logic functions from which all circuits can be designed: NOT (invert), OR, and

DIGITAL DESIGN WITH SM CHARTS

CS302 - Digital Logic Design Glossary By

Chapter 10 Adaptive Delta Demodulator

Course Outline Cover Page

High Speed Binary Counters Based on Wallace Tree Multiplier in VHDL

64/256/512/1K/2K/4K/8K x 9 Synchronous FIFOs

Solutions. ICS 151 Final. Q1 Q2 Q3 Q4 Total Credit Score. Instructions: Student ID. (Last Name) (First Name) Signature

ICS 151 Final. (Last Name) (First Name)

Transcription:

Chapter 5 Sequential Logic Circuits Part II Hiroaki Kobayashi 7//2 Ver. 72 7//2 Computer Engineering What is a Sequential Circuit? A circuit consists of a combinational logic circuit and internal memory to store its current state, and outputs depend on the current inputs as well as internal state The next state is also generate based on the current inputs and state, and stored in the internal memory. State transition of the current state to the next state is triggered when inputs are changed Combinational Logic circuit Internal Memory 7//2 Computer Engineering 2 Sequential Logic Circuit

Basic Element for Sequential Circuits SR Latch Latch Store one-bit information (two states of and ) Two inputs, R and R and Two outputs and (state) Basic functions of SR-latch S Set SR-latch S R Reset SR-latch S R Hold the current value of SR-latch memory S=R=, take unstable values! Prohibited inputs Circuit of SR-latch Timing chart to describe time-variant behavior of SR-latch 7//2 Computer Engineering 3 Asynchronous or Synchronous Asynchronous Circuits Takes an action when inputs changed States of sequential circuits changed soon after inputs provided No implicit control for circuits unexpected behaviors responding to transit input signals Synchronous Circuits Inputs are accepted when control clock asserted (rising or failing edge of clock) Easy to control circuits Clock should appropriately be adjusted to guarantee the correct behavior of circuits Timing design is very important for synchronous circuits clock Timing of PL Timing of NL Positive logic Negative logic (PL) (NL) Clocking of synchronous circuits Waveform of clock with period T and its activation timing 7//2 Computer Engineering 4

Hazard: Malfunction of Asynchronous Circuit Due to Signal Racing Example What happen on a circuit of Fig.(a) when inputs (X,Y) changed from (,) to (,)? Ideal (expected) But may go into the unstable state If the change of Y is a little bit delayed compared with that of X due to some signal transmission delay from preceding circuits, and the delay of XOR is a bit larger than that of AND (S,R) temporally become (,)(See Fig. c ) Hazard 7//2 S R AND Output (,) unchanged because inputs of the latch (S,R) changed from (,) to (,) (See Fig. (b)) XOR X Y (a) X X Y Y S S R R Unstable Unstable (b)ideally Prohibited inputs provided due to signal transmission delay (c)but actually Computer Engineering 5 Flip Flop: Building Element for Synchronous Circuits Flip Flop XOR Memory element controlled at the low-high clock transition or high-low clock transition. (Clock) Synchronized circuit X Y R AND Valid Valid S R FF activated at Ti Y 7//2 CLK X Edge-triggered FF S Invalid FF activatedat Ti+ Data held CLK Computer Engineering 6 Sampling points at Ti and Ti+

Inputs, States and Outputs of SR-Flip Flop FF holds one of two states State Memorize =) State Memorize =) Inputs S,R, and (current state) " is the current state before sampling at clock edge, Output " is the next state after sampling at clock edge. (a) Block diagram # Sampling: check inputs and states to take an action Clock t Clock t+ State Transition 7//2 Computer Engineering 7 Behavior of SR-Flip Flop(SR-FF) Edge-triggered SR-FF samples the inputs on the low-to-high (or highto-low) clock transition, and when S R Output (= )becomes Set FF to. S R Output (= ) becomes Reset FF to. S R Hold the current state (memory) = S R Unstable output inhibited! Inhibited inputs (b) State transition (c ) State Transition table(truth Table) diagram 7//2 Computer Engineering 8

Behavior of SR-FF (Cont d) Characteristic Equation of SR-FF to describe the next state in terms of the inputs and current state.! SR= Prohibited inputs (not allowed)! = SR+R =(S+)R = (S+)+R Hold Reset Set Hold By using SR=! =SR+SR+R=S(R+R)+R =S+R Reset Set Karnaugh Map 7//2 Computer Engineering 9 JK-FF JK-FF is designed to avoid the prohibited inputs for SR-FF (now called J and K, instead of S and R), and add some circuit to complement the current state (negation of the current state) if two inputs are. $ Functions of JK-FF J K= = J K= = J K= = J K= = (a) Block diagram (b) State Transition Table (Truth Table) 7//2 Computer Engineering

JK-FF Cont d) Behavior of JK-FF J 0 K= J 1 K= J 0 K=1 J 1 K=1 = =1 =0 = (a) Karnaugh Diagram Characteristic Equation of JK-FF J K (b) State Transition Diagram J CK JK-FF is a popular device as memory element for sequential circuits. 7//2 K Computer Engineering Implementation of Edge-Triggered JK-FF 7//2 Computer Engineering 2

D-FF: another FF D FF(Data Flip-Flop, or Delay Flip-Flop) Store an input as the internal state. Output the input at the next clock edge Characteristic Equation D Block diagram Truth Table Karnaungh Map State Transition Diagram 7//2 Computer Engineering 3 One More: T-FF(Toggle Flip-Flop) The toggle FF has a single input that causes the stored state to be complemented when the input is asserted Input T Output Input T (asserted) Output Characteristic equation T+T Block Diagram Truth Table State Transition Diagram 7//2 Computer Engineering 4

Relationship among SR-FF, JK-FF, T-FF, and D-FF Characteristic equations of RS, JK, T and D FFs. RS-FF =S+R, SR= JK-FF =J+K T-FF =T+T D-FF =D Excitation Table to describe required inputs of RS, JK, T and D FFs to make a transition from to. RS,JK,T,D?? X means an arbitrary value 7//2 Computer Engineering 5 Conversion of One Flop-Flop Type to Another: D-FF Implementation by Using JK-FF Excitation Table Karnaugh Map of a circuit to generate J and K inputs Design a combinational circuit to generate appropriate J and K inputs by and D D-FF D FF by using JK FF 7//2 Computer Engineering 6

T-FF Implementation by Using JK-FF Exciting Table T X X T X X J=T K=T Design a combinational circuit to generate appropriate J and K inputs by and T CLK Circuit 7//2 Computer Engineering 7 JK-FF Implementation by Using D-FF Excitation Table Design a combinational circuit to generate an appropriate D input by, J and K Circuit?? 7//2 Computer Engineering 8

Procedure for Sequential Circuit Design I. Define sets of inputs, outputs, and internal states based on the specification of a desired sequential circuit to be implemented II. Allocate binary numbers to each of inputs, outputs, and states III. Design state transition diagram and/or state transition table (truth table) to clarify the behavior of the circuit based on its specification IV. Decide FF type to be used for the circuit (JK, D, or T) V. Design a combinational circuit to generate appropriate inputs of FFs by using the state transition table and the truth table VI. Implement a sequential circuit by combining the FFs and the designed combinational circuit. Combinational Logic circuit FF FF General configuration of Sequential Logic Circuit 7//2 Computer Engineering 9 Example of Sequential Circuits Counter Count the number of s provided to the input Octal counter (3-bit),,,,,,,,,... $8 internal states input Z 3-bit for 8 internal states need 3 FFs A, B, C: current states of 3 FFs A, B,C : next state of 3 FFs Z: carry signal generated when counting-up from 8 to State transition table (Truth table) State transition diagram 7//2 Computer Engineering 2

Behavior of Octal Counter Waveform (timing chart) of octal counter Describe the behavior in terms of inputs, current state and the next state (outputs) across time Input (Clock signal 7//2 Computer Engineering 2 Design a Circuit of Octal Counter Using D-FFs Use D-FFs to store internal states of the counter! Need a combinational circuit to generate an appropriate inputs for D- FFs Combinational Circuit Block Diagram of an Octal (3-bit) Counter 7//2 Computer Engineering 22

Design a Circuit of Octal Counter Using D-FFs(Cont d) Characteristic Eq. of D-FF =D $ Prepare for D inputs Current state Next state Required inputs for Inputs Outputs Karnaugh Map State Transition Table (truth table) of D-FFs of the counter 7//2 Computer Engineering 23 Design a Circuit of Octal Counter Using D-FFs Cont d) 7//2 Computer Engineering 24

Final Design of a 3-bit (Octal) Counter Combinational Logic Circuit 7//2 Computer Engineering 25 If You Want to Use JK-FFs instead of D-FFs In JK-FFs, only J(= ) decides the output when =, or only K(= ) decides the output when =, so A B C A B C J A J B J C K A K B K C * * * * * * * * * * * * * * * * * * * * * * * * :Don t care 7//2 Computer Engineering 26

If You Want to Use JK-FFs instead of D-FFs In JK-FFs, only J(= ) decides the output when =, or only K(= ) decides the output when =, so A B C A B C J A J B J C K A K B K C * * * * * * * * * * * * * * * * * * * * * * * * :Don t care 7//2 Computer Engineering 27 If You Want to Use JK-FFs instead of D-FFs Design a combinational circuit to generate the outputs for JK-inputs A B C A B C * * * * = B C = B C J A K A * * * * J A K A A A Z * * * * J B B = C = C J B K B * * * * * * * * J C = K C = * * * * CLK K B J C K C B C C 7//2 Computer Engineering 28

Pattern Detector Ex. Detect a specific bit-pattern from - sequence (given -bit by bit) $ Generate signal when pattern detected. Step : Design a state transition diagram for a -pattern detector Input X Output signal of detected or not. There are four states: *(initial): State : State : State : 2 FFs needed. 7//2 Computer Engineering 29 Design of a -pattern Detector using D-FFs Step 2: Design a state transition table (truth table) and derive a logical equation for inputs of FFs of a -pattern detector When using two D-FFs, and input X ( or ) defined, design a combination circuit. Karnaugh Map State transition table (truth table) Logical Equations for inputs of D-FFs 7//2 Computer Engineering 3

A Circuit of a Bit-Pattern- Detector 7//2 Computer Engineering 3 Exercise % uestion! To design a vending machine for a 2-yen candy, draw a state transition diagram, and then design its sequential circuit. & Accept only -yen and 5-yen coins, & and output a 2-yen candy and change ' If other coins are used,. generate an error signal 2. return the deposit at that machine has, and 3. go back to the initial condition. 7//2 Computer Engineering 32

Register: On-Chip Memory using D-FFs Register On-chip temporal storage for data processing Fast data access achieved compared to data access to/from off-chip memory! Arithmetic Units use data on Registers instead of directly using data on off-chip memory Functions of Register: Block diagram of 4-bit register 4-bit register implementation using D-FFs When LD=, data loaded into registers When LD=, hold the data When CLR=, D- 7//2 Computer Engineering FF are reset to 33 Computer System Architecture: General Model Processor Memory 7//2 Computer Engineering 34

Sift Register Register with a functionality of data shifting Block diagram Implementation using D-FFs 4-bit shift register 7//2 Computer Engineering 35