DOC PREVIEW
Berkeley COMPSCI 150 - Lecture Notes

This preview shows page 1-2-3-22-23-24-45-46-47 out of 47 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 47 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 47 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 47 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 47 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 47 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 47 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 47 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 47 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 47 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 47 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Example: Prime GenerationCofactorsCofactors and PrimesExampleSimilar Fast Techniques to Generate RowsApproximate AlgorithmEspresso-II algorithm (approx)Espresso-II exampleEspresso-II presented here very simplifiedReturn to Exact MethodsEspresso-SignatureTwo-Level Synthesis SummaryImplementations of Two-level LogicTwo-level Logic Using NAND GatesTwo-level Logic Using NAND Gates (cont’d)Two-level Logic Using NOR GatesTwo-level Logic Using NOR Gates (cont’d)Combinational Logic SummaryHardware Description Languages: VerilogQuick History of HDLsDesign MethodologyVerilog/VHDLVerilogKey Problem (Both Verilog AND VHDL)Verilog IntroductionStructural ModelSlide 32Simple Behavioral ModelVerilog ModuleVerilog Continuous AssignmentComparator ExampleSlide 41Simple Behavioral Model: the always blockalways Block“Complete” AssignmentsIncomplete TriggersOne Latch or Two?Slide 47Verilog ifSlide 49Verilog caseSlide 51Verilog case vs C switchSlide 53Verilog case (cont)Parallel Casecasex ExampleCS 150 - Spring 2008 – Lec #3: Combinational Logic - 1Example: Prime GenerationProblem: “in practice” efficiently generate all primes for a functionSolution: Use recursive-evaluation method on “cofactors”CS 150 - Spring 2008 – Lec #3: Combinational Logic - 2CofactorsPartial evaluation of functionFa = F evaluated at a=1Fa’ = F evaluated at a=0Example: F=a’b’d’ + abd’ +a’b Fa = bd’Fa’ = b’d’ + bFor any function F, variable a:F = a Fa + a’ Fa’ (“Shannon Expansion”)Example: F = a bd’ + a’(b’d’ + b) [Check it!]CS 150 - Spring 2008 – Lec #3: Combinational Logic - 3Cofactors and PrimesTheorem: Any Function F, variable a, Primes are maximal implicants of set: {a Primes(Fa), a’ Primes(Fa’), Primes(Fa) Primes(Fa’)}In other wordsFind the primes of Fa, multiply each by aFind the primes of Fa’, multiply each by a’Multiply each prime of Fa by each prime of Fa’Maximal members of these sets are primes of FCS 150 - Spring 2008 – Lec #3: Combinational Logic - 4Example0 01 1X 0X 1DA1 10 X0 00 0BCF =0 01 11 10 XFa’ =Primes(Fa’) = d, bcX 0X 1A0 00 0Fa =Primes(Fa) = bc’,c’d’Primes(F) = a’d, a’bc, abc’,ac’d’, bc’dCS 150 - Spring 2008 – Lec #3: Combinational Logic - 5Similar Fast Techniques to Generate RowsRecurse down cofactor tree, throwing out primes when they disagreeStop when:Cofactor of on-set is empty (no rows)All the remaining primes cover the whole space (1 row, with those primes)Still one very fast technique, “Espresso-Signature” (to follow approximate algorithm)CS 150 - Spring 2008 – Lec #3: Combinational Logic - 6Approximate AlgorithmDon’t try to generate minimum coverGiven a cover (sum-of-products for on-set and don’t-care set)Generate a prime cover smaller than given coverKeep generating smaller prime covers until you can’t anymoreProgram – Espresso-IICS 150 - Spring 2008 – Lec #3: Combinational Logic - 7Espresso-II algorithm (approx)Given Cover C = c1 + c2 +…+cnWhile (we keep making improvement) PrimeCover = 0Foreach cube c_i of the cover, C Find a prime p_i containing c_i that contains as many c_j’s as possible PrimeCover = PrimeCover + p_iWe now have a prime cover p1+…+pn, Make the cover “irredundant” (example next slide). Result is a smaller prime cover“Reduce” each cube away from a prime while still retaining a cover (this permits a different expansion in next iteration)CS 150 - Spring 2008 – Lec #3: Combinational Logic - 8Espresso-II exampleF=a’b’d’ + abc’d’ + abc+ a’b, DC = abcdExpand: a’b’d’ => a’d’abc’d’ => bd’abc => bca’b => a’bPrime Cover a’d’ + bd’ + bc + a’bPrime bc is redundant: covered by bd’ + a’b + don’t-careIrredundant cover is:a’d’ + bd’ + a’bReduce to a’b’d’ + bd’ + a’bd for next iterationCS 150 - Spring 2008 – Lec #3: Combinational Logic - 9Espresso-II presented here very simplifiedSee text for fuller descriptionWhat I left outDetails of EXPAND (how to pick the primes)Details of IRREDUNDANTDetails of REDUCEESSENTIAL_PRIMES (identified early and tossed into don’t-care set for efficiency)LAST_GASP (radical reduction to get new starting point)MAKESPARSE (final pruning of literals in the output plane)CS 150 - Spring 2008 – Lec #3: Combinational Logic - 10Return to Exact MethodsRealization (mid-nineties): The only purpose of generating primes was to get to covering table!Specifically: to get to “non-dominated” rows of covering tableRealization (beyond the scope of this class)Can identify non-dominated rows without generating primes or minterms!“Espresso Signature”: first radical revision of exact two-level synthesis algorithma’d’0XX0bd’X1X0a’b01XXbcX11X0 (0000)12 (0010)15 (0101)112 (1100)1CS 150 - Spring 2008 – Lec #3: Combinational Logic - 11Espresso-SignatureEspresso-Signature AlgorithmGenerate non-dominated rows of covering tableThis forms a cover, the “canonical cover” of a logic functionUse modified Espresso EXPAND to generate non-dominated columns of covering tableSolve the covering problemMuch more efficient than standard algorithmCS 150 - Spring 2008 – Lec #3: Combinational Logic - 12Two-Level Synthesis SummaryTwo exact methods: Quine-McCluskey and Espresso-SignatureIn practice, both highly efficientTheoretically: exponential complexityAlgorithms work well because they fit circuits people actually design (though this set is not characterized well)One approximate method shown, EspressoOthers (McBoole, e.g.) similarAlso theoretically exponential complexity!In practice, fast, gives results within a few percent of optimum.CS 150 - Spring 2008 – Lec #3: Combinational Logic - 13Implementations of Two-level LogicSum-of-productsAND gates to form product terms(minterms)OR gate to form sumProduct-of-sumsOR gates to form sum terms(maxterms)AND gates to form productCS 150 - Spring 2008 – Lec #3: Combinational Logic - 14Two-level Logic Using NAND GatesReplace minterm AND gates with NAND gatesPlace compensating inversion at inputs of OR gateCS 150 - Spring 2008 – Lec #3: Combinational Logic - 15Two-level Logic Using NAND Gates (cont’d)OR gate with inverted inputs is a NAND


View Full Document

Berkeley COMPSCI 150 - Lecture Notes

Documents in this Course
Lab 2

Lab 2

9 pages

Debugging

Debugging

28 pages

Lab 1

Lab 1

15 pages

Memory

Memory

13 pages

Lecture 7

Lecture 7

11 pages

SPDIF

SPDIF

18 pages

Memory

Memory

27 pages

Exam III

Exam III

15 pages

Quiz

Quiz

6 pages

Problem

Problem

3 pages

Memory

Memory

26 pages

Lab 1

Lab 1

9 pages

Memory

Memory

5 pages

Load more
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?