Full Transcript

Great Ideas UC Berkeley in Teaching Professor Computer Architecture Dan Garcia (a.k.a. Machine Structures) Introduction to Synchronous Digital Systems (SDS): Switches, Transistors, Signals, & Waveforms...

Great Ideas UC Berkeley in Teaching Professor Computer Architecture Dan Garcia (a.k.a. Machine Structures) Introduction to Synchronous Digital Systems (SDS): Switches, Transistors, Signals, & Waveforms Garcia, Kao cs61c.org Machine Structures Application (ex: browser) CS61C Operating System Compiler (Mac OSX) Software Assembler Instruction Set Architecture Hardware Processor Memory I/O system Datapath & Control Digital Design Circuit Design Transistors Fabrication Garcia, Kao 14 Synchronous Digital Systems (3) New-School Machine Structures Software Harness Parallelism & Parallel Requests Hardware Achieve High Assigned to computer Performance e.g., Search “Cats” Smart Phon Warehouse e Parallel Threads Scale Computer Assigned to core e.g., Lookup, Ads Compute r Core Core Parallel Instructions Memory >1 instruction @ one time (Cache)… e.g., 5 pipelined instructions Input/Output Parallel Data Exec. Unit(s) Functional >1 data item @ one time Block(s) e.g., Add of 4 pairs of words A0+B0 A1+B1 Main Memory Hardware descriptions All gates work in parallel at same time Logic Gates Garcia, Kao 14 Synchronous Digital Systems (4) Great Idea #1: Abstraction (Levels of Representation/Interpretation) High Level Language temp = v[k]; v[k] = v[k+1]; Program (e.g., C) v[k+1] = temp; Compiler lw x3, 0(x10) Assembly Language lw x4, 4(x10) Program (e.g., RISC-V) sw sw x4, x3, 0(x10) 4(x10) Assembler 1000 1101 1110 0010 0000 0000 0000 0000 Machine Language 1000 1110 0001 0000 0000 0000 0000 0100 Program (RISC-V) 1010 1010 1110 1101 0001 0010 1110 0010 0000 0000 0000 0000 0000 0000 0000 0100 Hardware Architecture alu 1 +4 wb Reg [] DataD pc Reg[rs1] 1 ALU DMEM alu pc+4 2 Description 0 0 pc IMEM inst[11:7] AddrD Addr 1 wb pc+4 Reg[rs2] DataR Branch 0 0 inst[19:15] AddrA DataA Comp. DataW mem inst[24:20] AddrB DataB 1 (e.g., block diagrams) Architecture Implementation Logic Circuit Description inst[31:7] Imm. imm [31:0] Gen (Circuit Schematic Diagrams) Garcia, Kao 14 Synchronous Digital Systems (5) Synchronous Digital Systems Hardware of a processor, e.g., RISC-V, is a Synchronous Digital System Synchronous: All operations coordinated by a central clock “Heartbeat” of the system! Digital: All values represented by discrete values Electrical signals are treated as 1s and 0s; grouped together to form words Garcia, Kao 14 Synchronous Digital Systems (6) Logic Design Next several weeks: we’ll study how a modern processor is built; starting with basic elements as building blocks Why study hardware design? Understand capabilities and limitations of HW in general and processors in particular What processors can do fast and what they can’t do fast (avoid slow things if you want your code to run fast!) Background for more in depth HW courses (150, 152) There is just so much you can do with standard processors: you may need to design own custom HW for extra performance Garcia, Kao 14 Synchronous Digital Systems (7) Switches: Basic Element of Physical Circuit Implementing a simple circuit Switch open when A is 0, closed when A is 1 A=0 Z Switch open (if A is “0” or unasserted) so no current flow, light bulb (Z) off = 0 Z ≡ A A=1 Z Switch closed (if A is “1” or asserted) so current flows, light bulb (Z) on = 1 A In general, we’ll draw A near an arrow, indicating that setting A to 1 involes “closing” the switch. Garcia Synchronous Digital Systems (9) Switches (continued) Compose switches into more complex ones (Boolean functions): A B AND Z ≡ A and B A OR Z ≡ A or B B Garcia, Kao 14 Synchronous Digital Systems (10) Historical Note Early computer designers built ad hoc circuits from switches Began to notice common patterns in their work: ANDs, ORs, … Master’s thesis (by Claude Shannon) made link between transistors and 19th Century Mathematician George Boole Called it “Boolean” in his honor Could apply math to give theory to hardware design, minimization, … 🗹 Garcia, Kao 14 Synchronous Digital Systems (11) en.wikipedia.org/wiki/History_of_the_transistor The Transistor (“born” 1947-12-23) www.pbs.org/transistor youtu.be/-td7YT-Pums youtu.be/OwS9aTE2Go4 Semiconductor device to amplify or switch signals Key component in ALL modern electronics Before that? Vacuum Tubes After that? Integrated circuit, microprocessor “The Transistor was probably THE most important invention of the 20th Century” - Ira Flatow, Transistorized! (PBS Special) Garcia Synchronous Digital Systems (13) Transistor Networks Modern digital systems designed in CMOS MOS: Metal-Oxide on Semiconductor C for complementary: normally-open and normally- closed switches MOS transistors act as voltage-controlled switches Analogy … WATER is controlling the switch! Garcia, Kao 14 Synchronous Digital Systems (14) MOS (metal oxide semiconductor) Transistors Three terminals: Drain, Gate, Source To remember: n (“normal”), p (has a circle, like the top part of P itself) Switch action: Dan Garcia Says if voltage on gate terminal is (some amount) higher/lower than source terminal then conducting path established between drain and source terminals G G Gate Source S D S D Drain n-channel p-channel open when voltage at G is low closed when voltage at G is low closes when voltage at G is high opens when voltage at G is high voltage(G) > voltage (S) + ε voltage(G) > voltage (S) + ε G LOW G HIGH Garcia Synchronous Digital Systems (16) MOS Networks Relationship “1” (voltage in between source) 3v in and out ? out in out “0” 0v 0 volts 3 volts (ground) 3 volts 0 volts Garcia, Kao 14 Synchronous Digital Systems (17) Transistor Circuit Rep. vs. Block diagram Chips are composed of nothing but transistors and wires. Small groups of transistors form useful building blocks. “1” (voltage source) a b c 0 0 1 0 1 1 1 0 1 “0” (ground) 1 1 0 Block are organized in a hierarchy to build higher-level blocks: ex: adders. You can build AND, OR, NOT out of NAND! 🗹 Garcia, Kao 14 Synchronous Digital Systems (18) Signals and Waveforms: Clocks Signals When digital is only treated as 1 or 0 Is transmitted over wires continuously Transmission is effectively instant Implies that a wire contains 1 value at a time Garcia, Kao 14 Synchronous Digital Systems (20) Signals and Waveforms bn-1 an-1 a0 Noisy! Delay! Garcia, Kao 14 Synchronous Digital Systems (21) Signals and Waveforms: Grouping Garcia, Kao 14 Synchronous Digital Systems (22) Signals and Waveforms: Circuit Delay 2 3 4 5 3 10 0 1 5 13 4 6 Garcia, Kao 14 Synchronous Digital Systems (23) Sample Debugging Waveform Garcia, Kao 14 Synchronous Digital Systems (24) Type of Circuits Synchronous Digital Systems are made up of two basic types of circuits: Combinational Logic (CL) circuits Our previous adder circuit is an example. Output is a function of the inputs only. Similar to a pure function in mathematics, y = f(x). (No way to store information from one invocation to the next, no side effects) State Elements circuits that store information. Garcia, Kao 14 Synchronous Digital Systems (25) Circuits with STATE (e.g., register) Garcia, Kao 14 Synchronous Digital Systems (26) Garcia, Kao 14 Synchronous Digital Systems (27) And in conclusion… Clocks control pulse of our circuits Voltages are analog, quantized to 0/1 Circuit delays are fact of life Two types of circuits: Stateless Combinational Logic (&, |, ~) State circuits (e.g., registers) Garcia, Kao 14 Synchronous Digital Systems (28)

Use Quizgecko on...
Browser
Browser