EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 More igial Logic Gae delay and signal propagaion Clocked circui elemens (flip-flop) Wriing a word o memory Simplifying digial circuis: Karnaugh maps EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 PROPGTION ELY The propagaion delay p is defined as: p = ime when oupu is halfway beween iniial and final value - ime when inpu is halfway beween iniial and final value. V in () V IN () V OUT () p p oupu Low-o-high and high-o-low ransiions could have differen p.
EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 PROPGTION ELY To ge an approximae idea of he effecs of delay, we make he ransiions look insananeous (hough hey are exponenial). F Logic Sae Inpu Oupu F p EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 PROPGTION ELY C Inpus have differen delays, bu we ascribe a single worscase delay p o every gae How many gae delays for shores pah? NSWER : 2 How many gae delays for longes pah? NSWER : 3
EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 TIMING IGRMS ifferen delays hrough differen pahs can creae false oupu: Circui compues using parially updaed signals. C Logic sae,,c Noe becomes valid one gae delay afer swiches ( ) Noe ha C becomes valid wo gae delays afer &C swich, because he inver funcion akes one delay and he NN funcion a second. ( C) ( + ) p p p 2 p 2 p The final OR gae creaes one more delay. p 2 p 3 p EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 SYNCHRONOUS LOGIC We have now seen ha a circui can produce nonsensical oupu due o differing delay pahs in he circui. Presumably, he oupu of a logic circui migh serve as he inpu of a second logic circui. How do we preven he second circui from using and passing on his false informaion? nswer: Include gaekeeper componens ha pass on daa only when enough ime has passed o guaranee validiy Clocked (Synchronous) componens: flip-flops
EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 SYNCHRONOUS CIRCUIT V IN V OUT Flip Flop V IN2 Logic Circui Q Logic Circui 2 V OUT2 Clock Signal CK The Flip Flop is a synchronous (clocked) sequenial (memory) circui. he insan he clock signal CK rises from logic o logic, he oupu Q is se equal o he inpu. all oher imes, he oupu Q remains he same. The flip flop prevens Logic Circui 2 from receiving a new inpu value, unil he clock ransiion allows he daa o pass hrough. EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 FLIP FLOP CIRCUIT IGRM CK Q We may cover digial circuis wih feedback laer in he course.
EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 MKING MEMORIES 3 Q 3 2 Q 2 Q Q CK CK CK CK Wrie Clock In order o wrie o memory, he Wrie inpu mus be. Signal Noe we can only wrie o all four cells a once! To change only bi, e. g., change 2 o, se 3 = Q3 2 = = Q = Q To change bi on Calo board using sofware inerface, use biwise OR wih a mask: Q = Q (where Q is defined as Q 3 Q 2 Q Q ) How do you se one bi o logic using he Calo inerface? EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 CRETING ETTER CIRCUIT Wha makes a beer digial circui? Fas and low cos = beer. Fewer sages Fewer oal number of individual gaes Fewer ypes of gaes Fewer inpus on each gae (muli-inpu gaes are slower) In general, simplifying a digial circui o minimize he number of gaes is compuaionally inracable (uses very large amoun of ime and space, worse han NP-hard) The mehod of Karnaugh maps reduces he number of inpus per gae. I is ineresing o sudy he compuaional effor needed o analyze and simplify digial circuis. Some ineresing resuls (for hose who know abou complexiy, maybe discussed a end of semeser): The problem of deciding wheher here is a combinaion of inpus o a digial circui ha will generae an oupu of is in a special class of problems called NP-complee. If you are smar enough o figure ou a way o solve his problem in polynomial ime, hen he world will be able o solve all sors of hard problems in polynomial ime and you will win a Fields Medal. The number of gaes in a circui is mahemaically relaed o he ime complexiy of he problem i decides. If you can find an NP problem ha canno be decided wih a circui ha has polynomial number of gaes, hen you have proved ha some NP problems canno be decided in polynomial ime and you win a Fields Medal.
EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 KRNUGH MPS To find a simpler sum-of-producs expression,. Wrie he ruh able of your circui ino a special able. C C 2 Inpus 3 Inpus 4 Inpus 2. For each, circle he bigges 2m by 2n block ha includes ha. 3. Wrie he produc ha corresponds o ha block. This mehod simplifies circuis o smaller sum-of-producs (Ns and ORs). Could you use hese maps o simplify wih XOR? EECS 4 Spring 23 Lecure 2 EECS 4 Spring 23 Lecure 2 EXMPLE: ER C S S Simplificaion for S : C Inpu Oupu Use he Karnaugh map mehod o simplify S. Is here a simpler circui for S?