Unit 4. Comintionl Ciruits Digitl Eletroni Ciruits (Ciruitos Eletrónios Digitles) E.T.S.I. Informáti Universidd de Sevill 5/10/2012 Jorge Jun <jjhio@dte.us.es> 2010, 2011, 2012 You re free to opy, distriute nd ommunite this work pulily nd mke derivtive work provided you ite the soure nd respet the onditions of the Attriution-Shre like liense from Cretive Commons. You n red the omplete liense t: http://retiveommons.org/lienses/y-s/3.0
Contents Logi funtions Logi opertors Logi expressions Cnonil forms Design pproh Boolen lger Expression minimition Don't res Funtionl nlysis Timing nlysis
Logi funtions logi funtion Verl speifition Output "1" if two or more inputs re equl to "1". Output "0" otherwise. Forml speifition (truth tle) 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 Truth tle: forml speifition. Output vlue for every input omintion (n inputs: 2 n input vlues). Comintionl (digitl) iruits implement logi funtions.
Two-input logi funtions x y F F x y F 0 F 1 F 2 F 3 F 4 F 5 F 6 F 7 F 8 F 9 F 10 F 11 F 12 F 13 F 14 F 15 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 AND XOR OR NOR XNOR NAND In generl, there re 2 (2^n) funtions of n vriles
Logi opertors nd orresponding gtes x NOT 0 1 = x x 1 0 x y AND 0 0 0 0 1 0 1 0 0 = x y x y 1 1 1 x y OR 0 0 0 0 1 1 1 0 1 = x + y x y 1 1 1
Logi opertors nd orresponding gtes x y NAND 0 0 1 0 1 1 1 0 1 = x y x y 1 1 0 x y NOR 0 0 1 0 1 0 1 0 0 = x + y x y 1 1 0 x y XOR 0 0 0 0 1 1 1 0 1 = x y = xy + xy x y 1 1 0 x y XNOR 0 0 1 0 1 0 1 0 0 = x y = x y + xy x y 1 1 1
Logi expressions logi funtion An expression for funtion n lwys e otined y omining the NOT, AND nd OR opertors. Method: 1. For every "1" of the funtion, uild produt term tht is "1" for tht input omintion only. 2. Sum (OR) ll the terms. 0 0 0 0 The resulting expression is sum-of-produts (S-O-P) Terms ontining ll the literls re "minterms". The sum-of-minterms is known s "nonil form of minterms" 0 0 1 0 = + + + 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1
Logi expressions logi funtion An expression for funtion n lwys e otined y omining the NOT, AND nd OR opertors. Method: 1. For every "0" of the funtion, uild sum term tht is "0" for tht input omintion only. 2. Multiply (AND) ll the terms. 0 0 0 0 The resulting expression is produt-of-sums (P-O-S) Terms ontining ll the literls re "mxterms". The sum-of-mxterms is known s "nonil form of mxterms" 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 = (++) (++) (++) (++) 1 1 1 1
Cnonil form nottion minterms m-nott. 0 0 0 m0 0 0 1 m1 0 1 0 m2 0 1 1 m3 1 0 0 m4 1 0 1 m5 1 1 0 m6 1 1 1 m7 mxterm M-nottion 0 0 0 ++ M0 0 0 1 ++ M1 0 1 0 ++ M2 0 1 1 ++ M3 1 0 0 ++ M4 1 0 1 ++ M5 1 1 0 ++ M6 1 1 1 ++ M7 = + + + = m3 + m5 + m6 + m7 = Σ(3,5,6,7) minterm: input omintion for whih the funtion is "1" = (++)(++)(++)(++) = M0 M1 M2 M4 = Π(0,1,2,4) mxterm: input omintion for whih the funtion is "0"
Logi design pproh = + + + S-O-P n e diretly mpped to digitl iruits using three si gtes: - Inverters (omplements) - AND (produts) - OR (sum) Is the result minimum?
Contents Logi funtions Boolen lger Expression minimition Don't res Funtionl nlysis Timing nlysis
Boolen lger {NOT, AND, OR} opertors re "Boolen lger" Elementry x+0 = x x+1 = 1 x+x = x x+x = 1 x 1 = x x 0 = 0 x x = x x x = 0 (x) = x George Boole (1815-1864) Commuttivity x+y = y+x x y = y x Assoitivity (x+y)+ = x+(y+) (x y) = x (y ) Distriutivity x (y+) = (x y)+(x ) x+(y ) = (x+y) (x+) Redution (x y)+(x y) = x (x+y) (x+y) = x De Morgn's (x+y+...) = x y... (x y...) = x+y+... Dulity: if n expression holds, the expression tht results from interhnging + with nd 0 with 1 lso holds.
Boolen lger Preedene of over + x+(y ) = x+y " " n e omitted x+y = x+y
Minimition xy + xy = x "x" n e ny expression = + + + 0-term = + + 1-term One term n e used more thn one (we nnot simplify one term t time). Implint of funtion - Produt term tht n e prt of S-O-P expression of funtion - Produt term tht "overs" some minterms of funtion
Minimition lgorithm (Quine- MCluskey more or less) 1. Find 1st order implints (1-term) By pplying the redution theorem to djent minterms 2. Eliminte overed minterms No need to worry out overed minterms euse they re onsidered in higher order impints (more simple terms) 3. Find 2nd order implints (2-term) By pplying the redution theorem to djent 1-term 4. Eliminte 1st order overed implints 5. Continue until implints re s ig s possile (prime implints) Prime implints re the simplest terms possile to over ll the minterms of the funtion. 6. Selet ll the essentil implints nd/or minimum numer tht overs ll the minterms.
Minimition lgorithm (Quine- MCluskey -simplified-) F(,,,d) = Σ(0,1,4,9,11,13,15) F(,,,d) = d+ d+ d+ d+ d+ d+ d d d d d d d d
Krnugh mps minimition K-mps: 2-dimensions tle Gry ode-like input vlues ordering Eh ell orresponds to minterm Esy to see djent minterms nd n-terms K-mps re yli! Esy finding of prime implints Esier expression minimition d 00 01 11 10 00 01 11 10 0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10 F(,,,d) F(,,,d) = Σ(0,1,4,9,11,13,15) d 00 01 11 10 00 01 11 10 1 0 1 1 0 3 0 2 1 4 0 5 0 7 0 6 0 12 1 13 1 15 0 14 0 8 1 9 1 11 0 10 F(,,,d)
K-mp minimition summry Systemti Minimum Two-level (+inverters) implementtion Two-levels: homogeneous dely Only few si gtes: AND, OR, INV K-mp mnul minimition is tedious nd error-prone for 5 or 6-input funtions. Unfesile for >6. Quine-MCluskey not fesile for lrge numer of inputs Computtionl time inreses exponentilly with n. of inputs (32 inputs ~10 15 prime implints) Alterntive: Heuristi logi minimiers
Design lterntives S-O-P: AND-OR P-O-S: OR-AND But in CMOS it is esier to mke NAND's nd NOR's! d= d d d d = d d d =
Don't res F(,,,d) = Σ(0,1,4,9,11,13,15)+d(2,3,5) d 00 00 01 11 1 0 1 4 0 12 10 0 8 Don't res re input vlues for whih the output is not defined. 01 11 10 1 1-5 1 13-3 0 7 1 15-2 0 6 0 14 F(,,,d) 1 9 1 11 0 10 Don't res mke simpler funtion implementtions nd should e identified when defining prolem: - Cn e onsidered "1" to mke igger (more simple) prime implints. - Do not need to e overed.
Mnul design proess (summry) Funtionl desription (word desription) Miniml S-O-P/P-O-S Formlition No. of inputs nd outputs Don't res Gte seletion AND-OR or NAND-NAND? OR-AND or NOR-NOR? Single or dul ril? Truth tle/k-mp Ciruit Minimition "Only NAND" mens SOP "Only NOR" mens POS "Optiml" mens try SOP&POS d
Design exmple Design omintionl iruit with four inputs (x3, x2, x1, x0) tht represent the its of BCD digit X, nd two outputs (1, 0) tht represents the its of mgnitude C, where C is the quotient of the division X/3. E.g. if X=7 C=2, tht is, (x3,x2,x1,x0)=(0,1,1,1) (1,0)=(1,0) Design the iruit using minimum two-level struture of only NAND gtes.
Contents Logi funtions Boolen lger Expression minimition Don't res Funtionl nlysis Timing nlysis
Funtionl nlysis x x x f(x,y,) = x + xy y xy Method. Strting t primry inputs: For eh gte with known inputs, lulte the eqution t the gte's output. Repet until the equtions of ll iruit outputs re known. Convert to more useful representtion: truth tle, K-mp, Give verl desription of the opertion (if possile).
Timing nlysis x y I1 I2 A1 A2 f(x,y,) I1 = x I2 = A1 = I1 I2 A2 = x y f = A1 + A2 y = 1 I1 = x I2 = A1 = I1 I2 A2 = x f = A1 + A2 x y = 1 Method: I1 I2 A1 A2 f For every gte: equtions of the output s funtion of the inputs. Sustitute onstnt input vlues (DO NOT SUBSTITUTE ANYTHING ELSE) Drw node urves from primry inputs to the outputs. Dely every output trnsition y the gte's dely time (simple model: sme dely for every gte: Δ) 0 10 20 30 40 50 60 70 80 90 100 t(ns)
Hrds f(,,) = + y 1 0 0 00 01 11 1 10 x 0 f(,,) 1 1 1 1 1 1 ==1; f(,,) = + = 1 f(,,) x= y= =x f=y+ When the input of omintionl iruit hnges, the output my show wrong trnsient vlues until it settles to the expeted vlue given y the implemented oolen funtion. 0 10 20 30 40 50 60 70 80 90 100 t(ns)