Theory of Logic Circuits. Laboratory manual. Exercise 3



Similar documents
SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

CHAPTER 11 LATCHES AND FLIP-FLOPS

Engr354: Digital Logic Circuits

Sequential Logic Design Principles.Latches and Flip-Flops

Counters and Decoders

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

ECE380 Digital Logic

Module 3: Floyd, Digital Fundamental

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Flip-Flops, Registers, Counters, and a Simple Processor

Sequential Logic: Clocks, Registers, etc.

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

Memory Elements. Combinational logic cannot remember

Lesson 12 Sequential Circuits: Flip-Flops

BINARY CODED DECIMAL: B.C.D.

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

7. Latches and Flip-Flops

CS311 Lecture: Sequential Circuits

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Master/Slave Flip Flops

Counters. Present State Next State A B A B

Lecture 8: Synchronous Digital Systems

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

CSE140: Components and Design Techniques for Digital Systems

Chapter 9 Latches, Flip-Flops, and Timers

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Set-Reset (SR) Latch

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Contents COUNTER. Unit III- Counters

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

CHAPTER 3 Boolean Algebra and Digital Logic

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Fig1-1 2-bit asynchronous counter

Counters & Shift Registers Chapter 8 of R.P Jain

CHAPTER 11: Flip Flops

IE1204 Digital Design F12: Asynchronous Sequential Circuits (Part 1)

ASYNCHRONOUS COUNTERS

Chapter 5. Sequential Logic

Digital Logic Design Sequential circuits

Lecture-3 MEMORY: Development of Memory:

DEPARTMENT OF INFORMATION TECHNLOGY

Upon completion of unit 1.1, students will be able to

Lecture 10 Sequential Circuit Design Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010

Modeling Latches and Flip-flops

Sequential Circuits. Combinational Circuits Outputs depend on the current inputs

Lecture 7: Clocking of VLSI Systems

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute. 2nd (Spring) term 2012/2013

Digital Electronics Detailed Outline

Gates, Circuits, and Boolean Algebra

Digital Fundamentals

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Lecture 10: Sequential Circuits

Chapter 8. Sequential Circuits for Registers and Counters

Design Verification & Testing Design for Testability and Scan

Lecture 11: Sequential Circuit Design

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

SN54/74LS192 SN54/74LS193

Combinational Logic Design Process

Advanced Logic Design Techniques in Asynchronous Sequential Circuit Synthesis

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

Clocking. Figure by MIT OCW Spring /18/05 L06 Clocks 1

Chapter 2 Logic Gates and Introduction to Computer Architecture

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

Topics of Chapter 5 Sequential Machines. Memory elements. Memory element terminology. Clock terminology

2 : BISTABLES. In this Chapter, you will find out about bistables which are the fundamental building blocks of electronic counting circuits.

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

Lecture 10: Latch and Flip-Flop Design. Outline

Logic Reference Guide

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Layout of Multiple Cells

Latch Timing Parameters. Flip-flop Timing Parameters. Typical Clock System. Clocking Overhead

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

Asynchronous Counters. Asynchronous Counters

74HC107; 74HCT107. Dual JK flip-flop with reset; negative-edge trigger

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

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

Asynchronous counters, except for the first block, work independently from a system clock.

Digital Logic Elements, Clock, and Memory Elements

Wiki Lab Book. This week is practice for wiki usage during the project.

DM74LS112A Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flop with Preset, Clear, and Complementary Outputs

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

Napier University. School of Engineering. Electronic Engineering A Module: SE42205 Digital Design

EE552. Advanced Logic Design and Switching Theory. Metastability. Ashirwad Bahukhandi. (Ashirwad Bahukhandi)

EE360: Digital Design I Course Syllabus

Transcription:

Zakład Mikroinformatyki i Teorii Automatów yfrowych Theory of Logic ircuits Laboratory manual Exercise 3 Bistable devices 2008 Krzysztof yran, Piotr zekalski (edt.)

1. lassification of bistable devices A bistable element of flip-flop is a sequential logic device that has two and only two stable output states. In general bistable elements can be divided into two categories: 1. asynchronous devices (called basic latches) 2. synchronous devices. In turn, synchronous bistable devices can be classified according to the triggering way into three groups: 1. gated latches, 2. master-slave flip-flops (called also pulse-triggered ones), 3. edge-triggered flip-flops. Also asynchronous devices can be further divided into two groups: fundamental mode (or static) devices and pulse mode (or dynamic) ones. However, since we will not deal with the second group at all, unless explicitly specified, all devices referred to as asynchronous are in fact asynchronous fundamental mode ones. Flip-flops in each category can be built as devices of type SR, D, JK and T according to the logical functions that they perform. The most often their logical behavior is specified by reduced characteristic tables and by excitation tables. We assume that for assignment of asynchronous flip-flops the lower case letters will be used. For assignment of synchronous ones, we will use capital letters. It should be stressed here that despite of theoretical possibility of building all types of flip-flops as devices of each mentioned category, not all of them have practical meaning due to their bad functionality. For example asynchronous static t flip-flop would not achieve stable state for input t = 1 and output of asynchronous static d flip-flop would be always equal to its input. It is self evident that using such elements is senseless. Page 2 of 12

1.1. Reduced characteristic tables Reduced characteristic tables present the information about the behavior of the flip-flop for given conditions on its input signals. S R n+1 Operation 0 0 n no change 0 1 0 reset 1 0 1 set 1 1 X not normally allowed J K n+1 Operation 0 0 n no change 0 1 0 reset 1 0 1 set 1 1 n toggle T n+1 Operation 0 n no change 1 n toggle D n+1 Operation 0 0 reset 1 1 set 1.2. Excitation tables Excitation tables gives the information about the desired values on inputs of flip-flop for given transition from present to next state n n+1 S R 0 0 0 x 0 1 1 0 1 0 0 1 1 1 x 0 n n+1 J K 0 0 0 x 0 1 1 x 1 0 x 1 1 1 x 0 n n+1 T 0 0 0 0 1 1 1 0 1 1 1 0 n n+1 D 0 0 0 0 1 1 1 0 0 1 1 1 Page 3 of 12

2. Asynchronous flip-flops In practice only sr flip-flops (and their modifications, like: ~s~r flip-flops) are built as asynchronous devices 1. First let us consider sr basic latch implemented with the use of two NOR gates (Fig. 1). s r Figure 1. Logic diagram of the NOR-based sr basic latch The logical symbol of this bistable device is given in the Fig.2. Numbers associated with s, r and are connected with the problem of dominance of inputs. s 1 0 r 1 Figure 2. Logic symbol of the sr basic latch with dominant resetting input It should be taken in account that = ~ only when two inputs s and r are not active at the same time (active means equal to logic one in this case, since numbers associated with s and r are ones). When these inputs are both active, i.e. when sr = 11, then = = 0 (zero is associated with in Fig. 2). From what was said here, it is obvious that to be able to use the output of sr flip-flop as ~ it is necessary to ensure at the design stage of the project that condition sr = 11 will never occur. If this is satisfied, then discussed here problem of input dominance is of no importance and the logic symbol of the sr flip-flop is simplified as shown in Fig. 3. However in detailed analysis of flip-flops, when we treat them as black boxes and from their behavior we want to get to know about them as much as possible, such normally forbidden condition is very important. It is so important, because it is easy to be recognized, since it is the only case when two outputs of the sr flip-flop are not complementing each other. Therefore after detecting this state we can uniquely determine the active values of inputs. They are the values that cause this normally forbidden state to occur. If they are 11 then we have sr flip-flop and if they are 00 then we have ~s~r. 1 The tilde sign ~ preceding the Boolean variable has the meaning that this variable is accessible in complemented form. In other words tilde with some literal creates a name of some other literal. Of course logical value of this new literal is a complement of the literal without tilde. But since tilde is an inherent part of a name it cannot be canceled (according to double complement theorem) if the name with tilde is complemented. For example ~s is abbreviated name of the name OMPLEMENTED_SET_INPUT of the flip-flop. It means that purpose of this input is to set flip-flop, but the active value (value used for performing action) is logic zero. Page 4 of 12

s r Figure 3. Logic symbol of the sr basic latch Besides, having detected this state, we can also determine the dominance of inputs. The setting input s (or ~s) is dominant if and only if in normally forbidden state two outputs are equal to logic one. Similarly, the resetting input r (or ~r) is dominant if and only if in normally forbidden state two outputs are equal to logic zero. Therefore if we find that = = 0, then the resetting input prevailed over setting one, so it is the flip-flop with dominant resetting input. On contrary, if = = 1, then the setting input prevailed over resetting one, so it is the flip-flop with dominant setting input. It is easy to see, that flip-flop from the Fig. 1 and 2 is the one with dominant resetting input, since when sr = 11 (both active), = = 0. Fig. 4 presents NAND-based ~s~r flip-flop with dominant setting input (i.e. for active inputs ~s~r = 00, = = 1). ~s ~r Figure 4. Logic diagram of the NAND-based ~s~r basic latch Fig. 5 gives the logic symbol of the circuit from Fig. 4. Since it is flip-flop with dominant setting input, the number associated with output is 1. The fact that inputs are active low is signaled by dots preceding internal s and r signals. It means that the device has to be connected to external ~s and ~r signals respectively. Fig.6 presents simplified logic symbol of the ~s~r flip-flop. Such logic symbol can be used in designs only with the restrictions concerning the avoidance of simultaneous active inputs. These restrictions are of the same nature as those discussed earlier for Fig. 2 and Fig. 3. Page 5 of 12

s 1 1 r 1 Figure 5. Logic symbol of the ~s~r basic latch with dominant setting input s r Figure 6. Logic symbol of the ~s~r basic latch 3. Synchronous flip-flops Synchronous flip-flops will be presented in three subsequent sections. The division into them is made according to different way of triggering. All bistable devices use previously discussed sr basic latch as the fundamental structure to build more complicated circuits. 3.1. Gated latches The example of gated SR NOR-based latch is given in the Fig.6. When the control input signal (called clock signal) is 0, signals applied to the S and R inputs can not effect the cross-coupled NOR latch circuit. However, when the clock signal is 1, signals applied to the S and R inputs can effect the cross-coupled NOR latch circuit. Page 6 of 12

S R Figure 7. Gated SR NOR-based latch The logic symbol of the gated SR latch is provided in Fig. 8. S R Figure 8. Logic symbol of the gated SR latch A gated SR latch can converted to a gated D latch by simple addition of an Inverter as shown in Fig. 9 D Figure 9. Gated D latch The Inverter in the gated D latch serves two different purposes. It provides a latch circuit with only one input (not including the clock) called data input. It also insures that SR latch inputs are always complemented so that the signal conditions SR = 11 cannot occur. All gated latches have got the property of transparency. The transparency property simply means that the outputs respond to an input signal change when the control input signal is 1. For gated D latch, the data input signal D is transferred to the output when control input signal is 1. The output signal follows the data input signal D as long as the control input remains a logic 1. Logic symbol of the gated D latch is given in Fig. 10. Page 7 of 12

D Figure 10. Logic symbol of the gated D latch 3.2. Master-slave flip-flops A master-slave flip-flop is designed to interrupt the logic connection between the inputs and the outputs during the time the input control signal is a logic 1. Removing the logic connection between the input and output signals afforded by the master-slave design provides the following benefits: it removes the transparency property and hence race condition in feedback applications as well as it provides a memory device, which can be used in synchronous sequential designs. The circuit diagram of the master-slave JK flip-flop shown in Fig. 11. presents how the transparency property is removed by interrupting signal path from the inputs to the outputs. MASTER SLAVE J s M S R K r M ~ Figure 11. Master-slave (pulse-triggered) JK flip-flop The master-slave JK flip-flop is simply two gated SR latches connected in cascade such that master drives the slave. The present state outputs of the slave are fed back to the inputs of the master such that the J inputs is qualified by ~ while K is qualified by, providing steering and thus allowing the toggle property. When the external control input signal is a logic 1, the master is transparent from its inputs to its outputs. Because of the Inverter, during this same time period the slave remains stable and cannot cause the race conditions through the slave via the outputs of the master. In effect this interrupts the logic connection between the inputs and the outputs of the device during the time the clock is a logic 1. When the clock makes a transition from a logic 1 to a logic 0, the data present at the J and K inputs are captured, the master is disabled, and the slave is enabled. hanges at the master s inputs are of no consequence at this Page 8 of 12

time since it is now disabled and its outputs are stable. The slave is now transparent but the master is supplying it with stable inputs. Master-slave can toggle only once for each external clock signal pulse. Because master-slave utilizes both edges of the external signal applied to clock input, this type of flip-flop is a pulse-triggered one. Despite of the interrupt in logic connection between master and slave, this type of flip-flops can have drawbacks. The main drawback is 1s catching or 0s catching property. This property is due to the fact that that the master is transparent during the time the external clock is a logic one. Therefore when the slave s output is a logic 0 and J input changes to 1 after rising edge of, then master will catch this set condition. The set condition is then passed on to the slave on the falling edge of. The slave s output becomes a logic 1, although on rising edge of the clock J input was inactive. It means that such flip-flop catches 1s. The 0s catching is essentially the same, with the difference that it happens when slave s output is a logic 1 and reset condition on K input occurs after raising edge of the clock. This reset condition is caught by master and then passed on to the slave resetting its output. The 1s catching and 0s catching property exists for all master-slave flipflops that do not contain data-lockout feature. When data-lockout feature is present, then the input conditions are checked only on raising edge and 1s or 0s catching does not take place. The logic symbol of JK flip-flop with 1s and 0s catching is shown in the Fig. 12, while logic symbol of JK flipflop with data-lockout is shown in the Fig. 13. J K postponed output symbols signifying pulse triggering Figure 12. Logic symbol of the master-slave JK flip-flop with 1s and 0s catching J K dynamic input postponed outputs Figure 13. Logic symbol of the master-slave JK flip-flop with data-lockout feature Page 9 of 12

3.3. Edge triggered flip-flops An edge-triggered flip-flop is a device designed to respond to a raising or a falling edge of the clock signal. The influence of external signals on inputs and changes on outputs of edge-triggered flip-flops are made on the same edge of the clock. hanges of input signals that occur outside of the very short time (setup time + hold time) around the active edge of the flip-flop are ignored. The logic symbol of positive edge-triggered D flip-flop is given in Fig. 14 and logic symbol of negative edge-triggered D flip-flop is given in Fig. 15. D dynamic input Figure 14. Logic symbol of the positive edge-triggered D flip-flop D dynamic input Figure 15. Logic symbol of the negative edge-triggered D flip-flop 4. How to prepare yourself at home to laboratory Page 10 of 12

1. You should know the reduced characteristic tables and excitation tables of all types of flip-flops. 2. You should be familiar with terminology and concepts concerning classification of flip-flops, active values and dominance of inputs, the triggering ways. 3. You should resolve all theoretical parts of the tasks below, so that on laboratory, you could implement your designs and verify your ideas. Especially you should have designed on a paper all circuits and prepared (in the form of timing diagrams) such changes of inputs, which after filling outputs (from observations made during laboratory) give you unique answers. My suggestion is to prepare short timings one waveform for only one question, and not one long waveform suitable for all problems covered in a task. 5. Tasks to be performed during laboratory 1. Design and implement with NAND gates sr basic latch with dominant setting input (Fig. 16). Draw timing diagrams (taken from the built circuit) illustrating the behavior of the device s 1 1 r 1 Figure 16. Logic symbol of the sr basic latch with dominant setting input 2. Design and implement with NAND gates ~s~r basic latch with dominant resetting input (Fig. 17). Draw timing diagrams (taken from the built circuit) illustrating the behavior of the device s 1 0 r 1 Figure 17. Logic symbol of the ~s~r basic latch with dominant resetting input 3. Use only asynchronous inputs of the synchronous D flip-flop to determine their active value and which of them is dominant. Draw timing diagrams used to resolve the problem 4. Use only asynchronous inputs of the synchronous JK flip-flop to determine their active value and which of them is dominant. Draw timing diagrams used to resolve the problem 5. Recognize the triggering way of the synchronous D flip-flops (gated latch, master slave with or without 1s and 0s catching, or positive or negative edge-triggered). Draw timing diagrams used to resolve the problem Page 11 of 12

6. Recognize the triggering way of the synchronous JK flip-flops (gated latch, master slave with or without 1s and 0s catching, or positive or negative edge-triggered). Draw timing diagrams used to resolve the problem. Help: Since the task here is not to obtain full characteristics of the JK flip-flop, but only the triggering way, it is convenient to connect inputs J and K together. In this way from logical point of view you will obtain T flip-flop, but the triggering way will remain unchanged and the circuit will have only two inputs (T and ) instead three (J, K and ). It will simplify the problem. 6. Instructions to follow 1. Solve all tasks before the exercise. 2. Implement the circuits specified by your supervisor (using given elements). Present working circuits to your supervisor for acceptance. Page 12 of 12