ll the Gates There are only 6 possible 2-input gates Let s examine all of them. Some we already know, others are just silly. Do we really need all of these gates? How many of these gates can be implemented using a single MOS gate? N-FETs can only pull the ouput to, and only if one or more of their inputs is a. P-FETs can only pull the ouput to, and only if one or more of their inputs is a. Nope! Once we realize that we can describe all of them using just NOT, followed by ND, followed by OR.
omposing gates to build others Let s start with a couple of basics, ND and OR. Each can be constructed using a pair of MOS gates, ND is just NND with an inverter, and OR is just NOR with an inverted output. ND OR y These two gates are particularly important. Using them will allows us to develop a systematic approach for constructing any combinational function. 2
omposing arbitrary gates > XOR y How many different gates do we really need? We can always do it with 3 different types of gates (ND, OR, INVERT), and sometimes with 2, but, can we use fewer? The TRIK is to OR the NDs of all input combinations that generate an output of. ou don t need the OR gate if only one input combination results in a. ou need Inverters to handle input combinations involving s, NDs, and ORs. 3
One will do! NNDs and NORs are UNIVERSL! UNIVERSL gate is one that can be used to implement *N* OMINTIONL FUNTION. There are many UNIVERSL gates, but not all gates are UNIVERSL. Q: What is a OMINTIONL FUNTION? : ny function that can be written as a truth table. = = = = = = h!, but what if we want more than 2-inputs? 4
Few More Gates omposing gates for high fan-in SOP logic synthesis MUX logic 5
Stupid Gate Tricks Suppose we have some 2-input XOR gates: t pd = ns nd we want an N-input XOR: output = iff number of s input is ODD ( PRIT ) t pd = N ns -- WORST SE. an we compute an N-input XOR faster? 6
I Think That I Shall Never See a Gate Lovely as a... 2 2 2 log N 2 log N N-input TREE has O( ) levels... 2 EVER N-Input ombinational function be implemented using only 2-input gates? ut, it s handy to have gates with more than 2-inputs when needed. Signal propagation takes O( log N ) gate delays. 7
systematic Design pproach Truth Table ) Write the functional spec as a truth table 2) Write down a oolean expression for every in the output = (! &&! && ) (! && && ) ( && &&!) ( && && ) 3) Wire up the ideal gates, replace them with equivalent realizable gates, call it a day, and go home! -it s systematic! -it works! -it s easy! -we get to go home! This approach will always give us logic expressions in a particular form: SUM-OF-PRODUTS 8
Straightforward Synthesis We can implement SUM-OF-PRODUTS with just 3 levels of logic. INVERTERS/ND/OR 9
Other Useful Gate ombinations NND-NND!(&&) =!! Pushing and ancelling ubbles DeMorgan s Laws NOR-NOR!( ) =! &&!
Other Useful MOS Gates V dd OI (ND-OR-INVERT) D OI (OR-ND-INVERT) D V dd OI and OI structures can be realized as a single MOS gate. However, their function is equivalent to 3 levels of logic. n OI s DeMorgan equivalent is usually easier to think about. D D D
nother Interesting 3-Input Gate ased on, select the or input to be copied to. If is then copy to, otherwise copy to Truth Table 2-input Multiplexer schematic Gate symbol 2
MUX ompositions and Shortcuts 4-input Mux (implemented as a tree) 4-bit wide 2-input Mux S I I I 2 I 3 S S S S S D S 2 3 2 2 3 3 S S S 2 3-3 -3 S -3 S 3
MUX Function Synthesis onsider implementation of some arbitrary ombinational function, F(,,)... using a MULTIPLEXER as the only circuit element: Mux Logic: n example configurable logic element,, 2 3 4 5 6 7 4
MUX Logic tricks We can apply certain optimizations to MUX Function synthesis Desired Logic Function 2 3 - Largely by inspection or exhaustive search There s something interesting going on in those MUXes, - uild any N-input gate with an N- input MUX & one inverter 5
Next Time inary ircuits that: DD SUTRT SHIFT 6