CS代写 MCIT 593 – Introduction to Computer Systems

MCIT 593 – Introduction to Computer Systems
WHAT IS A TRANSISTOR?
Property of Penn Engineering 2

Copyright By PowCoder代写 加微信 powcoder

MCIT 593 – Introduction to Computer Systems
What Is a Transistor (MOSFET Type)?
• An electrical device that acts as an electrical switch; it’s typically made from Silicon
• 3 electrical contacts/terminals: Gate, Drain, Source
• Gate controls flow of current between Drain and Source terminals; this style transistor is called a MOSFET
Current flows!
Light turns ON
current flows!
Light turns OFF
Equivalent circuit when transistor is ON using a simple switch
Equivalent circuit when transistor is OFF using a simple switch
When gate has positive voltage, switch is ON… we have a closed circuit
When gate has 0 Volts
switch is OFF… we have an open circuit
Property of Penn Engineering 3
3V Battery 3V Battery 3V
3V Battery
3V Battery

MCIT 593 – Introduction to Computer Systems
HOW IS A TRANSISTOR MADE?
Property of Penn Engineering 5

MCIT 593 – Introduction to Computer Systems
What Exactly Is Current?
• Current is defined as:
• The net movement of positive charge over time…
• …past a given point in a circuit
Any solid (like copper in wire)
is composed of a lattice of atoms bonded together via their electrons
If a solid has electrons not participating in the bond,
the electrons are called “free”
If one applies an electric field across the solid, the free electrons can move!
The movement of these electrons, due to an applied electric field,
is what we call current!
If a solid has few free electons, when an electric field is applied little current will result;
we consider these materials insulators
• Let’sexaminecurrentinasegmentofwire +3V
+ + + + + + + + + +
– – – – – –
—— ——
———- 0V
Property of Penn Engineering
3V Battery
segment of copper wire

MCIT 593 – Introduction to Computer Systems
Why Silicon for Transistors?
• Silicon is a naturally occurring element
• It has 4 electrons in its outer shell
• It covalently bonds with 4 neighboring atoms to form a solid
• Since all outer electrons bond, none of them are free for current
• But, if you “heat” up Silicon, you can shake some electrons free!
• For this reason, it’s called a “semi” conductor
Property of Penn Engineering

MCIT 593 – Introduction to Computer Systems
How Transistors Are Built
• We can improve Silicon’s ability to conduct current by “doping” it • N-type Silicon: “doped” with atoms from column V (P, As, Sb)
• Gives it an extra electron!
• P-type Silicon: “doped” with atoms from column III (Al, Ga, In)
• Removes electrons – creates “holes” in lattice
• Transistors are formed from p & n-type “doped” Silicon
MOS – Metal Oxide
Property of Penn Engineering
Symbol for an n-type MOSFET
Transistor
METAL OXIDE
P-Type (extra holes)
Internal Structure of an n-type MOSFET Transistor
Semiconductor

MCIT 593 – Introduction to Computer Systems
HOW A TRANSISTOR WORKS
Property of Penn Engineering 10

MCIT 593 – Introduction to Computer Systems
How Does a Transistor Work?
(When It’s Off)
When the gate on an nMOS transistor has 0V (GND) – it’s off
Electrons cannot move between source and drain no path exists under the gate
The transistor – aka “the switch” – is “OFF” (the light stays off)
Property of Penn Engineering 11
3V Battery
3V Battery

MCIT 593 – Introduction to Computer Systems
How Does a Transistor Work?
(When It’s On)
Why does a positive charge on the gate turn transistor on?
1) Positive charge repels holes from under the gate
attracts electrons from source/drain regions
2) Creates an “n-type” channel under the oxide why we call this an nMOS transistor
Property of Penn Engineering 12
3V Battery 3V
3V Battery 3V

MCIT 593 – Introduction to Computer Systems
How Does a Transistor Work?
(When It’s On)
Why does a positive charge on the gate turn transistor on?
1) Positive charge repels holes from under the gate
attracts electrons from source/drain regions
2) Creates an “n-type” channel under the oxide why we call this an nMOS transistor
3) Current can flow from drain to source
electrons enter source, exit drain
4) Electrons cannot penetrate oxide
electric field forms across oxide; hence “FET”
– Light turns ON
– – – – – –S- – 0V
Property of Penn Engineering 13
3V Battery 3V
3V Battery 3V

MCIT 593 – Introduction to Computer Systems
How Does a Transistor Work?
When gate on nMOS transistor has “positive” charge
(aka “High Voltage”) on gate
A “channel” is formed between source and drain, electrons flow (so current flows!)
The transistor – aka “The Switch” – is “ON”, and so is the light!
When gate on nMOS transistor has no charge (0V) – It’s off
Property of Penn Engineering 14
3V Battery 3V

MCIT 593 – Introduction to Computer Systems
Speed of MOSFET
• Dependent on many factors, 1 crucial factor: Length of Channel Ø Why? Electron takes less time to travel across smaller distance!
• Currently, channels have lengths < 5 nm! Note: Human hair is ~80,000 nm wide! Moore’s Law: Every 18 months, # of transistors fit into an IC will double BECAUSE length of the channel will halve every 18 months Property of Penn Engineering 15 MCIT 593 - Introduction to Computer Systems Two Types of MOSFETs: nMOSFET and pMOSFET • nMOSFET (nMOS): channel carries negative charges (electrons) • pMOSFET (pMOS): channel carries positive charges (holes) Property of Penn Engineering 16 MCIT 593 - Introduction to Computer Systems Two Types of MOSFETs: nMOSFET and pMOSFET • nMOSFET (nMOS): channel carries negative charges (electrons) • GATE MUST BE (+) (LOGIC 1) to be ON • pMOSFET (pMOS): channel carries positive charges (holes) • GATE MUST BE (-) (LOGIC 0) to be ON Property of Penn Engineering 17 MCIT 593 - Introduction to Computer Systems PAIRING TRANSISTORS TOGETHER: CMOS Property of Penn Engineering 19 MCIT 593 - Introduction to Computer Systems CMOS: pMOSFET & nMOSFET in Complement Notice, the gates are tied together (aka: shorted) • This ensures each transistor has the same voltage on its gate • But recall, the transistors perform “complementary” actions: • 3V turns NMOS ON • 3V turns PMOS OFF • Light has “0V” across it, so it stays off • No current flow in this circuit Property of Penn Engineering 20 3V Battery 3V 3V Battery 3V MCIT 593 - Introduction to Computer Systems CMOS: pMOSFET & nMOSFET in Complement 3V on the input (the gates) turns the light OFF! • What if the input is set to 0V? • 0V turns NMOS OFF • 0V turns PMOS ON • Light has “3V” across it! • Current flows in this circuit, so light turns ON! S -------- 3V- 0V - Property of Penn Engineering 21 3V Battery 3V 3V Battery MCIT 593 - Introduction to Computer Systems CMOS: pMOSFET & nMOSFET in Complement S -------- D OUT - 3V IN - - - G 0V Property of Penn Engineering 22 3V Battery 3V Battery 3V 3V Battery 3V Battery 3V MCIT 593 - Introduction to Computer Systems More Common Electrical Symbols Dr. Farmer’s notation for lecture Standard notation you’ll see in books High Voltage Low Voltage (0V), (3V, 5V, etc) typically ground (GND) Property of Penn Engineering 23 3V Battery 3V MCIT 593 - Introduction to Computer Systems FROM CMOS TO LOGIC GATES Property of Penn Engineering 25 MCIT 593 - Introduction to Computer Systems Recall...How a Computer Represents Data Transistors are the basis for all digital electronics • We’ve seen that they by controlling the flow of electrons Recall our mapping of voltages to the binary world: 1. Presence of a voltage – we’ll call this state “1” 2. Absence of a voltage – we’ll call this state “0” Computers use transistors as switches to manipulate bits • Before transistors: tubes, electro-mechanical relays (pre 1950s) • Mechanical adders (punch cards, gears) as far back as mid-1600s Property of Penn Engineering 26 MCIT 593 - Introduction to Computer Systems Our First Logic Gate: the Inverter We’ve Already Seen It! Our 1st “Logic Gate” Logic 1 OUT A Digital Inverter: At the transistor Level (using CMOS technology) Absence of a voltage: Logical 0 Presence of a voltage: Logical 1 Digital Inverter: Logic Symbol (technology independent) Digital Inverter: Truth Table Property of Penn Engineering 27 MCIT 593 - Introduction to Computer Systems LOGIC GATES: NAND, NOR Property of Penn Engineering 29 MCIT 593 - Introduction to Computer Systems NAND Gate (NOT-AND) Sample Input: A=0, B=1 Note: parallel structure on top, series on bottom NAND Gate Logic Symbol ABC 001 011 NAND Gate Truth Table NAND Gate Transistor Level Property of Penn Engineering 30 MCIT 593 - Introduction to Computer Systems NAND Gate (NOT-AND) Sample Input: A=1, B=1 Note: parallel structure on top, series on bottom NAND Gate Logic Symbol ABC 001 011 NAND Gate Truth Table NAND Gate Transistor Level Property of Penn Engineering 31 MCIT 593 - Introduction to Computer Systems NOR Gate (NOT-OR) Note: series structure on top, parallel on bottom. NOR Gate Transistor Level Sample Input: A=0, B=1 NOR Gate Logic Symbol ABC 001 010 NOR Gate Truth Table Property of Penn Engineering 32 MCIT 593 - Introduction to Computer Systems General Structure for CMOS • All CMOS gates must have 2 parts: PUN – “Pull Up Network” – pulls output “up” to PWR (logic 1) • RULE: PUN can only contain PMOS transistors PDN – “Pull Down Network” – pulls output “down” to GND (logic 0) • RULE: PDN can only contain NMOS transistors Either PUN or PDN is “ON” at any given time (never both) Output is taken where PUN and PDN intersect (Pull up network) (Pull down network) Important to notice: • If output = logic 1 PUN is “ON” ; PDN is “OFF” • If output = logic 0 PUN is “OFF” PUN must be ON! PDN is “ON” ; Property of Penn Engineering 33 MCIT 593 - Introduction to Computer Systems Basic Digital Logic Gates Basic Logic Gates: NOT/INV NAND AND NOR OR • We can put these together to make more complex Boolean functions • Using only an INV / AND / OR we can make any other Boolean function (logically complete!) • We could design only at the “logic gate level;” not always the most efficient • Technology independent at this level • We could make them from vacuum tubes, relays, carbon nano-tubes! Property of Penn Engineering 34 MCIT 593 - Introduction to Computer Systems LOGIC GATES: MULTIPLE INPUTS AND DELAYS Property of Penn Engineering 36 MCIT 593 - Introduction to Computer Systems More Than 2 Inputs? Arbitrary Functions? AND/OR can take any number of inputs • AND=1ifallinputsare1 • OR=1ifanyinputis1(0ifallinputsare0) Implementation • Multiple two-input gates or single CMOS circuit Can implement arbitrary Boolean functions as a gate • More complex n- and p- networks Property of Penn Engineering 37 MCIT 593 - Introduction to Computer Systems Gate Delays • With any logic circuit there will be a short delay between the time you change one of the inputs and the time the output settles to its final value • This time is referred to as the gate delay (takes a bit of time to setup channel & get signal through it!) • For modern circuitry, these gate delays are on the order of nano seconds (10-9 seconds) or pico • Nonetheless, these delays ultimately limit the rate at which you can compute – limiting the number of operations you can perform per second seconds (10-12 seconds) Inverter Logic Gate Property of Penn Engineering 38 MCIT 593 - Introduction to Computer Systems Gate Delays Which is the better implementation of 4-input AND? • One on the left • Why? It’s faster, 2 “gate delays” instead of 3 Gate delays: longest path (in gates) through a circuit • Grossly over-simplified, ignores gate differences, wires • Good enough for our purposes Property of Penn Engineering 39 MCIT 593 - Introduction to Computer Systems Visual Shorthand for Multi-Bit Gates Use a cross-hatch mark to group wires • Example: calculate the AND of a pair of 2-bit numbers • A3 is “high-order” or “most-significant” bit • If“A”is1000,thenA3 =1,A2=0,A1=0,A0=0 This is still a 2-input AND, Except each input is 4-bits wide! Property of Penn Engineering 40 MCIT 593 - Introduction to Computer Systems Shorthand for Inverting Signals Invert a signal by adding either • A before/after a gate • A “bar” over letter, even an apostrophe “Boolean Algebra” or Logic Function Form: A AND B A AND B Property of Penn Engineering 41 MCIT 593 - Introduction to Computer Systems LOGIC GATES TO COMBINATIONAL LOGIC Property of Penn Engineering 43 MCIT 593 - Introduction to Computer Systems Logic Gates to Truth Table • Multiple logic gates can combine to implement a Boolean/Logic function • Sometimes called a “logic circuit” There are two inputs Since the input on each can be logic 0 or logic 1, there are only 4 possible combinations of the two inputs Property of Penn Engineering 44 MCIT 593 - Introduction to Computer Systems Logic Gates to Truth Table • Multiple logic gates can combine to implement a Boolean/Logic function • Sometimes called a “logic circuit” How to determine what a logic circuit does Try each input combination (row by row) and follow to the output Property of Penn Engineering 45 MCIT 593 - Introduction to Computer Systems Logic Gates to Truth Table • Multiple logic gates can combine to implement a Boolean/Logic function • Sometimes called a “logic circuit” How to determine what a logic circuit does Try each input combination (row by row) and follow to the output Property of Penn Engineering 46 MCIT 593 - Introduction to Computer Systems Logic Gates to Truth Table • Multiple logic gates can combine to implement a Boolean/Logic function • Sometimes called a “logic circuit” 0110 1010 1101 How to determine what a logic circuit does Try each input combination (row by row) and follow to the output Property of Penn Engineering 47 MCIT 593 - Introduction to Computer Systems Logic Gates to Boolean Functions • Multiple logic gates can combine to implement a Boolean/Logic function • Sometimes called a “logic circuit” Boolean Logic Functions: You can translate the logic circuit into a “Boolean Function” S=(A’ANDB)OR(AANDB’) = (A’B)+(AB’) C=AANDB =AB 0110 1010 1101 Boolean Algebra = branch of math governing logic functions! Property of Penn Engineering 48 MCIT 593 - Introduction to Computer Systems Logic Gates to Boolean Functions • Multiple logic gates can combine to implement a Boolean/Logic function • Sometimes called a “logic circuit” ABSC 0000 0110 Cout 10 Sum This “hardware” is the cornerstone for a CPU’s “adding” circuitry Notice something amazing! This logic circuit implements binary addition! This particular logic circuit is called a “half adder” Property of Penn Engineering 49 MCIT 593 - Introduction to Computer Systems GENERATING COMBINATION LOGIC USING PLA Property of Penn Engineering 51 MCIT 593 - Introduction to Computer Systems Truth TableàGates (PLAs) We’ve learned how to go from GATESàTruth Table • What if you only have a Truth Table...how to go to GATES? PLA (Programmable Logic Array) • Tool that can implement any truth table • Mechanical technique for configuring AND/OR/INV • Logically complete system • Note: not very efficient if you have 4+ inputs Property of Penn Engineering 52 MCIT 593 - Introduction to Computer Systems Implementing a PLA From a Truth Table • AND, OR, NOT can implement ANY truth table 0 1 0 0 truth table 1. AND combinations that yield a "1" in the 2. OR the results of the AND gates Notice, 5 rows that cause a “1” in the output...5 AND gates Notice, 1 output, only 1 OR gate Property of Penn Engineering 53 MCIT 593 - Introduction to Computer Systems PLAs – Not Always the • A PLA can be used to implement ANY logical function Provides you with an incredibly easy tool to use If you can generate a truth table to model desired behavior • PLA gives you a way generate the gate level implementation However, PLAs don’t give the most efficient solution Truth Table Logic Function F=(A AND B) OR C Property of Penn Engineering 54 Minimized Logic MCIT 593 - Introduction to Computer Systems Logic Minimization Using Boolean Algebra How can we “minimize” a complex logic circuit? By applying Boolean Algebra Laws, we can minimize! • Identities ØXAND1=X; XAND0=0 ØXOR1=1; XOR0=X • Associative Laws ØA AND (B AND C) = (A AND B) AND C ØA OR (B OR C) = (A OR B) OR C • Distributive Laws ØA AND (B OR C) = (A AND B) OR (A AND C) ØA OR (B AND C) = (A OR B) AND (A OR C) • DeMorgan’s Law ØA NAND B = NOT (A AND B) = (NOT A) OR (NOT B) ØANORB =NOT(AORB) =(NOTA)AND(NOTB) More laws here: http://en.wikipedia.org/wiki/Boolean_algebra#Laws Alternatively...you can use a Karnaugh Map, graphical tool for Boolean Algebra Simplification Property of Penn Engineering 55 MCIT 593 - Introduction to Computer Systems Transistor – Electronic Switch • Two complementary flavors: nMOSFET, pMOSFET (CMOS) • Controltheflowofcurrentinacircuit, • Whencurrentisflowing:logic1,whenitisn’t:logic0 Logic Gate • Basic Gates: AND/OR/NOT also, NAND/NOR • TodayweimplementthesebasicgatesusingCMOS • Tomorrowwe’llusecarbonnanotubesorQbits! Combinational Logic • Usingseverallogicgatestogetherwecancreatealogiccircuitthatperformsworkforus, like adders/multipliers/etc. • WelearnedhowtogofromGatestoLogicFunction • PLA=TooltogofromTruthTabletoLogicGates ØNot the most efficient tool, but always works! Property of Penn Engineering 56 MCIT 593 - Introduction to Computer Systems CHAINING SIMPLE COMPONENTS FROM HALF ADDER TO INCREMENTER Property of Penn Engineering 58 MCIT 593 - Introduction to Computer Systems Chaining Basic Components Together: Incrementer Let’s create an incrementer for an 8-bit # • Input: A • Output: S = A+1 • Why? Recall how to create 2C number? • We “flip bits” then add 1 Approach #1 (impractical) • Use PLA-like techniques to implement circuit • Problem: 28 or 256 rows, 8 output columns • In theory, possible; in practice, intractable Ø Imagine a 16-bit incrementer! Approach #2 (pragmatic) • Create a 1-bit incrementer circuit • Replicate it 8 times • We already have! A half adder can be used to just add 1 A8 +1 8 incrementer (just adds 1) 00001011 Property of Penn Engineering 59 MCIT 593 - Introduction to Computer Systems One-Bit Incrementer Implement a single-column of an incrementer using a half adder 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com