Spiral 2-4. Function synthesis with: Muxes (Shannon's Theorem) Memories

Similar documents
Learning Outcomes. Spiral 2 4. Function Synthesis Techniques SHANNON'S THEOREM

14.1. Unit 14. State Machine Design

9.1. Unit 9. Implementing Combinational Functions with Karnaugh Maps or Memories

CHAPTER1: Digital Logic Circuits Combination Circuits

MODULAR CIRCUITS CHAPTER 7

Review for Test 1 : Ch1 5

Systems I: Computer Organization and Architecture

Combinational Logic Design Principles

211: Computer Architecture Summer 2016

Chapter 3 Ctd: Combinational Functions and Circuits

Number System conversions

WORKBOOK. Try Yourself Questions. Electrical Engineering Digital Electronics. Detailed Explanations of

Lecture 2 Review on Digital Logic (Part 1)

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

MC9211 Computer Organization

Review: Additional Boolean operations

Introduction to Digital Logic

Software Engineering 2DA4. Slides 8: Multiplexors and More

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

Computational Boolean Algebra. Pingqiang Zhou ShanghaiTech University

Binary addition example worked out

Combinational Logic Fundamentals

L4: Karnaugh diagrams, two-, and multi-level minimization. Elena Dubrova KTH / ICT / ES

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

Chap 2. Combinational Logic Circuits

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Section 4.1 Switching Algebra Symmetric Functions

Fundamentals of Computer Systems

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

Spiral 1 / Unit 5. Karnaugh Maps

Combinational Logic Design Combinational Functions and Circuits

Class Website:

Fundamentals of Computer Systems

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

9/29/2016. Task: Checking for a Lower-Case Letter. ECE 120: Introduction to Computing. Change C 5 to C 5 to Obtain L(C) from U(C)

Chapter 2. Boolean Algebra and Logic Gates

Design of Sequential Circuits

ECE 2300 Digital Logic & Computer Organization

Chapter 2: Boolean Algebra and Logic Gates

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

Digital Logic Design. Combinational Logic

CprE 281: Digital Logic

14:332:231 DIGITAL LOGIC DESIGN. Combinational Circuit Synthesis

Fundamentals of Digital Design

CPE100: Digital Logic Design I

Chapter 5. Digital systems. 5.1 Boolean algebra Negation, conjunction and disjunction

Combinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.

ELCT201: DIGITAL LOGIC DESIGN

CHAPTER 12 Boolean Algebra

Lecture 6: Gate Level Minimization Syed M. Mahmud, Ph.D ECE Department Wayne State University

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

Logic Gate Level. Part 2

Boolean Algebra, Gates and Circuits

Unit 2 Session - 6 Combinational Logic Circuits

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

ELC224C. Karnaugh Maps

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

ENG2410 Digital Design Combinational Logic Circuits

Logic Design Combinational Circuits. Digital Computer Design

ECE380 Digital Logic. Positional representation

( c) Give logic symbol, Truth table and circuit diagram for a clocked SR flip-flop. A combinational circuit is defined by the function

Fundamentals of Computer Systems

Chapter 2 Combinational Logic Circuits

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Chapter 2 Combinational Logic Circuits

Building a Computer Adder

Logic Design. Chapter 2: Introduction to Logic Circuits

to become literate in most common concepts and terminology of digital electronics

Week-I. Combinational Logic & Circuits

Chapter 3 Combinational Logic Design

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

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

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

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


Contents. Chapter 3 Combinational Circuits Page 1 of 36

Combinational Logic. Review of Combinational Logic 1

EC-121 Digital Logic Design

Part 1: Digital Logic and Gates. Analog vs. Digital waveforms. The digital advantage. In real life...

Boolean cubes EECS150. Mapping truth tables onto cubes. Simplification. The Uniting Theorem. Three variable example

Written reexam with solutions for IE1204/5 Digital Design Monday 14/

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

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

ELCT201: DIGITAL LOGIC DESIGN

DIGITAL LOGIC CIRCUITS

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

Combinational Logic Design Arithmetic Functions and Circuits

Overview. Arithmetic circuits. Binary half adder. Binary full adder. Last lecture PLDs ROMs Tristates Design examples

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Simplifying Logic Circuits with Karnaugh Maps

Karnaugh Maps (K-Maps)

Combinatorial Logic Design Principles

Programmable Logic Devices

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

Transcription:

2-4. Spiral 2-4 Function synthesis with: Muxes (Shannon's Theorem) Memories

2-4.2 Learning Outcomes I can implement logic for any truth table by using Shannon's theorem to decompose the function to create two smaller functions and a 2-to- mux I can recursively apply Shannon's theorem k times to decompose any size truth table to arrive at 2 k smaller functions and a 2 k -to- mux I can implement logic for any truth table by using a memory as a look-up table I understand how to determine the necessary dimensions of the memory I understand how to reinterpret input combinations as address inputs to determine the correct row to place the desired output

2-4.3 Function Synthesis Techniques Given a combination function (i.e. truth table or other description) what methods can we use to arrive at a circuit? Karnaugh maps Sum of minterms / Produce of maxterms Neither of these scale well to larger number of inputs Now we will see a few others X Z P Primes between -7

2-4.4 Implementing functions with muxes SHANNON'S THEOREM

2-4.5 Simplify This Given F(x,y,z) = x yz + y z, simplify F(,y,z) = then simplify F(,y,z) = Given G(a,b,c,d) = bd + ab cd + ac d G(,,c,d) =

2-4.6 2-to- Mux: Another View Old Views: I I S -bit wide 2-to- mux (I ) S IN IN if(s==) = IN else = IN New View: We can show the function of a 2-to- mux as a splitter where the variable 's' decides which input passes upwards s I I

z 2-4.7 3-bit Prime Number Function X Z P X Z P F OFF-set x y ON-set z Primes between -7 Truth Table z if(z==) output else output I I S

2-4.8 Function Implementation w/ Muxes Implementing a function using muxes relies is based on Shannon s expansion theorem which states: F(X,X 2,,X n ) = X F(,X 2,,X n ) + X F(,X 2,,X n ) X can be pulled out of F if we substitute an appropriate constant and qualify it with X or X Now recall a 2-to- mux can be built as: F = S I + S I Comparing the two equations, Shannon s theorem says we can use X as our select bit to a 2-to- mux with F(,X 2, X n ) as input of our mux and F(,X 2,,X n ) as input

2-4.9 Binary Decision Trees & Muxes Z F F(x,y,z) X Z F Z F F(,y,z) F(,,z) Z F F(,,z) x y z F(,y,z) F(,y,z) F(,,z) F(,,z) F(,,z) F(,,z) F(x,y,z) Z F F(,y,z) Z F F(,,z) Z F x y z F(x,y,z) F(,y,z) F(,y,z) F(,,z) F(,,z) F(,,z) F(,,z) F(,,z)

2-4. Splitting on X We can use smaller muxes by breaking the truth table into fewer disjoint sets This increases the amount of logic at the inputs though Break the truth table into groups based on some number (k) of MSB s For each group, describe F as a function of the n-k LSB s X Z F I I S X Put the k MSB s on the selects F

2-4. Splitting on X We can use smaller muxes by breaking the truth table into fewer disjoint sets This increases the amount of logic at the inputs though Break the truth table into groups based on some number (k) of MSB s For each group, describe F as a function of the n-k LSB s X Z F y xor z (y z + yz ) (y + z) Z Z I I S X Put the k MSB s on the selects F

2-4.2 Implement G X Z G y I G y xor z I S X

2-4.3 Shannon s Theorem F(X,X 2,,X n ) = X F(,X 2,,X n ) + X F(,X 2,,X n ) Now recall a 2-to- mux can be built as: F = S I + S I Comparing the two equations, Shannon s theorem says we can use X as our select bit to a 2-to- mux with F(,X 2, X n ) as input of our mux and F(,X 2,,X n ) as input We can recursively apply Shannon s theorem to pull out more variables: F(X,X 2,,X n ) = X X 2 F(,,,X n ) + X X 2 F(,,,X n ) + X X 2 F(,,,X n ) + X X 2 F(,,,X n ) +

2-4.4 Additional Logic Muxes allow us to break a function into some number of smaller, disjoint functions Use MSB s to choose which small function we want By including the use of inverters we can use a mux with n- select bits (given a function of n-var s) Break the truth table into groups of 2 rows For each group, put F in terms of: z, z,, or X Z F z z z F (z) F (z) F 2 (z) F 3 (z) F(x,y,z) can be broken into several disjoint functions z z z D D D 2 D 3 S S x y Put the n- MSB s on the selects F

2-4.5 More Practice X Z G D z D D 2 G z' D 3 S S x y

2-4.6 As Far as We like We can take this tactic all the way down and use ONL a mux to implement any function Connect the input variables to the select bits of the mux The output of the mux is the output of the function Whatever the output should be for each input value, attach that to the input of the mux X Z F D D D 2 D 3 D 4 D 5 D 6 D 7 S 2 S S x y z F

2-4.7 Splitting on Z F We can always rearrange our variables if it helps make the function simpler to implement x y z X Z F Z X F F z x y z F

2-4.8 Implementing Logic Functions We can use muxes to implement any arbitrary logic function Choose one variable to split the large function into two smaller functions: f(,x2,x3, ) and f(,x2,x3, ) A 2-to- mux will produce the output bit and the chosen "split" variable will be the select Implement f(,x2,x3, ) using any known method and connect it to input of the 2-to- mux Implement f(,x2,x3, ) using any known method and connect it to input of the 2-to- mux

2-4.9 Implementing an Initial State Since the NSL is just a combinational function of the current state and inputs, we can use Shannon's theorem (i.e. muxes)to find an implementation rather than K-Maps S NSL (Next State Logic) Q (t) Q (t) D D SM (State Memory) PRE D Q Q (t) OFL (Output Function Logic) CLK CLR RESET PRE D Q Q (t) A CLK CLK CLR RESET Current State Feedback

2-4.2 Example Implement D & D using 2-to- muxes with S as the select Current State State Q Q State Next State S = S = Q*= D Q*= D State Q* =D Q* =D G G G G G G G G G G G G Output A Q xnor Q I Q xor Q I I S S D Q xnor Q Q xnor Q I S S D D = Q xnor Q (Since both inputs are xnor, we don't need the mux)

2-4.2 Example 2 Implement D and D using (2) 4-to- muxes with Q,Q as the selects Current State Next State S = S = Output State Q Q State Q * Q * State Q * Q * SSG MTG MSG SS MS MT N/A X d d X d d d d d MT MS MS MS SS SS D S D anything D D 2 D 3 S S D anything D D 2 D 3 S S D Q Q Q Q

2-4.22 Example 3 L Implement D using a mux L OFF P= H ON P= H Current State Next State H L = H L = H L = H L = Symbol Q Sym. Q* Sym. Q* Sym. Q* Sym. Q* OFF ON OFF OFF X d ON ON ON OFF X d Note: The State Value, Q forms the Pump output (i.e. when we want the pump to be on and othewise) Due to don't care: Option : H'L' Option 2: L' I D Option : H' Option 2: H'+L' I S Q

2-4.23 Example 4 Implement D using a mux. Current State Do a K-Map for each column separately since the mux splits them Next State X = X = State Q2 Q Q State* D2 D D State* D2 D D Z Sinit Sinit S S Sinit S S S S S S S S S S Outp ut Q2 + Q I D Q2+(Q xnor Q) I S X

2-4.24 Summary Shannon's theorem allows us to decompose an ARBITRARIL large function into many smaller functions This allows a method that can scale for a function with many variables It is at the heart of many computer algorithms that will find logic implementation given highlevel descriptions of a function

2-4.25 Using a LookUp-Table to implement a function MEMORIES

2-4.26 Memories as Look-Up Tables One major application of memories in digital design is to use them as LUT s (Look- Up Tables) to implement logic functions Given a logic function use a memory to hold all the possible answers and feed the inputs of the function to the address inputs to look-up the answer

2-4.27 Implementing Functions w/ Memories 8x Memory 8x Memory X Z F Z X A A A 2 2 3 4 5 6 X,,Z inputs look up the correct answer A A A 2 2 3 4 5 6 7 7 Arbitrary Logic Function D F D

2-4.28 Implementing Functions w/ Memories 8x2 Memory 8x2 Memory X C i C o S C i X A A A 2 2 A A A 2 2 3 4 5 6 3 4 5 6 7 7 Full Adder D D D D C o S ++ =

2-4.29 Example Implement D & D using a memory Current State Next State State Q Q State Q* Q* S = S = Stat e Q* Q* G G G G G G Q Q S 8x2 Memory A A A 2 2 3 4 5 G G G G G G 6 7 D D D D

2-4.3 Example 2 L Implement D using a memory L OFF P= H ON P= H Current State Next State H L = H L = H L = H L = Symbol Q Sym. Q* Sym. Q* Sym. Q* Sym. Q* OFF ON OFF OFF X d ON ON ON OFF X d L H Q 8x Memory A A A 2 2-3 4 5 6 7 - D D

2-4.3 Example 3 Implement D and D using a memory 8x2 Memory Current State Next State S = S = Output State Q Q State Q * Q * State Q * Q * SSG MTG MSG SS MS MT Q Q S A A A 2 2 - - N/A X d d X d d d d d 3 MT MS MS MS SS SS 4 5 - - 6 7 D D D D

2-4.32 4x4 Multiplier Example Determine the dimensions of the memory that would be necessary to implement a 4x4-bit unsigned multiplier with inputs X[3:] and [3:] and outputs P[??:] (Question: How many bits are needed for P). 2 3 X X X2 X3 A A A2 A3 A4 A5 A6 A7 2 2 33 ROM Example:... X 3 X 2 X X = 3 2 = 255 P = X * = 2 * = 2 = P7 P

2-4.33 Implementing Functions w/ Memories To implement a function w/ n-variables and m outputs Just place the output truth table values in the memory Memory will have dimensions: 2 n rows and m columns Still does not scale terribly well (i.e. n-inputs requires memory w/ 2 n outputs) But it is easy and since we can change the contents of memories it allows us to create "reconfigurable" logic This idea is at the heart of FPGAs