欢迎来到天天文库
浏览记录
ID:59423687
大小:731.50 KB
页数:43页
时间:2020-09-19
《Chapter 7 DSP的C语言编程ppt课件.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、第七章DSP的C语言编程SoftwaredevelopmentflowusingC/C++TheshadedportionofthefigurehighlightsthemostcommonpathofsoftwaredevelopmentforC/C++languageprograms.8/21/20212C/C++ComplierOverviewANSIStandardTheC54xC/C++compilerisafull-featuredoptimizingcompilerthattranslatesstandardANSIC/C++pro
2、gramsintoC54xassemblylanguagesource.Thefollowingsubsectionsdescribethekeyfeaturesofthecompiler.ANSI-standardCThecompilerfullyconformstoANSICStandard.C++ThecompileralsosupportsC++.ANSI-standardruntimesupportAllruntimelibraryfunctionsconformtoANSI-standard.8/21/20213OutputFiles
3、AssemblysourceoutputGeneratesassemblylanguagesourcefilesthatyoucaninspecteasily,enablingyoutoseethecodegeneratedfromtheC/C++sourcefiles.COFFobjectfilesCommonObjectFileFormat,allowstheusertodefinethesystem’smemorymapatlinktime.CodetoinitializedataintoROMEnablestheusertolinkall
4、codeandinitializationdataintoROM,allowingC/C++codetorunfromreset.8/21/20214CompileroperationIntegratedPreprocessorTheC/C++preprocessorisintegratedwiththeparser,allowingfastercompilation.Standalonepreprocessororpreprocessorlistingisalsoavailable.OptimizationUsesasophisticatedo
5、ptimizationpassthatemploysseveraladvancedtechniquesforgeneratingefficient,compactcodefromC/C++source.GeneralOptimizationforanyC/C++codeandC54xspecificoptimizationsforC54xarchitecture.8/21/20215CCS的C语言简介由DSP厂商及第三方为DSP提供C编译器;使得采用高级语言开发DSP软件成为可能;TI公司的CCS又提供了优化的C编译器;优化后的C编译器得到的代码
6、效率只比汇编语言低10%~20%;DSP的C编译器还在不断优化;DSP的C编译器符合ANSIC标准;ANSIC标准会受处理器、运行环境或主机环境的影响。8/21/20216DSP的C语言特性标识符和常数(IdentifierandConstant)标识符大小写敏感,且前100个字符有效;主机和目标字符集为ASCII吗,不存在多字节字符多字符常数按最后一个字符编码。数据类型(DataTypes)与普通C语言类似,不同的是C54x的一个字节为16bits,而并非8bits;表数范围也相应有所变化;size_t的类型为unsignedint,也就是si
7、zeof运算符的结果;prtdiff_t的类型为int—指针相减的结果。8/21/202178/21/20218DataConversion()Float-to-intconversionstruncatetoward0.Pointersandintegerscanbefreelyconverted,aslongastheresulttypeislargeenoughtoholdtheoriginalvalue.ExpressionsWhentwosignedintegersaredividedandeitherisnegative,thequo
8、tientisnegative,andthesignoftheremainderisthesameasthesignofthenumer
此文档下载收益归作者所有