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

Similar documents
EECS 150 Homework 4 Solutions Fall 2008

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

Module -18 Flip flops

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

DIGITAL ELECTRONICS QUESTION BANK

Laboratory Manual CS (P) Digital Systems Lab

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

SRV ENGINEERING COLLEGE SEMBODAI RUKMANI VARATHARAJAN ENGINEERING COLLEGE SEMBODAI

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

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

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

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

Electronic Circuits EE359A

IES Digital Mock Test

CMOS Digital Integrated Circuits Lec 11 Sequential CMOS Logic Circuits

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

CMOS Digital Integrated Circuits Analysis and Design

Digital Logic Circuits

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

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

CONTENTS Sl. No. Experiment Page No

Chapter 3 Digital Logic Structures

Spec. Instructor: Center

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


HIGH LOW Astable multivibrators HIGH LOW 1:1

Department of Electronics and Communication Engineering

Exercises: Fundamentals of Computer Engineering 1 PAGE: 1

Electronics. Digital Electronics

GATE Online Free Material

Module-20 Shift Registers

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

Linear & Digital IC Applications (BRIDGE COURSE)

CS302 - Digital Logic Design Glossary By

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

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

Logic Design I (17.341) Fall Lecture Outline

ELECTRONICS ADVANCED SUPPLEMENTARY LEVEL

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

Odd-Prime Number Detector The table of minterms is represented. Table 13.1

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

UC Berkeley CS61C : Machine Structures

EC O4 403 DIGITAL ELECTRONICS

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

UC Berkeley CS61C : Machine Structures

Lecture 20: Several Commercial Counters & Shift Register

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

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

Asst. Prof. Thavatchai Tayjasanant, PhD. Power System Research Lab 12 th Floor, Building 4 Tel: (02)

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. Digital Logic

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

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

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

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

Computer-Based Project in VLSI Design Co 3/7

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

Topic Notes: Digital Logic

Classification of Digital Circuits

EXPERIMENT NO 1 TRUTH TABLE (1)

Lecture 7: Components of Phase Locked Loop (PLL)

First Optional Homework Problem Set for Engineering 1630, Fall 2014

ENGIN 112 Intro to Electrical and Computer Engineering

E-Tec Module Part No

ENGR-2300 Electronic Instrumentation Quiz 3 Spring Name: Solution Please write you name on each page. Section: 1 or 2

Theory of Logic Circuits. Laboratory manual. Exercise 4

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

EC4205 Microprocessor and Microcontroller

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

Chapter 1: Digital logic

DIGITAL CIRCUITS AND SYSTEMS ASSIGNMENTS 1 SOLUTIONS

The SOL-20 Computer s Cassette interface.

Gates and Circuits 1

DIGITAL INTEGRATED CIRCUITS A DESIGN PERSPECTIVE 2 N D E D I T I O N

DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

DIGITAL ELECTRONICS: LOGIC AND CLOCKS

The book has excellent descrip/ons of this topic. Please read the book before watching this lecture. The reading assignment is on the website.

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

EE 330 Lecture 44. Digital Circuits. Dynamic Logic Circuits. Course Evaluation Reminder - All Electronic

Preface... iii. Chapter 1: Diodes and Circuits... 1

Memory, Latches, & Registers

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

DIGITAL DESIGN WITH SM CHARTS

CHAPTER 3 BASIC & COMBINATIONAL LOGIC CIRCUIT

Sequential Logic Circuits

Practical Workbook Logic Design & Switching Theory

ELECTRONIC CIRCUITS. Time: Three Hours Maximum Marks: 100

HAZARDS AND PULSE MODE SEQUENTIAL CIRCUITS

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

COLLEGE OF ENGINEERING, NASIK

2014 Paper E2.1: Digital Electronics II

ENGINEERING TRIPOS PART II A ELECTRICAL AND INFORMATION ENGINEERING TEACHING LABORATORY EXPERIMENT 3B2-B DIGITAL INTEGRATED CIRCUITS

Logic Families. Describes Process used to implement devices Input and output structure of the device. Four general categories.

Lecture 02: Digital Logic Review

Lecture 3: Logic circuit. Combinational circuit and sequential circuit

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

Sr. No. Instrument Specifications. TTL (Transistor-Transistor Logic) based on bipolar junction transistors

Project Board Game Counter: Digital

電子電路. Memory and Advanced Digital Circuits

NUMBER SYSTEM AND CODES

Transcription:

Sequential Logic The combinational logic circuits we ve looked at so far, whether they be simple gates or more complex circuits have clearly separated inputs and outputs. A change in the input produces a change in the output. End of story! Inputs logic system Outputs The addition of feedback means that the state of the circuit may change with time; it is sequential. Inputs logic system Outputs The simplest example must be an invereter. At first glance this seems to be an impossible circuit, if the input to the gate is 0 then the output is 1, but the output is connected to the input so it must have the same value. In actual fact this circuit oscillates. When the input to a gate changes the output doesn t change instantly, it takes a little time. We call this time the propagation delay. The circuit makes sense now; if the input becomes 1, a little while later the output becomes 0 so, the input becomes 0, a little while later the output becomes 1 so, the input becomes 1, a little while later the output becomes 0 and so on... The frequency of oscillation will be f = 1/2Tpd, where Tpd is the propagation delay. A typical value of Tpd might be about 10ns so the circuit would oscillate with a frequency of about 50MHz.

Although oscillators are very useful this one isn t! The propagation delay of gates is somewhat unpredictable so the frequency of oscillation would be difficult to guarantee with this arrangement. Now consider a similar arrangement, this time using two inverters: In this example, as long as power is applied to the circuit, the output of the second inverter (1 or 0) will always be identical to the input of the first, even without any inputs to the circuit. This is almost a memory element, it s not a lot of use to us yet as we can t change the value which is stored. We can rectify this deficiency by using NAND gates instead of inverters. The extra inputs can now be used to Set (make the output 1) and Reset the circuit (make the output 0). Normally we would draw this differently. We call this circuit a latch. Sometimes you will see it called a flip-flop but many authors prefer to reserve this title for clocked circuits which we ll see later. We can describe the operation of the circuit with a table (rather like a truth table) called an excitation table. S R Q+ 0 0 U (undefined) 0 1 1 (set) 1 0 0 (reset) 1 1 Q- (unchanged)

The + and suffices denote time; + meaning next and meaning previous. Although we might call this device a SR latch it would probably be more correct to call it a not SR latch as values of zero are used to Set and Reset it. If we build the circuit using NOR gates, or add a pair of inverters we get a true SR latch. S /Q R Q S Q R /Q Synchronous Circuits In general, we prefer to design circuits in which all of the changes are synchronised by a clock signal, meaning that all parts of the circuit change at the same time. It s quite simple to modify our latch to use a clock: S R In the example S and R can only influence the circuit when the clock is high (the value is 1) because of the NAND gates we ve added. This is still not ideal. In complex systems the output of the flip flop may ultimately influence the inputs. It is preferable that this influence is not allowed to have any effect until the next clock pulse arrives, but in the circuit above the inputs are vulnerable throughout the positive clock phase.

Two common techniques exist to isolate the outputs from the inputs of the flip flop, the first, known as Master Slave operation actually uses two flip flops. Master Slave In this example the first flip flop (the master) is active when the clock is high. Because of the inverter, the second flip flop (the slave) is active when the clock is low, and the contents of the master are transferred to it. Because the master is no longer active, the output of the slave can not influence the master until the clock goes high again. Another approach to this problem is Edge Triggering in which the flip flop is triggered on the clock edge. Conceptually, an edge triggered device is quite simple. a b c In the diagram, the inverter has a small but finite propagation delay so the clock signal presented to the flip flop is extremely narrow, consequently, by the time the outputs change the clock has long since gone. a b c

Other flip flops There are other kinds of flip flop apart from the SR. There is little to be gained from exploring the inner workings of each device, so we ll simply consider their excitation tables. We use the same notation but now the and + suffices mean before and after the clock pulse respectively. The JK flip flop J K Q+ 0 0 Q- (unchanged) 0 1 1 (reset) 1 0 0 (set) 1 1 /Q- (toggle) The only difference between the JK and the SR is the operation when we attempt to set AND reset it at the same time (J=K=1). Instead of the undefined operation of the SR flip flop, the JK does something useful; it toggles. In other words, if J and K are both 1, then the value of Q after the clock is NOT what it was before the clock. The D (Data or Delay) type flip flop This is a simpler device which we might think of as being a subset of the JK. It has only one input, called D. D Q+ 0 0 1 1 The D flip flop has an output of 1 after the clock when and only when the input is a one before the clock. The D flip flop can be constructed from a JK flip flop by ensuring that J and K are always different by using an inverter. This corresponds to the middle two rows of the JK excitation table. Ignore the S & R in these diagrams real devices often have these extra inputs.

The T (Toggle) type flip flop This is another simple device, once again it is effectively a subset of the JK in which J and K are always the same, it corresponds to the top and bottom rows of the JK excitation table. With an input of 0 the T type does nothing (the output doesn t change), but when the input is 1 the output toggles. Again, ignore S & R in the diagrams. T Q+ 0 Q- 1 /Q- Ad Hoc Circuits We can devise a surprisingly large number of very useful circuits simply by connecting flip flops together, without using any formal design methodology. An eight bit (SISO/SIPO) shift register The diagram illustrates a 8-bit shift register. Data enters at the left hand side (provided by the switch in this example) and the entire contents of the register move one position to the right with each successive clock pulse. Shift registers are useful in many areas, for example shifting a byte one place to the right (or left) is equivalent to dividing (or multiplying) by two. Various

configurations of shift register are also used to convert between serial and parallel data formats. In the example above, data enters the register serially, one bit after another, but may be read in parallel, all bits together, from the Q outputs of the flip flops. Five bit ring counter The ring counter is a simple extension to the shift register. The separate Set and Reset inputs available on many flip flops are used to initialise the register and the output is fed back to the input. In this example the 1 held in the first flip flop will move one position to the right with each clock pulse, when it reaches the end it will start again. The pattern of bits on the outputs will look like: 10000 01000 00100 00010 00001 10000 01000 etc. Five bit Johnson Counter A slightly different arrangement in which /Q instead of Q is fed back produces a quite different sequence in the Johnson counter:

00000 10000 11000 11100 11110 11111 01111 00111 00011 00001 00000 10000 etc. This circuit is sometimes called a twisted ring or switch-tail. Eight bit ripple counter Although we said earlier that, in general we prefer to design circuits in which all of the changes are synchronised by a clock signal, there are one or two exceptions. The diagram above illustrates an asynchronous, or ripple counter. In this circuit, only the first flip flop is controlled by the clock. The output of this flip flop clocks the second. The second clocks the third, and so on. Consequently the clock (and the changes to the flip flops) ripples through the circuit from left to right. As its name suggests, this circuit counts, beginning with 00000000, then 00000001, up to 11111111, then starts again. Because it is so simple, and because counters are used such a lot, we often make allowances for its asynchronous behaviour. Design methods Detailed coverage of sequential logic design is beyond the scope of this module, obviously, design methods do exist so it is possibly useful to look very briefly at a simple design example. We will design a counter which counts in a rather odd sequence:

0010 0110 0111 0101 0100 1100 1101 1111 1110 1010 As our counter has 4 bits we ll use 4 D Type flip flops to build it. We begin by drawing a state transition table. On the left hand side we tabulate the counter values before the clock, and on the right hand side, the values after the clock: Present state abcd Next state abcd 0010 0110 0110 0111 0111 0101 0101 0100 0100 1100 1100 1101 1101 1111 1111 1110 1110 1010 1010 0010 We ll call the four outputs a,b,c,d (for no particular reason). Looking at the top row of the table, it is telling us that when the outputs are 0010 before the clock, we want an output of 0110 after the clock. Because we are using D Type flip flops this means that the D inputs to the flip flops must be 0110 before the clock. Now let s produce K-maps for each of our flip flops: ab cd a 00 01 11 10 cd ab b 00 01 11 10 00 1 1 01 1 11 1 10 1 00 1 1 01 1 1 11 1 1 10 1 1

c d cd ab 00 01 11 10 cd ab 00 01 11 10 00 01 1 11 1 10 1 1 1 1 00 1 01 1 11 1 10 1 The Karnaugh maps yield the flip flop input equations: Da = ab + b/c/d Dc = c/d + abc Db = b/c + b/d + /ac/d Dd = ab/c + /abc From here we can build a circuit, which would look something like:

This isn t quite finished! I ve deliberately left the S and R inputs floating. Imagine what happens when we first apply power to this circuit; the flip flops will probably contain zeroes (we can t guarantee this!). Looking back at our original design, the counter never has 0000 in its sequence, so if it starts in this state we have not designed a way out. There are two possible solutions to the problem: we can use the S and R inputs to the flip flops to ensure that appropriate starting conditions are used... Or we can design in the unused states. Apart from 0000 there are many other possible states which do not occur in the sequence we ve chosen. The counter has 4 bits and could therefore have sixteen different states, the missing ones are: 0000 0001 0011 1011 1001 1000 It would make a lot of sense to put these codes in the present state side of our state transition table and on the next state side ensure that they all lead to valid states. We are building an escape route; if our counter ever ends up in a state that it shouldn t be in, it will move to one that it should be in at the next clock pulse. Modifying the design is fairly easy it is left as an exercise for the student!!!! Epilogue Many of the example circuits are available on my web pages in LogicWorks format. Download them and see how they work. If you don t understand the design example don t panic! It s only included for illustration. There are much cleverer (and easier to understand!) techniques for designing sequential logic but you have to wait a year or two for these!