200 likes | 426 Views
Computer Architecture CS401 Sabanci University erkays@sabanciuniv.edu. Outline. Brief Overview What is under a computer program Components Roadmap for this class. Things You will be Learning. How computers work; the basic foundation How to analyze their performance and how not to
E N D
Computer Architecture CS401 Sabanci University erkays@sabanciuniv.edu Erkay Savas
Outline • Brief Overview • What is under a computer program • Components • Roadmap for this class Erkay Savas
Things You will be Learning • How computers work; the basic foundation • How to analyze their performance and how not to • Key technologies determining the modern processor performance • Datapath • Pipeline • Cache • Memory Hierarchy • I/O • Multiprocessors Erkay Savas
Below the Software • Abstraction • Delving into the depths reveals more information • An abstraction omits unneeded detail, helps us cope with complexity • Computers might be very different from what we think they are when we look at it at the hardware level. • In fact, they can be communicated only by sending them electrical signals: HIGH/LOW voltage • First level of abstraction is to designate these signals as TRUE/FALSE and 1/0 • We often think that the true language of the computers is binary numbers Erkay Savas
Instruction Set Architecture • Important abstraction • interface between hardware and low-level software • Or features available to programmers • instructions • e.g. does a computer have an multiply instruction? • instruction coding • number of bits to represent data • I/O mechanism. • addressing mechanism • Modern instruction set architectures: • 80x86/Pentium/K6, PowerPC, DEC Alpha, MIPS, SPARC, HP, ARM. Erkay Savas
Organization • Organization is how features are implemented in hardware • Transparent to programmers • different implementations of the same architecture • Control signals, interfaces, memory technology. • e.g. Is there a hardware multiply unit or is it done by repeated addition? Erkay Savas
How to Program a Computer? • Most natural way is to encode whatever you want to tell the computer to do with electrical signals (on and off) • since this is the only thing it understands • Of course, we need something simpler to work with • Machine Code • Assembly language • High-level languages • C/C++, Pascal, Fortran, Java, C# Erkay Savas
Assembly language program for MIPS C compiler swap: muli $2, $5, 4add $2, $4, $2lw $15, 0($2)lw $16, 4($2)sw $16, 0($2)sw $15, 4($2)jr $31 00000000101000010000000000011000000000001000111000011000001000011000110001100010000000000000000010001100111100100000000000000100101011001111001000000000000000001010110001100010000000000000010000000011111000000000000000001000 Binary machine language program for MIPS Assembler Processing a C Program High-level language program (in C) swap (int v[], int k){ int temp; temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; } Erkay Savas
Functions of a Computer • Data processing • Data storage • Data movement • Control Erkay Savas
Functions of a Computer source & destination of data data movements apparatus Control mechanism Data processing facility Data storage facility Erkay Savas
Computer Five Classic Components Processor Memory Input Datapath Control Output System Interconnection Erkay Savas
USB 2.0 Sound Motherboard Parallel/Serial PS/2 connectors SIMM Sockets Processor PCI Card Slots IDE Connectors Erkay Savas
Inside the Processor Chip Instruction Cache Control branch prediction Data Cache Bus integer datapath floating-point datapath Erkay Savas
peripherals CPU I/O System interconnection Memory network Computer computer Erkay Savas
Registers ALU Cache Memory Control Unit CPU Internal CPU interconnection CPU Erkay Savas
Memory • Nonvolatile: • ROM • Hard disk, floppy disk, magnetic tape, CDROM, USB Memory • Volatile • DRAM used usually for main memory • SRAM used mainly for on-chip memory such as register and cache • DRAM is much less expensive than SRAM • SRAM is much faster than DRAM Erkay Savas
DRAM and Processor Characteristics Erkay Savas
Solutions to Memory Problems • Increase number of bits retrieved at one time • Make DRAM “wider” rather than “deeper” • Change DRAM interface • Cache • Reduce frequency of memory access • More complex cache and cache on chip • Increase interconnection bandwidth • High speed buses • Hierarchy of buses Erkay Savas
Computer Networks • Very essential aspect of computer systems • Communication • Resource sharing • Remote access • Ethernet is the most popular LAN • Range is limited to 1 kilometer • 3 Mbit/s to 10 Gbit/s • Coaxial cable to twisted pair to optical fiber • Wide Area Networks (WAN) • Cross continents and backbone of the Internet Erkay Savas
Roadmap • Performance issues • Instruction set of MIPS • Arithmetic and ALU • Constructing a processor to execute our instructions (datapath design) • Pipelining • Memory hierarchy: caches and virtual memory • I/O • Multiprocessors Erkay Savas