1 EE 109 Unit 12 – Computer Organization
2 Review of some key concepts from the first half of the semester A BRIEF SUMMARY
3 A Few Big Ideas 1 • Setting and clearing bits in a register tells the hardware what do and when (this is SW interacting with HW) • Speed matters – Your software is executing quickly compared to how fast a human can do something – You can use that to your advantage: blinking an LED at a fast rate can give the illusion it's always on but just more dim – Or it can work to your disadvantage: One button press may look like many because a loop may see one press on multiple iterations. – We must write our software with this in mind
4 A Few Big Ideas 2 • Clocking or enables are necessary to say "when" – Digital signals are always 1's and 0's so just looking at the bits doesn't tell us how many we have – We usually need clocks (pulses) to tell the hardware when we want it to grab the data Just looking at this set of digital values, are we sending 0101 once, twice, three times, how many? Once because we use the clock/enable to indicate that. But without the clock we'd have no clue how many times we are trying to write 0101
5 A Few Big Ideas 3 • External events happen asynchronously with your software (don't know "when" something has happened) – Your software program is the brains for how to process information but it doesn't magically know "when" something has happened? – We have to keep checking it (polling) or – Hardware designers built "interrupt" mechanisms to help • Many tasks can be done in either SW or HW; SW may be easier to code/use but HW provides parallelism – A 0.1 second timer can be done in SW using delays but then software can't do much else – Or in HW using timers allowing SW to do other tasks
6 Big picture ideas of what the CECS major prepares you for REVISITING CECS
7 Remember Day 1 • Computer engineering prepares you for a broad set of fields – You could work in the SW industry – You could work in the HW industry – You will be most qualified for jobs that combine that knowledge • We've been focused on the software/hardware interaction embodied in embedded systems http://www.cmu.edu/news/image-archive/Boss.jpg http://prisonerofclass-5933.zippykid.netdna-cdn.com/wp-content/uploads/2013/05/iphone.jpg http://firstcallappliance.com/wp-content/uploads/image/microwave.jpg http://www.amazon.com/Fisher-Price-T-M-X-Tickle-Me-Elmo/dp/B000ETRE0Q http://oeatech.net/wp-content/uploads/2011/03/RADARSAT2-satellite.jpg
8 You Can Do That… Cloud & Distributed Computing Scripting & (CyberPhysical, Databases, Data Networked Interfaces Mining,etc.) Applications Applications SW (AI, Robotics, Graphics, Mobile) Applications C / C++ / Java Systems & Networking OS Libraries (Embedded Systems, Networks) Assembly / Machine Code What we've been focusing on thus far Processor / Memory / I/O Architecture (Processor & Embedded HW) Functional Units (Registers, Adders, Muxes) HW Logic Gates Devices & Integrated Circuits (Semiconductors & Fabrication) Transistors Voltage / Currents
9 Dive Into a SmartPhone • Here's a picture of what's inside the iPhone TM 6 • Both sides of the circuit board are populated with chips 2-sided Circuit Board https://d3nevzfk7ii3be.cloudfront.net/igi/6MaZk5cEE2tm1uCj.huge Battery http://www.techinsights.com/teardown.com/apple-iphone-6/
10 What's Inside Your SmartPhone • What's inside an iPhone 6? • Microcontrollers/microprocessors – Apple A8 APL1011 SoC + Elpida 1 GB LPDDR3 RAM – SoC = System on Chip…Not just a processor but a processor with custom hardware to do specialized tasks…on -board graphics processor in this case – NXP LPC18B1UK ARM Cortex-M3 Microcontrollers – Similar on- board I/O modules as the Arduino. Take a look… – http://www.nxp.com/products/microcontrollers/cortex_m3/ • Modem + Amplifiers + Transceivers for wireless communication – Qualcomm MDM9625M LTE Modem + many others http://www.techinsights.com/teardown.com/apple-iphone-6/
11 What's Inside? • A gyroscope, accelerometer, and touchscreen – InvenSense MP67B 6-axis gyroscope and accelerometer combo – Broadcom BCM5976 Touchscreen Controller – Both use some form of A-to-D conversion to sense motion or touch • Memory Storage – SK Hynix H2JTDG8UD1BMS 128 Gb (16 GB) NAND Flash • Other specialized HW I/O modules – Murata 339S0228 Wi-Fi Module – Qualcomm PM8019 power management IC – Cirrus Logic 338S1201 audio codec http://www.techinsights.com/teardown.com/apple-iphone-6/
12 Computer Engineering & HW • Computer engineering prepares you to work in jobs that design these kinds of systems by: – Learning how to design digital circuits using logic gates [AND, OR, NOT] ( EE 154 and EE 254 Digital System Design ) – Learning how to optimize processors to execute software as efficiently as possible ( EE 457 Computer Architecture ) – Learn how to assemble many HW pieces (processor cores, RAM, specialized HW) to form systems-on-chip ( EE 454L – SoC Design ) – Learn some of the physics and science of Die Photo of the Apple A8 SoC Processor fabricating these designs on silicon ( EE 277L and EE 477L VLSI Design ) http://www.anandtech.com/show/8562/chipworks-a8
13 BASIC COMPUTER ORGANIZATION
14 You Can Do That… Cloud & Distributed Computing Scripting & (CyberPhysical, Databases, Data Networked Interfaces Mining,etc.) Applications Applications SW (AI, Robotics, Graphics, Mobile) Applications C / C++ / Java Systems & Networking OS Libraries (Embedded Systems, Networks) Assembly / Machine Code Processor / Memory / I/O Architecture (Processor & Embedded HW) Functional Units (Registers, Adders, Muxes) Where we will head now… HW Logic Gates Devices & Integrated Circuits (Semiconductors & Fabrication) Transistors Voltage / Currents
15 Computer Engineering as Abstraction Levels if (x > 0) then CMPR X,0 x = x + y - z; JLE SKIP a = b*x; Software ADD X,X,Y Code SUB X,X,Z SKIP MUL A,B,X Applications C / C++ / Java Chips SW 1110010101… (Processors) OS Libraries Assembly / Machine Code A S Functional Processor / Memory / I/O + B Units Functional Units (Registers, Adders, Muxes) x AND Logic HW F y gate Logic Gates z - - - - Output Transistors (Drain ) - - - Controlling Transistors Input (Gate ) Voltage / Currents Source
16 Motivation • We will start to learn assembly language so that… – …we understand why high level code has some of the constructs it has (if, while, etc) – …we understand the basic hardware inside a computer and why certain structures are there – …we can start to understand why HW companies create the structures they do (multicore processors) – …we can start to understand why SW companies deal with some of the issues they do (efficiencies, etc.)
17 Computer Organization • Three primary sets of components – Processor – Memory – I/O (everything else) • Tell us where things live? – Running code – Compiled program (not running) – Circuitry to execute code – Source code file – Data variables – Data for the pixels being displayed on your screen
18 Input / Output • Processor performs reads and writes to communicate with I/O devices just as it does with memory – I/O devices have locations (i.e. registers ) that contain data that the processor can access – These registers are assigned unique addresses just like memory Processor Memory 0 … 3FF A D C Video Interface 800 FE may FE 800 FE signify a WRITE … white dot at 01 a particular location ‘a’ = 61 hex Keyboard in ASCII Interface 400 61
19 Processor • 3 Primary Components inside a processor – ALU – Registers – Control Circuitry • Connects to memory and I/O via address , data , and control buses ( bus = group of wires) Bus Processor Memory Addr 0 1 2 Data 3 4 5 Control 6
20 Arithmetic and Logic Unit (ALU) • Executes arithmetic operations like addition and subtraction along with logical operations (AND, OR, etc.) Processor Memory Addr 0 op. 1 ALU 2 ADD, out in1 SUB, Data 3 AND, 4 in2 OR 5 Control 6
21 Registers • Some are for general use by software – Registers provide fast, temporary storage locations within the processor (to avoid having to read/write slow memory) • Others are required for specific purposes to ensure proper operation of the hardware Processor Memory PC Addr 0 op. 1 ALU 2 ADD, out in1 SUB, Data 3 AND, 4 in2 OR 5 R0-R31 Control 6
22 General Purpose Registers • Registers available to software instructions for use by the programmer/compiler • Instructions use these registers as inputs (source locations) and outputs (destination locations) Processor Memory PC Addr 0 op. 1 ALU 2 ADD, out in1 SUB, Data 3 AND, 4 in2 OR 5 R0-R31 Control 6
23 What if we didn’t have registers? • Example w/o registers: F = (X+Y) – (X*Y) – Requires an ADD instruction, MULtiply instruction, and SUBtract Instruction – w/o registers • ADD: Load X and Y from memory, store result to memory • MUL: Load X and Y again from mem., store result to memory • SUB: Load results from ADD and MUL and store result to memory • 9 memory accesses Processor Memory PC Addr 0 X op. 1 Y ALU 2 ADD, out in1 SUB, Data 3 F AND, 4 in2 OR 5 R0-R31 Control 6
Recommend
More recommend