欢迎来到天天文库
浏览记录
ID:27682531
大小:1.79 MB
页数:179页
时间:2018-12-02
《嵌入式系统架构软体设计》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、嵌入式系统架构软体设计嵌入式系统架构软体设计---usingARMDay#3,#4,#5ModulesOutline课程介绍Day#3SimpleRISCAssemblyLanguageARMAssemblyLanguageARMDevelopmentSuite使用练习Day#4ArmInstructionsetImportantASMProgrammingSkillsARM/THUMB/CInterworkingDay#5ARMExceptionHandlerBuildARMROMImageUseNET-Start!ucLinuxBSP嵌入式系统产品设计流
2、程概观ARMsystem-on-chipArchitecture,2nded.ARMarchitecturereferencemanual,2nded.ARMDevelopmentSuite-GettingStartedARMDevelopmentSuite-DeveloperGuideARMDevelopmentSuite-AssemblerGuidehttp://www.uclinux.org/2002嵌入式系统开发经验BuildingpowerfulplatformwithWindowsCESoftwareEngineering,Apractition
3、er’sApproach3rded.ProfessionalSymbianProgramming嵌入式系统架构软体设计---usingARMModule#3-1:SimpleRISCAssemblyConceptRISC精简指令集vs.CISC复杂指令集HardwareinstructiondecodelogicPipelineexecutionSingleexecutionLargemicrocodeROMstodecodeinstructionAllowlittlepipelineManycyclestocompleterasingleinstructi
4、onAsmallerdiesizeAshorterdevelopmenttimeAhigherperformancePoorcodedensityMUO一个简单的处理器MUO指令集与资料路径指令Opcode功能LDAS0000ACC=mem[S]STOS0001mem[S]=ACCADDS0010ACC=ACC+mem[S]SUBS0011ACC=ACC-mem[S]JMPS0100PC=SJGES0101IfACC>=PC=SJNES0110IfACC!=0PC=SSTP0111stop指令规则指令执行范例ADD0x16AACC:=ACC+mem[0x16
5、A]运算范例Cfunction:Main(){C=A+B;}MUO机器指令LDA0x100ADD0x104STO0x108指令Opcode功能LDAS0000ACC=mem[S]STOS0001mem[S]=ACCADDS0010ACC=ACC+mem[S]SUBS0011ACC=ACC-mem[S]JMPS0100PC=SJGES0101IfACC>=PC=SJNES0110IfACC!=0PC=SSTP0111stop练习:MUO微处理器的运算0x100LDA0x1000x002SUB0x1040x004STO0x1000x006JNE0x0000x00
6、8STP请描述此段程式的动作,暂存器值的变化、与资料流。请用C语言来写出这段程式码。指令Opcode功能LDAS0000ACC=mem[S]STOS0001mem[S]=ACCADDS0010ACC=ACC+mem[S]SUBS0011ACC=ACC-mem[S]JMPS0100PC=SJGES0101IfACC>=PC=SJNES0110IfACC!=0PC=SSTP0111stop嵌入式系统架构软体设计---usingARMModule#3-2:ARMAssemblyLanguageARM7TDMI资料流e.g.r3:=r4+(r4,,2)ADDr3,r
7、4,r4,LSL#2AbusBbusARM的暂存器30general-purpose,32bitsregisters1ProgramCounter(PC)1CurrentProgramStatusRegister(CPSR)5SavedProgramStatusRegisters(SPSR)UsermodeFIQmodeirqmodeSVCmodeabortmodeundefinedmodeProgramStatusRegisterCPSR:CurrrentProgramStatusRegiterSPSR:SavedProgramStatusRegister
8、Conditioncodeflags-N:Negat
此文档下载收益归作者所有