Interpolation filtering method and interpolation filtering device

By calculating the parallel path number and tap coefficient of the filter, using the order inverted product and performing accumulated output, the problem of large delay of the interpolation filter in the prior art is solved, and more efficient data processing and compatibility are achieved.

CN113783549BActive Publication Date: 2024-11-08SHANGHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111061490.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-10
Publication Date
2024-11-08
Estimated Expiration
2041-09-10

AI Technical Summary

Technical Problem

In the existing multi-rate digital communication systems, the interpolation filter has a large delay, and the consumption of hardware resources multiplier and lookup tables limits the improvement of the number of parallel processing paths, resulting in adverse factors in the overall design of the system.

Method used

By calculating the input parallel paths, tap coefficients and difference multiples of the filter, calculate the output data parallel paths and the number of input data required, use the product of the tap coefficients and the input data in reverse order, and use the internal DSP resources of the FPGA or The shift addition method is used to calculate, and finally the output is accumulated through the intermediate value and output value register group to reduce the filter delay.

Benefits of technology

It effectively reduces the delay time of the filter, improves the data processing speed, and reduces the power consumption of the system, adapts to filters of various orders and coefficient structures, and has good compatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113783549B_ABST
    Figure CN113783549B_ABST
Patent Text Reader

Abstract

The present invention provides an interpolation filtering method and an interpolation filtering device. After obtaining the number of parallel input paths, tap coefficients and difference multiples of the filter, the scheme calculates the number of parallel output data paths of the filter, the number of input data required for each group of parallel multi-path output signals and the time period required to obtain the input data based on the acquired data, and then calculates the product of each path of the input data and the tap coefficient of the filter. Finally, based on a preset rule, a target product result is selected from the product results for cumulative output, which can effectively reduce the delay time of the filter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital signal interpolation filtering processing, and in particular to a multi-channel parallel interpolation filtering method and an interpolation filtering device based on FPGA. Background Art

[0002] In today's highly information-based era, communication technology plays a vital role. With the rapid development of digital communication technology, various data transmission services are also increasing. In the same digital communication system, signals of different rates often need to be transmitted. Therefore, multi-rate signal processing technology is needed to achieve different transmission rates. Efficient multi-rate filters are the key to multi-rate signal processing systems. Therefore, for a multi-rate digital modulation system, real-time and efficient interpolation filtering methods play a decisive role. In hardware implementation, FPGA is widely used due to its flexibility and parallelism. It is of great significance to study the implementation of interpolation filters on FPGA.

[0003] In the existing publicly reported research literature, many are based on the structure of polyphase filters, combined with the characteristics of zero-value interpolation to achieve interpolation filtering processing. Cui Wenling proposed a method to optimize polyphase interpolation filtering by constructing an auxiliary polyphase filter group in "Research on Generation Methods of Broadband Radar Signals", 2007: 35-38: When the prototype filter coefficients are symmetrical, the author constructs an auxiliary filter group to make the sub-filters in the polyphase structure also symmetrical. The symmetry can be used to reduce the multiplication operation, but the processing delay of this structure is still very large. Lu Chao proposed an interpolation filter structure based on clock division in "Core Algorithm Module Design of Wireless Communication Baseband Signal Processing", 2016: 45-49: According to the characteristics of zero-value interpolation and convolution calculation, the filter coefficients are divided into multiple groups, the coefficient queue moves once per clock cycle, and the data is input at a clock rate of T division (T is the interpolation multiple) for convolution operation. However, this method will increase the filter to a very high working clock, which is not conducive to improving the data processing speed, and high-frequency operation will increase system power consumption. In existing designs, the large consumption of hardware resources such as multipliers and lookup tables limits the increase in the number of parallel processing paths, and some design structures have large delays during high-order filtering, which is detrimental to the overall design of the communication system. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides an interpolation filtering method and an interpolation filtering device to reduce the delay of the filter.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] An interpolation filtering method is applied to a filter, and the method comprises:

[0007] Get the number of parallel input paths of the filter;

[0008] Obtaining tap coefficients of the filter;

[0009] Obtaining a difference multiple of the filter;

[0010] Calculate the number of parallel paths of output data of the filter based on the number of parallel paths of input and the difference multiple;

[0011] The number of input data required for each group of parallel multi-channel output signals and the time period required to obtain the input data are calculated based on the number of parallel output data paths, the difference multiple and the order of the filter;

[0012] Calculating the product of each channel of the input data and the tap coefficient of the filter;

[0013] The target product result is selected from the product results for accumulation and output.

[0014] Optionally, in the above interpolation filtering method, the method of calculating the number of parallel paths of output data of the filter based on the number of parallel paths of the input and the difference multiples includes:

[0015] The number of parallel paths M of the output data of the filter is calculated based on the formula M=L*T, wherein L is the number of parallel paths of the input data, and T is the difference multiple;

[0016] The number of input data required for each group of parallel multi-channel output signals and the time period required to obtain the input data are calculated based on the number of parallel output data paths, the difference multiple and the order of the filter, including:

[0017] The number of input data R required for each group of parallel multi-channel output signals is calculated based on the formula R=ceil[(N+M) / T], wherein N is the order of the filter and ceil[] represents rounding up;

[0018] The time period K required for inputting data is calculated based on the formula K=ceil[(N+M) / T*L].

[0019] Optionally, in the above interpolation filtering method, the calculating the product of each channel of the input data and the tap coefficient of the filter includes:

[0020] Obtain the L-th input data x(i) and the tap coefficient h(N) of the filter, wherein i=0, 1, 2, ..., L-1, and N is the order of the filter, wherein N=0, 1, 2, ...;

[0021] The product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated to obtain the product result res_i[j]=x(i)*h_rev(j), where h_rev(j)=h(Nj), (j=0,1,…,N).

[0022] Optionally, in the above interpolation filtering method, the calculating the product of the input data x(i) and the tap coefficient h_rev(j) after the order is reversed includes:

[0023] The product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated using the DSP resources inside the filter's FPGA, or the product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated using a shift-and-add method.

[0024] Optionally, in the above interpolation filtering method, the step of selecting a target product result from the product results for accumulation and outputting includes:

[0025] Create (K-1) intermediate value register groups and 1 output value register group. The initial values ​​of the intermediate value register group and the output value register group are both 0. The intermediate value register group and the output value register group each include M registers, which correspond to the intermediate values ​​and output values ​​of the output data after M-path interpolation filtering, respectively. The intermediate value register group and the output value register group are denoted as part_e[f] and y[f], respectively, where e represents the e-th intermediate value register group, e∈[1,K-1], and e∈N; f represents the intermediate value and output value of the f-th output data, f∈[0,M-1], and f∈N;

[0026] The value of the first intermediate value register group is equal to the cumulative sum of the corresponding target product results; the values ​​of the second to (K-1)th intermediate value register groups are equal to the values ​​of the previous intermediate value register groups plus the cumulative sum of the corresponding target product results;

[0027] The value of the output value register group is equal to the cumulative sum of the value of the (K-1)th intermediate value register group and its corresponding target product result.

[0028] Optionally, in the above interpolation filtering method, the process of calculating the value of the output value register group includes:

[0029] The value dout[u] of the output value register group is calculated based on the formula dout[u]=∑d(v)*h_rev(w);

[0030] Among them, the input data of the filter is [d(0), d(1), d(2), d(3), ..., d(R-1)];

[0031] The value of the filter output value register group is recorded as dout[u], u=0,1,2,…,M-1, which represents the data output after the u-th interpolation filter;

[0032] Where: v∈N, and ceil[u / T]≤v≤floor[(u+N)mod;

[0033] w=[Tu mod T]mod T+(v-ceil[u / T])*T; ceil means rounding up, floor means rounding down, and mod is the modulo operation.

[0034] An interpolation filter device is applied to a filter, and the device comprises:

[0035] A data acquisition unit, used to obtain the number of parallel input paths of the filter; obtain the tap coefficient of the filter; and obtain the difference multiple of the filter;

[0036] A basic data calculation unit, used to calculate the number of parallel paths of output data of the filter based on the number of parallel paths of input and the difference multiple; and to calculate the number of input data required for each group of parallel multi-path output signals and the time period required to obtain the input data based on the number of parallel paths of output data, the difference multiple and the order of the filter;

[0037] The output unit is used to calculate the product of each channel of the input data and the tap coefficient of the filter; and select a target product result from the product results for cumulative output.

[0038] Optionally, in the above interpolation filtering device, when the basic data calculation unit calculates the number of parallel paths of output data of the filter based on the number of parallel paths of the input and the difference multiple, it is specifically used to:

[0039] The number of parallel paths M of the output data of the filter is calculated based on the formula M=L*T, wherein L is the number of parallel paths of the input data, and T is the difference multiple;

[0040] The number of input data required for each group of parallel multi-channel output signals and the time period required to obtain the input data are calculated based on the number of parallel output data paths, the difference multiple and the order of the filter, including:

[0041] The number of input data R required for each group of parallel multi-channel output signals is calculated based on the formula R=ceil[(N+M) / T], wherein N is the order of the filter and ceil[] represents rounding up;

[0042] The time period K required for inputting data is calculated based on the formula K=ceil[(N+M) / T*L].

[0043] Optionally, in the above interpolation filtering device, when the output unit calculates the product of each channel of the input data and the tap coefficient of the filter, it is specifically used to:

[0044] Obtain the L-th input data x(i) and the tap coefficient h(N) of the filter, wherein i=0, 1, 2, ..., L-1, and N is the order of the filter, wherein N=0, 1, 2, ...;

[0045] The product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated to obtain the product result res_i[j]=x(i)*h_rev(j), where h_rev(j)=h(Nj), (j=0,1,…,N).

[0046] Optionally, in the above interpolation filtering device, when the output unit calculates the product of the input data x(i) and the tap coefficient h_rev(j) after the order is reversed, it is specifically used to:

[0047] The product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated using the DSP resources inside the filter's FPGA, or the product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated using a shift-and-add method.

[0048] Based on the above technical scheme, in the above scheme provided by the embodiment of the present invention, after obtaining the number of parallel input paths, tap coefficients and difference multiples of the filter, the number of parallel output data paths of the filter, the number of input data required for each group of parallel multi-path output signals and the time period required to obtain the input data are calculated based on the acquired data, and then the product of each path of the input data and the tap coefficient of the filter is calculated, and finally, based on the preset rules, the target product result is selected from the product results for cumulative output, which can effectively reduce the delay time of the filter. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0050] Figure 1 A schematic diagram of the flow of the interpolation filtering method disclosed in the embodiment of the present application;

[0051] Figure 2 This is a schematic diagram of interpolation filtering calculation disclosed in an embodiment of the present application;

[0052] Figure 3 The calculation result of the product of the example is provided for the present invention;

[0053] Figure 4 A simplified timing diagram of the intermediate value and output value register group of the present invention is provided as an example;

[0054] Figure 5 A schematic diagram of the structure of the interpolation filter device disclosed in the embodiment of the present application;

[0055] Figure 6 A system structure diagram of an output module in an interpolation filter device disclosed in an embodiment of the present application;

[0056] Figure 7 It is a detailed structural diagram of the pre-multiplication module in the output module. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] In order to delay the data, the present application discloses an interpolation filtering method, which is applied to the filter, see Figure 1 , methods may include:

[0059] Step S101: obtaining the number of parallel input paths of the filter, obtaining the filter coefficient of the filter, and obtaining the difference multiple of the filter;

[0060] This step is mainly used to obtain the input data of the filter and the relevant configuration parameters of the filter. In this step, the number of parallel input paths of the recorder can be recorded as L, the difference multiple of the filter can be recorded as T, the tap coefficient can be recorded as h(N), N is the order of the filter, and N=0, 1, 2, ...;

[0061] Step S102: Calculating the number of parallel paths of output data of the filter based on the number of parallel paths of input and the difference multiple;

[0062] The number of parallel paths M of the output data of the filter is calculated based on the formula M=L*T, wherein L is the number of parallel paths of the input data, and T is the difference multiple.

[0063] Step S103: Calculate the number of input data required for each group of parallel multi-channel output signals and the time period required to obtain the input data based on the number of parallel output data paths, the difference multiple and the order of the filter;

[0064] In this step, the number of input data R required for each group of parallel multi-channel output signals can be calculated based on the formula R=ceil[(N+M) / T], where N is the order of the filter and ceil[] represents rounding up;

[0065] The time period K required for inputting data is calculated based on the formula K=ceil[(N+M) / T*L]. From the period K, it can be known that K-1 intermediate value registers and 1 output value register group are required in the filter.

[0066] Step S104: Calculate the product of each channel of the input data and the tap coefficient of the filter;

[0067] Obtain the input data x(i) and the tap coefficient h(N) of the filter, wherein i=0, 1, 2, ..., L-1, and N is the order of the filter, wherein N=0, 1, 2, ...;

[0068] The product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated to obtain the product result res_i[j]=x(i)*h_rev(j), where h_rev(j)=h(Nj), (j=0,1,…,N).

[0069] In order to improve the calculation speed of the product, in this scheme, the DSP resources inside the FPGA of the filter can be used to calculate the product of the input data x(i) and the tap coefficient h_rev(j) after the order is reversed, or the product of the input data x(i) and the tap coefficient h_rev(j) after the order is reversed can be calculated by shift addition.

[0070] Step S105: Select a target product result from the product results for accumulation and output.

[0071] In this step, (K-1) intermediate value register groups and 1 output value register group may be newly created in advance in the register, the initial values ​​of the intermediate value register group and the output value register group are both 0, the intermediate value register group and the output value register group each include M registers, corresponding to the intermediate values ​​and output values ​​of the output data after M-path interpolation filtering, respectively, the intermediate value register group and the output value register group are respectively part_e[f] and y[f], wherein e represents the e-th intermediate value register group, e∈[1,K-1], and e∈N; f represents the intermediate value and output value of the f-th output data, f∈[0,M-1], and f∈N;

[0072] The value of the first intermediate value register group is equal to the cumulative sum of the target product result; the value of the second to (K-1)th intermediate value register groups is equal to the cumulative sum of the value of the previous intermediate value register group plus the target product result;

[0073] The value of the output value register group is equal to the cumulative sum of the value of the (K-1)th intermediate value register group and the target product result.

[0074] In the technical solution disclosed in the embodiment of the present application, the process of calculating that the value of the intermediate value register group is equal to the accumulation of the previous intermediate value register group plus the target product result includes:

[0075] The input data to be processed by interpolation filtering is [d(0), d(1), d(2), d(3), ..., d(R-1)];

[0076] The value of the output data is recorded as dout[u], u=0, 1, 2, ..., M-1, which represents the data output after the u-th interpolation filtering, and dout[u] is the value of the output value register group;

[0077] According to the characteristics of zero interpolation and the properties of filter convolution calculation, the calculation expression of dout[u] can be obtained as follows:

[0078] dout[u]=∑d(v)*h_rev(w)

[0079] Where: v∈N, and ceil[u / T]≤v≤floor[(u+N)mod;

[0080] w=[Tu mod T]mod T+(v-ceil[u / T])*T; ceil means rounding up, floor means rounding down, and mod is the modulo operation;

[0081] For d(v) in the product term of the dout[u] calculation expression, since it takes K clock cycles for all these data to arrive, they need to be divided into (K-1) intermediate value register groups and 1 output value register group for calculation and cache;

[0082] For data d(v), it corresponds to the data x(r) input in parallel in the current clock cycle, where r=vmodL. If t=floor(v / L)+1 is less than K, then x(r) needs to be placed in the u-th path (part_t[u]) of the t-th intermediate value register group for cumulative calculation; if t=floor(v / L)+1 is equal to K, then x(r) needs to be placed in the u-th path (y[u]) of the output value register group for cumulative calculation;

[0083] Thus, the expression of the first intermediate value register group is as follows:

[0084] part_1[u]=∑res_r[w];

[0085] Here, t=floor(v / L)+1=1 should be satisfied;

[0086] The expressions for the 2nd to K-1th intermediate value register groups are as follows:

[0087] part_t[u]=part_t-1[u]+∑res_r[w];

[0088] Here, 2≤t=floor(v / L)+1≤K-1 should be satisfied;

[0089] The expression of the output value register group is as follows:

[0090] y[u]=part_K-1[u]+∑res_r[w];

[0091] Here t=floor(v / L)+1=K should be satisfied.

[0092] In order to help users understand the real-time process of the above solution more clearly, this application illustrates the above solution with the following examples:

[0093] Taking the 64-order fir filter with the input parallel number L of 4, the filter zero-value interpolation multiple T of 6 as an example, the scheme is explained. At this time, the filter has a total of 65 tap coefficients, R is equal to 15, and the output data parallel number M=4*6=24; each output of 24 parallel signals needs to be calculated by R=ceil[(64+24) / 6]=15 input data, and these 15 input data need to go through K=ceil[15 / 4]=4 clock cycles to arrive in full.

[0094] For each parallel input data [x(0), x(1), x(2), x(3)], multiply each input data in each channel with the filter tap coefficients [h_rev(0), h_rev(1), h_rev(2), ..., h_rev(64)] in reverse order (implemented by shift addition); the product result is as follows Figure 3 As shown, the next step is to select the corresponding values ​​from these results for accumulation calculation. In this example, since 15 input data need 4 clock cycles to arrive, it is necessary to establish 3 intermediate register groups [part_1, part_2, part_3] and 1 output value register group [y], each register group contains 24 registers. The following will explain in detail how to select the corresponding product value for accumulation output:

[0095] The input data to be interpolated and filtered include d(0), d(1), d(2), d(3), ..., d(14), and the 24 parallel outputs corresponding to the interpolation filter are [dout(0), dout(1), ..., dout(23)], such as Figure 7 As shown, according to the properties of zero-value interpolation and convolution calculation, we can get:

[0096] dout(0)=d(0)*h_rev(0)+d(1)*h_rev(6)+d(2)*h_rev(12)+…+d(10)*h_rev(60);

[0097] dout(1)=d(1)*h_rev(5)+d(2)*h_rev(11)+d(3)*h_rev(17)…+d(10)*h_rev(59);

[0098] …

[0099] dout(23)=d(4)*h_rev(1)+d(5)*h_rev(7)+d(6)*h_rev(13)+…+d(14)*h_rev(61);

[0100] In the above expression, the input data d(0), d(4), d(8), d(12) are divided into the first parallel input data x(0), the input data d(1), d(5), d(9), d(13) are divided into the first parallel input data x(1), d(2), d(6), d(10), d(14) are divided into the first parallel input data x(2), and d(3), d(7), d(11) are divided into the first parallel input data x(3). The product expression containing [d(0), d(1), d(2), d(3)] is calculated in the first intermediate register group part1; the product expression containing [d(4), d(5), d(6), d(7)] is calculated in the second intermediate register group part2; the product expression containing [d(8), d(9), d(10), d(11)] is calculated in the third intermediate register group part3; the product expression containing [d(12), d(13), d(14)] is calculated in the output value register group y.

[0101] Right now:

[0102] Using the first intermediate register group to calculate and store the product of d(0), d(1), d(2), d(3) and the tap coefficient;

[0103] The second intermediate register group is used to calculate and store the product of d(4), d(5), d(6), d(7) and the tap coefficient;

[0104] The third intermediate register group is used to calculate and store the product of d(8), d(9), d(10), d(11) and the tap coefficient;

[0105] The output value register group is used to calculate and store the product of d(12), d(13), d(14) and the tap coefficient;

[0106] Each register stores 24 parallel output data. Take the first intermediate register group as an example. Figure 2 , the input data and the tap coefficients are arranged in parallel into two columns, the column number difference between the input data of the two adjacent columns is T, and the column number difference between the tap coefficients of the two adjacent columns is 1. At this time, d(0), d(1), d(2), d(3) are multiplied by the tap coefficients in the same column to obtain the first parallel output data part_1(0) of the first intermediate register group, the tap coefficients are shifted downward by one column, and d(0), d(1), d(2), d(3) are multiplied by the tap coefficients in the same column to obtain the second parallel output data part_1(1) of the first intermediate register group, and the tap coefficients are shifted downward by one column until the value of the 24th parallel output data part_1(24) of the first intermediate register group is calculated.

[0107] The first intermediate register group has:

[0108] part_1(0)=res_0(0)+res_1(6)+res_2(12)+res_3(18);

[0109] part_1(1)=res_1(5)+res_2(11)+res_3(17);

[0110] …

[0111] part_1(23)=0.

[0112] The same principle as above, d(4), d(5), d(6), d(7) are multiplied by the tap coefficients in the same column to obtain the first parallel output data part_2(0) of the second intermediate register group, the tap coefficients are shifted down one column, and d(4), d(5), d(6), d(7) are multiplied by the tap coefficients in the same column to obtain the second parallel output data part_2(1) of the second intermediate register group, and the tap coefficients are shifted down one column until the value of the 24th parallel output data part_2(23) of the second intermediate register group is calculated.

[0113] The same principle as above is used. The tap coefficients of d(8), d(9), d(10), d(11) are multiplied by the tap coefficients in the same column to obtain the first parallel output data part_3(0) of the third intermediate register group. The tap coefficients are shifted down by one column. At this time, d(8), d(9), d(10), d(11) are multiplied by the tap coefficients in the same column to obtain the second parallel output data part_3(1) of the third intermediate register group. The tap coefficients are shifted down by one column until the value of the 24th parallel output data part_3(23) of the third intermediate register group is calculated.

[0114] The same principle as above, d(12), d(13), d(14) are multiplied by the tap coefficients in the same column to obtain the first parallel output data y[0] of the output value register group, the tap coefficients are shifted down one column, and d(12), d(13), d(14) are multiplied by the tap coefficients in the same column to obtain the second parallel output data y[1] of the register, and the tap coefficients are shifted down one column until the value of the 24th parallel output data y

[23] of the output value register group is calculated.

[0115] The value of the first intermediate register group is recorded as a1, the value of the second intermediate register group is a1+a2, the value of the third intermediate register group is a1+a2+a3, and the value of the output value register group is a1+a2+a3+a4, wherein a1 is the parallel output data of each channel of the first intermediate register group obtained by the above calculation, a2 is the parallel output data of each channel of the second intermediate register group obtained by the above calculation, a3 is the parallel output data of each channel of the third intermediate register group obtained by the above calculation, and a4 is the parallel output data of each channel of the output value register group obtained by the above calculation.

[0116] like Figure 4 The figure shows a simplified timing diagram of the register group in this example. The number in the name of the input data indicates the clock cycle, and the number behind indicates which channel the signal is. For example, 1_x0 is the signal of the x[0]th parallel input in the first clock cycle. The number in the name of the register group data also indicates the clock cycle of the signal. The letters [a, b, c, d] correspond to the values ​​of the corresponding accumulated items of the registers [part_1[0], part_2[0], part_3[0], y[0]]. For example, 1a indicates the corresponding product value selected when calculating part_1[0] in the first clock cycle. In this example, the product value corresponding to 1a is [res_0(0)+res_1(6)+res_2(12)+res_3(18)]. It can be seen that the output value register y[0] outputs the valid filtered channel 0 signal from the fourth cycle.

[0117] In order to verify the reliability of the technical solution disclosed in this application, the applicant used the vivado_2018.3 tool to implement this example on the xc7vx485tffg1157-1 chip platform. When the number of quantization bits for data and filter coefficients is 10, a total of 2811 LUTs and 1481 Registers are consumed.

[0118] It can be seen from the above scheme that the technical solution disclosed in the above embodiment of the present invention is based on the characteristics of zero-value interpolation and convolution calculation. It can be divided into multiple register groups with multiple intermediate value registers and output value registers as the core to complete the interpolation and filtering processing within the clock cycle when all data arrives. For the result of each M-way parallel output, it is necessary to calculate the input data of the previous K=ceil[(N+M) / T*L] clock cycles. The present invention puts the multiplication and accumulation calculation that the data input from the 1st to the Kth clock cycle should participate in into the 1st to the K-1th intermediate value registers and output value registers for calculation and cache, so that only K register groups are needed to cache the value of the cumulative sum without consuming a large amount of resources to cache the product of the input data and the coefficient, and can realize the pipeline processing of the system and improve the data processing speed. The interpolation filter of the present invention has a simple structure and a small processing delay. Since the design has no specific requirements on the number and structure of the filter tap coefficients, it can adapt to filters of various orders and various coefficient structures and has good compatibility.

[0119] Corresponding to the above method, the present application also discloses an interpolation filter device, which can be applied to the filter, see Figure 5 , the device comprises:

[0120] The data acquisition unit 100 is used to obtain the number of parallel input paths of the filter; obtain the tap coefficients of the filter; and obtain the difference multiples of the filter;

[0121] The basic data calculation unit 200 is used to calculate the number of parallel paths of output data of the filter based on the number of parallel paths of input and the difference multiple; and calculate the number of input data required for each group of parallel multi-path output signals and the time period required to obtain the input data based on the number of parallel paths of output data, the difference multiple and the order of the filter;

[0122] The output unit 300 is used to calculate the product of each channel of the input data and the tap coefficient of the filter; and select a target product result from the product results for cumulative output.

[0123] Corresponding to the above method, when the basic data calculation unit calculates the number of parallel paths of output data of the filter based on the number of parallel paths of the input and the difference multiple, it is specifically used to:

[0124] The number of parallel paths M of the output data of the filter is calculated based on the formula M=L*T, wherein L is the number of parallel paths of the input data, and T is the difference multiple;

[0125] The number of input data required for each group of parallel multi-channel output signals and the time period required to obtain the input data are calculated based on the number of parallel output data paths, the difference multiple and the order of the filter, including:

[0126] The number of input data R required for each group of parallel multi-channel output signals is calculated based on the formula R=ceil[(N+M) / T], wherein N is the order of the filter and ceil[] represents rounding up;

[0127] The time period K required for inputting data is calculated based on the formula K=ceil[(N+M) / T*L].

[0128] Corresponding to the above method, when the output unit calculates the product of each channel of the input data and the tap coefficient of the filter, it is specifically used to:

[0129] Obtain the L-th input data x(i) and the tap coefficient h(N) of the filter, wherein i=0, 1, 2, ..., L-1, and N is the order of the filter, wherein N=0, 1, 2, ...;

[0130] The product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated to obtain the product result res_i[j]=x(i)*h_rev(j), where h_rev(j)=h(Nj), (j=0,1,…,N).

[0131] Corresponding to the above method, when the output unit calculates the product of the input data x(i) and the tap coefficient h_rev(j) after the order is reversed, it is specifically used to:

[0132] The product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated using the DSP resources inside the filter's FPGA, or the product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated using a shift-and-add method.

[0133] Corresponding to the above method, when the output unit selects a target product result from the product results to accumulate and output, it is specifically used to:

[0134] Create (K-1) intermediate value register groups and 1 output value register group. The initial values ​​of the intermediate value register group and the output value register group are both 0. The intermediate value register group and the output value register group each include M registers, which correspond to the intermediate values ​​and output values ​​of the output data after M-path interpolation filtering, respectively. The intermediate value register group and the output value register group are denoted as part_e[f] and y[f], respectively, where e represents the e-th intermediate value register group, e∈[1,K-1], and e∈N; f represents the intermediate value and output value of the f-th output data, f∈[0,M-1], and f∈N;

[0135] The value of the first intermediate value register group is equal to the cumulative sum of the corresponding target product results; the values ​​of the second to (K-1)th intermediate value register groups are equal to the values ​​of the previous intermediate value register groups plus the cumulative sum of the corresponding target product results;

[0136] The value of the output value register group is equal to the cumulative sum of the value of the (K-1)th intermediate value register group and its corresponding target product result.

[0137] Corresponding to the above method, when the output unit calculates that the value of the intermediate value register group is equal to the accumulation of the previous intermediate value register group plus the target product result, it is specifically used to:

[0138] The input data to be processed by interpolation filtering is [d(0), d(1), d(2), d(3), ..., d(R-1)];

[0139] The value of the output data is recorded as dout[u], u=0, 1, 2, ..., M-1, which represents the data output after the u-th interpolation filtering, and dout[u] is the value of the output value register group;

[0140] According to the characteristics of zero interpolation and the properties of filter convolution calculation, the calculation expression of dout[u] can be obtained as follows:

[0141] dout[u]=∑d(v)*h_rev(w)

[0142] Where: v∈N, and ceil[u / T]≤v≤floor[(u+N)mod;

[0143] w=[Tu mod T]mod T+(v-ceil[u / T])*T; ceil means rounding up, floor means rounding down, and mod is the modulo operation;

[0144] For d(v) in the product term of the dout[u] calculation expression, since it takes K clock cycles for all these data to arrive, they need to be divided into (K-1) intermediate value register groups and 1 output value register group for calculation and cache;

[0145] For data d(v), it corresponds to the data x(r) input in parallel in the current clock cycle, where r=vmodL. If t=floor(v / L)+1 is less than K, then x(r) needs to be placed in the u-th path (part_t[u]) of the t-th intermediate value register group for cumulative calculation; if t=floor(v / L)+1 is equal to K, then x(r) needs to be placed in the u-th path (y[u]) of the output value register group for cumulative calculation;

[0146] Thus, the expression of the first intermediate value register group is as follows:

[0147] part_1[u]=∑res_r[w];

[0148] Here, t=floor(v / L)+1=1 should be satisfied;

[0149] The expressions for the 2nd to K-1th intermediate value register groups are as follows:

[0150] part_t[u]=part_t-1[u]+∑res_r[w];

[0151] Here, 2≤t=floor(v / L)+1≤K-1 should be satisfied;

[0152] The expression of the output value register group is as follows:

[0153] y[u]=part_K-1[u]+∑res_r[w];

[0154] Here t=floor(v / L)+1=K should be satisfied.

[0155] like Figure 6 As shown, the output unit disclosed in the embodiment of the present application is mainly composed of multiple pre-multiplication modules and addition modules, wherein the pre-multiplication module is used to complete the product calculation of single-channel input data and N+1 filter tap coefficients respectively, such as Figure 7 As shown, each pre-multiplication module is composed of N+1 multiplication calculations, and for a single input data x(i), it can calculate and output the product results res_i[0], res_i[1], ..., res_i[N]; the addition module is composed of M accumulation calculations, which correspond to the intermediate values ​​(values ​​of the intermediate registers) or output values ​​(values ​​of the output value register group) of the M output signals.

[0156] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0157] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An interpolation filtering method, characterized in that: Applied to filters, the methods include: Get the number of parallel input paths of the filter; Obtaining tap coefficients of the filter; Obtaining a difference multiple of the filter; Calculate the number of parallel paths of output data of the filter based on the number of parallel paths of input and the difference multiple; The number of input data required for each group of parallel multi-channel output signals and the time period required to obtain the input data are calculated based on the number of parallel output data paths, the difference multiple and the order of the filter; Calculating the product of each channel of the input data and the tap coefficient of the filter; Select a target product result from the product results for cumulative output; The method of calculating the number of parallel paths of output data of the filter based on the number of parallel paths of the input and the difference multiples includes: The number of parallel paths M of the output data of the filter is calculated based on the formula M=L*T, wherein L is the number of parallel paths of the input data, and T is the difference multiple; The number of input data required for each group of parallel multi-channel output signals and the time period required to obtain the input data are calculated based on the number of parallel output data paths, the difference multiple and the order of the filter, including: The number of input data R required for each group of parallel multi-channel output signals is calculated based on the formula R=ceil[(N+M) / T], wherein N is the order of the filter and ceil[] represents rounding up; The time period K required for inputting data is calculated based on the formula K=ceil[(N+M) / T*L]; The step of selecting a target product result from the product results, accumulating and outputting the result includes: Create (K-1) intermediate value register groups and 1 output value register group, the initial values ​​of the intermediate value register group and the output value register group are both 0, the intermediate value register group and the output value register group each include M registers, corresponding to the intermediate values ​​and output values ​​of the output data after M-path interpolation filtering, respectively, the intermediate value register group and the output value register group are denoted as part_e[f] and y[f], respectively, wherein e represents the e-th intermediate value register group, e∈[1, K-1], and e∈ a natural number; f represents the intermediate value and output value of the f-th output data, f∈[0, M-1], and f∈ a natural number; The value of the first intermediate value register group is equal to the cumulative sum of the corresponding target product results; the values ​​of the second to (K-1)th intermediate value register groups are equal to the values ​​of the previous intermediate value register groups plus the cumulative sum of the corresponding target product results; The value of the output value register group is equal to the cumulative sum of the value of the (K-1)th intermediate value register group and its corresponding target product result.

2. The interpolation filtering method according to claim 1, characterized in that: The calculating the product of each channel of the input data and the tap coefficient of the filter comprises: Obtain the input data x(i) of the i-th path and the tap coefficient h(N) of the filter, wherein i=0, 1, 2, ..., L-1, and N is the order of the filter, wherein N=0, 1, 2, ...; The product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated to obtain the product result res_i[j]=x(i)*h_rev(j), where h_rev(j)=h(Nj), (j=0,1,…,N).

3. The interpolation filtering method according to claim 2, characterized in that: The calculating the product of the input data x(i) and the tap coefficient h_rev(j) after the order is reversed comprises: The product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated using the DSP resources inside the filter's FPGA, or the product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated using a shift-and-add method.

4. An interpolation filtering device, characterized in that: Applied to filters, the device includes: A data acquisition unit, used to obtain the number of parallel input paths of the filter; obtain the tap coefficient of the filter; and obtain the difference multiple of the filter; A basic data calculation unit, used to calculate the number of parallel paths of output data of the filter based on the number of parallel paths of input and the difference multiple; and to calculate the number of input data required for each group of parallel multi-path output signals and the time period required to obtain the input data based on the number of parallel paths of output data, the difference multiple and the order of the filter; An output unit is used to calculate the product of each channel of the input data and the tap coefficient of the filter; and select a target product result from the product results for cumulative output; Wherein, when the basic data calculation unit calculates the number of parallel paths of output data of the filter based on the number of parallel paths of the input and the difference multiple, it is specifically used to: The number of parallel paths M of the output data of the filter is calculated based on the formula M=L*T, wherein L is the number of parallel paths of the input data, and T is the difference multiple; The number of input data required for each group of parallel multi-channel output signals and the time period required to obtain the input data are calculated based on the number of parallel output data paths, the difference multiple and the order of the filter, including: The number of input data R required for each group of parallel multi-channel output signals is calculated based on the formula R=ceil[(N+M) / T], wherein N is the order of the filter and ceil[] represents rounding up; The time period K required for inputting data is calculated based on the formula K=ceil[(N+M) / T*L]; The step of selecting a target product result from the product results, accumulating and outputting the result includes: Create (K-1) intermediate value register groups and 1 output value register group, the initial values ​​of the intermediate value register group and the output value register group are both 0, the intermediate value register group and the output value register group each include M registers, corresponding to the intermediate values ​​and output values ​​of the output data after M-path interpolation filtering, respectively, the intermediate value register group and the output value register group are denoted as part_e[f] and y[f], respectively, wherein e represents the e-th intermediate value register group, e∈[1, K-1], and e∈ a natural number; f represents the intermediate value and output value of the f-th output data, f∈[0, M-1], and f∈ a natural number; The value of the first intermediate value register group is equal to the cumulative sum of the corresponding target product results; the values ​​of the second to (K-1)th intermediate value register groups are equal to the values ​​of the previous intermediate value register groups plus the cumulative sum of the corresponding target product results; The value of the output value register group is equal to the cumulative sum of the value of the (K-1)th intermediate value register group and its corresponding target product result.

5. The interpolation filtering device according to claim 4, characterized in that: When the output unit calculates the product of each channel of the input data and the tap coefficient of the filter, it is specifically used to: Obtain the input data x(i) of the i-th path and the tap coefficient h(N) of the filter, wherein i=0, 1, 2, ..., L-1, and N is the order of the filter, wherein N=0, 1, 2, ...; The product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated to obtain the product result res_i[j]=x(i)*h_rev(j), where h_rev(j)=h(Nj), (j=0,1,…,N).

6. The interpolation filtering device according to claim 5, characterized in that: When the output unit calculates the product of the input data x(i) and the tap coefficient h_rev(j) after the order is reversed, it is specifically used to: The product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated using the DSP resources inside the filter's FPGA, or the product of the input data x(i) and the reversed tap coefficient h_rev(j) is calculated using a shift-and-add method.