Top Banner
1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL
31

1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

Jan 01, 2016

Download

Documents

Nancy Norman
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

1

EE121 John Wakerly Lecture #4

Combinational-Circuit Synthesis

ABEL

Page 2: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

2

Combinational-Circuit Analysis

• Combinational circuits -- outputs depend only on current inputs (not on history).

• Kinds of combinational analysis:– exhaustive (truth table)– algebraic (expressions)– simulation / test bench (example in lab #2)

• Write functional description in HDL• Define test conditions / test vecors, including corner cases• Compare circuit output with functional description (or

known-good realization)• Repeat for “random” test vectors

Page 3: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

3

Combinational-Circuit Design

• Sometimes you can write an equation or equations directly using “logic” (the kind in your brain).

• Example (alarm circuit):

• Corresponding circuit:

Page 4: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

4

Alarm-circuit transformation

• Sum-of-products form– Useful for programmable logic devices (next lec.)

• “Multiply out”:

Page 5: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

5

Sum-of-products form

AND-OR

NAND-NAND

Page 6: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

6

Product-of-sums form

OR-AND

NOR-NOR

P-of-S preferred in CMOS, TTL (NAND-NAND)

Page 7: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

7

Brute-force design

• Truth table --> canonical sum (sum of minterms)

• Example:prime-number detector– 4-bit input, N3N2N1N0

row N3 N2 N1 N0 F 0 0 0 0 0 0 1 0 0 0 1 1 2 0 0 1 0 1 3 0 0 1 1 1 4 0 1 0 0 0 5 0 1 0 1 1 6 0 1 1 0 0 7 0 1 1 1 1 8 1 0 0 0 0 9 1 0 0 1 010 1 0 1 0 011 0 0 1 1 112 1 1 0 0 013 1 1 0 1 114 1 1 1 0 015 1 1 1 1 0

F = (1,2,3,5,7,11,13)

Page 8: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

8

Minterm list --> canonical sum

Page 9: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

9

Algebraic simplification

• Theorem T8,

• Reduce number of gates and gate inputs

Page 10: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

10

Resulting circuit

Page 11: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

11

Visualizing T10 -- Karnaugh maps

Page 12: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

12

3-variable Karnaugh map

Page 13: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

13

Example: F = (1,2,5,7)

Page 14: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

14

Karnaugh-map usage

• Plot 1s corresponding to minterms of function.• Circle largest possible rectangular sets of 1s.

– # of 1s in set must be power of 2– OK to cross edges

• Read off product terms, one per circled set.– Variable is 1 ==> include variable– Variable is 0 ==> include complement of variable– Variable is both 0 and 1 ==> variable not included

• Circled sets and corresponding product terms are called “prime implicants”

• Minimum number of gates and gate inputs

Page 15: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

15

Prime-number detector (again)

Page 16: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

16

• When we solved algebraically, we missed one simplification -- the circuit below has three less gate inputs.

Page 17: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

17

Another example

Page 18: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

18

Yet another example

• Distinguished 1 cells• Essential prime implicants

Page 19: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

19

Quine-McCluskey algorithm

• This process can be made into a program, using appropriate algorithms and data structures.– Guaranteed to find “minimal” solution

• Required computation has exponential complexity (run time and storage)-- works well for functions with up to 8-12 variables, but quickly blows up for larger problems.

• Heuristic programs (e.g., Espresso) used for larger problems, usually give minimal results.

Page 20: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

20

Lots of possibilities

• Can follow a “dual” procedure to find minimal products of sums (OR-AND realization)

• Can modify procedure to handle don’t-care input combinations.

• Can draw Karnaugh maps with up to six variables.

Page 21: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

21

Real-World Logic Design

• Lots more than 6 inputs -- can’t use Karnaugh maps

• Design correctness more important than gate minimization– Use “higher-level language” to specify logic

operations

• Use programs to manipulate logic expressions and minimize logic.

• PALASM, ABEL, CUPL -- developed for PLDs• VHDL, Verilog -- developed for ASICs

Page 22: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

22

ABEL• Advanced Boolean Equation Language

– Developed for use with programmable logic devices, which have a programmable AND-OR structure.

• Combinational logic functions– Operators:

– Sets:

– Relations:

– Intermediate variables

AND, OR, NOT, XOR, XNOR & # ! $ !$

XBUS = [X3,X2,X1,X0];XBUS = [1,1,0,1];XBUS = 13;

(XBUS == YBUS)(XBUS > [1,1,0,1])

Page 23: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

23

ABEL Program Structure

Page 24: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

24

ABEL Example

Page 25: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

25

ABEL Example (continued)

Page 26: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

26

ABEL language processor (compiler)

• Checks syntax• Checks device-pin capabilities• Expands language statements and equations• Reduces equations into sum-of-products form

form for programmable logic device (PLD)• Checks test vectors against equations• Checks equation requirements (# of inputs,

product terms) against PLD resources• Determines “fuse map” to program the PLD

Page 27: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

27

ABEL equations (.eq3) file

Page 28: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

28

ABEL equations file (continued)

Page 29: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

29

ABEL WHEN Statements

Page 30: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

30

Nested WHEN statements

• Note: different variables can be used in different THEN and ELSE clauses

Page 31: 1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.

31

Next time

• PLDs (target of ABEL programs)• Documentation standards