320 likes | 484 Views
Lecture 3. Hardware Description Methods, Review of Switching Algebra. A binary switch. x. =. 0. x. =. 1. (a) Two states of a switch. S. x. (b) Symbol for a switch. A light controlled by a switch. S. Battery. Light. L. x. (a) Simple connection to a battery. S. Power. L. x.
E N D
Lecture 3 Hardware Description Methods, Review of Switching Algebra
A binary switch x = 0 x = 1 (a) Two states of a switch S x (b) Symbol for a switch
A light controlled by a switch S Battery Light L x (a) Simple connection to a battery S Power L x supply (b) Using a ground connection as the return path
Two basic functions S S Power Light x x L supply 1 2 (a) The logical AND function (series connection) S x 1 Power Light L supply S x 2 (b) The logical OR function (parallel connection)
A series parallel connection S x S 1 Power Light x L supply S 3 x 2
An inverting circuit R Power supply x S L
x x 1 1 . x x x + x 1 2 1 2 x x 2 2 x 1 x x 2 1 x + x 1 2 x 2 … x + x + + x 1 2 n x n x x (b) OR gates Basic gates x 1 . x x 1 2 x 2 (c) NOT gate x 1 x 2 (d) NAND gate . … x x x 1 2 n x n (a) AND gates (e) NOR gate
Logic network 0 0 1 1 1 1 0 0 x 1 A 1 1 0 1 f 0 0 0 1 B 0 1 0 1 x 2 ( , ) x x f x x 1 2 1 2 (a) Network that implements 0 0 1 0 1 1 f = x1 + x1 x2 1 0 0 1 1 1 (b) Truth table for f
1 x 1 0 1 x 2 0 1 A 0 1 B 0 1 f 0 Time Logic network (c) Timing diagram 0 0 1 1 1 1 0 0 x 1 1 1 0 1 0 1 0 1 g x 2 (d) Network that implements g = x + x 1 2
Boolean algebra - axioms x*0 = 0 0*0 = 0 DeMorgan laws x + 1 = 1 1 + 1 = 1 x*y = x + y x*1 = x 1*1 = 1 x + y = x*y x +0 = x 0 +0 = 0 x* x = x 0* 1 = 1* 0 = 0 x + x*y = x + y x + x = x 1 + 0 = 0 + 1 = 1 x* x = 0 x*(x + y) = x*y x = x x+ x = 1
Please see “portrait orientation” PowerPoint file for Chapter 2 Figure 2.12 The Venn diagram representation
Please see “portrait orientation” PowerPoint file for Chapter 2 Figure 2.13 Verification of the distributive property
Please see “portrait orientation” PowerPoint file for Chapter 2 Figure 2.14 Verification example
Two implementations x 1 x 2 f x 1 f x 2 (b) Minimal-cost realization (a) Canonical sum-of-products
x 2 f x 3 x 1 x 1 x 3 f x 2 Two implementations (b) A minimal product-of-sums (a) A minimal sum-of-products
Three way light controller Specification (for logic only): • A room with three doors. • Light switch at each door. • Light turned on/off at each door. • 1 - turned on. • 0 – turned off.
f x 1 x 2 x 3 Sum of Products – SOP
x 3 x 2 x 1 f Products of Sums – POS
s x1 x2 f (s, x1, x2) 0 0 0 0 0 0 1 0 x 1 0 1 0 1 0 1 1 1 f 1 0 0 0 s 1 0 1 1 x 2 1 1 0 0 1 1 1 1 s f (s, x1, x2) s x1 x 0 0 1 f x2 x 1 1 2 Multiplexer (b) Circuit (c) Graphical symbol (a) Truth table (d) More compact truth table
x 1 x2 XOR XNOR x1 f 0 0 0 1 0 1 1 0 x 2 1 0 1 0 1 1 0 1 XOR, XNOR gates (a) Truth table (b) One of XOR Circuits (c) XOR Graphical symbol (d) XNOR Graphical symbol
Please see “portrait orientation” PowerPoint file for Chapter 2
x 1 x 2 f x 3 first touch of VHDL
x 1 x 3 f x 2 g x 4 Four-input function