1 / 306

Chapter 4 Combinational Logic Design Principles ( 组合逻辑设计原理 )

Digital Logic Design and Application ( 数字逻辑设计及应用 ). Chapter 4 Combinational Logic Design Principles ( 组合逻辑设计原理 ). Basic Logic Algebra ( 逻辑代数基础 ) Combinational-Circuit Analysis ( 组合电路分析 ) Combinational-Circuit Synthesis ( 组合电路综合 ).

giolla
Télécharger la présentation

Chapter 4 Combinational Logic Design Principles ( 组合逻辑设计原理 )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Digital Logic Design and Application (数字逻辑设计及应用) Chapter 4 Combinational Logic Design Principles(组合逻辑设计原理) • Basic Logic Algebra • (逻辑代数基础) • Combinational-Circuit Analysis • (组合电路分析) • Combinational-Circuit Synthesis • (组合电路综合)

  2. Digital Logic Design and Application (数字逻辑设计及应用) Review of Chapter 3 • Electronic Behavior of CMOS Circuits • Logic Voltage Levels (逻辑电压电平) • DC Noise Margins(直流噪声容限) • Fan-In(扇入) • Fun-Out (扇出)

  3. EN_L EN A 逻辑符号 Z B A OUT A B EN Digital Logic Design and Application (数字逻辑设计及应用) Review of Chapter 3 • Transmission Gates (传输门) • Schmitt-Trigger Inputs(Hysteresis) • Three-State Outputs (Tri-State output) • Open-Drain Outputs (Open-Collector Gate)

  4. HIGH (高态) ABNOMAL (不正常状态) LOW (低态) VIHmin VOLmax VOHmin VILmax Digital Logic Design and Application (数字逻辑设计及应用) Review of Chapter 3 • Logic Levels • CMOS(0-1.5V, 3.5-5V) • TTL(0-0.8V, 2-5V) • ECL(L=-1.8V, • H=-0.9V) • (L=3.6V, • H=4.4V)

  5. A Z B Digital Logic Design and Application (数字逻辑设计及应用) Review of Chapter 3 • Wired AND (线与) • Open-Drain Outputs (Open-Collector Gate) • Wired OR (线或) • Emitter-Coupled Logic Gate (ECL, 发射极耦合逻辑门)

  6. Vcc R VOUT VIN 获得高、低电平的基本原理 Digital Logic Design and Application (数字逻辑设计及应用) Review of Chapter 3 • Positive Logic and Negative Logic • (正逻辑和负逻辑) • Three basic logic functions: AND, OR, and NOT • (三种基本逻辑:与、或、非)

  7. Digital Logic Design and Application (数字逻辑设计及应用) Review of Chapter 3 (第三章内容回顾) • Three kinds of Description Method (三种描述方法): Truth Table (真值表) Logic Expression (逻辑表达式) Logic Circuit (逻辑符号) • NAND and NOR (与非和或非)

  8. Introduction Let’s learn to design digital circuits, starting with a simple form of circuit: Combinational circuit Outputs depend solely on the present combination of the circuit inputs’ values b=0 F=0 Digital b=0 F=0 Digital System b=1 F=1 System Digital System 2.1 • Vs. sequential circuit: Has “memory” that impacts outputs too b=1 F=1 Digital System b=0 F=1 Digital System if b=0, then F=0 Cannot determine value ofF solely from present input value 8 (a) if b=1, then F=1 (b)

  9. Digital Logic Design and Application (数字逻辑设计及应用) Basic Concepts (基本概念) Two Types of Logic Circuits(逻辑电路分为两大类): Combinational Logic Circuit(组合逻辑电路) Sequential Logic Circuit(时序逻辑电路) Outputs depend only on its Current Inputs. (任何时刻的输出仅取决与当时的输入) 电路特点:无反馈回路、无记忆元件 Outputs depends not only on the current Inputs but also on the Past sequence of Inputs. (任一时刻的输出不仅取决与当时的输入, 还取决于过去的输入序列)

  10. Digital Logic Design and Application (数字逻辑设计及应用) 4.1 Switching Algebra (开关代数) • 4.1.1 Axioms(公理) • X = 0 , if X  1 X = 1, if X  0 • 0’ = 1 1’ = 0 • 0·0 = 0 1+1 = 1 • 1·1 = 1 0+0 = 0 • 0·1 = 1·0 = 0 1+0 = 0+1 = 1 F = 0 + 1 · ( 0 + 1 · 0’ )’ = 0 + 1 · 1’

  11. 变量和 其自身 的关系 变量和 常量的 关系 Digital Logic Design and Application (数字逻辑设计及应用) 4.1.2 Single-Variable Theorems(单变量开关代数定理) • Identities (自等律):X + 0 = X X · 1 = X • Null Elements (0-1律):X + 1 = 1 X · 0 = 0 • Involution (还原律):( X’ )’ = X • Idempotency(同一律):X + X = X X · X = X • Complements(互补律):X + X’ = 1 X · X’ = 0

  12. Digital Logic Design and Application (数字逻辑设计及应用) 4.1.3 Two-and Three-Variable Theorems (二变量或三变量开关代数定理) Similar Relationship with General Algebra (与普通代数相似的关系) • Commutativity (交换律) • A · B = B · A A + B = B + A • Associativity (结合律) • A·(B·C) = (A·B)·C A+(B+C) = (A+B)+C • Distributivity (分配律) • A·(B+C) = A·B+A·C A+B·C = (A+B)·(A+C) 可以利用真值表证明公式和定理

  13. Perfect induction of the theorem • To prove, just evaluate all possibilities Use the truth table to prove the functions on both side are same !

  14. Example uses of the properties Show abc’ equivalent to c’ba. Use commutative property: a*b*c’ = a*c’*b = c’*a*b = c’*b*a Show abc + abc’ = ab. Use first distributive property abc + abc’ = ab(c+c’). Complement property Replace c+c’ by 1: ab(c+c’) = ab(1). Identity property ab(1) = ab*1 = ab. a 14

  15. Example uses of the properties Show x + x’z equivalent to x + z. Second distributive property Replace x+x’z by (x+x’)*(x+z). Complement property Replace (x+x’) by 1, Identity property replace 1*(x+z) by x+z. a 15

  16. Digital Logic Design and Application (数字逻辑设计及应用) Notes (几点注意) • 不存在变量的指数 A·A·A  A3 • 允许提取公因子 AB+AC = A(B+C) • 没有定义除法 • if AB=BC  A=C ?? 错! A=1, B=0, C=0 AB=AC=0, AC • 没有定义减法 if A+B=A+C  B=C ?? 错! A=1, B=0, C=1

  17. Digital Logic Design and Application (数字逻辑设计及应用) Some Special Relationships(一些特殊的关系) • Covering (吸收律) • X + X·Y = X X·(X+Y) = X • Combining (组合律) • X·Y + X·Y’ = X (X+Y)·(X+Y’) = X • Consensus [添加律(一致性定理)] • X·Y + X’·Z + Y·Z = X·Y + X’·Z • (X+Y)·(X’+Z)·(Y+Z) = (X+Y)·(X’+Z)

  18. 代入定理: 在含有变量 X 的逻辑等式中,如果将式中所有出现 X 的地方都用另一个函数 F 来代替,则等式仍然成立。 Digital Logic Design and Application (数字逻辑设计及应用) 对上述的公式、定理要熟记,做到举一反三 A + A’ = 1 (X+Y) + (X+Y)’ = 1 X·Y + X·Y’ = X (A’+B)·(A·(B’+C)) + (A’+B)·(A·(B’+C))’ = (A’+B)

  19. Digital Logic Design and Application (数字逻辑设计及应用) Prove (证明): X·Y + X’·Z + Y·Z = X·Y + X’·Z Y·Z = 1·Y·Z = (X+X’)·Y·Z X·Y + X’·Z + (X+X’)·Y·Z = X·Y + X’·Z + X·Y·Z +X’·Y·Z = X·Y·(1+Z) + X’·Z·(1+Y) = X·Y + X’·Z

  20. Digital Logic Design and Application (数字逻辑设计及应用) 4.1.4 n-Variable Theorems (n变量定理) • Generalized idempotency theorem ( 广义同一律 ) • X + X + … + X = X X·X·…·X = X • Shannon’s expansion theorems ( 香农展开定理 )

  21. Digital Logic Design and Application (数字逻辑设计及应用) Prove (证明): A·D + A’·C + C·D + A·B’·C·D = A·D + A’·C = A · ( 1·D + 1’·C + C·D + 1·B’·C·D ) + A’ · ( 0·D + 0’·C + C·D + 0·B’·C·D ) = A · ( D + C·D + B’·C·D ) + A’ · ( C + C·D ) = A·D·( 1 + C + B’·C ) + A’·C·( 1 + D ) = A·D + A’·C

  22. (A · B)’ = A’ + B’ (A + B)’ = A’ · B’ Digital Logic Design and Application (数字逻辑设计及应用) 4.1.4 n-Variable Theorems ( n变量定理 ) • Demorgan’s Theorems (摩根定理) ——Complement Theorems (反演定理)

  23. Digital Logic Design and Application (数字逻辑设计及应用) • Complement Rules (反演规则): • ·+,0  1,Complementing Variables ( 变量取反) • Follow the Priority Sequence as Before ( 遵循原来的运算优先次序 ) • Keep the complement Symbol of Non-single variables ( 不属于单个变量上的反号应保留不变 )

  24. 合理地运用反演定理能够将一些问题简化 Example 1:Write the Complement function for each of The Following Logic functions. (写出下面函数的反函数 ) F1 = A · (B + C) + C · D F2 = (A · B)’ + C · D · E’ Example 2:Prove (A·B + A’·C)’ = A·B’ + A’·C’

  25. AB + AC + BC = AB + AC (A+B)(A+C) AA +AC + AB + BC AC + AB AC + AB + BC Prove:AB + AC = AB + AC Digital Logic Design and Application (数字逻辑设计及应用) 合理地运用反演定理能够将一些问题简化

  26. Digital Logic Design and Application (数字逻辑设计及应用) 4.1.5 Duality (对偶性) • Duality Rule ( 对偶规则 ) • · +;0  1 • 变换时不能破坏原来的运算顺序(优先级) • Principle of Duality ( 对偶原理 ) • 若两逻辑式相等,则它们的对偶式也相等 FD(X1 , X2 , … , Xn , + , · , ’ ) = F(X1 , X2 , … , Xn , · , + , ’ ) 例: Write the Duality function for each of the following Logic functions. (写出下面函数的对偶函数) F1 = A + B · (C + D) F2 = ( A’·(B+C’) + (C+D)’ )’ X + X · Y = X X · X + Y = X X + Y = X X · ( X + Y ) = X

  27. A(B+C) AB+AC Digital Logic Design and Application (数字逻辑设计及应用) 4.1.5 Duality (对偶性) • Duality Rule ( 对偶规则 ) • · +;0  1 • 变换时不能破坏原来的运算顺序(优先级) • Principle of Duality ( 对偶原理 ) • 若两逻辑式相等,则它们的对偶式也相等 证明公式:A+BC = (A+B)(A+C)

  28. Two kind of logic Positive logic : 1 ( high level ) 0 (low level) Negative logic: 0 ( high level ) 1 (low level) If a logic relation exist in positive logic, it must be exist in negative logic. Both logic are duality for each other. Positive-Logic Convention and Negative-Logic Convention Are Duality (正逻辑约定和负逻辑约定互为对偶关系)

  29. Digital Logic Design and Application (数字逻辑设计及应用) Duality and Complement(对偶和反演) Duality (对偶):FD(X1 , X2 , … , Xn , + , · , ’ ) = F(X1 , X2 , … , Xn , · , + , ’ ) Complement (反演): [ F(X1 , X2 , … , Xn , + , · ) ]’ = F(X1’, X2’, … , Xn’, · , + ) [ F(X1 , X2 , … , Xn) ]’ = FD(X1’, X2’, … , Xn’)

  30. Digital Logic Design and Application (数字逻辑设计及应用) 第4章作业(P230) • 4.4 T8’ • 4.5 • 4.6 • 4.7 (d) (i) • 4.8 (c) (h) • 补充:写出 4.7 (c) 4.8 (g) 的对偶式和反演式

  31. Digital Logic Design and Application (数字逻辑设计及应用) A Class Problem ( 每课一题 ) • Write the Duality and Complement function for each of the following Logic functions. (分别写出下面函数的对偶函数和反函数) • F1 = A’· (B + C) + C’· D • F2 = ( A·(B+C’) + (C+D)’ )’

  32. Digital Logic Design and Application (数字逻辑设计及应用) Chapter 4 Combinational Logic Design Principles(组合逻辑设计原理) • Basic Logic Algebra • (逻辑代数基础) • Combinational-Circuit Analysis • (组合电路分析) • Combinational-Circuit Synthesis • (组合电路综合)

  33. Digital Logic Design and Application (数字逻辑设计及应用) Review of 4.1 Switching Algebra (开关代数内容回顾) • 1、 Axioms (公理) • 2、 Single-Variable Theorems • (单变量开关代数定理) • 3、 Two-and Three-Variable Theorems • (二变量或三变量开关代数定理) • 需要特别记忆:A + B·C = (A+B)·(A+C) • A·B + A’·C + B·C = A·B + A’·C • 补充:代入定理

  34. Review of 4.1 Switching Algebra (开关代数内容回顾) 4、 n-Variable Theorems (n变量定理) • Generalized Idempotency (广义同一律) • Shannon’s Expansion Theorems (香农展开定理) • Demorgan’s Theorems [ 摩根定理(反演)] • Duality (对偶) X + X + … + X = X X · X · … · X = X

  35. Digital Logic Design and Application (数字逻辑设计及应用) Review of 4.1 Switching Algebra (开关代数内容回顾) • n-Variable Theorems (n变量定理) • Generalized Idempotency • (广义同一律) • Shannon’s Expansion Theorems • (香农展开定理) • Demorgan’s Theorems • [ 摩根定理(反演)] • Duality (对偶) 与或,0  1 变量取反 与或,0  1 [ F(X1 , X2 , … , Xn) ]’ = FD(X1’, X2’, … , Xn’)

  36. A A B F A B F G1 A B F F B 0 0 0 0 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 1 1 0 0 0 L L L L H L H L L H H H Digital Logic Design and Application (数字逻辑设计及应用) The relationship of Positive-Logic Convention and Negative-Logic Convention are Duality (正逻辑约定和负逻辑约定互为对偶关系) Negative-Logic (负逻辑): F = A+B Positive-Logic (正逻辑): F = A·B Electrical Function Table (电气功能表) Positive-Logic Convention Negative-Logic Convention

  37. A 真值表 C 逻辑函数 & B A Y ≥1 A B C Y Y B C 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 逻辑图 Digital Logic Design and Application (数字逻辑设计及应用) 补充:逻辑函数及其表示方法 举重裁判电路 开关ABC 1表闭合 指示灯 1 表亮 0 0 0 0 0 1 1 1 Y = F (A,B,C ) = A·(B+C)

  38. Gates vs. switches Notice Boolean algebra enables easy capture as equation and conversion to circuit How design with switches? 38

  39. Gates vs. switches Of course, logic gates are built from switches, but we think at level of logic gates, not switches w = NOT(s) AND k 1 Belt Warn Belt Warn 0 s k w w 0 s k 1 Seatbelt a 39

  40. Some Gate-Based Circuit Drawing Conventions no yes yes no x F y ok not ok 40

  41. Boolean Algebra By defining logic gates based on Boolean algebra, we can use algebraic methods to manipulate circuits Notation: Writing a AND b, a OR b, NOT(a) is cumbersome Use symbols: a * b (or just ab), a + b, and a’ 2.5 41

  42. Boolean Algebra Original: w = (p AND NOT(s) AND k) OR t New: w = ps’k + t Spoken as “w equals p and s prime and k, or t” Or just “w equals p s prime k, or t” s’ known as “complement of s” While symbols come from regular algebra, don’t say “times” or “plus” "product" and "sum" are OK and commonly used 2.5 42

  43. Boolean Algebra 2.5 Boolean algebra precedence, highest precedence first. Symbol Name Description ( ) Parentheses Evaluate expressions nested in parentheses first ’ NOT Evaluate from left to right * AND Evaluate from left to right + OR Evaluate from left to right 43

  44. Boolean Algebra Terminology Example equation: F(a,b,c) = a’bc + abc’ + ab + c Variable Represents a value (0 or 1) Three variables: a, b, and c Literal Appearance of a variable, in true or complemented form Nine literals: a’, b, c, a, b, c’, a, b, and c 44

  45. Boolean Algebra Terminology Productterm Product of literals Four product terms: a’bc, abc’, ab, c Sum-of-products Equation written as OR of product terms only Above equation is in sum-of-products form. “F = (a+b)c + d” is not. 45

  46. Combinational logic The output is determined only by its input. Output can be changed when input changed.

  47. Representations of Boolean Functions 2.6 English 1: F outputs 1 when a is 0 and b is 0, or when a is 0 and b is 1. (a) English 2: F outputs 1 when a is 0, regardless of b’s value Equation 1: F(a,b) = a’b’ + a’b a a b F b Equation 2: F(a,b) = a’ F 0 0 1 0 1 1 (c) 1 0 0 (b) Circuit 1 1 1 0 Truth table a F (d) Circuit 2 The function F 47

  48. Representations of Boolean Functions A function can be represented in different ways Above shows seven representations of the same functions F(a,b), using four different methods: English Equation Circuit and Truth Table 2.6 a 48

  49. Representations of logic functions Truth table Timing diagram Logic equations Logic circuits

  50. Truth table Left: the input combinations in binary order Right: the output for the input

More Related