计算机工程 ›› 2012, Vol. 38 ›› Issue (9): 244-247.doi: 10.3969/j.issn.1000-3428.2012.09.075

• 工程应用技术与实现 • 上一篇    下一篇

一种微控制器中零开销循环的实现方法

薛超凡,张盛兵   

  1. (西北工业大学计算机学院,西安 710072)
  • 收稿日期:2011-09-09 出版日期:2012-05-05 发布日期:2012-05-05
  • 作者简介:薛超凡(1987-),男,硕士,主研方向:微处理器设计;张盛兵,教授、博士生导师

Implementation Method of Zero-overhead Loop in MCU

XUE Chao-fan, ZHANG Sheng-bing   

  1. (School of Computer, Northwestern Polytechnical University, Xi’an 710072, China)
  • Received:2011-09-09 Online:2012-05-05 Published:2012-05-05

摘要: 为扩展芯片的应用领域,增强芯片DSP的能力,提出一种用于MCU处理器支持零开销循环的设计方法。该方法依据在DSP程序中经常出现循环的特点,设计专门的硬件处理循环,用以消除循环转移造成的流水线等待,在分析MCU原有结构特别是指令单元的基础上,对循环指令采取与其他分支指令不同的处理方法。在尽量少改动原有MCU结构的前提下,支持零开销的循环。性能分析结果表明,改进后的MCU能有效减少循环执行周期。

关键词: 硬件循环, 零开销循环, 微控制器, 数字信号处理, 指令缓冲

Abstract: In order to extend the application field of chip and improve the DSP ability of chip, this paper proposes a design of supporting zero-overhead loop for the Micro Controller Unit(MCU). Based on the character of frequent loops in the Digital Signal Processing(DSP) program, a special hardware module for handling the loops is designed to eliminate the stall of pipeline caused by the loop. By analyzing the original structure of MCU, especially instruction fetch unit, the different treatments are taken from the other branch instructions for the loop instructions. The structure of the MCU is modified as little as possible to support zero-overhead loop. Performance analysis results show that the MCU changed reduces the loop’s execution cycles.

Key words: hardware loop, zero-overhead loop, Micro Controller Unit(MCU), Digital Signal Processing(DSP), instruction buffer

中图分类号: