Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Organization and Design Transistors & Logic - II Montek Singh Wed, Oct 17, 2012 Lecture 11.

Similar presentations


Presentation on theme: "Computer Organization and Design Transistors & Logic - II Montek Singh Wed, Oct 17, 2012 Lecture 11."— Presentation transcript:

1 Computer Organization and Design Transistors & Logic - II Montek Singh Wed, Oct 17, 2012 Lecture 11

2 Today’s Topics  Implementing digital logic transistor-level circuits transistor-level circuits gate-level circuits gate-level circuits 2

3 From Transistors… to Gates!  Logic Gate recipe: use complementary arrangements of PFETs and NFETs use complementary arrangements of PFETs and NFETs  called CMOS (“complementary metal-oxide semiconductor”) at any time: either “pullup” active, or “pulldown”, never both! at any time: either “pullup” active, or “pulldown”, never both! V DD V IN V OUT pullup: make this connection when V IN is near 0 so that V OUT = V DD pulldown: make this connection when V IN is near V DD so that V OUT = 0 We’ll use p-type here and, n-type here Gnd

4 CMOS Inverter V in V out V in V out AY inverter Only a narrow range of input voltages result in “invalid” output values. (This diagram is greatly exaggerated) Valid “1” Valid “0” Invalid “1”“1”“0”“0” “0”“0”“1”“1”

5 CMOS Complements conducts when A is highconducts when A is low conducts when A is high and B is high: A. B A B AB conducts when A is low or B is low: A+B = A. B conducts when A is high or B is high: A+B A B AB conducts when A is low and B is low: A. B = A+B AA Series N connections: Parallel N connections: Parallel P connections: Series P connections:

6 A Two Input Logic Gate A B What function does this gate compute? A B C 0 0 1 1 0 1

7 Here’s Another… What function does this gate compute? A B C 0 0 1 1 0 1 A B

8 CMOS Gates Like to Invert Observation: CMOS gates tend to be inverting! One or more “0” inputs are necessary to generate a “1” output One or more “0” inputs are necessary to generate a “1” output One or more “1” inputs are necessary to generate a “0” output One or more “1” inputs are necessary to generate a “0” output Why? Why? A B

9 General CMOS Gate Recipe Step 1. Figure out pulldown network that does what you want (i.e the set of conditions where the output is ‘0’) e.g., F = A*(B+C) A BC Step 2. Walk the hierarchy replacing nfets with pfets, series subnets with parallel subnets, and parallel subnets with series subnets A B C Step 3. Combine pfet pullup network from Step 2 with nfet pulldown network from Step 1 to form fully- complementary CMOS gate. A B C A BC

10 One Last Exercise  Lets construct a gate to compute: F = A+BC = NOT(OR(A,AND(B,C))) F = A+BC = NOT(OR(A,AND(B,C))) Step 1: Draw the pull-down network Step 1: Draw the pull-down network Step 2: The complementary pull-up network Step 2: The complementary pull-up network F A B C V dd A BC

11 One Last Exercise  Lets construct a gate to compute: F = A+BC = NOT(OR(A,AND(B,C))) F = A+BC = NOT(OR(A,AND(B,C))) Step 1: Draw the pull-down network Step 1: Draw the pull-down network Step 2: The complementary pull-up network Step 2: The complementary pull-up network Step 3: Combine and Verify Step 3: Combine and Verify F A B C V dd A B C ABCF 000 001 010 011 100 101 110 111 1110000011100000

12 Now We’re Ready to Design Stuff!  We need to start somewhere usually it’s the functional specification usually it’s the functional specification A B Y If C is 1 then copy B to Y, otherwise copy A to Y C If you are like most engineers you’d rather see a table, or formula than parse a logic puzzle. The fact is, any combinational function can be expressed as a table. These “truth tables” are a concise description of the combinational system’s function. Conversely, any computation performed by a combinational system can expressed as a truth table. Truth Table

13 A Slight Diversion  Are we sure we have all the gates we need? How many two-input gates are there? How many two-input gates are there? All of these have 2-inputs (no surprise) All of these have 2-inputs (no surprise)  … 2 inputs have 4 possible values How many possible patterns for 4 outputs are there? ___ How many possible patterns for 4 outputs are there? ___  Generalizing, for N inputs, there are 2 (2^N) gates ANDORNANDNOR SURGE 2424

14 There Are Only So Many Gates  There are only 16 possible 2-input gates … some we know already, others are just silly … some we know already, others are just silly  Do we need all of these gates? Nope. We describe them all using AND, OR, and NOT. Nope. We describe them all using AND, OR, and NOT. How many of these gates can actually be implemented using a single CMOS gate?

15 We Can Make Most Gates Out of Others  How many different gates do we really need? B>A A B y XOR A B Y A B Y

16 One Will Do!  NANDs and NORs are universal one can make any circuit out of just NANDs, or just NORs! one can make any circuit out of just NANDs, or just NORs!  Ah! But what if we want more than 2-inputs? = = = = = =

17 Gate Trees Suppose we have some 2-input XOR gates: And we want an N-input XOR: A0011A0011 B0101B0101 C0110C0110 t pd = 1 t pd = O( ___ ) -- WORST CASE. output = 1 iff number of 1s in input is ODD (“ODD PARITY”) Can we compute N-input XOR faster? N

18 Gate Trees N-input TREE has O( ______ ) levels... Signal propagation takes O( _______ ) gate delays. log N 2121 2 2 log 2 N

19 Design Approach: Sum-of-Products Three steps: 1. Write functional spec as a truth table 2. Write down a Boolean expression for every ‘1’ in the output 3. Wire up the gates!  This approach will always give us logic expressions in a particular form: SUM-OF-PRODUCTS SUM-OF-PRODUCTS  SUM actually means OR  PRODUCT actually means AND Truth Table

20 Straightforward Synthesis  We can implement SUM-OF-PRODUCTS… …with just three levels of logic …with just three levels of logic  INVERTERS/AND/OR ABCABC ABCABC ABCABC ABCABC Y

21 Notations  Symbols and Boolean operators:

22 DeMorgan’s Laws  Change ANDs into ORs and vice-versa

23 AB=A+B Useful Gate Structures  NAND-NAND  NOR-NOR C A B Y C A B Y  C A B Y  C A B Y C A B Y C A B Y AB=A+B “Pushing Bubbles” DeMorgan’s Laws

24 An Interesting 3-Input Gate: Multiplexer  Based on C, select the A or B input to be copied to the output Y. Truth Table A B Y C If C is 1 then copy B to Y, otherwise copy A to Y 2-input Multiplexer B C A Y “schematic” diagram A B C 0 1 Gate symbol

25 Multiplexer (MUX) Shortcuts 0101 01S01S 0101 01S01S 0101 01S01S I0I1I2I3I0I1I2I3 Y S 0 S 1 A 4-input Mux (implemented as a tree) 0101 01S01S 0101 01S01S A2B2A3B3A2B2A3B3 Y0Y0 S 0101 01S01S 0101 01S01S A0B0A1B1A0B0A1B1 Y1Y1 Y2Y2 Y3Y3 A 4-bit wide 2-input Mux ABCDSABCDS 01230123 Y A 0-3 B 0-3 S Y 0-3

26 Next  Arithmetic Circuits


Download ppt "Computer Organization and Design Transistors & Logic - II Montek Singh Wed, Oct 17, 2012 Lecture 11."

Similar presentations


Ads by Google