Combinational Logic Decoders, Encoders, Multiplexers 03.

Slides:



Advertisements
Similar presentations
Review: Additional Boolean operations
Advertisements

Multiplexers Today, we’ll study multiplexers, which are just as commonly used as the decoders we presented last time. Again, These serve as examples for.
Digital Design: Combinational Logic Blocks
Modular Combinational Logic
Combinational Circuits
Combinational Circuits
Functions and Functional Blocks
CS370 – Spring 2003 Programmable Logic Devices PALs/PLAs.
111 Basic Circuit Elements n Standard TTL Small-Scale Integration: 1 chip = 2-8 gates n Requires numerous chips to build interesting circuits n Alternative:
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
Comparator.
CPEN Digital System Design
IV - Combinational Logic Technologies © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Combinational Logic Technologies Standard gates  gate packages.
ECE C03 Lecture 41 Lecture 4 Combinational Logic Implementation Technologies Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
ECE C03 Lecture 61 Lecture 6 Arithmetic Logic Circuits Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Lecture 8 Arithmetic Logic Circuits
Chapter # 4: Programmable and Steering Logic Section 4.1
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
EE2174: Digital Logic and Lab
DIGITAL SYSTEMS TCE OTHER COMBINATIONAL LOGIC CIRCUITS DECODERS ENCODERS.
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Propositional Calculus Math Foundations of Computer Science.
Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Top-down modular design
Decoders, Multiplexers and Programmable Logic. MSI and PLD components1 Decoders Next, we’ll look at some commonly used circuits: decoders and multiplexers.
Combinational and Sequential Logic Circuits.
1 COMBINATIONAL LOGIC One or more digital signal inputs One or more digital signal outputs Outputs are only functions of current input values (ideal) plus.
Lecture 23 Final Revision 3. Prof. Sin-Min Lee.
CS1Q Computer Systems Lecture 8
Chapter 4. combinational logic technologies
IKI c-Decoders, Selectors, etc. Bobby Nazief Semester-I The materials on these slides are adopted from: CS231’s Lecture Notes at UIUC,
1 Lecture 9 Demultiplexers Programmable Logic Devices  Programmable logic array (PLA)  Programmable array logic (PAL)
Combinational Design, Part 3: Functional Blocks
4-1 Introduction Chapter # 4: Programmable and Steering Logic.
CHAPTER 4 Combinational Logic
Chapter 5 Designing Combinational Systems Tell me what you Have in Have out And want done in between Then I can build a program to do anything. Capt. Ed.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
CS231 Boolean Algebra1 K-map Summary K-maps are an alternative to algebra for simplifying expressions. – The result is a minimal sum of products, which.
درس مدارهای منطقی دانشگاه قم مدارهای منطقی محاسباتی تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه.
1 CSE370, Lecture 11 Lecture 11  Logistics  HW3 due now  Lab4 goes on as normal next week  Tuesday review 6pm, place TBD  Last lecture  "Switching-network"
Programmable Logic Devices (PLDs)
05 BA2 Page 1 ECEn/CS 224 Boolean Algebra – Part 2.
Hamming Code,Decoders and D,T-flip flops Prof. Sin-Min Lee Department of Computer Science.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
1 Carry Lookahead Logic Carry Generate Gi = Ai Bi must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi carry in will equal carry out here.
Chapter # 4: Programmable Logic
1 Combinational Logic EE 208 – Logic Design Chapter 4 Sohaib Majzoub.
DIGITAL SYSTEMS Programmable devices PLA-PAL Rudolf Tracht and A.J. Han Vinck.
Programmable logic devices. CS Digital LogicProgrammable Logic Device2 Outline PLAs PALs ROMs.
Addition and multiplication Arithmetic is the most basic thing you can do with a computer, but it’s not as easy as you might expect! These next few lectures.
LECTURE 4 Logic Design. LOGIC DESIGN We already know that the language of the machine is binary – that is, sequences of 1’s and 0’s. But why is this?
Revisão de Circuitos Lógicos PARTE III. Review Use this table and techniques we learned to transform from 1 to another.
Chapter # 4: Programmable Logic
Lecture 9 Logistics Last lecture Today HW3 due Wednesday
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
Chapter 6 Functions of Combinational Logic
Additional Gates and Decoders
Programmable Configurations
Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent.
Dr. Clincy Professor of CS
Lecture 11 Logistics Last lecture Today HW3 due now
Design example: Comparing 2-bit numbers
CSE 370 – Winter 2002 – Comb. Logic building blocks - 1
From now on: Combinatorial Circuits:
Multiplexers For the rest of the day, we’ll study multiplexers, which are just as commonly used as the decoders we presented last time. Again, These serve.
Overview Last lecture Timing; Hazards/glitches
Digital System Design Combinational Logic
Multiplexers Next, we’ll study multiplexers, which are just as commonly used as the decoders we presented last time. Again, These serve as examples for.
ECE 352 Digital System Fundamentals
Presentation transcript:

Combinational Logic Decoders, Encoders, Multiplexers 03

Decoders  Next, we’ll look at some commonly used circuits: decoders and multiplexers. ◦ These serve as examples of the circuit analysis and design techniques. ◦ They can be used to implement arbitrary functions. ◦ We are introduced to “abstraction” and “modularity” as hardware design principles.  We’ll often use decoders and multiplexers as building blocks in designing more complex hardware Spring'14Page Logic Design / 03

What is a Decoder?  In older days, the (good) printers used to be like typewriters: ◦ To print “A”, a wheel turned, brought the “A” key up, which then was struck on the paper.  Letters are encoded as 8 bit codes inside the computer. ◦ When the particular combination of bits that encodes “A” is detected, we want to activate the output line corresponding to A Decoder  How to do this “detection” : Decoder  General idea: given a k-bit input, ◦ Detect which of the 2 k combinations is represented ◦ Produce 2 k outputs, only one of which is “1”. Spring'14Page Logic Design / 03

What does a Decoder do?  A n-to-2 n decoder takes an n-bit input and produces 2 n outputs. The n inputs represent a binary number that determines which of the 2 n outputs is uniquely true.  A 2-to-4 decoder operates according to the following truth table. ◦ The 2-bit input is called S1 S0, and the four outputs are Q0-Q3. ◦ If the input is the binary number i, then output Qi is uniquely true.  For instance, if the input S1 S0 = 10 (decimal 2), then output Q2 is true, and Q0, Q1, Q3 are all false.  This circuit “decodes” a binary number into a “one-of-four” code. Spring'14Page Logic Design / 03

How can you build a 2-to-4 decoder?  Follow the design procedures! ◦ We have a truth table, so we can write equations for each of the four outputs (Q0-Q3), based on the two inputs (S0-S1).  In this case there’s not much to be simplified. Q0= S1’ S0’ Q1= S1’ S0 Q2= S1 S0’ Q3= S1 S0 Spring'14Page Logic Design / 03

A Picture of a 2-to-4 Decoder Spring'14Page Logic Design / 03 Q0= S1’ S0’ Q1= S1’ S0 Q2= S1 S0’ Q3= S1 S0

Enable Inputs enable input “activate”“deactivate”  Many devices have an additional enable input, which is used to “activate” or “deactivate” the device.  For a decoder, ◦ EN=1 activates the decoder, so it behaves as specified earlier. Exactly one of the outputs will be 1. ◦ EN=0 “deactivates” the decoder. By convention, that means all of the decoder’s outputs are 0.  We can include this additional input in the decoder’s truth table: Spring'14Page Logic Design / 03

An aside: Abbreviated Truth Tables  In this table, note that whenever EN=0, the outputs are always 0, regardless of inputs S1 and S0.  We can abbreviate the table by writing x’s in the input columns for S1 and S0. Spring'14Page Logic Design / 03

 Decoders are common enough that we want to encapsulate them and treat them as an individual entity.  Block diagrams  Block diagrams for 2-to-4 decoders are shown here. The names of the inputs and outputs, not their order, is what matters. Blocks and Abstraction Q0= S1’ S0’ Q1= S1’ S0 Q2= S1 S0’ Q3= S1 S0 Spring'14Page Logic Design / 03

Decoder  A decoder block provides abstraction: ◦ You can use the decoder as long as you know its truth table or equations, without knowing exactly what’s inside. ◦ It makes diagrams simpler by hiding the internal circuitry. ◦ It simplifies hardware reuse. You don’t have to keep rebuilding the decoder from scratch every time you need it.  These blocks are like functions in programming! Spring' Logic Design / 03Page 10

A 3-to-8 Decoder  Larger decoders are similar. Here is a 3- to-8 decoder. ◦ The block symbol is on the right. ◦ A truth table (without EN) is below. ◦ Output equations are at the bottom right.  Again, only one output is true for any input combination. Q0= S2’ S1’ S0’ Q1= S2’ S1’ S0 Q2= S2’ S1 S0’ Q3= S2’ S1 S0 Q4= S2 S1’ S0’ Q5= S2 S1’ S0 Q6= S2 S1 S0’ Q7= S2 S1 S0 Spring'14Page Logic Design / 03

So what good is a decoder?  Do the truth table and equations look familiar?  Decoders are sometimes called minterm generators. ◦ For each of the input combinations, exactly one output is true. ◦ Each output equation contains all of the input variables. ◦ These properties hold for all sizes of decoders.  This means that you can implement arbitrary functions with decoders. ◦ If you have a sum of minterms equation for a function, you can easily use a decoder (a minterm generator) to implement that function. Q0= S1’ S0’ Q1= S1’ S0 Q2= S1 S0’ Q3= S1 S0 Spring'14Page Logic Design / 03

Design example: “Addition”  Let’s make a circuit that adds three 1 -bit inputs X, Y and Z.  We will need two bits to represent the total; let’s call them C and S, for “carry” and “sum” Note that C and S are two separate functions of the same inputs X, Y and Z.  Here is a truth table and sum-of-minterms equations for C and S = = 10 C(X,Y,Z) =  m(3,5,6,7) S(X,Y,Z) =  m(1,2,4,7) Spring'14Page Logic Design / 03

 Here, two 3-to-8 decoders implement C and S as sums of minterms. Decoder-based “Adder” C (X,Y,Z) =  m (3,5,6,7) S (X,Y,Z) =  m (1,2,4,7) Spring'14Page Logic Design / 03

Using just one decoder C (X,Y,Z) =  m (3,5,6,7) S (X,Y,Z) =  m (1,2,4,7)  Since the two functions C and S both have the same inputs, we could use just one decoder instead of two. Spring'14Page Logic Design / 03

Building a 3-to-8 decoder  You could build a 3-to-8 decoder directly from the truth table and equations below, just like how we built the 2-to-4 decoder.  Another way to design a decoder is to break it into smaller pieces.  Notice some patterns in the table below: ◦ When S2 = 0, outputs Q0-Q3 are generated as in a 2-to-4 decoder. ◦ When S2 = 1, outputs Q4-Q7 are generated as in a 2-to-4 decoder. Q0= S2’ S1’ S0’= m 0 Q1= S2’ S1’ S0= m 1 Q2= S2’ S1 S0’= m 2 Q3= S2’ S1 S0= m 3 Q4= S2 S1’ S0’= m 4 Q5= S2 S1’ S0= m 5 Q6= S2 S1 S0’= m 6 Q7= S2 S1 S0= m 7 Spring'14Page Logic Design / 03

Decoder Expansion  You can use enable inputs to string decoders together. Here’s a 3-to-8 decoder constructed from two 2-to-4 decoders: Spring'14Page Logic Design / 03

Modularity  Be careful not to confuse the “inner” inputs and outputs of the 2-to-4 decoders with the “outer” inputs and outputs of the 3-to-8 decoder (which are in boldface).  This is similar to having several functions in a program which all use a formal parameter “x”  You could verify that this circuit is a 3-to-8 decoder, by using equations for the 2-to-4 decoders to derive equations for the 3-to-8. Spring'14Page Logic Design / 03

A variation of the standard decoder  The decoders we’ve seen so far are active-high decoders.  An active-low decoder is the same thing, but with an inverted EN input and inverted outputs. Spring'14Page Logic Design / 03

Separated at birth?  Active-high decoders generate minterms, as we’ve already seen.  The output equations for an active-low decoder are mysteriously similar, yet somehow different. ◦ It turns out that active-low decoders generate maxterms. Q3= S1 S0 Q2= S1 S0’ Q1= S1’ S0 Q0= S1’ S0’ Q3’= (S1 S0)’= S1’ + S0’ Q2’= (S1 S0’)’= S1’ + S0 Q1’= (S1’ S0)’= S1 + S0’ Q0’= (S1’ S0’)’= S1 + S0 Spring'14Page Logic Design / 03

Product of maxterms form  Every function can be written as a unique product of maxterms: ◦ Only AND (product) operations occur at the “outermost” level. ◦ Each term must be maxterm.  If you have a truth table for a function, you can write a product of maxterms expression by picking out the rows of the table where the function output is 0. f = M 4 M 5 M 7 =  M(4,5,7) = (x’ + y + z)(x’ + y + z’)(x’ + y’ + z’) f’ = M 0 M 1 M 2 M 3 M 6 =  M(0,1,2,3,6) = (x + y + z)(x + y + z’)(x + y’ + z) (x + y’ + z’)(x’ + y’ + z) f’ contains all the maxterms not in f. Spring'14Page Logic Design / 03

Active-low decoder example  So we can use active-low decoders to implement arbitrary functions too, but as a product of maxterms.  For example, here is an implementation of the function from the previous page  f (x,y,z) =  M (4,5,7), using an active-low decoder.  The “ground” symbol connected to EN represents logical 0, so this decoder is always enabled.  Remember that you need an AND gate for a product of sums. Spring'14Page Logic Design / 03

Converting between standard forms  We can easily convert a sum of minterms to a product of maxterms.  The easy way is to replace minterms with maxterms, using maxterm numbers that don’t appear in the sum of minterms:  The same thing works for converting in the opposite direction, from a product of maxterms to a sum of minterms. f=  m(0,1,2,3,6) f’=  m(4,5,7)-- f’ contains all the minterms not in f = m 4 + m 5 + m 7 (f’)’= (m 4 + m 5 + m 7 )’-- complementing both sides f = m 4 ’ m 5 ’ m 7 ’-- DeMorgan’s law = M 4 M 5 M 7 -- from the previous page =  M(4,5,7) F=  m(0,1,2,3,6) =  M(4,5,7) Spring'14Page Logic Design / 03

Summary  A n-to-2 n decoder generates the minterms of an n-variable function. ◦ As such, decoders can be used to implement arbitrary functions. ◦ Later on we’ll see other uses for decoders too.  Some variations of the basic decoder include: ◦ Adding an enable input. ◦ Using active-low inputs and outputs to generate maxterms.  We also talked about: ◦ Applying our circuit analysis and design techniques to understand and work with decoders. ◦ Using block symbols to encapsulate common circuits like decoders. ◦ Building larger decoders from smaller ones. Spring'14Page Logic Design / 03

Multiplexers Demultiplexers Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA. Spring'14Page Logic Design / 03

In the good old times …  Multiplexers, or “muxes”, are used to choose between resources.  A real-life example: in the old days before networking, several computers could share one printer through the use of a switch. Spring'14Page Logic Design / 03

Multiplexers  A 2 n -to- 1 multiplexer sends one of 2 n input lines to a single output line. ◦ A multiplexer has two sets of inputs:  2 n data input lines  S select lines, to pick one of the 2 n data inputs ◦ The mux output is a single bit, which is one of the 2 n data inputs.  The simplest example is a 2-to- 1 mux:  The select bit S controls which of the data bits D0-D1 is chosen: ◦ If S=0, then D0 is the output (Q=D0). ◦ If S=1, then D1 is the output (Q=D1). Q = S’ D 0 + S D 1 Spring'14Page Logic Design / 03

More truth table abbreviations  Here is a full truth table for this 2-to- 1 mux, based on the equation on the right:  Another kind of abbreviated truth table. ◦ Input variables appear in the output column. ◦ This table implies that when S=0, the output Q=D 0, and when S= 1 the output Q=D 1. ◦ This is a pretty close match to the equation. Q = S’ D 0 + S D 1 Spring'14Page Logic Design / 03

A 4-to-1 Multiplexer  Here is a block diagram and abbreviated truth table for a 4-to-1 mux. Q = S 1 ’ S 0 ’ D 0 + S 1 ’ S 0 D 1 + S 1 S 0 ’ D 2 + S 1 S 0 D 3 Spring'14Page Logic Design / 03

Implementing functions with multiplexers  Muxes can be used to implement arbitrary functions.  One way to implement a function of n variables is to use an n-to-1 mux: ◦ For each minterm m i of the function, connect 1 to mux data input Di. Each data input corresponds to one row of the truth table. ◦ Connect the function’s input variables to the mux select (S) inputs. These are used to indicate a particular input combination.  For example, let’s look at f (x,y,z) =  m (1,2,6,7). Spring'14Page Logic Design / 03

A more efficient way  We can actually implement f(x,y,z) =  m(1,2,6,7) with just a 4-to-1 mux, instead of an 8-to-1.  Step 1: Find the truth table for the function, and group the rows into pairs. Within each pair of rows, x and y are the same, so f is a function of z only. ◦ When xy=00, f=z ◦ When xy=01, f=z’ ◦ When xy=10, f=0 ◦ When xy=11, f=1  Step 2: Connect the first two input variables of the truth table (here, x and y) to the select bits S 1 S 0 of the 4-to-1 mux.  Step 3: Connect the equations above for f(z) to the data inputs D 0 -D 3. Spring'14Page Logic Design / 03

Multiplexer-based Adder  Let’s implement the adder carry function, C (X,Y,Z), with muxes.  There are three inputs, so we’ll need a 4-to-1 mux.  The basic setup is to connect two of the input variables (usually the first two in the truth table) to the mux select inputs. With S 1 =X and S 0 =Y, then Q = X’Y’D 0 + X’YD 1 + XY’D 2 + XYD 3 Equation for the multiplexer Spring'14Page Logic Design / 03

Multiplexer-based “Carry”  We can set the multiplexer data inputs D 0 -D 3, by fixing X and Y and finding equations for C in terms of just Z. C= X’ Y’ D 0 + X’ Y D 1 + X Y’ D 2 + X Y D 3 = X’ Y’ 0+ X’ Y Z+ X Y’ Z+ X Y 1 = X’ Y Z+ X Y’ Z+ XY =  m(3,5,6,7) When XY=00, C=0 When XY=01, C=Z When XY=10, C=Z When XY=11, C=1 Spring'14Page Logic Design / 03

Multiplexer-based “Sum”  Here’s the same thing, but for the “sum” function S(X,Y,Z). S= X’ Y’ D 0 + X’ Y D 1 + X Y’ D 2 + X Y D 3 = X’ Y’ Z+ X’ Y Z’+ X Y’ Z’+ X Y Z =  m(1,2,4,7) When XY=00, S=Z When XY=01, S=Z’ When XY=10, S=Z’ When XY=11, S=Z Spring'14Page Logic Design / 03

Summary  A 2 n -to- 1 multiplexer routes one of 2 n input lines to a single output line.  Just like decoders, ◦ Muxes are common enough to be supplied as stand- alone devices for use in modular designs. ◦ Muxes can implement arbitrary functions.  We saw some variations of the standard multiplexer: ◦ Smaller muxes can be combined to produce larger ones. ◦ We can add active-low or active-high enable inputs.  As always, we use truth tables and Boolean algebra to analyze things. Spring'14Page Logic Design / 03

Binary Addition Spring'14Page Logic Design / 03 The following slides are adapted from David Culler’s slides used at Electrical Engineering and Computer Sciences, University of California, Berkeley

Half Adder AiAi BiBi Sum = A i B i + A i B i = A i xor B i AiAi BiBi Carry = A i. B i Spring'14Page Logic Design / 03

Half-Adder Schematic Spring' Logic Design / 03Page 38

Full Adder Spring' Logic Design / 03Page 39 S = C I xor A xor B C O = B C I + A C I + A B = C I (A + B) + A B

Full Adder from Half Adders C o = = A.B + C I (A xor B) = A.B + B.C I + A.C I Half Adder A B Half Adder A xor B CICI A xor B xor C I SS COCO COCO C I (A xor B) A.B S COCO Spring'14Page Logic Design / 03

Ripple Carry Adder Spring'14Page Logic Design / 03

Delay in the Ripple Carry Adder Critical delay: the propagation of carry from low to high order stages late arriving signal two gate delays to compute CO 4 stage adder final sum and carry Spring'14Page Logic Design / 03

Ripple Carry Timing Critical delay: the propagation of carry from low to high order stages worst case addition T0: Inputs to the adder are valid T2: Stage 0 carry out (C1) T4: Stage 1 carry out (C2) T6: Stage 2 carry out (C3) T8: Stage 3 carry out (C4) 2 delays to compute sum but last carry not ready until 6 delays later Spring'14Page Logic Design / 03

What really happens with the carries A B Cout S Cin 0 1 Cin ~Cin 10 Cin ~Cin Cin Carry action Kill Propagate Generate Carry Generate Gi = Ai Bi must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi carry in will equal carry out here Ai Bi Gi Ai Bi Pi All generates and propagates in parallel at first stage. No ripple. Spring'14Page Logic Design / 03

Carry Look Ahead Logic Carry Generate Gi = Ai Bi must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi carry in will equal carry out here Si = Ai xor Bi xor Ci = Pi xor Ci Ci+1 = Ai Bi + Ai Ci + Bi Ci = Ai Bi + Ci (Ai + Bi) = Ai Bi + Ci (Ai xor Bi) = Gi + Ci Pi Sum and Carry can be reexpressed in terms of generate/propagate: Ci Pi SiSi Gi Ci Pi C i+1 Spring'14Page Logic Design / 03

All Carries in Parallel Reexpress the carry logic for each of the bits: C1 = G0 + P0 C0 C2 = G1 + P1 C1 = G1 + P1 G0 + P1 P0 C0 C3 = G2 + P2 C2 = G2 + P2 G1 + P2 P1 G0 + P2 P1 P0 C0 C4 = G3 + P3 C3 = G3 + P3 G2 + P3 P2 G1 + P3 P2 P1 G0 + P3 P2 P1 P0 C0 Each of the carry equations can be implemented in a two-level logic network Variables are the adder inputs and carry in to stage 0! Spring'14Page Logic Design / 03

CLA Implementation Adder with Propagate and Generate Outputs Increasingly complex logic Spring'14Page Logic Design / 03

Programmable Logic Spring'14Page Logic Design / 03

Programmable Logic Devices (PLDs)  PLD is a re-configurable IC built with large numbers of gates connected through electronic fuses to implement arbitrary circuits. ◦ Programmable Logic Array (PLA) ◦ Programmable Array Logic (PAL) ◦ Programmable ROM (read-only memory) ◦ FPGA Spring'14Page Logic Design / 03

 Two dimensional array of 1s and 0s ◦ entry (row) is called a "word" ◦ width of row = word-size ◦ index is called an "address" ◦ address is input ◦ selected word is output decoder 0n-1 Address 2 -1 n word[i] = 0011 word[j] = 1010 bit lines (normally pulled to 1 through resistor – selectively connected to 0 by word line controlled switches) j i Internal Organization word lines (only one is active – decoder is just right for this) Read-Only Memories Example: 10-line address x 8 data ROM 2 10 words x 8 ROM 1024 words x 8 ROM 1k x 8 ROM Spring'14Page Logic Design / 03

ABC F 0 F 1 F 2 F Truth Table F 0 = A' B' C + A B' C' + A B' C F 1 = A' B' C + A' B C' + A B C F 2 = A' B' C' + A' B' C + A B' C' F 3 = A' B C + A B' C' + A B C' Block Diagram ROM 8 words x 4 bits/word addressoutputs ABC F 0 F 1 F 2 F 3 ROMs and Combinational Logic  Combinational logic implementation (two- level canonical form) using a ROM Spring'14Page Logic Design / 03

ROM Structure n address lines inputs Decoder 2 n word lines outputs Memory Array (2 n words by m bits) m data lines Spring'14Page Logic Design / 03

inputs AND array outputs OR array product terms Programmable Logic Arrays  Pre-fabricated building block of many AND/OR gates ◦ Actually NOR or NAND ◦ “Personalized” by making or breaking connections among gates ◦ Programmable array block diagram for sum of products form Spring'14Page Logic Design / 03

Example: F0 = A + B' C' F1 = A C' + A B F2 = B' C' + A B F3 = B' C + A personality matrix 1 = uncomplemented in term 0 = complemented in term – = does not participate 1 = term connected to output 0 = no connection to output input side: output side: productinputsoutputs termABCF0F1F2F3 AB11–0110 B'C– AC'1–00100 B'C'– A1––1001 reuse of terms Enabling Concept  Shared product terms among outputs Spring'14Page Logic Design / 03

Before Programming  All possible connections available before "programming" Spring'14Page Logic Design / 03

After Programming  Unwanted connections are "blown" ◦ Fuse (normally connected, break unwanted ones) ◦ Anti-fuse (normally disconnected, make wanted connections) Spring'14Page Logic Design / 03

Notation for implementing F0 = A B + A' B' F1 = C D' + C' D AB+A'B' CD'+C'D AB A'B' CD' C'D ABCD Alternate Representation for High Fan-in Structures  Short-hand notation -- don't have to draw all the wires ◦ Signifies a connection is present and perpendicular signal is an input to gate Spring'14Page Logic Design / 03

ABCF1F2F3F4F5F full decoder as for memory address bits stored in memory Programmable Logic Array Example  Multiple functions of A, B, C ◦ F1 = A B C ◦ F2 = A + B + C ◦ F3 = A' B' C' ◦ F4 = A' + B' + C' ◦ F5 = A xor B xor C ◦ F6 = A xnor B xnor C Spring'14Page Logic Design / 03

a given column of the OR array has access to only a subset of the possible product terms PALs and PLAs  Programmable logic array (PLA) ◦ what we've seen so far ◦ unconstrained fully-general AND and OR arrays  Programmable array logic (PAL) ◦ constrained topology of the OR array ◦ innovation by Monolithic Memories ◦ faster and smaller OR plane Spring'14Page Logic Design / 03

0 1 X X X X 0 0 X X D A B C Minimized Functions: W = A + B D + B C X = B C' Y = B + C Z = A'B'C'D + B C D + A D' + B' C D' ABCDWXYZ –––––11––––––ABCDWXYZ –––––11–––––– 0 0 X X X X 0 1 X X D A B C K-map for WK-map for X 0 1 X X X X 1 1 X X D A B C K-map for Y PALs and PLAs: Design Example  BCD to Gray code converter K-map for Z 0 0 X X X X 1 0 X X D A B C Spring'14Page Logic Design / 03

 Code converter: programmed PLA not a particularly good candidate for PAL/PLA implementation since no terms are shared among outputs however, much more compact and regular implementation when compared with discrete AND and OR gates Minimized Functions: W = A + B.D + B.C X = B.C' Y = B + C Z = A’.B’.C’.D + B.C.D + A.D' + B’.C.D' PALs and PLAs: design example (cont’d) Spring'14Page Logic Design / 03

4 product terms per each OR gate AB CD PALs and PLAs: design example (cont’d)  Code converter: ◦ programmed PAL Spring'14Page Logic Design / 03

PALs and PLAs: Another Design Example  Magnitude comparator D A B C D A B C D A B C D A B C K-map for EQ K-map for NE K-map for GT K-map for LT LT = A'B'D +A'C+B'CD GT =B C'D'+AC'+ABD' EQ =A'B'C'D'+ A'BC'D +ABCD+AB'CD’ NE =AC'+ B’D +BD’+A'C Spring'14Page Logic Design / 03