Preface In the late 1990s, when I was preparing a course called “Design of Embedded DSP(DigitalSignalProcessing)Processors”atLinköpingUniversity,Sweden,Icould notfindatextbookdescribingthefundamentalsofembeddedprocessordesign.It becamemyfirstandprimemotivationforwritingthisbook.Duringmyworktime inindustry,Icouldnotfindanysuitableandcomprehensivereferencebookeither, whichledtomysecondmotivationforwritingsuchabook.Ithasbeenmybelief thatthisbookwillbeavaluabletextbookorreferencebookforanyoneinterestedin thedesignofembeddedsystemsinallitsaspects,fromhardwaredesigntofirmware design.AlthoughthisbookwaswrittenmainlyforASIP(application-specificinstruc- tionsetprocessor)orASIC(application-specificintegratedcircuit)designers,itwill also benefit software programmers who want more hardware knowledge,such as DSPapplicationengineers. Whilereadingthisbook,youwillgetopportunitiestogothroughthedesignof aprogrammabledeviceforaclassofapplications,stepbystep.Thematerialinthis bookissuitableforteachingseniorundergraduatestudentsandgraduatestudents inElectricalEngineeringandComputerEngineering.Thisbookcanalsobeusedas a reference book for engineers who are designing or want to design application- specific DSP processors,general processors,accelerators,peripheral modules,and evenmicrocontrollers.Embeddedsystemdesigners(e.g.,DSPfirmwaredesigners) will also benefit from the knowledge of real-time system design elaborated in this book. Classical CPU designers will benefit from the exposed difference between CPUandASIP.Thisbookisalsoafundamentalreferencebookforresearchers. FundamentalDSPtheoryandbasicdigitallogicdesignareaddressedinthisbook as background knowledge.Very basic concepts and methods were used without redundantintroduction.Readerswithoutthefundamentalknowledgeshouldread relevant books about DSP theory,logic design,and computer architecture before readingthisbook. DSP, asopposedtogeneral-purposecomputingsystems,hasbeenamajortech- nologydrivenbyembeddedapplicationsandthesemiconductortechnologies.This isevidentfromthegrowingmarketofDSP-basedproducts.Theincreasingneedfor DSPandDSPprocessorscanbefoundeverywhereintoday’ssocietyinareassuch asmultimedia,wirelesscommunications,Internetterminals,carelectronics,robot, healthcare,environment monitoring and control,education,scientific computing, industrialcontrol,transportation,anddefense. DSP is used widely for various applications such as data enhancement, data compression, pattern recognition, simulation, emulation, and optimization. Sig- nal recovery in advanced digital communications is a good example of data enhancement.Otherdataenhancementapplicationsincludeerrorcorrection,echo cancellation,and noise suppression. Data compression is another important area intoday’sdailyusedfacilities:forexample,voice,music,image,video,andInternet data needs to be compressed to fit into a limited bandwidth for transmission and xix “Liu:fm-p374123” — 2008/5/6 — 12:00 — page xix — #19 xx Preface storage. If voice was not compressed by a DSP processor in a mobile phone,the cost of a mobile phone call would be 10 to 15 times higher. If video signals were not compressed,DVD players and digital video broadcasting would not be possible. Patternrecognitiontechniquesareusedforvoicerecognition,languagerecogni- tion,andimagetargetrecognitionforhealthcare,cardriving,anddefense.Physical simulation has been used for gaming,training (education),scientific computing, defense,and experiments that are expensive or even impossible to realize in the realworld. The global market share of DSP processors and microcontrollers is more than 95%ofthetotalvolumeofprocessorssoldin2006.DSPprocessorsforembedded applications have led to a major shift in the semiconductor industry.The sales of DSPprocessorshavereached20%oftheglobalsemiconductormarketsince2002. TakingonlytheDSPprocessorsinmobilephonesasanexample,thetotalsalesin 2006wasmorethan$10billionUS. General-purposeDSPprocessors(commercialoff-the-shelfDSPprocessors)usu- ally have a high degree of flexibility,a friendly design environment,and sufficient design references. General-purpose DSP processors are preferred when require- ments on power,performance,and silicon area are not very critical.When these requirementsarestrict,embeddedDSPprocessorsasASIPwillbecomeanecessity. Figure P.1 shows the trend of the different DSP market shares.The figure clearly showsthatthefutureofASIPDSPisobviouslyexciting—thisismythirdmotivation forwritingthisbook. Most DSP applications can be categorized as streaming signal processing,in which the processing speed is higher than the speed of incoming signals. Classic DSP hardware for streaming signal processing was usually implemented on non- programmableASICs to minimize the silicon cost. Recently programmability has become a vital issue because the complexity as well as design costs keep going higher. Programmability has been required by industries in order to support mul- timodesormultistandardapplications.Thankstotheongoingprogressofmodern FIGUREP.1 TrendofdifferentDSPmarketshares(FreehandDSP,Sweden). “Liu:fm-p374123” — 2008/5/6 — 12:00 — page xx — #20 Preface xxi VLSI(verylargescaleintegratedcircuits)technologies,programmablefeatureshave beenrealisticsincethe1990s. AnongoingtrendisthatthearchitectureofMPU(microprocessorsasthecentral processorinpersonalcomputers)isconverging.ThearchitectureofDSPprocessors isdiverging.OnereasonisthatapplicationsrunningonDSPsarediverging.However, thefunctionalitieswillberelativelyfixedwhenaDSPprocessorisembeddedina system.Anotherreasonisthattherequirementsareverycriticalonsiliconefficiency, powerconsumption,anddesigncostofembeddedprocessorsorASIP. General-purposeprocessordesignersthinkofultimateperformanceandultimate flexibility.Theinstructionsetmustbegeneralbecausetheapplicationisunknown, and the programmer’s behavior is unknown.ASIP designers have to think about the application and cost first. Usually the biggest challenge forASIP designers is the efficiency issue. Based on the carefully specified function coverage,the goal ofanASIPdesignistoreachthehighestperformanceoversiliconandthehighest performanceoverpowerconsumptionaswellasthehighestperformanceoverthe designcost.Therequirementonflexibilityshouldbesufficientinsteadofultimate. Theperformanceisapplication-specificinsteadofthehighest.Thisbookwillexpose andanalyzethedifferencesbetweengeneral-purposeprocessordesignersandASIP designers. AnASIPisoftenaSIP(SiliconIntellectualPropertyorSiliconIP,orIP).MoreSoC (system on a chip) solutions useASIP IP.Therefore,the focus of this book will be thedesignofIPcoresofASIPforembeddedsystemsonachip.SiliconIPhasbeen usedascomponentsinsiliconchipdesignssincethemid-1990s.Therequirements for quality design of silicon IP became higher after 2000 because silicon IP has beenwellacceptedandwidelyused.InFigureP.2,thesystemdesigncomplexityis dividedintothesystemdesigncomplexityandthecomponentdesigncomplexity. Around the middle to late 1980s,RTL components (for example,multipliers and adders) were optimized as the lowest level components of system designs. RTL componentstookacertaindegreeofdesigncomplexityfromthesystemdesignso thatthesystemcouldberelativelymoreadvancedcomparingthesystemdesigned onatransistorlevel.Duringthemid-1990s,thesystemdesignbecamesoadvanced andcomplicatedthatprogrammableIPhastobeusedasthelowestlevelcomponent torelaxthesystemdesigncomplexity. BecauseanIPusuallyisdesignedbythethirdpartyoranotherdesignteam,the systemcomplexitycanthereforebeshared.Also,becauseanIPusuallyisdesigned for multiusers,the design cost usually is shared by multiusers;relatively high IP design cost is therefore acceptable.This is the fourth motivation of writing the book—to show ways to design high quality programmable IP as components for multiusers. The fourth motivation became even more important when the platform-based designconceptwasintroducedrecently.Aplatformisapartlydesignedapplication- specificsystemthatcanbeusedtoadapttoacustomdesignwithminimumcost. The platform-based system design requires the minimum design cost while plug- ging a programmable IP on the platform and running firmware on it. It means “Liu:fm-p374123” — 2008/5/6 — 12:00 — page xxi — #21 xxii Preface FIGUREP.2 HandlingcomplexityofthedesignusingASIPIPandplatform. that the design ofASIP must be both silicon-efficient and platform-oriented.The platform-adaptiveASIP design skills offered by this book will thus be even more interesting. I deeply acknowledge the research and teaching contributions from my PhD students in my Division of Computer Engineering,Department of Electrical Engi- neering at Linköping University, Sweden. The labs of the course and part of the contents of this book are based on their research work. Di Wu and Johan Eilert read through the book and provided enormous suggestions. Per Karlström managedallMSWordproblemsandfigureformattingusinghisfantasticWord-VBA programming skills.Andreas Ehliar went through all code examples in the book. Per Karlström, Johan Eilert,Andreas Ehliar, Di Wu, and Master students Vinodh Ravinath and Bobo Svangård implemented the Senior DSP processor core. Research engineer Anders (S) Nilsson made the assembler and instruction set simulatorofSenior,theprocessorusedastheexampleofthebook.Acknowledg- ment also goes to other PhD students:RizwanAsghar,Dr.Anders Nilsson,Dr. Eric Tell,Dr.Tomas Henriksson,Dr. DanielWiklund,Dr. Ulf Nordqvist,and Lic. Mikael Olausson. I thank all Master students who participated in the course“Design of Embedded DSP Processors”from 1999 to 2007. My sincere thanks go to Freehand DSPAB (Ltd.),Sweden (orVIATech Sweden after2002),aleadingcompanydevelopingDSPprocessorsforcommunicationsand home electronic applications. Special thanks to my friend and boss,CEO Harald Bergh, who went through several chapters and provided very professional and valuable suggestions. I was the cofounder,CTO,and vice president of Freehand “Liu:fm-p374123” — 2008/5/6 — 12:00 — page xxii — #22 Preface xxiii DSPAB(Ltd.)Stockholm,Sweden,during1999and2002,whichwaslateracquired byVIATechnologiesin2002. IthankCoresonicAB(Ltd.),Linköping,Sweden,aleadingDSPcoreSIPcompany forprogrammableradiobasebandsolutions.IamacofounderandcurrentlytheCTO ofthiscompany.Isincerelythankmybestfriend,ProfessorChristerSvensson,atthe DepartmentofElectricalEngineering(ISY),LinköpingUniversity,Sweden,whohad beenmysupervisor(1990–1994)duringmyresearchtowardmytechnologydoctor degree. Christer is the cofounder and the Chairman of the Board of Coresonic. I also thank cofounders Dr. EricTell,Dr.Anders Nilsson,and Daniel Svensson for many useful discussions and encouragements.All staff of CoresonicAB are greatly acknowledged. I greatly acknowledge the following experts for their insightful discussions: VodafonechairProfessorGerhardFettweis,TUDresden;ProfessorChristophKessler ofLinköpingUniversity;ProfessorLarsSvenssonofChalmersUniversity;Professor Viktor Öwall of Lund University; Professor Petru Eles of Linköping University; Dr.Carl-FredrikLendersonofSonyEricsson;ProfessorDr.XiaoningNieofInfineon Munich;Dr.FranzDielacher,CSO,InfineonconnectionsVillach;andInfineonfellow ProfessorDr.LajosGazsi,Düsseldorf. Finally,the most acknowledgment and gratitude goes to my dear wife Meiying and my daughterAngie.Without their love,understanding,and support,this book wouldneverhavebeenpossible. DakeLiu December2007 Linköping,Sweden REFERENCES [1] Strauss,W. (2000). Digital signal processing,the new semiconductor industry technology driver.IEEESignalProcessingMagazine,March,52–56. [2] http://www.fwdconcepts.com. [3] BDTI,DSPselectionguidehttp://www.bdti.com. [4] Claasen,T.(2006).Anindustryperspectiveoncurrentandfuturestate-of-the-artinsystem-on- chip(SoC)technology.ProceedingsoftheIEEE94(6). [5] http://www.da.isy.liu.se/∼dake. [6] http://www.viatech.se. [7] http://www.coresonic.com. “Liu:fm-p374123” — 2008/5/6 — 12:00 — page xxiii — #23 List of Trademarks and Product Names ADIprocessors ARMprocessors CEVADSPprocessors CoresonicLeoCoreprocessors FreehandDSP Freescale InfineonCamelprocessor IntelPentiumand8x86processors NXPEVP16basebandprocessor xxv “Liu:fm-p374123” — 2008/5/6 — 12:00 — page xxv — #25 xxvi List of Trademarks and Product Names OpenriscofOpencores SPICELL(SonyPanasonicIBM)processors TI(TexasInstrument)DSPprocessors XilinxFPGA Tools and programs include MATLAB and SimulinkofMathworks DesigncompilerofSynopsys LISAandProcessorDesignerofCoWare ZSPofLSI GCCfromGNU “Liu:fm-p374123” — 2008/5/6 — 12:00 — page xxvi — #26 CHAPTER 1 Introduction DSP theory, DSP applications, and implementation of DSP subsystem hardware and algorithms will be reviewed in this chapter. Some real-time DSP applications will be covered briefly in order to provide an introduction to implementation costs (execution time and hardware complexity).Also,DSP architecture,embed- ded systems, and other essential background knowledge will be collected and reviewed. Thisbookisintendedforreaderswhoalreadyhavesomefundamentalknowledge in logic design,computer architecture,programming using C and HDL languages, DSPtheory,anddigitalVLSIdesign.Applicationknowledgeindigitalcommunication ordatacompressionisuseful,butnotnecessary. Tomakereadingeasier,areadingguidefollows. 1.1 HOW TO READ THE BOOK This book is organized into four parts.The first four chapters constitute Part 1, whichprovidessomefundamentalknowledge.ThechaptersofPart1areorganized asfollows: 1. Knowledge review, including DSP fundamentals, processor architectures, real-timesystems,anddesignofembeddedsystems. 2. Numerical representation and precision control of fixed-point number systemsinfixed-pointprocessors. 3. Review of ASIP and DSP architectures for different requirements and applications. 4. IntroductiontodesignmethodologiesforASIPandDSPfirmware. The second part of this book covers DSP assembly instruction set design and designmethodologies.ThechaptersofPart2coverthefollowingtopics: 5. Identification of drawbacks and problems of Junior,a DSP processor with anintuitiveassemblyinstructionsetfollowingClanguageprimitives. 1 “Liu:ch01-p374123” — 2008/5/2 — 23:49 — page 1 — #1 2 CHAPTER 1 Introduction 6. ProfilingforASIPinstructionsetdesignwithfocusonthedifferencebetween profilingforqualitysoftwaredesignandprofilingforASIPdesign. 7. Instruction set design technique is discussed in detail based on identified drawbacks of Junior and profiling knowledge. Instruction set design includes trade-off decisions,design of RISC subset,CISC subset,addressing, coding,anddesignforHWacceleration. 8. Introduction to the toolchain for assembly programming including code analyzer,Ccompiler,assembler,linker,simulator,anddebugger. 9. Benchmarking of assembly instruction set based on DSP kernel algorithms andapplications. ThethirdpartofthisbookcoversDSPmicroarchitecturedesignandthedesign ofDSPcoreindetail.Part3discussesthefollowingtopics: 10. MicroarchitecturedesigningeneralandASIPmicroarchitecturedesign. 11. RF(RegisterFile)designandimplementation. 12. ALU(ArithmeticandLogicUnit)designandimplementation. 13. MAC(MultiplicationandAccumulation)unitdesignandimplementation. 14. Controlpathdesignandimplementation. 15. Designandimplementationofmemorysubsystemsandaddressgenerators. Part4coversadvancedissuesofapplication-specificDSPdesign: 16. Design and implementation of DSP peripherals including core periph- eral modules (Interrupt Handler,Timer,and DMA module),interprocessor buses,andchipperipherals(I/Oports). 17. DesignforfunctionalaccelerationandDSPaccelerators. 18. FirmwaredesignforbothDSPprocessorsandASIP. 19. IntegrationandverificationofASIP. 20. Design of parallelASIP for streaming signal processing.This chapter is not writtenforundergraduatestudents. Theappendixcontainstheseniorinstructionsetmanual,itsbenchmarking,and RTLimplementation. This book is written for both university students and engineers.The targeted readersarecategorizedinTable1.1. For university teachers and research supervisors,this book can be organized for either a half-year course or a quarter-year course usingTable 1.2 and related material available from the web page [1]. We suggest that teachers apply and modify the lab work according to their own curriculum plans. “Liu:ch01-p374123” — 2008/5/2 — 23:49 — page 2 — #2
Description: