摘要
为了解决传统位操作的执行效率低下问题,应用KEA128微控制器的位操作引擎方法,提高系统的运行速度.首先以封装地址方式形成外设存储地址访问空间,然后通过映射方式对应到SRAM_U和外设地址.以LED点阵屏智能控制系统为例,分别采用自定义构建函数方法、直接地址访问方法和位操作引擎方法编写关键程序代码.经测试,位操作引擎法比构件函数法效率提高了213%,生成的机器指令数减少了46%;比直接地址法效率提高了133%,生成的机器指令数减少了29%.应用结果表明,基于KEA128微控制器的位操作引擎方法适合嵌入式应用中执行效率要求较高的场景,在内核资源紧张的时候可以给用户提供一个精简代码和提高程序执行速度的手段,能够减少CPU执行时间,降低系统的功耗,提高指令执行效率.
To solve the problem of low execution efficiency of traditional bit operation, this study attempted to improve the speed of system with Bit Manipulation Engine of the KEA128 microcontroller. First, forming decorated address was utilized to establish the external storage space, and then mapped address corresponding to the SRAM_U and peripheraladdress. Taking LED dot matrix screen intelligent control system for example, the component function,directly address access method and Bit Manipulation Engine were employed to write the key code. The comparison test revealed that the efficiency of Bit Manipulation Engine is 213% higher than the component function, the number of machine instructions was reduced by 46%;its efficiency is 133% higher than direct address method, the number of machine instructions is reduced by 29%. The application results showed that Bit Manipulation Engine of the KEA128 microcontroller is suitable for high efficiency in embedded applications, when the kernel resources tense can provide users with a streamlined code and improve the execution speed of the means to reduce the execution time of CPU,reduce the power consumption and improve the efficiency of instruction execution.
出处
《南通大学学报(自然科学版)》
CAS
2016年第1期6-11,共6页
Journal of Nantong University(Natural Science Edition)
基金
南通市应用研究计划项目(BK2012068)
南通大学教学改革研究项目(2015C02)