ComputerArchitectureIntroduction &Quantitative Design and AnalysisComputerArchitecture
Computer Architecture Computer Architecture Introduc1on & Quan1ta1ve Design and Analysis
Why Are You Here for This Course?"c"as a model of computationC ProgrammingProgrammer'sviewofacomputersystemworksHowdoesanassemblyArchitect/microarchitect'sview:program end up executing asHowtodesign acomputerthatdigital logic?meetssystemdesigngoalsWhat happens in-between?ChoicescriticallyaffectboththeSWprogrammerandHowisacomputerdesignedthe HW designerusing logic gates and wires tosatisfy specific goals?HW designer's view of acomputersystemworksLogic DesignDigital logic as amodelofcomputationComputerArchitecture
Computer Architecture • How does an assembly program end up execu4ng as digital logic? • What happens in-between? • How is a computer designed using logic gates and wires to sa4sfy specific goals? C Programming Logic Design “C” as a model of computa4on Digital logic as a model of computa4on Programmer’s view of a computer system works HW designer’s view of a computer system works Architect/microarchitect’s view: How to design a computer that meets system design goals. Choices cri<cally affect both the SW programmer and the HW designer Why Are You Here for This Course? 2
Levels of Transformation“Thepurposeof computingis insight"(Richard Hamming)WegainandgenerateinsightbysolvingproblemsHowdoweensureproblemsaresolvedbyelectrons?ProblemAlgorithmProgram/LanguageRuntimeSystemISA (Architecture)MicroarchitecturealCircuitsElectronsComputerArchitecture
Computer Architecture Microarchitecture ISA (Architecture) Program/Language Algorithm Problem Logic Circuits Runtime System (VM, OS, MM) Electrons “The purpose of compu4ng is insight” (Richard Hamming) We gain and generate insight by solving problems How do we ensure problems are solved by electrons? Levels of Transforma4on 3
ThePowerofAbstraction. Levels of transformation create abstractionsAbstraction:Ahigherlevelonlyneedstoknowabouttheinterfacetothelowerlevel,nothowthelowerlevelisimplemented- E.g., high-level language programmer does not really need toknow what the IsA is and how a computer executes instructions. Abstraction improves productivity- No need to worry about decisions made in underlying levelsE.g.,programming in Javavs.Cvs.assembly vs.binaryvs.byspecifying control signals of each transistor every cycle. Then, why would you want to know what goes onunderneath or above?ComputerArchitecture
Computer Architecture • Levels of transformation create abstractions – Abstraction: A higher level only needs to know about the interface to the lower level, not how the lower level is implemented – E.g., high-level language programmer does not really need to know what the ISA is and how a computer executes instructions • Abstraction improves productivity – No need to worry about decisions made in underlying levels – E.g., programming in Java vs. C vs. assembly vs. binary vs. by specifying control signals of each transistor every cycle • Then, why would you want to know what goes on underneath or above? The Power of Abstrac4on 4
Crossing the Abstraction Layers: As long as everything goes well, not knowing what happensin the underlying level (or above) is not a problem..WhatifTheprogramyouwroteisrunningslow?Theprogram youwrotedoes not run correctly?Theprogramyouwroteconsumestoomuchenergy?.What if-Thehardwareyoudesigned istoohardtoprogram?Thehardwareyoudesignedistooslowbecauseitdoesnotprovidetherightprimitivestothe software?One goal of this course is to understand how a processorworksunderneaththesoftwarelayerandhowdecisionsmade in hardware affect the software/programmerComputerArchitecture
Computer Architecture • As long as everything goes well, not knowing what happens in the underlying level (or above) is not a problem. • What if – The program you wrote is running slow? – The program you wrote does not run correctly? – The program you wrote consumes too much energy? • What if – The hardware you designed is too hard to program? – The hardware you designed is too slow because it does not provide the right primitives to the software? • One goal of this course is to understand how a processor works underneath the software layer and how decisions made in hardware affect the software/programmer Crossing the Abstrac4on Layers 5