CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

Similar documents
CS221: Digital Design. Indian Institute of Technology Guwahati

6 Synchronous State Machine Design

ECE 341. Lecture # 3

Different encodings generate different circuits

CHW 261: Logic Design

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

ELCT201: DIGITAL LOGIC DESIGN

Synchronous Sequential Circuit Design. Digital Computer Design

I. Motivation & Examples

Digital Circuits ECS 371

Counters. We ll look at different kinds of counters and discuss how to build them

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

Synchronous Sequential Logic

Chapter 5 Synchronous Sequential Logic

COE 202: Digital Logic Design Sequential Circuits Part 3. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

ECE/Comp Sci 352 Digital Systems Fundamentals. Charles R. Kime Section 2 Fall Logic and Computer Design Fundamentals

Synchronous Sequential Logic. Chapter 5

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Roger L. Tokheim. Chapter 8 Counters Glencoe/McGraw-Hill

COE 202: Digital Logic Design Sequential Circuits Part 3. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters

Sequential Logic Worksheet

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

Finite State Machine. By : Ali Mustafa

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop

Digital Logic Design - Chapter 4

CSE 140: Components and Design Techniques for Digital Systems. Lecture 9: Sequential Networks: Implementation

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters)

CPE100: Digital Logic Design I

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

COE 202: Digital Logic Design Sequential Circuits Part 4. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Digital Fundamentals

Week-5. Sequential Circuit Design. Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Sequential vs. Combinational

Chapter 7 Sequential Logic

Digital Logic Design - Chapter 5

Digital Fundamentals

Sequential Logic Design: Controllers

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

EEE2135 Digital Logic Design

Lecture 10: Synchronous Sequential Circuits Design

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Sample Test Paper - I

ELE2120 Digital Circuits and Systems. Tutorial Note 9

EECS150 - Digital Design Lecture 23 - FSMs & Counters

EECS150 - Digital Design Lecture 16 Counters. Announcements

ALU, Latches and Flip-Flops

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary

CprE 281: Digital Logic

Simplify the following Boolean expressions and minimize the number of literals:

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF

Synchronous Sequential Logic Part I

Menu. Excitation Tables (Bonus Slide) EEL3701 EEL3701. Registers, RALU, Asynch, Synch

Finite State Machine (FSM)

Synchronous Sequential Logic Part I. BME208 Logic Circuits Yalçın İŞLER

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

Gates and Flip-Flops

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

CPE100: Digital Logic Design I

Synchronous Sequential Circuit Design

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

EECS150 - Digital Design Lecture 25 Shifters and Counters. Recap

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Stop Watch (System Controller Approach)

Sequential Circuits Sequential circuits combinational circuits state gate delay

Lecture 7: Logic design. Combinational logic circuits

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

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

Sequential logic and design

ELE2120 Digital Circuits and Systems. Tutorial Note 10

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec 09 Counters Outline.

Preparation of Examination Questions and Exercises: Solutions

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

Fundamentals of Computer Systems

Sequential Circuit Design

Lecture 9: Digital Electronics

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec09 Counters Outline.

Digital Electronics Circuits 2017

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

Digital Electronics Final Examination. Part A

Timing Constraints in Sequential Designs. 63 Sources: TSR, Katz, Boriello & Vahid

FSM Optimization. Counter Logic Diagram Q1 Q2 Q3. Counter Implementation using RS FF 10/13/2015

PGT104 Digital Electronics. PGT104 Digital Electronics

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

Digital Electronic Meters

Sequential Synchronous Circuit Analysis

Chapter 14 Sequential logic, Latches and Flip-Flops

Clocked Synchronous State-machine Analysis

CSE140: Design of Sequential Logic

MOSIS REPORT. Spring MOSIS Report 1. MOSIS Report 2. MOSIS Report 3

Transcription:

CS221: Digital Design Counter&Registers Dr. A. Sahu DeptofComp.Sc.&Engg. Indian Institute of Technology Guwahati

Outline Counter : Synchronous Vs Asynchronous Counter: Finite it State t Machine Mhi A register and Combinational logic Counter & FSM Controller: Using JK FFs, RS FF and T FFs Up/Down Counter, Clear, Load Counter Registers Preset/Clear, Load, Left/Right Shift Counter Based on Shift Registers

Binary Counter: Asynchronous CLK 1 Rising Edge TQ Q0 Q1 Q2 Q3 Falling Edge 1 TQ 1 TQ 1 TQ Q Q Q Q CLK Q0 0 1 0 1 0 1 0 1 0 1 Q1 0 0 1 1 0 0 1 1 0 0 Q2 0 0 0 0 1 1 1 1 0 0 Q3 0 0 0 0 0 0 0 0 1 1

Counter : Sync Vs Async Asynchronous Counter : Ripple Counter Change in State of Q i 1 is used to Toggle Q i Clock is applied at FF0, it propagate through to FFn Input Clock to FF1= Skewed version of Clkof FF0 Clock + Propagation delay of FF Rippling: Overall time delay of occurrence of count pulse and when stabilized count appear at O/P When counter : 1111..11 to 0000..00, toggle signal must propagate through allffs Wrostcase Settling time: n x t pd wheret =Propagationdelay ofaff where t pd =Propagation delay of a FF Synchronous Counter: One single clock to all FF

Binary Counter: Synchronous Q0 Q1 Q2 Q3 1 T Q 1 T Q 1 T Q 1 T Q Q Q Q Q CLK Q 0 =1 => 10 Q 1 Q 0 =11 => 100 Q 2 Q 1 Q 0 111 =>1000

Counter Example of 4 bit counter Count from 0000 to 1111 and repeat Up counter : 0000 to 1111 Down counter : 1111 to 0000 ModNcounter: Mod 10 counter : 0000 to 1001 (0 to 9) and repeat Mod 6 counter : 000 to 101 (0 to 5) and repeat

FSM of Counter : 2 bit State bits = Output bits A B C D 00 01 10 11 Combinational logic n1 s1 s0 I/P O/P s1 s0 n0 n1 A 0 0 0 1 n0 s1 s0 B 0 1 1 0 clk State register C 1 0 1 1 B 1 1 0 0

FSM Controller: Binary Counter A 00 B 01 C 10 D 11 n1 = s1 xor s0 n0 = s0 I/P O/P s0 s1 s0 n0 n1 A 0 0 0 1 B 0 1 1 0 C 1 0 1 1 B 1 1 0 0 clk s1 s0 State register n0 s1 n1

SynchronousCounter:Design Together: Create FSM, Encode Bit State Table Design Combination Circuit

Mod10Counter:BCDCounter Count from 0000 to 1001 (0 9 the Reset) FSM with Encoding done A B C D E 0000 0001 0010 0011 0100 J 1001 I 1000 H 0111 G 0110 F 0101

StateTable Creation Present State Next State S3 S2 S1 S0 N3 N2 N1 N0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 0 0 0 N0=S0 N1= N3= N4=

UsingotherFFinCounter Takes benefitofdualinputstoff inputs Counter can be implemented using Small CombinationalCircuit Circuit More Inputs from Combinational Circuit Use of Excitation Table How FF out changes from one to others Required FF inputs to change FF output 0 to 0, 0 to 1, 1 to 0 and 1 to 1

Design of Counter: With FFs 0,2,3,4,5,1,0 A B C 000 010 011 J I H 001 101 110

Counter design using JK FF clk Combinational logic s2 s1 s0 State register n0 s2 s1 s0 n1 n2 Q1 Q2 Q3 Q Q Q Q FF1 FF2 J C K J C K Logic Network Q Q FF3 J C K CLK

4 Types of Flip Flops S R Q+ J K Q+ 0 0 Qt 0 0 Qt 0 1 0 0 1 0 1 0 1 1 0 1 1 1 U 1 1 Qt D Q+ 0 0 1 1 T Q+ 0 Qt 1 Qt

CharacteristicEquations Adescriptionsofthenext of the next state statetabletable of a flip flop Constructing from the Karnaughmap forq t+1 intermsofthepresentstate the state and input

Characteristic tables The tables that we ve made so far are called characteristic tables. They show the next state Q(t+1) in terms of the current state Q(t) and the inputs. For simplicity, the control input C is not usually listed. Again, these tables don t indicate the positive edgetriggered behavior of the flip-flops that we ll be using. J K Q+ 0 0 Qt 0 1 0 1 0 1 1 1 Qt D Q+ 0 0 T Q+ 0 Qt 1 1 1 Qt

Characteristic equations We can also write characteristic equations, where the next state Q(t+1)is defined in terms of the current state Q(t) and inputs. J K Q+ 0 0 Qt Q + = K Q + JQ 0 1 0 Q(t+1)=K Q(t)+JQ (t) KQ(t) + (t) 1 0 1 1 1 Qt

Characteristic equations We can also write characteristic equations, where the next state Q(t+1) is defined in terms of the current state Q(t) and inputs. D Q+ 0 0 1 1 T Q+ 0 Qt 1 Qt Q + =D Q(t+1) = D Q+= T Q+TQ = T Q Q(t+1) = T Q(t) + TQ (t) = T Q(t)

Characteristic equations Q SR Flip Flop Type SR JK Characteristic Equation Q + =S +R Q (SR=0) Q + =JQ +K Q +KQ D Q + =D Q + = S + R Q (SR=0) T Q + =TQ +T Q=T Q

ExcitationTable forjkflipflop Flop It is different than Characteristic Equation Tabling requires Input to change from Q to Q + J K Q+ 0 0 Qt 0 1 0 1 0 1 1 1 Qt Characteristic Table Q Q + J K 0 0 0 X 0 1 1 X 1 0 X 1 1 1 X 0 Excitation Table

ExcitationTable fortflipflop Flop It is different than Characteristic Equation Tabling requires Input to change from Q to Q + T Q+ 0 Qt 1 Qt Characteristic Table Q Q + T 0 0 0 0 1 1 1 0 1 1 1 0 Excitation Table

ExcitationTable fordflipflop Flop It is different than Characteristic Equation Tabling requires Input to change from Q to Q + D Q+ 0 0 1 1 Characteristic Table Q Q + D 0 0 0 0 1 1 1 0 0 1 1 1 Excitation Table

ExcitationTable forsrflipflop Flop It is different than Characteristic Equation Tabling requires Input to change from Q to Q + S R Q+ 0 0 Qt 0 1 0 1 0 1 1 1 U Characteristic Table Q Q + S R 0 0 0 X 0 1 1 0 1 0 0 1 1 1 X 0 Excitation Table

Excitation Table: Sync Counter Using JK FF A B C 000 010 011 J I H 001 101 110 Q Q + J K 0 0 0 X 0 1 1 X 1 0 X 1 1 1 X 0 Present State Next State Flip Flop Inputs Q1 Q2 Q3 Q1 + Q2 + Q3 + J1 K1 J2 K2 J3 K3 0 0 0 0 1 0 0 X 1 X 0 X 0 1 0 0 1 1 0 X X 0 1 X 0 1 1 1 1 0 1 X X 0 X 1 1 1 0 1 0 1 X 0 X 1 1 X 1 0 1 0 0 1 X 1 0 X X 0 0 0 1 0 0 0 0 X 0 X X 1

Present State FF Input Functions Flip Flop Inputs Q1 Q2 Q3 J1 K1 J2 K2 J3 K3 0 0 0 0 X 1 X 0 X 0 1 0 0 X X 0 1 X 0 1 1 1 X X 0 X 1 1 1 0 X 0 X 1 1 X 1 0 1 X 1 0 X X 0 0 0 1 0 X 0 X X 1 J1= F (Q1,Q2,Q3) J2= F (Q1,Q2,Q3) J3= F (Q1, Q2,Q3) K1= F (Q1,Q2,Q3) K2= F (Q1, Q2,Q3) K3= F (Q1, Q2,Q3)

Solve Each Function Using KMAP Present State Flip Flop Inputs Q1 Q2 Q3 J1 K1 J2 K2 J3 K3 0 0 0 0 X 1 X 0 X Q2 Q3 Q1 0 1 0 0 X X 0 1 X 0 0 1 0 0 1 1 1 X X 0 X 1 1 1 0 X 0 X 1 1 X 1 0 1 X 1 0 X X 0 0 0 1 0 X 0 X X 1 J1= Q2Q3 J2= Q3 J3= Q2 K1= Q2 K2= Q1 K3= Q1 Q1 X X X X

Counter Logic Diagram Q1 Q2 Q3 Q Q Q Q Q Q FF1 FF2 FF3 J C K J C K J C K CLK J1= Q2Q3 K1= Q2 J2= Q3 K2= Q1 J3= Q2 Logic Network K3= Q1 Q1 Q2 Q3 Q Q FF1 J C K C J K Q Q Q Q FF2 FF3 J C K J C K CLK

Excitation Table: Sync Counter Using D FF A B C 000 010 011 J I H 001 101 110 Q Q + D 0 0 0 0 1 1 1 0 0 1 1 1 Present State Next State Flip Flop Inputs Q1 Q2 Q3 Q1 + Q2 + Q3 + D1 D2 D3 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0

Excitation Table: Sync Counter Using D FF A B C 000 010 011 J I H 001 101 110 Present State Flip Flop Inputs Q1 Q2 Q3 D1 D2 D3 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 0 1 0 0 1 0 0 1 0 0 0 Q Q + D 0 0 0 0 1 1 1 0 0 1 1 1 D 1 = Q 1 Q 2 +Q 2 Q 3 D 2 = Q 1 Q 2 +Q 2 Q 3 D 3 = Q 1 +Q 2 Q 3

Counter Implementation using D FF Q1 Q2 Q3 D 1 = Q 1 Q 2 +Q 2 Q 3 D 2 = Q 1 Q 2 +Q 2 Q 3 D 3 = Q 1 +Q 2 Q 3 Q Q Q Q FF1 FF2 D C D C Q Q FF3 D C Same as FSM Controller CLK Require more Logic as JK FF Based

Excitation Table: Sync Counter Using T FF A B C 000 010 011 J I H 001 101 110 Q Q + T 0 0 0 0 1 1 1 0 1 1 1 0 Present State Next State Flip Flop Inputs Q1 Q2 Q3 Q1 + Q2 + Q3 + T1 T2 T3 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1 0 0 1 0 1 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1

Excitation Table: Sync Counter Using D FF A B C 000 010 011 J I H 001 101 110 Present State Flip Flop Inputs Q1 Q2 Q3 T1 T2 T3 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 0 1 1 1 0 0 1 1 1 0 1 1 0 0 0 0 1 0 0 1 Q Q + T 0 0 0 0 1 1 1 0 0 1 1 1 T 1 = Q 1 Q 2 +Q 2 Q 3 T 2 = Q 1 Q 2 +Q 2 Q 3 T 3 = Q 1 +Q 1 Q 3

Counter Implementation using D FF Q1 Q2 Q3 T 1 = Q 1 Q 2 +Q 2 Q 3 T 2 = Q 1 Q 2 +Q 2 Q 3 Q Q FF1 T C Q Q FF2 T C Q Q FF3 T C T 3 = Q 1 +Q 1 Q 3 CLK Still Require more Logic as JK FF Based

Excitation Table: Sync Counter Using RS FF A B C 000 010 011 J I H 001 101 110 Q Q + S R 0 0 0 X 0 1 1 0 1 0 0 1 1 1 X 0 Present State Next State Flip Flop Inputs Q1 Q2 Q3 Q1 + Q2 + Q3 + S1 R1 S2 R2 S3 R3 0 0 0 0 1 0 0 X 1 0 0 X 0 1 0 0 1 1 0 X X 0 1 0 0 1 1 1 1 0 1 0 X 0 0 1 1 1 0 1 0 1 X 0 0 1 1 0 1 0 1 0 0 1 0 1 0 X X 0 0 0 1 0 0 0 0 X 0 X 0 1

Present State FF Input Functions Flip Flop Inputs Q1 Q2 Q3 S1 R1 S2 R2 S3 R3 0 0 0 0 X 1 0 0 X 0 1 0 0 X X 0 1 0 0 1 1 1 0 X 0 0 1 1 1 0 X 0 0 1 1 0 1 0 1 0 1 0 X X 0 0 0 1 0 X 0 X 0 1 S1= F (Q1,Q2,Q3) S2= F (Q1,Q2,Q3) S3= F (Q1, Q2,Q3) R1= F (Q1,Q2,Q3) R2= F (Q1, Q2,Q3) R3= F (Q1, Q2,Q3)

Solve Each Function Using KMAP Present State Flip Flop Inputs Q 1 Q 2 Q 3 R 1 S 1 S 2 R 2 S 3 R 3 0 0 0 0 X 1 X 0 X Q2 Q3 Q1 0 1 0 0 X X 0 1 X 0 0 1 0 0 1 1 1 X X 0 X 1 1 1 0 X 0 X 1 1 X 1 0 1 X 1 0 X X 0 0 0 1 0 X 0 X X 1 S 1 = Q 2 Q 3 S 2 = Q 1 Q 3 S 3 = Q 2 Q 3 1 2 3 2 1 3 3 2 3 R 1 = Q 2 R 2 = Q 1 R 3 = Q 1 Q 3 Q1 X X X X

Counter Logic Diagram S 1 = Q 2 Q 3 R 1 = Q 2 S 2 =Q 1 Q 3 Q1 Q2 Q3 Q Q FF1 S C R Q Q FF2 S C R Q Q FF3 S C R R 2 = Q 1 S 3 =Q 2 Q 3 R 3 = Q 1 Q 3 CLK

Thanks