摘要
随着应用系统复杂性的增长以及对可移植性要求的提高,采用C语言进行程序开发是一个较好的选择。分析了实现直接Ⅱ型I2R数字滤波器的算法,指出他的主要计算量在于卷积和移位,采用循环缓冲区来减少移位操作是降低计算量的关键。提出一种使用一维数组和循环移位标志实现循环缓冲区的方法,其特点是以移位标志为新数组的起点,用循环变量对数组长度求模运算来确定循环移位后新的地址,并给出了实现的C源代码。
The C- based programming is a better choice than the assembler, because of the more complex system and the adding request for portability. In this paper,the algorithm of direct form Ⅱ of I^2R filter is introduced firstly,whose computational complexity consists of convolution and data shift. To reduce the complexity, a circular buffer technique is put forward, which consists of only an array and a flag,and whose circular shift addressing is implemented by the circular variable to the module of the length of the array. In the end,the C code of the I^2R realization is offered.
出处
《现代电子技术》
2007年第4期9-10,13,共3页
Modern Electronics Technique
基金
西安石油大学博士创新基金(200611)