ebook img

Practical Introduction to Computer Architecture PDF

649 Pages·2009·9.45 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Practical Introduction to Computer Architecture

Texts in Computer Science Editors DavidGries FredB.Schneider Forfurthervolumes: http://www.springer.com/series/3191 Daniel Page A Practical Introduction to Computer Architecture 123 Dr.DanielPage UniversityofBristol Dept.ComputerScience Room3.10,MerchantVenturersBuilding WoodlandRoad,Bristol UnitedKingdom,BS81UB [email protected] SeriesEditors DavidGries FredB.Schneider DepartmentofComputerScience DepartmentofComputerScience UpsonHall UpsonHall CornellUniversity CornellUniversity Ithaca,NY14853-7501,USA Ithaca,NY14853-7501,USA ISBN 978-1-84882-255-9 e-ISBN 978-1-84882-256-6 DOI 10.1007/978-1-84882-256-6 SpringerDordrechtHeidelbergLondonNewYork BritishLibraryCataloguinginPublicationData AcataloguerecordforthisbookisavailablefromtheBritishLibrary LibraryofCongressControlNumber:2009922086 (cid:2)c Springer-VerlagLondonLimited2009 Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permittedundertheCopyright,DesignsandPatentsAct1988,thispublicationmayonlybereproduced, stored or transmitted, in any form or by any means, with the prior permission in writing of the publishers,orinthecaseofreprographicreproductioninaccordancewiththetermsoflicensesissuedby theCopyrightLicensingAgency.Enquiriesconcerningreproductionoutsidethosetermsshouldbesent tothepublishers. Theuseofregisterednames,trademarks,etc.,inthispublicationdoesnotimply,evenintheabsenceofa specificstatement,thatsuchnamesareexemptfromtherelevantlawsandregulationsandthereforefree forgeneraluse. Thepublishermakesnorepresentation,expressorimplied,withregardtotheaccuracyoftheinformation containedinthisbookandcannotacceptanylegalresponsibilityorliabilityforanyerrorsoromissions thatmaybemade. Printedonacid-freepaper SpringerispartofSpringerScience+BusinessMedia(www.springer.com) ToKate♥ Foreword It is a great pleasure to write a preface to this book. In my view, the content is uniqueinthatitblendstraditionalteachingapproacheswiththeuseofmathematics and a mainstream Hardware Design Language (HDL) as formalisms to describe key concepts. The book keeps the “machine” separate from the “application” by strictlyfollowingabottom-upapproach:itstartswithtransistorsandlogicgatesand onlyintroducesassemblylanguageprogramsoncetheirexecutionbyaprocessoris clearlydefined. Using a HDL, Verilog in this case, rather than static circuit diagrams is a big deviation from traditional books on computer architecture. Static circuit diagrams cannotbeexploredinahands-onwaylikethecorrespondingVerilogmodelcan.In ordertounderstandwhyIconsiderthisshiftsoimportant,onemustconsiderhow computer architecture, a subject that has been studied for more than 50 years, has evolved. Inthepioneeringdayscomputerswereconstructedbyhand.Anentirecomputer could (just about) be described by drawing a circuit diagram. Initially, such dia- grams consisted mostly of analogue components before later moving toward dig- ital logic gates. The advent of digital electronics led to more complex cells, such ashalf-adders,flip-flops,anddecodersbeingrecognisedasusefulbuildingblocks. However, miniaturisation of devices and hence computers has led to the design of singlecircuitscontainingmillionsorevenbillionsofcomponents.Asaresult,hand- lay-out isonlyused forspecific modules, and circuitdiagrams arelessuseful asa mechanismfordescribingfunctionalityforrealcircuits. Instead, two formalisms are used in industry: HDLs and mathematics. A HDL allows us to tell the component-layout and simulation tools how we would like to implement our circuit; mathematics tells us what the circuit ought to do. In order toverifywhetherthecircuitdoeswhatwewantitto,wecan(partlymechanically) compare the mathematical description with the HDL description. This represents increased use of abstraction to cope with complexity, and an engineer can now be productivebysimplyunderstandingandusinghigh-levelcircuitdesign(e.g.,multi- plierdesignorpipelinedprocessors)andformalisms(e.g.,HDLsandmathematics). vii viii Foreword Circuitdiagramsarestillusedinthedesignflow,butmostlytosketchthephysical layout,inordertopredictwhetheracircuitcanbelaidoutsensibly. Dealingwithgapsinunderstandingbetweensuchawiderangeofconceptsand techniques is often off-putting for people new to the subject. The best way to ap- proachtheproblemisbyplacingitwithinapracticalcontextthatenablesstudents toexperimentwithideasanddiscoverthemselvestheadvantagesanddisadvantages ofaparticulartechnique. Inthisbook,Dandoesjustthatbygivinganexcellentoverviewofkeyconcepts andanintroductiontoformalismswithwhichtheycanbeexplored.Ihopethisbook willinspiremanyreaderstofollowacareerinthisfascinatingsubject. HenkMuller. PrincipalTechnologist,XMOS. Preface Intheorythereisnodifferencebetweentheoryandpractice.Inpracticethereis. –L.P.“Yogi”Berra Overview In my (limited) experience, and although there are a number of genuinely excel- lent textbooks on the subject, two main challenges exist in relation to delivery of Universityleveltaughtmodulesincomputerarchitecture: 1. Such modules are often regarded as unpopular and irrelevant by students who have not been exposed to the subject before, and who view a computer system fromtheapplicationslevel.Thisiscompoundedbytheprevalenceoftechnolo- gies such as Java which place a further layer between the student and actual computerhardware.Inshort,andnomatterhowonetriestopersuadethemoth- erwise,studentsoftenseenopointinlearningabouttheinternalsofacomputer systembecausetheycannotseethebenefit. 2. Conventionaltextbooksteachthesubjectinadifferentwaythaninothermodules studentsareexposedtoatthesametime.Forexample,conventionalwisdomsays that one cannot “teach” programming, one has to “do” programming in order to learn. This is in stark contrast to textbooks on computer architecture where students are often forced to learn in a more theoretical way, learning by taking factsforgrantedratherthanexperimentingtoarriveattheirownconclusions.For example,becauseofthedifficultyinworkingwithlargelogicdesignsonpaper, anypracticalworkisoftenlimitedandhencedetachedfromthemorechallenging content. I would argue that this is a shame: computer architecture represents a broad spec- trum of fundamental and exciting topics that underpin computer science in gen- eral.Asidefromthetechnicalchallengesandsenseofachievementthatstemfrom ix x Preface understanding exactly how high-level programs are actually executed on devices builtfromsimplebuildingblocks,historicaldevelopmentsincomputerarchitecture neatlycaptureandexplainmanydesigndecisionsthathaveshapedalandscapewe nowtakeforgranted.TherepresentationofstringsinCisagreatexample:thenull- terminated ASCIIZ approach was not adopted for any real reason other than the PDP-7computerincludedinstructionsidealforprocessingstringsinthisform,and yet we still live with this decision years after the PDP-7 became obsolete. Seem- ingly frivolous anecdotes and examples like this are increasingly being consigned to history whereas from an Engineering perspective, one would like to learn and understandpreviousapproachessoastopotentiallyimproveinthefuture. International experts regularly debate tools and techniques for delivering University-levelmodulesincomputerarchitecture;theWorkshoponComputerAr- chitectureEducation(WCAE),currentlyheldinconjunctionwiththeInternational SymposiumonComputerArchitecture(ISCA),isthepremierresearchconference inthisarea.Thisbookrepresentsanattemptattranslatingmypersonalphilosophy, that theoretical concepts should be accessible for practical experimentation, into a formsuitableforuseinsuchmodules.Putsimply,Iseecomputerarchitectureasa subjectinwhich“gettingthingsdone”isparamount;theabilitytounderstandtrade- offs before selecting between and implementing well considered design options is oftenasimportantasthestudyofthoseoptionsatamoretheoreticallevel.Thisfo- cusisunderlinedbythebooksub-title:a“practical”approachistheaimthroughout. Toenablethis,akeyfeatureofthisbookisinclusionanduseofahardwaredescrip- tion language (i.e., Verilog), and a concrete processor (i.e., MIPS32) as practical vehiclesformodellingandexperimentingwithdigitallogicandprocessordesign. TargetAudience Thecontentisorganisedintothreepartswhichcontainatotalofthirteencorechap- ters. Although some slight disagreement about inclusion of specific topics is in- evitable,thechaptersrepresentacompromisebetweenmyinformalopinion,inter- estsandexperience,andmoreformalcurriculumguidelinessuchasthatdeveloped bytheUKQualityAssuranceAgency(QAA): http://www.qaa.ac.uk/ Ofcourse,internationalequivalentsexist;examplesincludethosedevelopedjointly bytheIEEEandACM,leadingprofessionalbodieswithinthisdomain: http://www.computer.org/curriculum/ The general aim of this book is to cover topics every computer science student should have at least a basic grasp of, and equip said students with enough knowl- edgetoreadandunderstandmoreadvancedtextbooks.Inthisrespect,thecoretar- getaudienceisfirst-yearUndergraduatestudentswitharudimentaryknowledgeof Preface xi programminginC.Moregenerally,thebookcontentispitchedatalevelwhichsat- isfies most of the demands that have resulted from our degree programmes at the UniversityofBristol.Inparticular,themoreadvancedmaterialhasprovedusefulas a bridge toward, or in support of, more specialised textbooks that cover later-year UndergraduateandPostgraduatemodules. Organisation The book chapters aredescribed briefly below. Veryroughly thethree partsof the bookcanbeviewedassomewhatself-contained,representingthreelayersorlevels ofabstraction:thedigitallogiclayer,theinstructionsetandmicro-architecture layer,andthehardware/softwareinterface.Part1dealswithbasictoolsandtech- niqueswhichunderpintherestofthebook: Chapter1 Introducesthetheoreticalbackgroundincludinglogic,sets,andnum- berrepresentation. Chapter2 Usesthetheorydevelopedinthepreviouschaptertodescribetheba- sicsofdigitallogicincludinglogicgatesandtheirconstructionusingtransistors, combinatorialandclockedcircuitsandtheiroptimisation. Chapter3 Asameansofrealisingthedigitallogicdesignspresentedinthepre- vious chapter, Verilog is presented in an introductory manner; this content is writtenwithareaderwhoisaproficientCprogrammerinmind. Part2dealswiththebroadtopicofprocessordesignandimplementation.Thecon- tenttakesastep-by-stepapproach,startingwithafunctionaldescriptionofacom- puter processor and gradually expanding on the details, issues and techniques that haveresultedinmodern,high-performanceprocessordesigns: Chapter4 Thefirststepinintroducingthedesignofprocessors(asanextension tothestudyofgeneralcircuits)istotrackhistoricaldevelopmentsandusethem asameanstoexplaincentralconceptssuchasthefetch-decode-executecycle. Chapter5 Once the core concepts are introduced, a concrete realisation in the formofMIPS32isdiscussed;thisdiscussionincludesdetailssuchasaddressing modesandinstructionencodingforexample. Chapter6 This chapter outlines some basic methods for evaluating processors in terms of various metrics which can be used to defined quality, focusing on performanceinparticular. Chapter7 Asavitalcomponentinanyprocessor,thedesignofefficientcircuits forarithmetic(e.g.,additionandmultiplication)isintroducedanddemonstrated usingVerilog. Chapter8 Inthesamewayasarithmetic,thedesignofefficientcomponentsin thememoryhierarchyisintroducedanddemonstratedusingVerilog. Chapter9 Finally, a number of more advanced topics in processor design are investigatedincludingapproachessuchassuperscalarandvectorprocessors.

Description:
Computer architecture, which underpins computer science, is a topic in which "getting things done" is paramount: The ability to understand trade-offs before selecting between and implementing well-considered design options is often as important as the study of those options at a more theoretical lev
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.