cse140 components and design techniques for digital
play

CSE140: Components and Design Techniques for Digital Systems - PowerPoint PPT Presentation

CSE140: Components and Design Techniques for Digital Systems Introduction Instructor: Pietro Mercati Slides from Prof. Tajana Simunic Rosing Welcome to CSE 140! http://cseweb.ucsd.edu/classes/fa15/cse140/ Instructor: Pietro Mercati


  1. CSE140: Components and Design Techniques for Digital Systems Introduction Instructor: Pietro Mercati Slides from Prof. Tajana Simunic Rosing

  2. Welcome to CSE 140! http://cseweb.ucsd.edu/classes/fa15/cse140/ • Instructor: Pietro Mercati • Email: pimercat@eng.ucsd.edu; – please put “CSE140” in the subject line • Office Hours: – Tue 3.30-5.30pm CSE 2109 – Tue 8/9 4-6pm CSE 2109 • TAs and Tutors – Office hours listed on the class website/Piazza • Discussion sessions: Mon 5-6pm • Grades/HWs: http://ted.ucsd.edu; submit one file in pdf format • Announcements and online discussion : https://piazza.com – “CSE140_S216_MERCATI”  SIGN UP SOON !!!!

  3. Class website • https://cseweb.ucsd.edu/classes/su16_2/cse140-a/index.html

  4. Textbooks and Recommended Readings • Recommended textbook: – digital design by F. Vahid • Other recommended textbooks: – Digital Design by F. Vahid – Digital Design & Computer Arch. • by David & Sarah Harris – Contemporary Logic Design • by R. Katz & G. Borriello • Lecture slides are derived from the slides designed for all three books

  5. Grading • 4 Homeworks – 5% each • Midterm – 30% • Final – 50% • Homeworks are out on Tuesdays and are due on the following Tuesday before the lecture starts (i.e. before 11am) • Homework 1 will be out right after this class • Sumbission via TED

  6. Some Class Policies • Academic Honesty – Studying together in groups is encouraged – Turned-in work must be completely your own – Both “giver” and “receiver” are equally culpable – Cheating on HW/ exams: F in the course . – Any instance of cheating will be referred to Academic Integrity Office • Late: – Late submissions will not be accepted.

  7. CSE140 & other CSE classes Layers of abstraction Application programs Software Operating device drivers Systems CSE 30 instructions Architecture registers focus of this course CSE 141 Micro- datapaths architecture controllers adders Logic memories CSE 140 Digital AND gates Circuits NOT gates Analog amplifiers Circuits filters Abstraction: transistors Devices diodes A way to simplify by hiding details from other layers Physics electrons

  8. Why Study Digital Design? Look “under the hood” of your processors You become a better programmer when you understand hardware your code runs on Nvidia Tegra 2 die photo

  9. The Scope of CSE140 • We start with Boolean algebra Y = A and B • End up with the design oof a simple CPU • What’s next? CSE141 – more complex CPU architectures Nvidia Tegra 2 die photo

  10. Lets get started! • Number representations – Analog vs. Digital – Digital representations: • Binary, Hexadecimal, Octal • Switches, MOS transistors, Logic gates – What is a switch – How a transistor operates – Logic gates – Building larger functions from logic gates • Universal gates • Boolean algebra – Properties – How Boolean algebra can be used to design logic circuits

  11. What Does “Digital” Mean? • Digital signal • Analog signal – Finite possible values – Infinite possible values • Ex: button pressed • Ex: voltage on a wire on a keypad created by microphone Which is analog? 1 2 3 4 A) Wind speed 2 digital B) Radio Signal analog signal signal C) Clicker response D) A) & B) Possible values: Possible values: 0, 1, 2, 3, or 4. 4 1.00, 1.01, 2.0000009, E) All of the above That’s it. 3 value ... infinite possibilities value 2 1 0 time time

  12. Encoding Numbers – Base 10 & 2 Decimal to binary: • Each position represents a - Divide by two - Report the reminder quantity; symbol in position - Concatenate the reminders means how many of that NUMBER REMINDER quantity 523 1 – Base ten ( decimal ) • Ten symbols: 0, 1, 2, ..., 8, and 9 261 1 • More than 9 -- next position 130 0 – So each position power of 10 65 1 • Nothing special about base 10 -- 32 0 used because we have 10 fingers 16 0 – Base two ( binary ) 8 0 • Two symbols: 0 and 1 4 0 • More than 1 -- next position 2 0 – So each position power of 2 1 1 523 = 1000001011

  13. Encoding Numbers – Base 10 & 2 • Each position represents a quantity; symbol in position Binary to decimal: - Each position is a power of 2 means how many of that - Sum up all the powers of 2 quantity where you have a “1” – Base ten ( decimal ) • Ten symbols: 0, 1, 2, ..., 8, and 9 9 8 7 6 5 4 3 2 1 0 • More than 9 -- next position – So each position power of 10 1 0 0 0 0 0 1 0 1 1 • Nothing special about base 10 -- used because we have 10 fingers 2 0 + 2 1 + 2 3 + 2 9 = 523 – Base two ( binary ) • Two symbols: 0 and 1 • More than 1 -- next position – So each position power of 2

  14. Bases Sixteen & Eight • 8 A F Base sixteen – Used as compact way to write binary numbers 16 4 16 3 16 2 16 1 16 0 – Basic digits: 0-9, A-F 8 A F – Known as hexadecimal , or just hex 1000 1010 1111 • Base eight – Basic digits: 0-7 hex binary hex binary 4 2 7 – Known as octal 0 0000 8 1000 8 4 8 3 8 2 8 1 8 0 1 0001 9 1001 4 2 7 2 0010 A 1010 3 0011 B 1011 100 010 111 4 0100 C 1100 5 0101 D 1101 octal binary 6 0110 E 1110 0 000 7 0111 F 1111 1 001 2 010 3 011 4 100 5 101 6 110 7 111

  15. Bases Sixteen & Eight Hexadecimal to binary: hex binary hex binary - Expand each hexadecimal digit into the 0 0000 8 1000 1 0001 9 1001 corresponding binary string 2 0010 A 1010 3 0011 B 1011 8 A F = 4 0100 C 1100 5 0101 D 1101 1000 1010 1111 6 0110 E 1110 7 0111 F 1111 Binary to hexadecimal: 1 0 1 1 0 1 - Pad the binary string with zeros on the left until you have a number of digits 0 0 1 0 1 1 0 1 multiple of 4 - Group digits 4-by-4 starting from the right and convert into the corresponding 2 D hexadecimal symbol

  16. Combinational circuit building blocks: Switches & CMOS transistors

  17. Switches • Electronic switches are the basis of binary digital circuits – Electrical terminology 4.5 A • Voltage : Difference in electric potential – + 9V 4.5 A between two points – Analogous to water pressure 2 ohms • Current : Flow of charged particles – Analogous to water flow 9V 0V • Resistance : Tendency of wire to resist current flow 4.5 A – Analogous to water pipe diameter • V = I * R (Ohm’s Law)

  18. CMOS Switches • CMOS circuit – Consists of N and PMOS transistors – Both N and PMOS are similar to basic switches nMOS 1 0 gate conducts does not conduct pMOS 1 0 gate Silicon -- not quite a conductor or insulator: does not conducts conduct Semiconductor

  19. Transistor Circuit Design • nMOS: V DD – Turns on when gate is connected to 1 – When turned on, nMOS passes zeros pMOS well, but not ones, so connect source pull-up to GND network – nMOS forms a pull-down network inputs • pMOS: output – Turns on when gate is connected to 0 nMOS – When turned on, pMOS passes ones pull-down well, but not zeros, so connect source network to V DD – pMOS forms a pull-up network • Note: Vahid’s textbook shows some circuits with pMOS connected to GND and nMOS to Vdd: this is NOT normally done in practice!

  20. CMOS Switches The following is true for CMOS switches: A. nMOS turns on when gate is connected to logic 1 B. pMOS is an open switch when gate is connect to logic 1 C. All of the above D. None of the above nMOS gate pMOS gate

  21. Logic gates: CMOS NOT Gate NOT V DD A Y P1 A Y Y = A N1 A Y 0 1 GND 1 0 A P1 N1 Y 0 1

  22. CMOS Two Input NAND Gate V DD NAND P2 P1 A Y Y B A N1 Y = AB B N2 A B Y 0 0 1 0 1 1 GND 1 0 1 1 1 0 A B P1 P2 N1 N2 Y 0 0 0 1 1 0 1 1

  23. BREAK !

  24. Common Logic Gates V DD P1 a NOT a BUF a’ A Y 0 1 a 0 N1 1 0 1 GND P2 P1 Y a b AND a b NAND 0 0 0 0 0 1 A N1 0 1 0 0 1 1 1 0 0 1 0 1 B N2 a • b 1 1 0 1 1 1 (a • b)’ a b NOR a b OR 0 0 1 0 0 0 0 0 1 0 1 1 1 0 0 1 0 1 (a+b )’ a+b 0 1 1 1 1 1 a b XNOR a b XOR 0 0 1 0 0 0 0 1 0 0 1 1 ab’ + a’b 1 0 ab + a’b’ 0 1 0 1 1 1 1 1 1 0

  25. Boolean algebra – B = {0, 1} – Variables represent 0 or 1 only – Operators return 0 or 1 only – Basic operators • Intersection: • is logical AND : a AND b returns 1 only when a=1 & b=1 • Union: + is logical OR : a OR b returns 1 if either a=1 or b=1 (or both) • Complement: ’ is logical NOT : NOT a returns the opposite of a AND OR NOT BUFFER a NOT a BUF a b OR a b AND a’ 0 1 a 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 0 1 0 1 0 1 1 0 0 a • b a+b 1 1 1 1 1 1 – Derived operators : NAND NOR XOR XNOR a b XNOR a b XOR a b NOR a b NAND 0 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 0 (a • b)’ (a+b )’

  26. Boolean Algebra X and Y are Boolean variables with X=1, Y=0 What is X+X+Y? A. 0 B. 1 C.2 D.None of the above

  27. Universal Gate: NAND Any logic function can be implemented using just NAND gates . Boolean algebra’s basic operators are AND, OR and NOT https://en.wikipedia.org/wiki/NAND_logic

Recommend


More recommend