ELCT201: DIGITAL LOGIC DESIGN

Similar documents
ELCT201: DIGITAL LOGIC DESIGN

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

ELCT201: DIGITAL LOGIC DESIGN

ELCT201: DIGITAL LOGIC DESIGN

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

ELCT201: DIGITAL LOGIC DESIGN

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

Chapter 5 Synchronous Sequential Logic

CHW 261: Logic Design

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:

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

Chapter 7 Sequential Logic

Digital Circuits ECS 371

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

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

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

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

Synchronous Sequential Logic. Chapter 5

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

I. Motivation & Examples

Lecture 17: Designing Sequential Systems Using Flip Flops

Experiment 9 Sequential Circuits

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

Sequential Circuits Sequential circuits combinational circuits state gate delay

Chapter 7. Sequential Circuits Registers, Counters, RAM

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

Computers also need devices capable of Storing data and information Performing mathematical operations on such data

Different encodings generate different circuits

Lecture (08) Synchronous Sequential Logic

The Design Procedure. Output Equation Determination - Derive output equations from the state table

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

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

ELE2120 Digital Circuits and Systems. Tutorial Note 10

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

Digital Circuits and Systems

EET 310 Flip-Flops 11/17/2011 1

Philadelphia University Student Name: Student Number:

Sequential Logic Circuits

Digital Electronics Sequential Logic

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

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

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

Synchronous Sequential Logic

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

Sequential Circuit Analysis

Lecture 10: Synchronous Sequential Circuits Design

Lecture 8: Sequential Networks and Finite State Machines

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

ECE 341. Lecture # 3

6 Synchronous State Machine Design

Chapter 4. Sequential Logic Circuits

PAST EXAM PAPER & MEMO N3 ABOUT THE QUESTION PAPERS:

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

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

Chapter 14 Sequential logic, Latches and Flip-Flops

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

Sequential Logic Worksheet

Fundamentals of Digital Design

EECS150 - Digital Design Lecture 23 - FSMs & Counters

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

FSM model for sequential circuits

Digital Fundamentals

Sequential vs. Combinational

DE58/DC58 LOGIC DESIGN DEC 2014

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

Latches. October 13, 2003 Latches 1

Models for representing sequential circuits

Sequential Circuit Design

Logical design of digital systems

Design of Sequential Circuits

課程名稱 : 數位邏輯設計 P-1/ /6/11

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

EECS150 - Digital Design Lecture 16 Counters. Announcements

Synchronous Sequential Logic Part I

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

EECS150 - Digital Design Lecture 23 - FFs revisited, FIFOs, ECCs, LSFRs. Cross-coupled NOR gates

Synchronous Sequential Circuit Design

Lecture 9: Digital Electronics

Philadelphia University Student Name: Student Number:

EE 209 Logic Cumulative Exam Name:

CprE 281: Digital Logic

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

Analysis of Clocked Sequential Circuits

ELE2120 Digital Circuits and Systems. Tutorial Note 9

Digital Electronics Final Examination. Part A

PGT104 Digital Electronics. PGT104 Digital Electronics

Digital Fundamentals

Digital Logic Design - Chapter 4

CPE100: Digital Logic Design I

Digital Logic Design - Chapter 5

Q: Examine the relationship between X and the Next state. How would you describe this circuit? A: An inverter which is synched with a clock signal.

Topic 8: Sequential Circuits

Digital Control of Electric Drives

Decoding A Counter. svbitec.wordpress.com 1

CPE100: Digital Logic Design I

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

Transcription:

ELCT201: DIGITAL LOGIC DESIGN Dr. Eng. Haitham Omran, haitham.omran@guc.edu.eg Dr. Eng. Wassim Alexan, wassim.joseph@guc.edu.eg Following the slides of Dr. Ahmed H. Madian Lecture 10 محرم 1439 ه Winter 2018

COURSE OUTLINE 1. Introduction 2. Gate-Level Minimization 3. Combinational Logic 4. Synchronous Sequential Logic 5. Registers and Counters 6. Memories and Programmable Logic 2

LECTURE OUTLINE Counters Definition and Introduction Binary Ripple Counters T FF-based D FF-based Synchronous Counters Up Counters Down Counters Unused States Design Problems 3

COUNTERS: A DEFINITION A register that goes through a prescribed sequence of states upon the application of input pulses is called a counter The input pulses may be clock pulses, or they may originate from some external source and occur at a fixed interval of time or at random The sequence of states may follow the binary number sequence or any other sequence of states 000 001 010 011 100 101 000 010 100 000 010 100 4

COUNTERS: INTRODUCTION A counter that follows the binary number sequence is called a binary counter An n bit binary counter consists of n FFs and can count from 0 through 2 n 1 Counters are available in 2 categories: Ripple counters Synchronous counters 5

COUNTERS: INTRODUCTION In a ripple counter, a FF output transition serves as a source for triggering other FFs This means that the C input of some or all FFs are triggered, not by the common clock pulses, but rather by the transition that occurs in other FF outputs In a synchronous counter, the C inputs of all FFs receive the common clock 6

BINARY RIPPLE COUNTERS A binary ripple counter consists of a series connection of complementing FFs, with the output of each FF connected to the C input of the next higher order FF (see next slide) The FF holding the least significant bit receives the incoming count pulses The output of the first FF is always the complement of its input The T inputs of all the FFs in the first counter are permanently connected to Logic 1, making each FF complement if the signal in its C input goes through a negative transition The negative transition occurs when the output of the previous FF to which C is connected goes from 1 to 0 7

A 0 A 0 Count Count A 1 A 1 A 2 A 2 But what if we are interested in building a counter that counts down? How can we modify the current logic diagrams to achieve this new target? Logic 1 A 3 A 3 Reset Reset 8

BINARY RIPPLE COUNTERS: BONUS QUESTION How many flip-flops will be complemented in a 10 bit binary ripple counter to reach the next count after the following counts? a. 1001100111 b. 0011111111 c. 1111111111 9

SYNCHRONOUS COUNTERS In a synchronous binary counter, the FF controlling the least significant bit is complemented with every clock cycle Any other FF will only complement its stored bit when all the bits in the lower significant positions are equal to 1 For example, if the present state of a 4 bit counter is A 3 A 2 A 1 A 0 = 0011, the next count is 0100 A 0 is always complemented. A 1 is complemented because the present state of A 0 = 1. A 2 is only complemented if the present state of A 1 A 0 =11. However A 3 is not complemented, because the present state of A 2 A 1 A 0 = 011, which does not give an all 1s condition 10

SYNCHRONOUS COUNTERS The first stage, A 0, has its J and K equal to 1 if the counter is enabled The other J and K inputs are equal to 1 if all previous least significant stages are equal to 1 and the count is enabled The chain of AND gates generates the required logic for the J and K inputs in each stage Such a counter can be extended to any number of stages, with each stage having an additional FF and an AND gate that gives an output of 1 if all previous FF outputs are 1 11

A 0 4 BIT SYNCHRONOUS BINARY COUNTER Count enable A 1 A 2 JK FF characteristic table Is the polarity of the clock essential in this design? What happens if we implement this counter with a negative edge-triggered clock? Clk 12 A 3 To next stage

4 BIT SYNCHRONOUS BINARY UP/DOWN COUNTER So how can we design an up/down synchronous binary counter? 13

Up Down A 0 Function table With a mode control of 10 and a current count of 0101, what is the next count? This is not a mistake! With a mode control of 01 and a current count of 0111, what is the next count? A 1 A 2 A 3 T FF characteristic table Clk 14

UNUSED STATES What happens if we are interested in a counter design that does not include all states (counts)? 101 000 001 For example, here is a state diagram and a state table (next slide) for a counter that repeatedly counts from 000 to 101 100 010 What should we write in the table for the couple of unused states? 011 15

UNUSED STATES Present State Next State Q 2 Q 1 Q 0 Q 2 Q 1 Q 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 1 1 0??? 1 1 1??? 101 100 000 011 001 010 16

UNUSED STATES CAN BE DON T CARES Present State Next State Q 2 Q 1 Q 0 Q 2 Q 1 Q 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 1 1 0 X X X 1 1 1 X X X To reach the simplest possible circuit, we can fill in don t cares for the next states This will also result in don t cares for the FF inputs, which might simplify the hardware If the circuit somehow ends up in one of the unused states {110,111}, its behavior will depend on exactly what the don t cares were filled in with 17

110 111 OR MAYBE WE DO CARE! 000 Present State Next State 101 001 Q 2 Q 1 Q 0 Q 2 Q 1 Q 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 100 011 010 To reach the safest possible circuit, we can explicitly fill in next states for the unused states {110,111} This guarantees that even if the circuit somehow enters an unused state, it will eventually end up into one of the valid states This is called a self-starting counter 18

DESIGN PROBLEM Design a sequential logic circuit that implements the following recurring sequence: 000 010 011 100 101 111 000 Assume that the circuit is a self-starting one. 19

DESIGN PROBLEM: SOLUTION 1. From the word description and 001 110 the required specifications, we sketch the state diagram. Since 000 each state consists of 3 bits, we need 3 flip-flops 010 Here, T FFs would be a good choice, since we are going to toggle some bits in every state transition 111 101 100 011 20

DESIGN PROBLEM: SOLUTION 2. Next, we derive the state table. The present and next states are known from the state diagram. While the FF inputs are obtained with the help of the T FF excitation table or characteristic equation 21

DESIGN PROBLEM: SOLUTION Present State Next State FF Inputs Q 2 Q 1 Q 0 Q 2 Q 1 Q 0 T 2 T 1 T 0 001 110 000 111 010 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 1 0 1 0 1 1 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 1 101 100 22 011

DESIGN PROBLEM: SOLUTION 3. The FF input equations are then simplified (carried out on the board) 4. Finally, the logic circuit of the counter is sketched (carried out on the board) 23

ASSIGNMENT 3 REMINDER! Deadline of assignment 3 is Monday the 10 th of December, 2018 24