CN116827308A - Resource-optimized FIR filter and its implementation method - Google Patents

Resource-optimized FIR filter and its implementation method Download PDF

Info

Publication number
CN116827308A
CN116827308A CN202311069361.7A CN202311069361A CN116827308A CN 116827308 A CN116827308 A CN 116827308A CN 202311069361 A CN202311069361 A CN 202311069361A CN 116827308 A CN116827308 A CN 116827308A
Authority
CN
China
Prior art keywords
data
tap
real
fir filter
formula
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311069361.7A
Other languages
Chinese (zh)
Other versions
CN116827308B (en
Inventor
朱士彬
林点号
王闻迪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Litong Communication Co ltd
Original Assignee
Shanghai Litong Communication Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Litong Communication Co ltd filed Critical Shanghai Litong Communication Co ltd
Priority to CN202311069361.7A priority Critical patent/CN116827308B/en
Publication of CN116827308A publication Critical patent/CN116827308A/en
Application granted granted Critical
Publication of CN116827308B publication Critical patent/CN116827308B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

The application discloses a source optimization type FIR filter, which comprises: a data delay unit; the data preprocessing unit is used for calculating a data tap mixing variable; a data tap mixture inner product calculation unit for base calculating a data tap mixture multiplication component; a data inner product calculation unit for calculating a data inner product amount; and the summation unit is used for calculating the tap inner integral quantity, calling the tap inner integral quantity, the data tap mixed multiplication component and the data inner integral quantity to sum, and obtaining a filtering result. The application has the beneficial effect of obviously reducing the number of multipliers used for the high-order filter. The implementation method of the FIR filter comprises the steps of performing delay calculation on input data; calculating a data tap mixing variable in real time; calculating the data tap mixed multiplication component in real time; calculating the inner integral quantity of the data in real time; the tap inner integral quantity, the data tap mixed multiplication component and the data inner integral quantity are summed to obtain a filtering result. Has the beneficial effect of obviously reducing the number of multipliers.

Description

资源优化型FIR滤波器及其实现方法Resource-optimized FIR filter and its implementation method

技术领域Technical field

本发明涉及通讯技术和滤波器技术领域。更具体地说,本发明涉及一种资源优化型FIR滤波器及其实现方法。The invention relates to the fields of communication technology and filter technology. More specifically, the present invention relates to a resource-optimized FIR filter and an implementation method thereof.

背景技术Background technique

有限长滤波器(Finite Impulse Response, FIR)是数字信号处理系统中一种最基本的数字滤波器,在通信领域有着广泛的应用,主要可用于信号滤波、数字预失真对消等领域。随着通信带宽的增加和对信号质量要求的提升,FIR滤波器的阶数也在逐渐增大。FIR滤波器的时域表达式为,其中,n为样点的编号,h(k)为FIR滤波器的第k个抽头的抽头系数,y(n)为第n个输出样点。FIR滤波器中包括的加法器和乘法器与其包括抽头的数目成正比,当FIR滤波器中包括大量的抽头时,其内包含大量的乘法器和加法器,如此使得FIR滤波器的尺寸变的很大,功耗和成本也较高。在复杂通信系统中,需要多个高阶FIR滤波器,逻辑实现的代价较大。不同场景下对FIR滤波器在面积、功耗、速度方面的关注各不相同。高性能场景要求FIR能工作在很高的运行速率上,而面向手持终端的场景需要更小的面积和功耗。针对不同场景下的FIR滤波器的逻辑实现优化是一项具有挑战性的工作。因此,针对面积和速率敏感型应用使用高阶FIR滤波器的场景,比如通信芯片中的数字滤波器,思考设计一种资源优化型FIR滤波器,降低使用乘法器的数量,从而减少消耗的逻辑资源。Finite Impulse Response (FIR) is the most basic digital filter in digital signal processing systems. It is widely used in the field of communications and can be mainly used in signal filtering, digital predistortion cancellation and other fields. With the increase of communication bandwidth and the improvement of signal quality requirements, the order of FIR filter is also gradually increasing. The time domain expression of the FIR filter is , where n is the number of the sample point, h(k) is the tap coefficient of the k-th tap of the FIR filter, and y(n) is the n-th output sample point. The adders and multipliers included in the FIR filter are proportional to the number of taps it includes. When the FIR filter includes a large number of taps, it contains a large number of multipliers and adders, which makes the size of the FIR filter become larger. It is very large and has higher power consumption and cost. In complex communication systems, multiple high-order FIR filters are required, and the cost of logic implementation is high. Different scenarios have different concerns about area, power consumption, and speed of FIR filters. High-performance scenarios require FIR to operate at a very high operating rate, while scenarios for handheld terminals require smaller area and power consumption. Optimizing the logic implementation of FIR filters in different scenarios is a challenging task. Therefore, for scenarios where high-order FIR filters are used in area- and rate-sensitive applications, such as digital filters in communication chips, consider designing a resource-optimized FIR filter to reduce the number of multipliers used, thereby reducing the logic consumed. resource.

发明内容Contents of the invention

本发明的一个目的是解决至少上述问题,并提供至少后面将说明的优点。It is an object of the present invention to solve at least the above-mentioned problems and to provide at least the advantages to be explained later.

为了实现根据本发明的这些目的和其它优点,提供了一种资源优化型FIR滤波器,包括:In order to achieve these objects and other advantages according to the present invention, a resource-optimized FIR filter is provided, including:

数据延迟单元,其用于对输入数据进行延迟计算,得到实时延迟数据a 0 ~a M b 0 ~b 3 The data delay unit is used to perform delay calculation on the input data to obtain real-time delay data a 0 ~ a M and b 0 ~ b 3 ;

数据预处理单元,其用于基于实时延迟数据a 0 ~a M 和滤波器抽头系数实时计算,得到数据抽头混合变量;A data preprocessing unit, which is used for real-time calculation based on real-time delay data a 0 ~ a M and filter tap coefficients to obtain data tap mixing variables;

数据抽头混合内积计算单元,其用于基于数据抽头混合变量实时计算,得到数据抽头混合相乘分量;The data tap mixing inner product calculation unit is used for real-time calculation based on the data tap mixing variable to obtain the data tap mixing multiplication component;

数据内积计算单元,其用于基于实时延迟数据b 0 ~b 3 实时计算,得到数据内积分量;The data inner product calculation unit is used for real-time calculation based on the real-time delay data b 0 ~ b 3 to obtain the data inner product amount;

求和单元,其用于基于滤波器抽头系数计算,得到抽头内积分量,并储存,以及用于调用抽头内积分量、数据抽头混合相乘分量及数据内积分量求和,以及执行位宽处理后,即得FIR滤波器的输出数据。The summation unit is used to calculate the tap coefficient based on the filter, obtain the integral amount within the tap, and store it, and to call the integral amount within the tap, the mixed multiplication component of the data tap and the summation of the integral amount within the data, and to perform the bit width After processing, the output data of the FIR filter is obtained.

优选的是,实时延迟数据a 0 ~a M b 0 ~b 3 的生成法则如公式1所示:Preferably, the generation rules of real-time delay data a 0 ~ a M and b 0 ~ b 3 are as shown in Formula 1:

公式1 Formula 1

其中,x (n)表示n时刻的输入数据;当滤波器阶数N为奇数时,则令M=N+1,且抽头系数h M =0;当滤波器阶数N为偶数时,则令M=NAmong them, x ( n ) represents the input data at time n ; when the filter order N is an odd number, then let M = N +1, and the tap coefficient h M =0; when the filter order N is an even number, then Let M = N .

优选的是,数据抽头混合变量的计算方法如公式2所示:Preferably, the data tap mixing variable is calculated as shown in Equation 2:

公式2 Formula 2

其中,h表示滤波器的抽头系数。Among them, h represents the tap coefficient of the filter.

优选的是,数据内积分量、数据抽头混合相乘分量以及抽头内积分量的计算方法如公式3所示:Preferably, the calculation method of the intra-data integral amount, the data tap mixing multiplication component and the intra-tap integral amount is as shown in Equation 3:

公式3 Formula 3

其中,d xx 表示数据内积分量;d xh 表示数据抽头混合相乘分量;d hh 表示抽头内积分量。Among them, d xx represents the integration amount within the data; d xh represents the data tap mixing multiplication component; d hh represents the integration amount within the tap.

优选的是,所述数据抽头混合内积计算单元和数据内积计算单元进行乘法运算时,还包括预编码子模块,其用于采用基4布斯编码方法对每串数据进行编码、部分积计算和映射,其中,编码、部分积计算和映射方法分别如公式4和公式5所示:Preferably, when the data tap mixed inner product calculation unit and the data inner product calculation unit perform multiplication operations, they also include a precoding submodule, which is used to use the radix 4 Booth encoding method to encode each string of data and perform partial products. Calculation and mapping, where the encoding, partial product calculation and mapping methods are shown in Equation 4 and Equation 5 respectively:

公式4 Formula 4

其中,X i 、2X i Mi均表示预编码的编码结果,索引i由输入数据位宽决定;Among them, X i , 2 X i , and Mi all represent the coding results of precoding, and the index i is determined by the input data bit width;

公式5 Formula 5

其中,Y xi 表示单倍部分积;Y 2xi 表示两倍部分积;PPT i 表示部分积映射结果;e i 表示PP i 的符号。Among them, Y xi represents a single partial product; Y 2xi represents a double partial product; PPT i represents the partial product mapping result; e i represents the symbol of PP i .

优选的是,所述数据抽头混合内积计算单元和数据内积计算单元进行乘法运算时,还包括压缩子模块,其用于对预编码子模块输出的部分积进行压缩并求和,如公式6所示:Preferably, when the data tap mixed inner product calculation unit and the data inner product calculation unit perform multiplication operations, they also include a compression submodule, which is used to compress and sum the partial products output by the precoding submodule, as shown in the formula As shown in 6:

公式6 Formula 6

其中,每次输入4个数据D 1 、D 2 、D 3 、D 4转换为中间变量TP 1~TP 7。。Among them, four pieces of data D 1 , D 2 , D 3 , and D 4 are input each time and converted into intermediate variables TP 1 ~ TP 7 . .

提供所述资源优化型FIR滤波器的实现方法,包括以下步骤:An implementation method of the resource-optimized FIR filter is provided, including the following steps:

步骤一、对输入数据进行延迟计算,得到实时延迟数据a 0 ~a M b 0 ~b 3 Step 1: Perform delay calculation on the input data to obtain real-time delay data a 0 ~ a M and b 0 ~ b 3 ;

步骤二、基于实时延迟数据a 0 ~a M 和滤波器抽头系数实时计算,得到数据抽头混合变量;Step 2: Based on the real-time delay data a 0 ~ a M and the filter tap coefficient, real-time calculation is performed to obtain the data tap mixing variable;

步骤三、基于数据抽头混合变量实时计算,得到数据抽头混合相乘分量;Step 3: Calculate the data tap mixing variable in real time to obtain the data tap mixing multiplication component;

步骤四、基于实时延迟数据b 0 ~b 3 实时计算,得到数据内积分量;Step 4: Calculate in real time based on the real-time delay data b 0 ~ b 3 to obtain the integration amount within the data;

步骤五、基于滤波器抽头系数计算,得到抽头内积分量,以及基于抽头内积分量、数据抽头混合相乘分量及数据内积分量求和,即得FIR滤波器的输出数据。Step 5: Based on the calculation of the filter tap coefficient, obtain the integral amount within the tap, and based on the summation of the integral amount within the tap, the mixed multiplication component of the data tap and the integral amount within the data, the output data of the FIR filter is obtained.

提供一种电子设备,包括:至少一个处理器,以及与所述至少一个处理器通信连接的存储器,其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行权利要求所述的方法。An electronic device is provided, including: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are The at least one processor executes, so that the at least one processor executes the method described in the claim.

提供一种存储介质,其上存储有计算机程序,该程序被处理器执行时,实现权利要求所述的方法。A storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in the claims is implemented.

本发明至少包括以下有益效果:The present invention at least includes the following beneficial effects:

第一、本发明通过优化FIR滤波器结构,减少需要使用的乘法器数量,具体通过重构滤波器内积,将原有的卷积求和修改为数据内积分量、数据抽头混合相乘分量和抽头内积分量。并考虑到抽头固定不变,提前存储抽头内积分量,并实时计算数据内积分量、数据抽头混合相乘分量,从而计算滤波器输出。First, the present invention reduces the number of multipliers that need to be used by optimizing the FIR filter structure. Specifically, by reconstructing the filter inner product, the original convolution summation is modified into a data inner integral component and a data tap mixed multiplication component. and the integral amount within the tap. And considering that the taps are fixed, the integral amount within the tap is stored in advance, and the integral amount within the data and the mixed multiplication component of the data tap are calculated in real time to calculate the filter output.

第二、针对重构后的FIR滤波器结构,通过部分积预编码减少部分积分个数,以及使用压缩编码减少加法阵列逻辑延时,提升乘加逻辑运行效率。Second, for the reconstructed FIR filter structure, partial product precoding is used to reduce the number of partial integrals, and compression coding is used to reduce the logic delay of the addition array and improve the operating efficiency of the multiply-accumulate logic.

本发明的其它优点、目标和特征将部分通过下面的说明体现,部分还将通过对本发明的研究和实践而为本领域的技术人员所理解。Other advantages, objects, and features of the present invention will be apparent in part from the description below, and in part will be understood by those skilled in the art through study and practice of the present invention.

附图说明Description of the drawings

图1为本发明的滤波器的各单元模块的连接结构的示意图;Figure 1 is a schematic diagram of the connection structure of each unit module of the filter of the present invention;

图2为本发明数据延迟单元实施例中的实现结构图;Figure 2 is an implementation structure diagram in an embodiment of the data delay unit of the present invention;

图3为本发明数据预处理单元实施例中的实现结构图;Figure 3 is an implementation structure diagram in an embodiment of the data preprocessing unit of the present invention;

图4为本发明数据抽头混合内积计算单元实施例中的实现结构图;Figure 4 is an implementation structure diagram of the data tap mixed inner product calculation unit in an embodiment of the present invention;

图5为本发明模块3-1实施例中的实现结构图;Figure 5 is an implementation structure diagram in the embodiment of module 3-1 of the present invention;

图6为本发明模块3-1-1实施例中的实现结构图;Figure 6 is an implementation structure diagram in the embodiment of module 3-1-1 of the present invention;

图7为本发明模块3-2实施例中的实现结构图;Figure 7 is an implementation structure diagram in the embodiment of module 3-2 of the present invention;

图8为本发明模块3-2-1实施例中的实现结构图;Figure 8 is an implementation structure diagram in the embodiment of module 3-2-1 of the present invention;

图9为本发明模块3-2-2实施例中的实现结构图;Figure 9 is an implementation structure diagram in the embodiment of module 3-2-2 of the present invention;

图10为本发明数据内积计算单元实施例中的实现结构图;Figure 10 is an implementation structure diagram in an embodiment of the data inner product calculation unit of the present invention;

图11为本发明模块4-2实施例中的实现结构图;Figure 11 is an implementation structure diagram in the embodiment of module 4-2 of the present invention;

图12为本发明模块4-3实施例中的实现结构图;Figure 12 is an implementation structure diagram in the embodiment of module 4-3 of the present invention;

图13是本发明求和单元实施例中的实现结构图。Figure 13 is an implementation structure diagram in an embodiment of the summation unit of the present invention.

具体实施方式Detailed ways

下面结合附图对本发明做进一步的详细说明,以令本领域技术人员参照说明书文字能够据以实施。The present invention will be further described in detail below with reference to the accompanying drawings, so that those skilled in the art can implement it with reference to the text of the description.

需要说明的是,下述实施方案中所述实验方法,如无特殊说明,均为常规方法,所述试剂和材料,如无特殊说明,均可从商业途径获得;在本发明的描述中,术语指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,并不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。It should be noted that the experimental methods described in the following embodiments, unless otherwise specified, are all conventional methods, and the reagents and materials, unless otherwise specified, can be obtained from commercial sources; in the description of the present invention, The orientation or positional relationship indicated by the terms is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description. It does not indicate or imply that the device or element referred to must have a specific orientation or in a specific manner. orientation construction and operation and therefore should not be construed as limitations of the invention.

<实施例><Example>

以滤波器阶数N为19、20,输入数据和滤波器抽头均为16比特定点复数进行说明。如图1~13所示,模块1为数据延迟单元;模块2为数据预处理单元;模块3为数据抽头混合内积计算单元;模块4为数据内积计算单元;模块5为求和单元。The explanation is based on the assumption that the filter order N is 19 and 20, and the input data and filter taps are both 16-bit specific point complex numbers. As shown in Figures 1 to 13, module 1 is the data delay unit; module 2 is the data preprocessing unit; module 3 is the data tap mixed inner product calculation unit; module 4 is the data inner product calculation unit; module 5 is the summation unit.

如图1~13所示,本发明资源优化型FIR滤波器包括:As shown in Figures 1 to 13, the resource-optimized FIR filter of the present invention includes:

数据延迟单元接受输入数据,将输入数据进行延迟,输出第一输出结果,a 0 a 1 、…、a 18 a 19 (共20个数据)和第二输出结果b 0 b 1 b 2 b 3 (共4个数据),数据延迟单元如图2所示,其中,The data delay unit accepts input data, delays the input data, and outputs the first output results, a 0 , a 1 , ..., a 18 , a 19 (a total of 20 data) and the second output results b 0 , b 1 , b 2 , b 3 (a total of 4 data), the data delay unit is shown in Figure 2, where,

公式1 Formula 1

x (n)表示n时刻的输入数据;当滤波器阶数N为奇数时,则令M=N+1,且抽头系数h M =0;当滤波器阶数N为偶数时,则令M=N x ( n ) represents the input data at time n ; when the filter order N is an odd number, then let M = N +1, and the tap coefficient h M =0; when the filter order N is an even number, then let M = N .

数据预处理单元接受数据延迟单元的a 0 a 1 、…、a 18 a 19 和滤波器抽头系数h 0 h 1 、…、h 18 h 19 作为输入,输出c 0 c 1 、…、c 18 c 19 ,数据预处理单元结构如图3所示,生成规则如公式2所示,The data preprocessing unit accepts a 0 , a 1 ,..., a 18 , a 19 of the data delay unit and the filter tap coefficients h 0 , h 1 ,..., h 18 , h 19 as input, and outputs c 0 , c 1 , …, c 18 , c 19 , the structure of the data preprocessing unit is shown in Figure 3, and the generation rules are shown in Formula 2,

公式2 Formula 2

数据抽头混合内积计算单元接受数据预处理单元的c 0 c 1 、…、c 18 c 19 作为输入,使用2*20个模块3-1实现2*160个部分积生成,2个模块3-2分别实现160个部分积求和,得到第四输出结果d xh The data tap mixed inner product calculation unit accepts c 0 , c 1 ,..., c 18 , c 19 from the data preprocessing unit as input, and uses 2*20 modules 3-1 to achieve 2*160 partial product generation, 2 modules 3-2 implements the summation of 160 partial products respectively, and obtains the fourth output result d xh :

d xh 表示数据抽头混合相乘分量。 d xh represents the data tap mix multiplication component.

如果N=19,则直接令h 19 =0即可。数据抽头混合内积计算单元如图4所示。If N =19, just set h 19 =0 directly. The data tap mixed inner product calculation unit is shown in Figure 4.

具体的,specific,

每个模块3-1,使用基4的布斯编码,将乘法计算(X* Y)转换为8个部分积PP 0 ~PP 7 PP 0 ~PP 7 的求和结果即为X*Y,编码映射过程如图5所示。Each module 3-1 uses base 4 Booth coding to convert the multiplication calculation (X*Y) into 8 partial products PP 0 ~ PP 7. The summation result of PP 0 ~ PP 7 is X*Y, The encoding mapping process is shown in Figure 5.

其中,单个部分积的布斯编码及选择由模块3-1-1完成,图6中示出具体编码规则和部分积生成方式,图6的索引i= 0,1,…,7。Among them, the Booth encoding and selection of a single partial product are completed by module 3-1-1. The specific encoding rules and partial product generation methods are shown in Figure 6. The index i = 0,1,...,7 in Figure 6.

编码公式:Coding formula:

公式4 Formula 4

其中,X i 、2X i Mi均表示预编码的编码结果;Among them, X i , 2 X i , and Mi all represent the coding results of precoding;

单个部分积中间变量映射方式:Single partial product intermediate variable mapping method:

公式5 Formula 5

其中,Y xi 表示单倍部分积;Y 2xi 表示两倍部分积;PPT i 表示部分积映射结果;e i 表示PP i 的符号。Among them, Y xi represents a single partial product; Y 2xi represents a double partial product; PPT i represents the partial product mapping result; e i represents the symbol of PP i .

最后使PPT i 表示部分映射成PP i Finally, the PPT i representation part is mapped to PP i .

如图7所示,模块3-2接受160个部分积,使用7级模块3-2-1压缩至2个数据,再通过模块3-2-2求和截位,得到所述第四输出结果。As shown in Figure 7, module 3-2 accepts 160 partial products, uses 7-level module 3-2-1 to compress it to 2 data, and then uses module 3-2-2 to sum and truncate to obtain the fourth output. result.

如图8所示,每个模块3-2-1将4个数据压缩至2个数据,压缩方式如下:As shown in Figure 8, each module 3-2-1 compresses 4 data to 2 data. The compression method is as follows:

公式6 Formula 6

如图9所示,模块3-2-2对压缩后的2个数据,首先截取F-2个比特(此处F=15),然后将数据分为高位部分和低2位部分,根据低2位的映射关系确定add 1 add 2 ,最后将2个输入数据的高位部分、add 1 add 2 *2相加,得到第四输出结果(数据抽头混合相乘分量)。其中,add 1add 2是两个标识;add 1=1,表示需要在计算结果上加1;add 1=0,表示不需要在计算结果上加1;add 2=1,表示需要在计算结果上加2;add 2=0,表示不需要在计算结果上加2。As shown in Figure 9, module 3-2-2 first intercepts F -2 bits (here F = 15) of the two compressed data, and then divides the data into the high-bit part and the low-order 2-bit part. The 2-bit mapping relationship determines add 1 and add 2. Finally, the high-order parts of the two input data, add 1 and add 2 *2, are added to obtain the fourth output result (data tap mixed multiplication component) . Among them, add 1 and add 2 are two identifiers; add 1 =1 means that 1 needs to be added to the calculation result; add 1 =0 means that there is no need to add 1 to the calculation result; add 2 =1 means that it needs to be added to the calculation result. Add 2 to the result; add 2 =0 means there is no need to add 2 to the calculation result.

如图10所示,数据内积计算单元接受数据延迟单元的第二输出结果b 0 b 1 b 2 b 3 作为输入,使用模块3-1实现2*32个部分积生成,2个模块4-2分别实现32个部分积求和,并通过模块4-3进行累加得到第五输出结果:As shown in Figure 10, the data inner product calculation unit accepts the second output results b 0 , b 1 , b 2 , b 3 of the data delay unit as input, and uses module 3-1 to realize 2*32 partial product generation, 2 Module 4-2 implements the summation of 32 partial products respectively, and accumulates them through module 4-3 to obtain the fifth output result:

d xx 表示数据内积分量。 d xx represents the amount of integration within the data.

具体的,specific,

如图11所示,模块4-2接受32个部分积,使用4级模块3-2-1将其压缩至2个数据,并通过模块3-2-2求和截位。As shown in Figure 11, module 4-2 accepts 32 partial products, uses level 4 module 3-2-1 to compress them to 2 data, and sums them through module 3-2-2.

如图12所示,模块4-3使用延迟为2的累加器对模块4-2的输出进行累加,得到所述第五输出结果d xx As shown in Figure 12, module 4-3 uses an accumulator with a delay of 2 to accumulate the output of module 4-2 to obtain the fifth output result dxx .

如图13所示,求和单元,接受第四输出结果d xh (数据抽头混合相乘分量)、第五输出结果d xx (数据内积分量)和滤波器抽头预运算结果d hh (抽头内积分量),求和并截位饱和得到滤波结果。As shown in Figure 13 , the summation unit accepts the fourth output result d Integral amount), summed and truncated to obtain the filtering result.

其中,滤波器抽头预运算结果为:Among them, the filter tap pre-operation result is:

当滤波器阶数N=19时,则令h 19 =0。When the filter order N =19, let h 19 =0.

通过上述滤波器的结构优化,使原本阶数为N的滤波器,需使用N个乘法器的现状改变为只需要使用(ceil(N/2)+2)个乘法器,ceil函数表示朝正无穷方向取整。即对于本实施例19和20阶滤波器,原来需要使用19和20个乘法器,经本申请结构优化后,均只需要使用12个乘法器,且阶数越高,收益越明显。Through the structural optimization of the above-mentioned filter, the current situation that the original order N filter needs to use N multipliers is changed to only need to use ( ceil ( N /2)+2) multipliers. The ceil function represents the positive direction. Rounding in the direction of infinity. That is to say, for the 19th and 20th order filters in this embodiment, 19 and 20 multipliers were originally needed. After the structural optimization of this application, only 12 multipliers are needed. The higher the order, the more obvious the benefits.

尽管本发明的实施方案已公开如上,但其并不仅仅限于说明书和实施方式中所列运用,它完全可以被适用于各种适合本发明的领域,对于熟悉本领域的人员而言,可容易地实现另外的修改,因此在不背离权利要求及等同范围所限定的一般概念下,本发明并不限于特定的细节和这里示出与描述的图例。Although the embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the description and embodiments. They can be applied to various fields suitable for the present invention. For those familiar with the art, they can easily Additional modifications may be made, and the invention is therefore not limited to the specific details and illustrations shown and described herein without departing from the general concept defined by the claims and equivalent scope.

Claims (9)

1.资源优化型FIR滤波器,其特征在于,包括:1. Resource-optimized FIR filter, which is characterized by: 数据延迟单元,其用于对输入数据进行延迟计算,得到实时延迟数据a 0 ~a M b 0 ~b 3 The data delay unit is used to perform delay calculation on the input data to obtain real-time delay data a 0 ~ a M and b 0 ~ b 3 ; 数据预处理单元,其用于基于实时延迟数据a 0 ~a M 和滤波器抽头系数实时计算,得到数据抽头混合变量;A data preprocessing unit, which is used for real-time calculation based on real-time delay data a 0 ~ a M and filter tap coefficients to obtain data tap mixing variables; 数据抽头混合内积计算单元,其用于基于数据抽头混合变量实时计算,得到数据抽头混合相乘分量;The data tap mixing inner product calculation unit is used for real-time calculation based on the data tap mixing variable to obtain the data tap mixing multiplication component; 数据内积计算单元,其用于基于实时延迟数据b 0 ~b 3 实时计算,得到数据内积分量;The data inner product calculation unit is used for real-time calculation based on the real-time delay data b 0 ~ b 3 to obtain the data inner product amount; 求和单元,其用于基于滤波器抽头系数计算,得到抽头内积分量,并储存,以及用于调用抽头内积分量、数据抽头混合相乘分量及数据内积分量求和,以及执行位宽处理后,即得FIR滤波器的输出数据。The summation unit is used to calculate the tap coefficient based on the filter, obtain the integral amount within the tap, and store it, and to call the integral amount within the tap, the mixed multiplication component of the data tap and the summation of the integral amount within the data, and to perform the bit width After processing, the output data of the FIR filter is obtained. 2.如权利要求1所述的资源优化型FIR滤波器,其特征在于,实时延迟数据a 0 ~a M b 0 ~b 3 的生成法则如公式1所示:2. The resource-optimized FIR filter according to claim 1, characterized in that the generation rules of real-time delay data a 0 ~ a M and b 0 ~ b 3 are as shown in Formula 1: 公式1 Formula 1 其中,x (n)表示n时刻的输入数据;当滤波器阶数N为奇数时,则令M=N+1,且抽头系数h M =0;当滤波器阶数N为偶数时,则令M=NAmong them, x ( n ) represents the input data at time n ; when the filter order N is an odd number, then let M = N +1, and the tap coefficient h M =0; when the filter order N is an even number, then Let M = N . 3.如权利要求2所述的资源优化型FIR滤波器,其特征在于,数据抽头混合变量的计算方法如公式2所示:3. The resource-optimized FIR filter as claimed in claim 2, characterized in that the calculation method of the data tap mixing variable is as shown in Formula 2: 公式2 Formula 2 其中,h表示滤波器的抽头系数。Among them, h represents the tap coefficient of the filter. 4.如权利要求3所述的资源优化型FIR滤波器,其特征在于,数据内积分量、数据抽头混合相乘分量以及抽头内积分量的计算方法如公式3所示:4. The resource-optimized FIR filter according to claim 3, characterized in that the calculation method of the integral amount within the data, the mixed multiplication component of the data tap and the integral amount within the tap is as shown in Formula 3: 公式3 Formula 3 其中,d xx 表示数据内积分量;d xh 表示数据抽头混合相乘分量;d hh 表示抽头内积分量。Among them, d xx represents the integration amount within the data; d xh represents the data tap mixing multiplication component; d hh represents the integration amount within the tap. 5.如权利要求4所述的资源优化型FIR滤波器,其特征在于,所述数据抽头混合内积计算单元和数据内积计算单元进行乘法运算时,还包括预编码子模块,其用于采用基4布斯编码方法对每串数据进行编码、部分积计算和映射,其中,编码、部分积计算和映射方法分别如公式4和公式5所示:5. The resource-optimized FIR filter according to claim 4, characterized in that when the data tap mixed inner product calculation unit and the data inner product calculation unit perform multiplication operations, they also include a precoding sub-module for The radix-4 Booth coding method is used to encode, partial product calculation and mapping each string of data. The encoding, partial product calculation and mapping methods are as shown in Equation 4 and Equation 5 respectively: 公式4 Formula 4 其中,X i 、2X i Mi均表示预编码的编码结果,索引i由输入数据位宽决定;Among them, X i , 2 X i , and Mi all represent the coding results of precoding, and the index i is determined by the input data bit width; 公式5 Formula 5 其中,Y xi 表示单倍部分积;Y 2xi 表示两倍部分积;PPT i 表示部分积映射结果;e i 表示PP i 的符号。Among them, Y xi represents a single partial product; Y 2xi represents a double partial product; PPT i represents the partial product mapping result; e i represents the symbol of PP i . 6.如权利要求5所述的资源优化型FIR滤波器,其特征在于,所述数据抽头混合内积计算单元和数据内积计算单元进行乘法运算时,还包括压缩子模块,其用于对预编码子模块输出的部分积进行压缩并求和,如公式6所示:6. The resource-optimized FIR filter according to claim 5, characterized in that when the data tap mixed inner product calculation unit and the data inner product calculation unit perform multiplication operations, they also include a compression sub-module for performing the multiplication operation. The partial products output by the precoding sub-module are compressed and summed, as shown in Equation 6: 公式6 Formula 6 其中,每次输入4个数据D 1 、D 2 、D 3 、D 4转换为中间变量TP 1~TP 7Among them, four pieces of data D 1 , D 2 , D 3 , and D 4 are input each time and converted into intermediate variables TP 1 ~ TP 7 . 7.如权利要求1~6任一项所述的资源优化型FIR滤波器的实现方法,其特征在于,包括以下步骤:7. The implementation method of the resource-optimized FIR filter according to any one of claims 1 to 6, characterized in that it includes the following steps: 步骤一、对输入数据进行延迟计算,得到实时延迟数据a 0 ~a M b 0 ~b 3 Step 1: Perform delay calculation on the input data to obtain real-time delay data a 0 ~ a M and b 0 ~ b 3 ; 步骤二、基于实时延迟数据a 0 ~a M 和滤波器抽头系数实时计算,得到数据抽头混合变量;Step 2: Based on the real-time delay data a 0 ~ a M and the filter tap coefficient, real-time calculation is performed to obtain the data tap mixing variable; 步骤三、基于数据抽头混合变量实时计算,得到数据抽头混合相乘分量;Step 3: Calculate the data tap mixing variable in real time to obtain the data tap mixing multiplication component; 步骤四、基于实时延迟数据b 0 ~b 3 实时计算,得到数据内积分量;Step 4: Calculate in real time based on the real-time delay data b 0 ~ b 3 to obtain the integration amount within the data; 步骤五、基于滤波器抽头系数计算,得到抽头内积分量,以及基于抽头内积分量、数据抽头混合相乘分量及数据内积分量求和,即得FIR滤波器的输出数据。Step 5: Based on the calculation of the filter tap coefficient, obtain the integral amount within the tap, and based on the summation of the integral amount within the tap, the mixed multiplication component of the data tap and the integral amount within the data, the output data of the FIR filter is obtained. 8.电子设备,其特征在于,包括:至少一个处理器,以及与所述至少一个处理器通信连接的存储器,其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行权利要求7所述的实现方法。8. Electronic equipment, characterized in that it includes: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions that can be executed by the at least one processor, and the The instructions are executed by the at least one processor, so that the at least one processor executes the implementation method of claim 7. 9.存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时,实现权利要求7所述的实现方法。9. A storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, the implementation method of claim 7 is implemented.
CN202311069361.7A 2023-08-24 2023-08-24 Resource optimization type FIR filter and implementation method thereof Active CN116827308B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311069361.7A CN116827308B (en) 2023-08-24 2023-08-24 Resource optimization type FIR filter and implementation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311069361.7A CN116827308B (en) 2023-08-24 2023-08-24 Resource optimization type FIR filter and implementation method thereof

Publications (2)

Publication Number Publication Date
CN116827308A true CN116827308A (en) 2023-09-29
CN116827308B CN116827308B (en) 2023-11-24

Family

ID=88122364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311069361.7A Active CN116827308B (en) 2023-08-24 2023-08-24 Resource optimization type FIR filter and implementation method thereof

Country Status (1)

Country Link
CN (1) CN116827308B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0266004A2 (en) * 1986-10-27 1988-05-04 Koninklijke Philips Electronics N.V. Architecture for power of two coefficient fir filter
US5262974A (en) * 1991-10-28 1993-11-16 Trw Inc. Programmable canonic signed digit filter chip
KR970031270A (en) * 1995-11-06 1997-06-26 구자홍 Finite Shock Response (FIR) Filter Structure
WO2001013515A1 (en) * 1999-08-13 2001-02-22 True Dimensional Sound, Inc. Digital filter
CN1757162A (en) * 2003-03-03 2006-04-05 神经网络处理有限公司 Digital filter design method and device, digital filter design program, digital filter
CN1965478A (en) * 2004-11-05 2007-05-16 神经网路处理有限公司 Digital filter and its designing method, desiging apparatus, and program for designing digital filter
CN1992517A (en) * 2005-12-26 2007-07-04 中兴通讯股份有限公司 Programmable interpolated filter device and realizing method therefor
CN101136623A (en) * 2007-10-12 2008-03-05 清华大学 Time Domain Implementation Method for Simple Coefficient FIR Filter
CN101268614A (en) * 2005-07-15 2008-09-17 日本电气株式会社 Adaptive digital filter, FM receiver, signal processing method, and program
CN106505973A (en) * 2016-09-19 2017-03-15 华为技术有限公司 A kind of N-tap FIR filter
CN107612523A (en) * 2017-08-25 2018-01-19 西安交通大学 A kind of FIR filter implementation method based on software checking book method
CN113193854A (en) * 2021-05-19 2021-07-30 中国人民解放军国防科技大学 Multiplication-free filter design method based on high gain of filter coefficient
CN113783549A (en) * 2021-09-10 2021-12-10 上海大学 Interpolation filtering method and interpolation filtering device
CN114744982A (en) * 2022-05-09 2022-07-12 杭州电子科技大学 Low-pass FIR filter implementation method for multiplication optimization
CN115310389A (en) * 2022-08-12 2022-11-08 中国电子科技集团公司第五十八研究所 Digital down-conversion design method of multiplication-free architecture

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0266004A2 (en) * 1986-10-27 1988-05-04 Koninklijke Philips Electronics N.V. Architecture for power of two coefficient fir filter
US5262974A (en) * 1991-10-28 1993-11-16 Trw Inc. Programmable canonic signed digit filter chip
KR970031270A (en) * 1995-11-06 1997-06-26 구자홍 Finite Shock Response (FIR) Filter Structure
WO2001013515A1 (en) * 1999-08-13 2001-02-22 True Dimensional Sound, Inc. Digital filter
CN1757162A (en) * 2003-03-03 2006-04-05 神经网络处理有限公司 Digital filter design method and device, digital filter design program, digital filter
CN1965478A (en) * 2004-11-05 2007-05-16 神经网路处理有限公司 Digital filter and its designing method, desiging apparatus, and program for designing digital filter
CN101268614A (en) * 2005-07-15 2008-09-17 日本电气株式会社 Adaptive digital filter, FM receiver, signal processing method, and program
CN1992517A (en) * 2005-12-26 2007-07-04 中兴通讯股份有限公司 Programmable interpolated filter device and realizing method therefor
CN101136623A (en) * 2007-10-12 2008-03-05 清华大学 Time Domain Implementation Method for Simple Coefficient FIR Filter
CN106505973A (en) * 2016-09-19 2017-03-15 华为技术有限公司 A kind of N-tap FIR filter
CN107612523A (en) * 2017-08-25 2018-01-19 西安交通大学 A kind of FIR filter implementation method based on software checking book method
CN113193854A (en) * 2021-05-19 2021-07-30 中国人民解放军国防科技大学 Multiplication-free filter design method based on high gain of filter coefficient
CN113783549A (en) * 2021-09-10 2021-12-10 上海大学 Interpolation filtering method and interpolation filtering device
CN114744982A (en) * 2022-05-09 2022-07-12 杭州电子科技大学 Low-pass FIR filter implementation method for multiplication optimization
CN115310389A (en) * 2022-08-12 2022-11-08 中国电子科技集团公司第五十八研究所 Digital down-conversion design method of multiplication-free architecture

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
S. JAYASHRI: "Reconfigurable FIR Filter using distributed arithmetic residue number system algorithm based on Thermometer Coding", ,《2014 INTERNATIONAL CONFERENCE ON COMMUNICATION AND SIGNAL PROCESSING》, pages 1991 - 1995 *
田晶晶: "一种基于迭代短卷积算法的低复杂度并行FIR滤波器结构", 《电子与信息学报》, pages 1151 - 1157 *

Also Published As

Publication number Publication date
CN116827308B (en) 2023-11-24

Similar Documents

Publication Publication Date Title
Jenkins et al. The use of residue number systems in the design of finite impulse response digital filters
Parhi et al. Architectures for IIR digital filters using stochastic computing
Shahein et al. A novel hybrid monotonic local search algorithm for FIR filter coefficients optimization
CN107612523A (en) A kind of FIR filter implementation method based on software checking book method
CN116827308B (en) Resource optimization type FIR filter and implementation method thereof
Gardezi et al. Design and VLSI Implementation of CSD based DA Architecture for 5/3 DWT
Vinay et al. Power efficient FIR filter architecture using distributed arithmetic algorithm
CN101178643A (en) Data conversion method and data conversion circuit capable of saving digital operations
CN115955217A (en) Low-complexity digital filter coefficient adaptive combined coding method and system
CN100542047C (en) Coding method and device for exponential Golomb coding
Lian A modified frequency-response masking structure for high-speed FPGA implementation of sharp FIR filters
CN114154631A (en) Convolutional neural network quantization implementation method and device based on FPGA
Mehra et al. FPGA based Speed Efficient Decimator using Distributed Arithmetic Algorithm
Sowmya et al. A 6tap Fir Filter Implementation Using Modified Bachet Architecture For Reduced Mapped Resources
Chulet et al. FIR filter designing using wallace multiplier
Stamenković et al. Constant-coefficient FIR filters based on residue number system arithmetic
Anandi et al. Efficient VLSI Architecture of FIR Filter for Processing Seismic Signal.
Basha et al. Distributed Arithmetic Based FIR Filter: FPGA Implementation
CN113010146B (en) Mixed signal multiplier
Ma et al. Efficient implementations of pipelined CORDIC based IIR digital filters using fast orthonormal/spl mu/-rotations
Mersereau On the equivalence between the Kaiser-Hamming sharpening procedure and the McClellan transformation for FIR digital filter design
Nair et al. Optimized FIR filter using distributed arithmetic architecture
Golconda et al. COMPARATIVE ANALYSIS OF MULTIPLIER AND MULTIPLIER-LESS METHOD USED TO IMPLEMENT FIR FILTER ON FPGA
Nithirochananont et al. An FPGA-based implementation of variable fractional delay filter
RAMYA et al. LUT Optimization Using Combined APC-OMS Technique For Memory-Based Computation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20241202

Address after: 430056 South taizihu innovation Valley, Wuhan Economic and Technological Development Zone, Wuhan City, Hubei Province, China (qdxx-g2002)

Patentee after: Wuhan Litong Communication Co.,Ltd.

Country or region after: China

Address before: 201306 building C, No. 888, Huanhu West 2nd Road, Lingang New District, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai

Patentee before: Shanghai Litong Communication Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right