Lecture 1 - CS324 CS324 Computer Architecture Lecture 1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS324 CS324 Computer Architecture Lecture 1 Lisa Ballesteros (www.mtholyoke.edu/~lballest) lecture slides: www.mtholyoke.edu/courses/cs324/Lectures www.mtholyoke.edu/courses/cs324/Lectures What is “Computer Architecture” What Computer Architecture = Instruction Set Architecture + Machine Organization software instruction set hardware What are “Machine Structures”? What Application (Netscape) Operating System Compiler Assembler (Windows 98) Processor Memory I/O system Datapath & Control Digital Design Circuit Design transistors 324 Instruction Set Architecture Software Hardware Coordination of many levels of abstraction Coordination levels – 60’s & 70’s programmers tried to limit memory usage (limited and small) to improve speed – Now programmers must understand current hierarchical memories and parallel nature of processors to build competitive software. Abstractions Abstractions Allow us to ignore many details in order to focus on only the relevant Allow info for a problem – Road map primarily shows layout of roads Programming languages as abstraction Programming – HLL statement may take many steps to perform 2 sets of primitives: are arithmetic/logical & control sets – AL: low level instructions, not necessarily the operations hardware performs – ML: lower level of abstraction corresponds to basic machine ops primitives: machine instructions primitives: Coordination of many levels of abstraction Coordination levels – 60’s-70’s programmers limited memory usage (limited/small) to improve speed – Now programmers must understand current hierarchical memories and parallel nature of processors to build competitive software. Levels of Representation Levels High Level Language Program (e.g., C) Compiler Assembly Language Program (e.g.,MIPS) Assembler Machine Language Program (MIPS) Machine Interpretation Control Signal Specification °Architecture °Implementation temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; lw lw sw sw 0000 1010 1100 0101 1001 1111 0110 1000 1100 0101 1010 0000 $to, $t1, $t1, $t0, 0110 1000 1111 1001 0($2) 4($2) 0($2) 4($2) 1111 1001 1000 0110 0101 1100 0000 1010 1000 0110 1001 1111 1010 0000 0101 1100 Logic Circuit Description (Logisim, etc.) Anatomy: 5 components of any Computer Anatomy: Personal Computer Computer Processor (active) Control (“brain”) Datapath (“brawn”) Memory (passive) (where programs, data live when running) Devices Input Keyboard, Mouse Disk (where programs, data live when not running) Output Display, Printer Execution Basics Execution AL instruction (sub r1, r2, r1) specifies AL – – – opcode: operation to perform (sub) operands: (r1, r2) result destination: (r1) Processor executes instructions Processor – datapath includes functional units (fu) that perform arithmetic ops – control tells datapath, memory, and I/O devices what, when, and how to perform instruction Execution Cycle Execution Instruction Fetch Instruction Decode Operand Fetch Execute Result Store Next Instruction Determine successor instruction Compute result value or status Deposit results in storage for later use Locate and obtain operand data Determine required actions and instruction size Obtain instruction from program storage Representations Representations Computing foundation: Using numbers for Computing instructions and data – Data can be anything (integers, floating point, characters): the program determines what it is – Stored program concept: instructions just data Not all numbers can be represented exactly Not exactly Representation used is critical Representation – may be no representation for some values – effects cost of computation Number Representations Number Computers typically represent numbers via binary Computers Humans use Decimal Humans – Digits: 0-9 – 623: from elementary school, 6 in 100’s place, 2 in 10’s place, and 3 in one’s place – each position is a power of 10 623 = 6 x 100 + 2 x 10 + 3 x 1 = 6 x 102 + 2 x 101 + 3 x 100 Number Representations Number Binary Numbers: 00000101 – at hardware level, represents low (0) and high (1) voltages – can ignore leading 0s if unsigned representation – typically written in groups of 4 bits: 0000 0101 – number bit positions from right to left rightmost bit (least significant bit or lsb) is bit 0 rightmost each bit to left gets next successive number each 8-bits: 0 0 1 0 1 0 1 1 p7 p6 p5 p4 p3 p2 p1 p0 – each position is a power of 2, in fact, 2p Binary/Decimal Conversions Binary/Decimal binary => decimal binary 1. number bits of binary string from right to left, beginning with 0 2. for each bit position, p, multiply the bit value (0,1) by 2 p 3. sum the products of your multiplications 1001 => 1*23 +0*22 + 0*21 + 1*20 = 8+1 = 9 8+1 Binary Numbers Binary 101 = 1 x 22 + 0 x 21 + 1 x 20 =1x4+0x2+1x1 = 5 in decimal 23 What is 10111 in decimal? What How many numbers can be represented with n How bits? 2n What is the maximum number that can be What represented by n bits? 2n − 1 Binary/Decimal Conversions Binary/Decimal N (in decimal) => binary via repeated divisions * (in – 1. 2. build a bit string from right to left: divide N by 2 Repeat until result is 0 a. set rightmost unset bit position to: • • 1 if there is a remainder 0 otherwise b. Divide result of division by 2 3. most significant bit is value of remainder *this approach can be used to convert to any base by repeatedly dividing by the base value Convert 4510 to binary (base 2) Other Bases Other Hexadecimal: Hexadecimal: – digits 0-9, A-F – 3 AF16 = – Typically used to represent addresses Octal (base 8 or radix Octal – digits 0-7 – 0338 ):3 2 Converting Binary to Another Base Converting Converting binary to base a = radix (e.g. base 16 = ) 24 1. 1. 2b : 2. Group binary digits into groups of b, beginning with lsb Substitute each group for the equivalent symbol in base b Other Bases Other Hexadecimal: Hexadecimal: – digits 0-9, A-F – 3 AF16 = what is this in binary? what is this number in decimal? Hexadecimal Numbers: Base 16 Hexadecimal Hexadecimal: Hexadecimal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F – Normal digits + 6 more from the alphabet – In C, written as 0x… (e.g., 0xFAB5) Conversion: Binary⇔Hex Conversion: – 1 hex digit represents 16 decimal values – 4 binary digits represent 16 decimal values ⇒1 hex digit replaces 4 binary digits One hex digit is a “nibble”. Two is a “byte” One Example: Example: – 1010 1100 0011 (binary) = 0x_____ ? Decimal vs. Hexadecimal vs. Binary Decimal Examples: Examples: 1010 1100 0011 (binary) 1010 1100 0011 (binary) == 0xAC3 0xAC3 10111 (binary) 10111 (binary) == 0001 0111 (binary) 0001 0111 (binary) == 0x17 0x17 0x3F9 0x3F9 == 11 1111 1001 (binary) 11 1111 1001 (binary) How do we convert between hex and How do we convert between hex and Decimal? Decimal? 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 15 0 1 2 3 4 5 6 7 8 9 A B C D E F 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 1111 MEMORIZE! Grading Grading Programming Assignments 20% Programming Homework 20% Homework Exams (2) 30% Exams Group Project 25% Group Participation 5% Participation What is “Computer Architecture” What Computer Architecture = Instruction Set Architecture + Machine Organization software instruction set hardware Instruction Set Architecture Instruction A very important abstraction very – interface between hardware and low-level software – standardizes instructions, machine language bit patterns, etc. – advantage: different implementations of the same architecture different – disadvantage: sometimes prevents using new innovations sometimes – Modern instruction set architectures: 80x86/Pentium/K6, PowerPC, DEC Alpha, MIPS, SPARC, HP Instruction Set Architecture (subset of comp Arch.) Instruction ... the attributes of a [computing] system as seen by the programmer, i.e. the conceptual structure and functional i.e. the behavior, as distinct from the organization of the data flows and controls, the logic design, and the physical implementation. – Amdahl, Blaaw, and Brooks, 1964 -- Organization of Programmable Storage -- Data Types & Data Structures: Encodings & Representations -- Instruction Set -- Instruction Formats -- Modes of Addressing and Accessing Data Items and Instructions -- Exceptional Conditions SOFTWARE Computer Architecture? Computer • ISA – the conceptual structure and functional behavior of a machine as seen by the programmer • Distinct from logic design, physical implementation or data flow/control • Microarchitecture (μarchitecture) – Describes how ISA will be implemented (control issues, etc) • Designer chooses which logic circuits to use to implement the μarchitecture more than 1 type of circuit can perform the same operation more • Devices built from circuits Overview of Physical Implementations Overview The hardware out of which we make systems. Integrated Circuits (ICs) Integrated – Combinational logic circuits, memory elements, analog interfaces. Printed Circuits (PC) boards Printed – substrate for ICs and interconnection, distribution of CLK, Vdd, and GND signals, heat dissipation. Power Supplies Power – Converts line AC voltage to regulated DC low voltage levels. Chassis (rack, card case, ...) Chassis – holds boards, power supply, provides physical interface to user or other systems. Connectors and Cables. Connectors Integrated Circuits (2007 state-of-the-art) Integrated Bare Die Primarily Crystalline Silicon Primarily 1mm - 25mm on a side 1mm 2007 feature size ~ 65 nm = 65 x 10-9 m 2007 (then 45, 32, 22, and 16 [by yr 2013]) 100 - 1000M transistors 100 (25 - 100M “logic gates”) (25 3 - 10 conductive layers “CMOS” (complementary metal oxide semiconductor) - most common. Chip in Package Package provides: Package – spreading of chip-level signal paths to board-level – heat dissipation. Ceramic or plastic with gold wires. Ceramic Printed Circuit Boards Printed fiberglass or ceramic fiberglass 1-20 conductive layers 1-20in on a side IC packages are soldered IC down. Provides: Provides: – Mechanical support – Distribution of power and heat. Computer Architechture Changes Computer Rapidly 1950’s-60’s: Computer Arithmetic 1950 1970’s-mid 1980’s: Instruction Set Design, especially 1970 those appropriate for compilers 1990’s: CPU design, memory systems, I/O systems, 1990 multiprocessors, networks 2010’s: Self-adapting systems? 2010 Self-organizing structures? DNA Systems/Quantum Computing? Technology Trends: Technology Microprocessor Complexity # of transistors on an IC Gordon Moore Intel Cofounder 2X Transistors / Chip Every 1.5 years Called “Moore’s Law” Year Technology Trends: Memory Capacity Technology (Single-Chip DRAM) size 1000000000 100000000 10000000 1000000 100000 10000 1000 1970 1975 1980 1985 Year 1990 1995 2000 • Now 1.4X/yr, or 2X every 2 years. • 8000X since 1980! year size (Mbit) 1980 0.0625 1983 0.25 1986 1 1989 4 1992 16 1996 64 1998 128 2000 256 2002 512 2004 1024 (1Gbit) 2006 2048 2Gbit) 900 800 700 600 500 400 300 200 100 0 Technology Trends: Processor Technology Performance Intel P4 2000 MHz (Fall 2001) Performance measure 1.54X/yr DEC Alpha 21264/600 DEC Alpha 5/500 DEC Alpha 5/300 DEC Alpha 4/266 IBM POWER 100 87 88 89 90 91 92 93 94 95 96 97 year We’ll talk about processor performance later on… Computer Technology - Dramatic Change! Computer Memory Memory – DRAM capacity: 2x / 2 years (since ‘96); 64x size improvement in last decade. Processor Processor – Speed 2x / 1.5 years (since ‘85);[slowing!] 100X performance in last decade. Disk Disk – Capacity: 2x / 1 year (since ‘97) 250X size in last decade. Uniprocessor Performance 10000 From Hennessy and Patterson, Computer Architecture: A Quantitative Approach, 4th edition, October, 2006 Performance (vs. VAX-11/780) ??%/year 1000 52%/year 100 10 25%/year pp ha at Wh ne e ?? ?? d 1 1978 1980 1982 1984 1986 1988 1990 1992 1994 1996 1998 2000 2002 2004 2006 • VAX : 25%/year 1978 to 1986 • RISC + x86: 52%/year 1986 to 2002 • RISC + x86: ??%/year 2002 to present The End of the Uniprocessor Era The Single biggest change in the history of computing systems Conventional Wisdom in Computer Architecture Conventional Old Conventional Wisdom: Power is free, Transistors expensive Old New Conventional Wisdom (CW) : “Power wall” Power expensive, New Transistors free (Can put more on chip than can afford to turn on) Old CW: Sufficient increasing Instruction-Level Parallelism (ILP) via Old compilers, innovation (pipelining, superscalar, out-of-order, speculation, VLIW, …) New CW: “ILP wall” law of diminishing returns on more hardware New for ILP Conventional Wisdom in Computer Architecture Old CW: Multiplies are slow, Memory access is fast Old New CW: “Memory wall” Memory slow, multiplies fast New (200 clock cycles to DRAM memory, 4 clocks for multiply) Old CW: Uniprocessor performance 2X / 1.5 yrs Old New CW: Power Wall + ILP Wall + Memory Wall = Brick Wall New – Uniprocessor performance now 2X / 5(?) yrs ⇒ Sea change in chip design: multiple “cores” (2X processors per chip / ~ 2 years) More, simpler processors are more power efficient More, • Processor is the new transistor? Problems with Sea Change Problems Algorithms, Programming Languages, Compilers, Algorithms, Operating Systems, Architectures, Libraries, … not ready to supply Thread-Level Parallelism or Data-Level Parallelism for 1000 CPUs / chip Architectures not ready for 1000 CPUs / chip Architectures – Unlike Instruction-Level Parallelism, cannot be solved by computer architects and compiler writers alone, but also cannot be solved without participation of architects Need a reworking of all the abstraction layers in the Need computing system stack Putting it all in perspective… Putting “If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside.” – Robert X. Cringely Computer Technology - Dramatic Change! Computer State-of-the-art PC when you graduate: State (at least…) – Processor clock speed: 5000 MegaHertz (5.0 GigaHertz) – Memory capacity: 8000 MegaBytes (8.0 GigaBytes) – Disk capacity: 2000 GigaBytes (2.0 TeraBytes) – New units! Mega => Giga, Giga => Tera (Tera => Peta, Peta => Exa, Exa => Zetta Zetta => Yotta = 1024) Abstraction Layers in Modern Systems Abstraction Application Algorithm Programming Language Original domain of the computer architect (‘50s-’80s) Parallel computing, security, … Domain of recent computer architecture (‘90s) Reliability, power, … Operating System/Virtual Machines Instruction Set Architecture (ISA) Microarchitecture Gates/Register-Transfer Level (RTL) Circuits Devices Physics Reinvigoration of computer architecture, mid-2000s onward. Summary Summary Continued rapid improvement in computing Continued – 2X every 2.0 years in memory size; every 1.5 years in processor speed; every 1.0 year in disk capacity; – Moore’s Law enables processor (2X transistors/chip ~1.5 yrs) 5 classic components of all computers classic Control Datapath Memory Input Output Processor Decimal for human calculations, binary for computers, hex Decimal to write binary more easily ...
View Full Document

Ask a homework question - tutors are online