A Fast Fourier Transform Acceleration Method Based on FPGA
By setting up the FFT decomposition module, the rotation factor storage module and the operation processing module in the FPGA, the FFT transformation is decomposed into 4 sub-FFT modules and processing data with a deep pipeline structure, the high time delay problem of the FFT IP core in high-speed systems is solved. Significantly improves system performance.
Patent Information
- Application Number
- CN202210080227.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-01-24
AI Technical Summary
The FFT IP cores provided by existing FPGAs have high time lag problems in high-speed systems, resulting in computing data coverage and affecting system performance.
By setting up the FFT decomposition module, the rotation factor storage module and the calculation processing module, the FFT transformation is decomposed into 4 sub-FFT modules, and 4 parallel data are processed in a deep pipeline structure to shorten the operation time lag.
It greatly shortens the time lag of FFT operations, improves system performance, and is suitable for high-speed communication systems and digital image processing modules.
Smart Images

Figure CN114579923B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of digital signal processing and relates to a fast Fourier transform acceleration method based on FPGA. Background Art
[0002] Fast Fourier Transform (FFT) is the most basic signal processing and analysis tool in digital signal processing. It can realize the transformation of signals from time domain to frequency domain and is widely used in communication and image processing. However, at this stage, with the continuous growth of users' demand for data, the high latency problem caused by the FFT IP core provided by FPGA can no longer meet the application requirements in high-speed systems. Taking high-speed communication systems as an example, in the IQ imbalance and channel estimation modules, whether it is time domain estimation and frequency domain equalization or frequency domain estimation and time domain equalization, the FFT IP core will be required for auxiliary calculations. When the high-speed system uses an iterative method to converge the estimated parameter values, the high latency problem of the FFT IP core will cause the calculated data to overlap, affecting the performance of the system.
[0003] Therefore, in view of the defects of the prior art, it is necessary to propose a fast Fourier transform acceleration method based on FPGA to solve the high time delay problem existing in the prior art. Summary of the invention
[0004] The present invention provides a fast Fourier transform acceleration method based on FPGA. By setting an FFT decomposition module, a rotation factor storage module and an operation processing module, the FFT change is decomposed into four sub-FFT modules for processing, and then the 4-way parallel data is processed according to four formulas in a deep pipeline structure, thereby greatly shortening the operation delay.
[0005] In order to solve the problems existing in the prior art, the technical solution of the present invention is as follows:
[0006] A fast Fourier transform acceleration method based on FPGA, wherein an FFT decomposition module, a rotation factor storage module and an arithmetic operation processing module are set in the FPGA, and the method comprises the following steps:
[0007] Step S1: The FFT decomposition module decomposes the input sequence of length N into 4 subsequences of length N / 4, and simultaneously performs N / 4-point FFT transformation;
[0008] Step S2: The rotation factor storage module outputs pre-stored rotation factor data by judging an external input signal for performing arithmetic operations;
[0009] Step S3: the arithmetic operation processing module processes the data output by the FFT decomposition module and the rotation factor storage module to obtain the N-point FFT transformation result of the original sequence;
[0010] Among them, the FFT decomposition module includes a sequence decomposition module, the FFT decomposition module includes 4 parallel N / 4 point sub-FFT modules, the N / 4 point sub-FFT module of the FFT decomposition module is an FFT IP core provided by FPGA, and the FFT IP core output mode of the FFT decomposition module is sequential output; the rotation factor storage module includes two control units, respectively denoted as ctr1 and ctr2; the rotation factor storage module includes three independent single-port Block RAMs, respectively used to store three different rotation factor data; the rotation factor storage module includes three independent single-port BRAMs, each with a depth of N / 4, respectively denoted as BRAM1, BRAM2 and BRAM3, and the corresponding rotation factor data stored therein are as follows:
[0011]
[0012]
[0013]
[0014] Wherein, step S1 further comprises:
[0015] Step S11: when the signal fft_valid == 1 is judged, the sequence x(n) with an input length of N, n = 0, 1, ..., N-1, is divided into four subsequences x(m), x(m+2), x(m+1) and x(m+3), m = 0, 1, ..., N / 4-1, each with a length of N / 4;
[0016] Step S12: transform the four subsequences x(m), x(m+2), x(m+1) and x(m+3) through four parallel N / 4-point FFT IP cores respectively to obtain four output sequences z1(m), z2(m), z3(m) and z4(m), m=0, 1, ..., N / 4-1; where z1(m) corresponds to the output of x(m), z2(m) corresponds to the output of x(m+2), z3(m) corresponds to the output of x(m+1), and z4(m) corresponds to the output of x(m+3);
[0017] Step S13: while outputting the sequences z1(m), z2(m), z3(m) and z4(m), a data valid signal data1_valid is synchronously output and transmitted to the rotation factor storage module, and a high level is effective.
[0018] Step S2 further comprises:
[0019] Step S21: storing the rotation factors shown in formula (1), formula (2) and formula (3) in binary form in the order of increasing k value into three independent storage units BRAM1, BRAM2 and BRAM3;
[0020] Step S22: when the control unit ctr1 determines that the signal data1_valid == 1, it generates a read enable signal rd1 and a read address counter addr1 of BRAM3, and sequentially obtains the rotation factor data of WN3 and transmits them to the operation processing module;
[0021] Step S23: when the control unit ctr2 determines that the signal data2_valid == 1, it generates the read enable signal rd2 and the read address counter addr2 of BRAM1 and BRAM2, and sequentially obtains the rotation factor data of WN1 and WN2 and transmits them to the operation processing module;
[0022] Step S3 further comprises:
[0023] Step S31: Delay the sequences z2(m) and z4(m) to wait for the rotation factor data of WN3; perform multiplication operations on the sequences z2(m) and z4(m) with the rotation factor data of WN3 in a pipeline structure to obtain a sequence z with a length of N / 4. 21 (m) and z 41 (m), m=0,1,...,N / 4-1;
[0024] Step S32: Delay the beat of sequences z1(m) and z3(m) to wait for z 21 (m) and z 41 (m); z1(m) and z 21 (m) performs addition operation to obtain a sequence Z1(m) of length N / 4, where m = 0, 1, ..., N / 4-1; z1(m) and z 21 (m) is subtracted, that is, z1(m) minus z 21 (m), and obtain a sequence Z2(m) of length N / 4, m = 0, 1, ..., N / 4-1; z3(m) and z 41 (m) performs addition operation to obtain a sequence Z3(m) of length N / 4, where m = 0, 1, ..., N / 4-1; z3(m) and z 41 (m) is subtracted, that is, z3(m) minus z 41 (m), and obtain a sequence Z4(m) of length N / 4, where m = 0, 1, ..., N / 4-1;
[0025] Step S33: obtaining Z3(m) and Z4(m) and synchronously outputting a data valid signal data2_valid to transmit to the rotation factor storage module, the high level is effective;
[0026] Step S34: Delay the sequences Z3(m) and Z4(m) to wait for the rotation factor data of WN1 and the rotation factor data of WN2; multiply the sequence Z3(m) and the rotation factor data of WN1 in sequence in a pipeline structure to obtain a sequence Z with a length of N / 4. 31 (m), m = 0, 1, ..., N / 4-1; the sequence Z4(m) is multiplied with the rotation factor data of WN2 in sequence using a pipeline structure to obtain a sequence Z with a length of N / 4 41 (m), m=0,1,...,N / 4-1;
[0027] Step S35: Delay the beat of sequences Z1(m) and Z2(m) to wait for Z 31 (m) and Z 41 (m); Sequences Z1(m) and Z 31 (m) performs addition operation to obtain a sequence y1(n) of length N / 4, n = 0, 1, ..., N / 4-1; the sequences Z2(m) and Z 41 (m) performs addition operation to obtain a sequence y2(n) of length N / 4, n = 0, 1, ..., N / 4-1; the sequences Z1(m) and Z 31 (m) is subtracted, that is, Z1(m) minus Z 31 (m), and obtain a sequence y3(n) of length N / 4, n = 0, 1, ..., N / 4-1; the sequence Z2(m) and Z 41 Subtract Z from Z2(m) 41 (m), and obtain a sequence y4(n) of length N / 4, n=0,1,...,N / 4-1;
[0028] Step S36: while outputting y1(m), y2(m), y3(m) and y4(m), a data valid signal dout_valid is synchronously output, and a high level is valid.
[0029] Compared with the prior art, the present invention has the following technical effects:
[0030] By setting up the FFT decomposition module, the rotation factor storage module and the operation processing module, the FFT change is decomposed into 4 sub-FFT modules for processing, and then the 4-way parallel data is processed according to four formulas with a deep pipeline structure, thereby greatly shortening the operation delay. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a schematic diagram of the overall framework of the fast Fourier transform divide-and-conquer method based on FPGA of the present invention;
[0032] Figure 2 This is a schematic diagram of the FFT decomposition module of the present invention;
[0033] Figure 3 This is a schematic diagram of a rotation factor storage module of the present invention;
[0034] Figure 4 This is a schematic diagram of the computing processing module of the present invention;
[0035] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0036] The specific implementation of the present invention will be described in detail below with reference to the accompanying drawings;
[0037] See also Figure 1 , the overall framework schematic diagram of the fast Fourier transform divide-and-conquer method based on FPGA of the present invention; setting FFT decomposition module, rotation factor storage module and operation processing module; see Figure 2 , a schematic diagram of the FFT decomposition module of the present invention; the FFT decomposition module includes a sequence decomposition module and four parallel N / 4-point sub-FFT modules, the N / 4-point sub-FFT modules of the FFT decomposition module are FFT IP cores provided by FPGA, and the output mode of the FFT IP core of the FFT decomposition module is sequential output; see Figure 3 , a schematic diagram of a rotation factor storage module of the present invention; the rotation factor storage module includes two control units, respectively denoted as ctr1 and ctr2; the rotation factor storage module includes three independent single-port Block RAMs, respectively used to store three different rotation factor data; the rotation factor storage module includes three independent single-port BRAMs, each with a depth of N / 4, respectively denoted as BRAM1, BRAM2, and BRAM3, and the corresponding rotation factor data stored therein are as follows:
[0038]
[0039]
[0040]
[0041] The specific implementation of the present invention comprises the following steps:
[0042] Step S1: The FFT decomposition module decomposes the input sequence of length N into 4 subsequences of length N / 4, and simultaneously performs N / 4-point FFT transformation;
[0043] Step S2: The rotation factor storage module outputs pre-stored rotation factor data by judging an external input signal for performing arithmetic operations;
[0044] Step S3: the arithmetic operation processing module processes the data output by the FFT decomposition module and the rotation factor storage module to obtain the N-point FFT transformation result of the original sequence;
[0045] See also Figure 2 , a schematic diagram of the FFT decomposition module of the present invention; step S1 further comprises:
[0046] Step S11: when the signal fft_valid == 1 is judged, the sequence x(n) with an input length of N, n = 0, 1, ..., N-1, is divided into four subsequences x(m), x(m+2), x(m+1) and x(m+3), m = 0, 1, ..., N / 4-1, each with a length of N / 4;
[0047] Step S12: transform the four subsequences x(m), x(m+2), x(m+1) and x(m+3) through four parallel N / 4-point FFT IP cores respectively to obtain four output sequences z1(m), z2(m), z3(m) and z4(m), m=0, 1, ..., N / 4-1; where z1(m) corresponds to the output of x(m), z2(m) corresponds to the output of x(m+2), z3(m) corresponds to the output of x(m+1), and z4(m) corresponds to the output of x(m+3);
[0048] Step S13: while outputting the sequences z1(m), z2(m), z3(m) and z4(m), a data valid signal data1_valid is synchronously output and transmitted to the rotation factor storage module, and a high level is effective.
[0049] See also Figure 3 , a schematic diagram of a rotation factor storage module of the present invention; step S2 further comprises:
[0050] Step S21: storing the rotation factors shown in formula (1), formula (2) and formula (3) in binary form in the order of increasing k value into three independent storage units BRAM1, BRAM2 and BRAM3;
[0051] Step S22: when the control unit ctr1 determines that the signal data1_valid == 1, it generates a read enable signal rd1 and a read address counter addr1 of BRAM3, and sequentially obtains the rotation factor data of WN3 and transmits them to the operation processing module;
[0052] Step S23: when the control unit ctr2 determines that the signal data2_valid == 1, it generates the read enable signal rd2 and the read address counter addr2 of BRAM1 and BRAM2, and sequentially obtains the rotation factor data of WN1 and WN2 and transmits them to the operation processing module;
[0053] See also Figure 4 , a schematic diagram of the operation processing module of the present invention, step S3 performs operation processing according to formula (4), formula (5), formula (6) and formula (7) to obtain the corresponding N-point fast Fourier transform results, wherein y1(m) corresponds to 1 to N / 4 bits of the N-point fast Fourier transform results, y2(m) corresponds to N / 4+1 to N / 2 bits of the N-point fast Fourier transform results, y3(m) corresponds to N / 2+1 to 3N / 4 bits of the N-point fast Fourier transform results, and y4(m) corresponds to 3N / 4+1 to N bits of the N-point fast Fourier transform results;
[0054]
[0055]
[0056]
[0057]
[0058] Wherein, step S3 further comprises:
[0059] Step S31: Delay the sequences z2(m) and z4(m) to wait for the rotation factor data of WN3; perform multiplication operations on the sequences z2(m) and z4(m) with the rotation factor data of WN3 in a pipeline structure to obtain a sequence z with a length of N / 4. 21 (m) and z 41 (m), m=0,1,...,N / 4-1;
[0060] Step S32: Delay the beat of sequences z1(m) and z3(m) to wait for z 21 (m) and z 41 (m); z1(m) and z 21 (m) performs addition operation to obtain a sequence Z1(m) of length N / 4, where m = 0, 1, ..., N / 4-1; z1(m) and z 21 (m) is subtracted, that is, z1(m) minus z 21 (m), and obtain a sequence Z2(m) of length N / 4, m = 0, 1, ..., N / 4-1; z3(m) and z 41(m) performs addition operation to obtain a sequence Z3(m) of length N / 4, where m = 0, 1, ..., N / 4-1; z3(m) and z 41 (m) is subtracted, that is, z3(m) minus z 41 (m), and obtain a sequence Z4(m) of length N / 4, where m = 0, 1, ..., N / 4-1;
[0061] Step S33: obtaining Z3(m) and Z4(m) and synchronously outputting a data valid signal data2_valid to transmit to the rotation factor storage module, the high level is effective;
[0062] Step S34: Delay the sequences Z3(m) and Z4(m) to wait for the rotation factor data of WN1 and the rotation factor data of WN2; multiply the sequence Z3(m) and the rotation factor data of WN1 in sequence in a pipeline structure to obtain a sequence Z with a length of N / 4. 31 (m), m = 0, 1, ..., N / 4-1; the sequence Z4(m) is multiplied with the rotation factor data of WN2 in sequence using a pipeline structure to obtain a sequence Z with a length of N / 4 41 (m), m=0,1,...,N / 4-1;
[0063] Step S35: Delay the beat of sequences Z1(m) and Z2(m) to wait for Z 31 (m) and Z 41 (m); Sequences Z1(m) and Z 31 (m) performs addition operation to obtain a sequence y1(n) of length N / 4, n = 0, 1, ..., N / 4-1; the sequences Z2(m) and Z 41 (m) performs addition operation to obtain a sequence y2(n) of length N / 4, n = 0, 1, ..., N / 4-1; the sequences Z1(m) and Z 31 (m) is subtracted, that is, Z1(m) minus Z 31 (m), and obtain a sequence y3(n) of length N / 4, n = 0, 1, ..., N / 4-1; the sequence Z2(m) and Z 41 Subtract Z from Z2(m) 41 (m), and obtain a sequence y4(n) of length N / 4, n=0,1,...,N / 4-1;
[0064] Step S36: output y1(m), y2(m), y3(m) and y4(m) and synchronously output a data valid signal dout_valid, which is valid at a high level;
[0065] The above are specific implementation steps explained by the inventor in combination with examples. The present invention is applicable to a digital baseband module and a digital image processing module of a communication system based on FPGA. It should be noted that those skilled in the art can improve and perfect the method of the present invention without departing from it, but it should be understood that the above examples do not limit the scope of protection of the present invention, and any improvement and perfection based on the present invention should fall within the scope of protection of the present invention.
Claims
1. A fast Fourier transform acceleration method based on FPGA, characterized in that: Setting up an FFT decomposition module, a rotation factor storage module, and an arithmetic operation processing module in an FPGA includes the following steps: Step S1: The FFT decomposition module decomposes the input sequence of length N into 4 subsequences of length N / 4, and simultaneously performs N / 4-point FFT transformation; Step S2: The rotation factor storage module outputs the pre-stored rotation factor data for arithmetic operation by judging the external input signal; Step S3: the arithmetic operation processing module processes the data output by the FFT decomposition module and the rotation factor storage module to obtain the N-point FFT transformation result of the original sequence; The FFT decomposition module includes a sequence decomposition module and four parallel N / 4-point sub-FFT modules, wherein the N / 4-point sub-FFT module is an FFT IP core provided by FPGA, and its output mode is sequential output; The rotation factor storage module includes two control units, respectively denoted as ctr1 and ctr2; and three independent single-port BRAMs, respectively used to store three different rotation factor data, each with a depth of N / 4, respectively denoted as BRAM1, BRAM2 and BRAM3, and the corresponding rotation factor data stored therein are as follows: Step S1 includes the following steps: Step S11: when the signal fft_valid == 1 is judged, the sequence x(n) with an input length of N, n = 0, 1, ..., N-1, is divided into four subsequences x(m), x(m+2), x(m+1) and x(m+3), m = 0, 1, ..., N / 4-1, each with a length of N / 4; Step S12: transform the four subsequences x(m), x(m+2), x(m+1) and x(m+3) through four parallel N / 4-point FFT IP cores respectively to obtain four output sequences z1(m), z2(m), z3(m) and z4(m), m=0, 1, ..., N / 4-1; where z1(m) corresponds to the output of x(m), z2(m) corresponds to the output of x(m+2), z3(m) corresponds to the output of x(m+1), and z4(m) corresponds to the output of x(m+3); Step S13: while outputting the sequences z1(m), z2(m), z3(m) and z4(m), a data valid signal data1_valid is synchronously output and transmitted to the rotation factor storage module.
2. The FPGA-based fast Fourier transform acceleration method according to claim 1, characterized in that: Step S2 further comprises the following steps: Step S21: storing the corresponding rotation factors in binary form in the order of increasing k value into three independent storage units BRAM1, BRAM2 and BRAM3; Step S22: when the control unit ctr1 determines that the signal data1_valid == 1, it generates a read enable signal rd1 and a read address counter addr1 of BRAM3, and sequentially obtains the rotation factor data of WN3 and transmits them to the operation processing module; Step S23: When the control unit ctr2 determines that the signal data2_valid == 1, it generates the read enable signal rd2 and the read address counter addr2 of BRAM1 and BRAM2, and sequentially obtains the rotation factor data of WN1 and WN2 and passes them to the operation processing module.
3. The FPGA-based fast Fourier transform acceleration method according to claim 1, characterized in that: Step S3 further comprises the following steps: Step S31: Delay the sequences z2(m) and z4(m) to wait for the rotation factor data of WN3; perform multiplication operations on the sequences z2(m) and z4(m) with the rotation factor data of WN3 in a pipeline structure to obtain a sequence z with a length of N / 4. 21 (m) and z 41 (m), m=0,1,...,N / 4-1; Step S32: Delay the beat of sequences z1(m) and z3(m) to wait for z 21 (m) and z 41 (m); z1(m) and z 21 (m) performs addition operation to obtain a sequence Z1(m) of length N / 4, where m = 0, 1, ..., N / 4-1; z1(m) and z 21 (m) is subtracted, that is, z1(m) minus z 21 (m), and obtain a sequence Z2(m) of length N / 4, m = 0, 1, ..., N / 4-1; z3(m) and z 41 (m) performs addition operation to obtain a sequence Z3(m) of length N / 4, where m = 0, 1, ..., N / 4-1; z3(m) and z 41 (m) is subtracted, that is, z3(m) minus z 41 (m), and obtain a sequence Z4(m) of length N / 4, where m = 0, 1, ..., N / 4-1; Step S33: obtaining Z3(m) and Z4(m) and synchronously outputting a data valid signal data2_valid to pass to the rotation factor storage module; Step S34: Delay the sequences Z3(m) and Z4(m) to wait for the rotation factor data of WN1 and the rotation factor data of WN2; multiply the sequence Z3(m) and the rotation factor data of WN1 in sequence in a pipeline structure to obtain a sequence Z with a length of N / 4. 31 (m), m = 0, 1, ..., N / 4-1; the sequence Z4(m) is multiplied with the rotation factor data of WN2 in sequence using a pipeline structure to obtain a sequence Z with a length of N / 4 41 (m), m=0,1,...,N / 4-1; Step S35: Delay the beat of sequences Z1(m) and Z2(m) to wait for Z 31 (m) and Z 41 (m); Sequences Z1(m) and Z 31 (m) performs addition operation to obtain a sequence y1(n) of length N / 4, n = 0, 1, ..., N / 4-1; the sequences Z2(m) and Z 41 (m) performs addition operation to obtain a sequence y2(n) of length N / 4, n = 0, 1, ..., N / 4-1; the sequences Z1(m) and Z 31 (m) is subtracted, that is, Z1(m) minus Z 31 (m), and obtain a sequence y3(n) of length N / 4, n = 0, 1, ..., N / 4-1; the sequence Z2(m) and Z 41 Subtract Z from Z2(m) 41 (m), and obtain a sequence y4(n) of length N / 4, n=0,1,...,N / 4-1; Step S36: outputting y1(m), y2(m), y3(m) and y4(m) while synchronously outputting the data valid signal dout_valid.
