[go: up one dir, main page]

CN101763338A - Mixed base FFT/IFFT realization device with changeable points and method thereof - Google Patents

Mixed base FFT/IFFT realization device with changeable points and method thereof Download PDF

Info

Publication number
CN101763338A
CN101763338A CN201010039602A CN201010039602A CN101763338A CN 101763338 A CN101763338 A CN 101763338A CN 201010039602 A CN201010039602 A CN 201010039602A CN 201010039602 A CN201010039602 A CN 201010039602A CN 101763338 A CN101763338 A CN 101763338A
Authority
CN
China
Prior art keywords
module
data
ifft
fft
storage module
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
CN201010039602A
Other languages
Chinese (zh)
Other versions
CN101763338B (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201010039602XA priority Critical patent/CN101763338B/en
Publication of CN101763338A publication Critical patent/CN101763338A/en
Application granted granted Critical
Publication of CN101763338B publication Critical patent/CN101763338B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

本发明公开了一种点数可变的混合基FFT/IFFT实现装置及其方法。本发明为FFT和IFFT两用系统,实现了点数可配;在变换过程中使用两块RAM,一块只存储输入数据,在每一次运算完成其第一级蝶形运算时,该RAM可以用来接受下次运算的数据,在完成连续多次运算时,节省了时间;另外使用了基4和基2相结合的方法实现2的L次幂(L为大于或等于3的正整数)点数的FFT和IFFT运算,在蝶形运算时,使用块浮点运算,解决了蝶形运算过程中乘法和加法造成的数据位宽扩大,节省了存储空间,同时对该结果做原址存储操作,实现近似的级间流水。该方法和装置具有控制简单,实现高效,配置灵活,可扩展性良好等特点。

Figure 201010039602

The invention discloses a mixed-radix FFT/IFFT realization device and method thereof with variable points. The present invention is a dual-purpose system of FFT and IFFT, which realizes that the number of points can be allocated; two blocks of RAM are used in the transformation process, one of which only stores the input data, and when each operation completes its first-level butterfly operation, the RAM can be used Accept the data of the next operation, and save time when completing multiple consecutive operations; in addition, the method of combining base 4 and base 2 is used to realize the number of points of the L power of 2 (L is a positive integer greater than or equal to 3) FFT and IFFT operations, in the butterfly operation, use block floating-point operations, which solves the data bit width expansion caused by multiplication and addition in the butterfly operation process, saves storage space, and at the same time performs original address storage operations on the results to achieve approximation of interstage flow. The method and device have the characteristics of simple control, high efficiency, flexible configuration, good scalability and the like.

Figure 201010039602

Description

一种点数可变的混合基FFT/IFFT实现装置及其方法 A mixed-radix FFT/IFFT implementation device and method with variable number of points

技术领域technical field

本发明涉及一种点数可变的混合基FFT/IFFT实现装置及其方法。The invention relates to a device and a method for implementing a mixed-radix FFT/IFFT with variable points.

背景技术Background technique

离散傅里叶变换(DFT)是数字信号处理领域最为基本也是最为常用的运算,我们可以利用DFT对信号做数字谱分析或者实现数字滤波,此外,在各种数字系统的设计和实现中也都会用到DFT。然而,在DFT运算提出初期,并没有一种很优的算法随之提出,因此,完成N点数据DFT的计算复杂度为O(N2);直到1965年,Cooley和Tukey在《Mathematics of Computation》上发表了“Analgorithm for the machine computation of complex Fourier series”一文,标志着快速傅里叶变换(FFT)算法的正式诞生。Discrete Fourier transform (DFT) is the most basic and commonly used operation in the field of digital signal processing. We can use DFT to perform digital spectrum analysis or digital filtering on signals. In addition, it will also be used in the design and implementation of various digital systems. Use DFT. However, at the beginning of the DFT operation, there was no good algorithm proposed. Therefore, the computational complexity of completing the DFT of N-point data was O(N 2 ); until 1965, Cooley and Tukey published in "Mathematics of Computation "The article "Analgorithm for the machine computation of complex Fourier series" was published, marking the official birth of the Fast Fourier Transform (FFT) algorithm.

FFT算法的提出被视为数字信号处理发展史上一个重要的里程碑,它将DFT的计算复杂度由O(N2)降到了O(Nlog2N),解决了数字信号处理实现和应用的瓶颈,具有很强的理论和工程意义。在目前数字信号处理的各个应用领域中,FFT算法仍然起着举足轻重的作用:例如,FFT算法作为时域和频域转换的基本算法,是我们进行数字谱分析的必备前提,在数字通信、语音信号分析、图像处理、雷达以及生物医学工程等方面都有着极其广泛的应用;又如,在数字语音编码、数字滤波、射电干涉阵等情况下,都需要使用专用的FFT设备来处理这种实时快速的运算;特别是,近年来由于现场可编程门阵列(FPGA)的飞速发展,使得FPGA非常适合用来实现FFT算法,如FPGA厂商Altera和Xlinx都开发了相应的FFT IP核,且价格非常昂贵,无法广泛应用,因此在实际工程应用中,开发一个基于FGPA的FFT实现方法显得尤为重要。The introduction of the FFT algorithm is regarded as an important milestone in the history of digital signal processing. It reduces the computational complexity of DFT from O(N 2 ) to O(Nlog 2 N), which solves the bottleneck in the implementation and application of digital signal processing. It has strong theoretical and engineering significance. In various application fields of digital signal processing at present, FFT algorithm still plays a pivotal role: for example, FFT algorithm, as the basic algorithm of time domain and frequency domain conversion, is a necessary prerequisite for us to carry out digital spectrum analysis. In digital communication, Speech signal analysis, image processing, radar, and biomedical engineering have extremely wide applications; for example, in the case of digital speech coding, digital filtering, radio interference array, etc., it is necessary to use special FFT equipment to deal with this Real-time and fast calculation; especially, due to the rapid development of field programmable gate array (FPGA) in recent years, FPGA is very suitable for implementing FFT algorithm. For example, FPGA manufacturers Altera and Xlinx have developed corresponding FFT IP cores, and the price It is very expensive and cannot be widely used, so in practical engineering applications, it is particularly important to develop an FGPA-based FFT implementation method.

目前,已有的各种各样的DFT计算快速算法大致可以分为两类:一类是将DFT转变为卷积,利用计算卷积的方法计算,其代表是Winograd算法和素因子算法;另一类是递归型算法,是将一维DFT转化为容易计算的二维或者多维DFT,且这个过程可以重复,具有代表性的算法有Cooley-Tukey算法、Rader-Brenner算法和分裂基算法。上述两类算法相比较而言,前者在运算量上占优,乘法器的使用比后者少,但是控制逻辑较复杂,控制单元实现起来相对较为麻烦。At present, the existing various fast algorithms for DFT calculation can be roughly divided into two categories: one is to convert DFT into convolution, and use the method of calculating convolution to calculate, which is represented by Winograd algorithm and prime factor algorithm; One is the recursive algorithm, which converts one-dimensional DFT into two-dimensional or multi-dimensional DFT that is easy to calculate, and this process can be repeated. Representative algorithms include Cooley-Tukey algorithm, Rader-Brenner algorithm and split basis algorithm. Compared with the above two types of algorithms, the former has an advantage in the amount of calculation, and the use of multipliers is less than that of the latter, but the control logic is more complicated, and the control unit is relatively troublesome to implement.

发明内容Contents of the invention

本发明的目的是克服现有技术的不足,提供一种点数可变的混合基FFT/IFFT实现装置及其方法。The purpose of the present invention is to overcome the deficiencies of the prior art, and provide a mixed-radix FFT/IFFT implementation device and method thereof with variable points.

点数可变的混合基FFT/IFFT实现装置包括模块:输入数据变换模块、存储模块A、数据选择器、蝶形运算模块、溢出检测模块、存储模块B、移位模块、输出数据变换模块以及控制模块,输入数据变换模块与存储模块A、数据选择器、蝶形运算模块、溢出检测模块、存储模块B、移位模块依次连接,存储模块B与输出数据变换模块相连,移位模块与数据选择器相连;在控制模块控制下,将串行输入数据变换后存储到存储模块A,然后控制模块控制存储模块A中所有数据完成第一级蝶形运算,结果完成溢出检测,同时也存入存储模块B;当存储模块A中所有数据均完成了第一级蝶形运算后,控制模块向外给出存储模块A空闲可用的标志信号,预示着下一次运算数据可以输入,同时控制模块控制移位模块、存储模块B、蝶形运算模块以及溢出检测模块完成接下来的所有蝶形运算;当所有蝶形运算全部完成之后,控制模块控制存储模块B、输出数据变换模块,将存储模块B中的数据串行读出经过移位、实部虚部变换后输出最终的块浮点运算结果,当存储模块B中数据全部输出后,输出数据变换模块向控制模块给出存储模块B空闲可用标志信号,新一次FFT/IFFT运算开始进行。The mixed-radix FFT/IFFT implementation device with variable points includes modules: input data transformation module, storage module A, data selector, butterfly operation module, overflow detection module, storage module B, shift module, output data transformation module and control module, the input data conversion module is connected to the storage module A, data selector, butterfly operation module, overflow detection module, storage module B, and shift module in sequence, the storage module B is connected to the output data conversion module, and the shift module is connected to the data selection module Under the control of the control module, the serial input data is converted and stored in the storage module A, and then the control module controls all the data in the storage module A to complete the first-level butterfly operation, and the result is overflow detection and is also stored in the storage Module B; when all the data in the storage module A have completed the first-level butterfly operation, the control module sends out a sign signal that the storage module A is free and available, indicating that the next calculation data can be input, and at the same time the control module controls the shifting The bit module, the storage module B, the butterfly operation module and the overflow detection module complete all subsequent butterfly operations; when all the butterfly operations are completed, the control module controls the storage module B and the output data transformation module, and converts the storage module B to After shifting and transforming the real and imaginary parts, the final block floating-point calculation result is output after serial reading of the data. When all the data in the storage module B is output, the output data conversion module gives the control module the free and available flag of the storage module B. signal, a new FFT/IFFT operation starts.

所述的蝶形运算模块包括相连接的旋转因子存储模块、乘法器模块和加法器模块。The butterfly operation module includes a connected twiddle factor storage module, a multiplier module and an adder module.

点数可变的混合基FFT/IFFT实现方法包括如下步骤:The mixed-radix FFT/IFFT implementation method with variable points comprises the following steps:

1)根据本次运算为FFT或者IFFT,在控制模块的控制下,将串行输入数据处理后按照分块倒叙方式存入存储模块A;1) According to whether the operation is FFT or IFFT, under the control of the control module, the serial input data is processed and stored in the storage module A in a block-by-block reverse order;

2)处理后串行输入数据全部写入存储模块A后,控制模块控制存储模块A、蝶形运算模块、和溢出检测判断模块,从存储模块A中读取四个数据完成一次基-4蝶形运算;对蝶形运算结果数据做溢出检测判断后,按原址存储到存储模块B中,当存储模块A中的所有数据均完成第一级蝶形运算,控制模块向外给出信号,下一次FFT或者IFFT运算的数据流进入存储模块A;2) After the processed serial input data are all written into the storage module A, the control module controls the storage module A, the butterfly operation module, and the overflow detection and judgment module, and reads four data from the storage module A to complete a base-4 butterfly Shape operation; after performing overflow detection and judgment on the butterfly operation result data, it is stored in the storage module B according to the original address. When all the data in the storage module A have completed the first-level butterfly operation, the control module sends out a signal, and the The data stream of an FFT or IFFT operation enters the storage module A;

3)将FFT或者IFFT运算的点数记为N,且N=2L,L为大于或等于3的正整数:若L为偶数,则蝶形运算级数为L/2;若L为奇数,则蝶形运算级数为(L+1)/2,在控制模块的控制下,L为偶数情况下的第二级到第L/2级或者L为奇数情况下的第二级到第(L-1)/2级的每一次蝶形运算均从存储模块B中读取四个数据,经过移位模块移位之后完成一次基-4蝶形运算,结果经过溢出检测判断后按原址存入存储模块B;当L为奇数时,第(L+1)/2级蝶形运算按照每次从存储模块B中读取两个数据,在控制模块下进行基-2蝶形运算,结果经过溢出检测判断后按原址存入存储模块B中;3) Record the points of FFT or IFFT operation as N, and N=2 L , L is a positive integer greater than or equal to 3: if L is an even number, the number of butterfly operation stages is L/2; if L is an odd number, Then the number of stages of the butterfly operation is (L+1)/2, under the control of the control module, L is the second stage to the L/2 stage in the case of an even number or the second stage to the ( Each butterfly operation of level L-1)/2 reads four data from storage module B, completes a radix-4 butterfly operation after being shifted by the shift module, and stores the result at the original address after being judged by overflow detection into the storage module B; when L is an odd number, the (L+1)/2-level butterfly operation reads two data from the storage module B each time, and performs the base-2 butterfly operation under the control module, and the result Store in storage module B according to the original address after overflow detection and judgment;

4)在所有蝶形运算完成之后,跟据本次运算为FFT或者IFFT,将存储模块B中的数据做相应处理后串行输出,得到输入数据的FFT或者IFFT块浮点运算结果,将该结果与最后输出的块浮点指数组合为实际FFT或者IFFT结果。4) After all the butterfly operations are completed, according to this operation as FFT or IFFT, the data in the storage module B is processed accordingly and then serially output to obtain the FFT or IFFT block floating-point operation results of the input data. The result is combined with the final output block floating-point exponent into the actual FFT or IFFT result.

所述的根据本次运算为FFT或者IFFT,在控制模块的控制下,将串行输入数据处理后按照分块倒叙方式存入存储模块A的步骤包括:Described according to this calculation is FFT or IFFT, under the control of the control module, the steps of storing the serial input data into the storage module A according to the block flashback mode after processing include:

1)FFT/IFFT变换的输入数据为复数,点数为N,N=2L,L为大于或等于31) The input data of FFT/IFFT transformation is a complex number, the number of points is N, N=2 L , and L is greater than or equal to 3

的正整数,若输入数据要求进行FFT运算,则输入复数数据不需做处理;若输入数据要求进行IFFT运算,则输入复数数据实部不变,虚部取反;If the input data requires FFT operation, the input complex data does not need to be processed; if the input data requires IFFT operation, the real part of the input complex data remains unchanged, and the imaginary part is reversed;

2)存储模块A包括四个大小相同的子存储模块,分别为A1、A2、A3、A4,每个子存储模块的大小为2×b×N/4比特,b为输入复数的实部或者虚部的位宽比特数,串行输入的N点处理后数据为x(n),其中n=0,1,2,......,N-1,将x(0)~x(N/4-1)、x(N/4)~x(2N/4-1)、x(2N/4)~x(3N/4-1)和x(3N/4)~x(N-1)分别按照倒叙存入A1、A2、A3、A4中;2) Storage module A includes four sub-storage modules of the same size, namely A1, A2, A3, and A4. The size of each sub-storage module is 2×b×N/4 bits, and b is the real or imaginary part of the input complex number The bit width bit number of the part, the processed data of N points serially input is x(n), wherein n=0,1,2,...,N-1, x(0)~x( N/4-1), x(N/4)~x(2N/4-1), x(2N/4)~x(3N/4-1) and x(3N/4)~x(N- 1) Store them in A1, A2, A3, and A4 in reverse order;

3)当输入数据点数达到N时,控制模块给出FFT/IFFT运算启动信号。3) When the number of input data points reaches N, the control module sends an FFT/IFFT operation start signal.

所述的处理后串行输入数据全部写入存储模块A后,控制模块控制存储模块A、蝶形运算模块和溢出检测判断模块,从存储模块A中读取四个数据完成一次基-4蝶形运算;对蝶形运算结果数据做溢出检测判断后,按原址存储到存储模块B中,当存储模块A中的所有数据均完成第一级蝶形运算,控制模块向外给出信号,下一次FFT或者IFFT运算的数据流可以进入存储模块A的步骤包括:After the processed serial input data are all written into the storage module A, the control module controls the storage module A, the butterfly operation module and the overflow detection and judgment module, and reads four data from the storage module A to complete a base-4 butterfly Shape operation; after performing overflow detection and judgment on the butterfly operation result data, it is stored in the storage module B according to the original address. When all the data in the storage module A have completed the first-level butterfly operation, the control module sends out a signal, and the The steps that the data stream of an FFT or IFFT operation can enter the storage module A include:

1)从子存储模块A1、A2、A3、A4中分别读出一个数据,经过三次复数乘法和八次复数加法,完成一次基-4蝶形运算;1) Read a piece of data from the sub-storage modules A1, A2, A3, and A4 respectively, and complete a radix-4 butterfly operation through three complex multiplications and eight complex additions;

2)对每次蝶形运算的结果做溢出检测判断,记下该运算结果中最大值的溢出比特数;2) perform overflow detection and judgment on the result of each butterfly operation, and write down the overflow bit number of the maximum value in the operation result;

3)存储模块B也由四个子存储模块组成,分别为子存储模块B1、B2、B3、B4,每次蝶形运算结束将四个数据写入子存储模块B1、B2、B3、B4,写地址等于子存储模块A1、A2、A3、A4的读地址;3) The storage module B is also composed of four sub-storage modules, which are respectively sub-storage modules B1, B2, B3, and B4. After each butterfly operation, four data are written into the sub-storage modules B1, B2, B3, and B4. The address is equal to the read address of the sub-storage modules A1, A2, A3, A4;

4)重复上述三个步骤,直至存储模块A中所有数据完成蝶形运算,此时最大的溢出比特数即为该级蝶形运算结果最终的溢出比特数;4) Repeat the above three steps until all the data in the storage module A completes the butterfly operation, at this time the maximum overflow bit number is the final overflow bit number of the butterfly operation result of this level;

5)当存储模块A中所有数据完成第一级蝶形运算后,控制模块向外给出标志信号,表明下一次FFT/IFFT的数据流串行进入存储模块A等待。5) After all the data in the storage module A complete the first-stage butterfly operation, the control module sends a flag signal to the outside, indicating that the next FFT/IFFT data stream enters the storage module A in series and waits.

所述的将FFT或者IFFT运算的点数记为N,且N=2L,L为大于或等于3的正整数:若L为偶数,则蝶形运算级数为L/2;若L为奇数,则蝶形运算级数为(L+1)/2。在控制模块的控制下,L为偶数情况下的第二级到第L/2级或者L为奇数情况下的第二级到第(L-1)/2级的每一次蝶形运算均从存储模块B中读取四个数据,经过移位模块移位之后完成一次基-4蝶形运算,结果经过溢出检测判断后按原址存入存储模块B;当L为奇数时,第(L+1)/2级蝶形运算按照每次从存储模块B中读取两个数据,在控制模块下进行基-2蝶形运算,结果经过溢出检测判断后按原址存入存储模块B中的步骤包括:The number of points in the FFT or IFFT operation is recorded as N, and N=2 L , L is a positive integer greater than or equal to 3: if L is an even number, the number of butterfly operation stages is L/2; if L is an odd number , then the butterfly operation series is (L+1)/2. Under the control of the control module, each butterfly operation from the second stage to the L/2th stage when L is an even number or from the second stage to the (L-1)/2th stage when L is an odd number is from Four data are read in the storage module B, and a base-4 butterfly operation is completed after being shifted by the shift module, and the result is stored in the storage module B according to the original address after overflow detection and judgment; when L is an odd number, 1)/2-level butterfly operation reads two data from storage module B each time, performs radix-2 butterfly operation under the control module, and stores the result in storage module B according to the original address after overflow detection and judgment include:

1)L为偶数情况下的第二级到第L/2级或者L为奇数情况下的第二级到第(L-1)/2级蝶形运算,在控制模块的控制下,每次分别从子存储模块B1、B2、B3、B4中各读取一个数据,数据移位模块按照前一级蝶形运算后溢出检测判断结果进行移位,移位结果完成一次基-4蝶形运算,结果经过溢出检测判断同时按照原址写入子存储模块B1、B2、B3、B4;1) The butterfly operation from the second stage to the L/2 stage when L is an even number or from the second stage to the (L-1)/2 stage when L is an odd number, under the control of the control module, every time Read one piece of data from each of the sub-storage modules B1, B2, B3, and B4, and the data shift module performs shifting according to the overflow detection judgment result after the previous butterfly operation, and the shift result completes a radix-4 butterfly operation , the result is written into the sub-storage modules B1, B2, B3, and B4 according to the original address after overflow detection and judgment;

2)当L为奇数时,第(L+1)/2级蝶形运算为基-2蝶形运算,在控制模块的控制下,首先从子存储模块B1和B3中分别读出一个数据,移位之后完成一次基-2蝶形运算,结果经溢出检测判断后按原址存入子存储模块B1和B3,如此循环直至子存储模块B 1、B3中所有数据均完成蝶形运算;之后,将子存储模块B2和B4组合,完成与子存储模块B1和B3相同的操作;2) When L is an odd number, the (L+1)/2-th stage butterfly operation is a radix-2 butterfly operation. Under the control of the control module, first read out a piece of data from the sub-storage modules B1 and B3 respectively, After the shift, a radix-2 butterfly operation is completed, and the result is stored in the sub-storage modules B1 and B3 according to the original address after being judged by overflow detection, and so on until all the data in the sub-storage modules B1 and B3 complete the butterfly operation; after that, Combining sub-storage modules B2 and B4 to complete the same operations as sub-storage modules B1 and B3;

3)此时,我们就顺利完成了N点数据FFT/IFFT运算的所有蝶形运算,结果存储在子存储模块B 1、B2、B3、B4中。3) At this point, we have successfully completed all the butterfly operations of the N-point data FFT/IFFT operations, and the results are stored in the sub-storage modules B1, B2, B3, and B4.

所述的在所有蝶形运算完成之后,跟据本次运算为FFT或者IFFT,将存储模块B中的数据做相应处理后串行输出,得到输入数据的FFT或者IFFT块浮点运算结果,将该结果与最后输出的块浮点指数组合为实际FFT或者IFFT结果的步骤包括:After all the butterfly operations described above are completed, according to this operation being FFT or IFFT, the data in the storage module B is processed and then serially output to obtain the FFT or IFFT block floating-point operation results of the input data, and the The steps of combining the result with the final output block floating-point index into the actual FFT or IFFT result include:

1)在控制模块控制下,将数据从子存储模块B1、B2、B3、B4中按照一定的顺序串行输出,并根据本次运算为FFT或者IFFT作如下处理:若为FFT,则实部和虚部均不变;若为IFFT,则实部不变,虚部取反;1) Under the control of the control module, serially output the data from the sub-storage modules B1, B2, B3, and B4 in a certain order, and perform the following processing according to whether this operation is FFT or IFFT: if it is FFT, the real part and the imaginary part remain unchanged; if it is IFFT, the real part remains unchanged and the imaginary part is reversed;

2)完成实部和虚部转换后,按照最后一级蝶形运算的溢出检测判断结果,将串行输出数据做相应移位后即可输出,输出的结果即为输入N点复数数据的FFT/IFFT块浮点运算结果,当N点数据全部输出后,向控制模块给出标志信号,表明存储模块B可用,可以进行新一次的FFT/IFFT运算;2) After the conversion of the real part and the imaginary part is completed, according to the overflow detection judgment result of the last butterfly operation, the serial output data can be output after being shifted accordingly, and the output result is the FFT of the input N-point complex data /IFFT block floating-point calculation result, when all the N-point data is output, a flag signal is given to the control module, indicating that the storage module B is available, and a new FFT/IFFT operation can be performed;

3)实际的FFT/IFFT结果为:X(k)=X′(k)*2-exp(k=0,1,…N-1,N为输入数据点数),其中X(k)为实际FFT/IFFT结果,X′(k)为FFT/IFFT块浮点运算结果,exp为块浮点指数。3) The actual FFT/IFFT result is: X(k)=X′(k)*2 -exp (k=0, 1,...N-1, N is the number of input data points), where X(k) is the actual FFT/IFFT result, X'(k) is the FFT/IFFT block floating-point operation result, and exp is the block floating-point exponent.

所述的实际的FFT/IFFT结果为:X(k)=X′(k)*2-exp,k=0,1,...,N-1,N为输入数据点数,其中X(k)为实际FFT/IFFT结果,X′(k)为FFT/IFFT块浮点运算结果,exp为块浮点指数的步骤包括:The described actual FFT/IFFT result is: X(k)=X'(k)*2 -exp , k=0,1,...,N-1, N is the number of input data points, where X(k ) is the actual FFT/IFFT result, X'(k) is the FFT/IFFT block floating point operation result, and exp is the block floating point index. The steps include:

1)当运算类型为FFT时,exp初值为0,当运算类型为IFFT时,exp初值为log2N;1) When the operation type is FFT, the initial value of exp is 0; when the operation type is IFFT, the initial value of exp is log 2 N;

2)每一级蝶形运算之后,exp等于在该级蝶形运算开始之前的值减去本级蝶形运算的溢出比特数,当所有蝶形运算完成之后,所得到的exp即为最终的块浮点指数;2) After each level of butterfly operation, exp is equal to the value before the start of butterfly operation of this level minus the number of overflow bits of butterfly operation of this level. After all butterfly operations are completed, the obtained exp is the final block float exponent;

3)通过最后的块浮点结果X′(k)和块浮点指数exp即可得到实际的FFT/IFFT结果X(k),X(k)=X′(k)*2-exp,k=0,1,...,N-1,N为输入数据点数。3) The actual FFT/IFFT result X(k) can be obtained through the final block floating point result X'(k) and the block floating point exponent exp, X(k)=X'(k)*2 -exp ,k =0, 1, ..., N-1, N is the number of input data points.

本发明为FFT和IFFT两用系统,将欲完成变换数据的点数送给控制器,可以实现点数可配;在变换过程中使用两块存储RAM,其中一块用来存储输入数据,这样在每一次FFT/IFFT运算完成其第一级蝶形运算时,该RAM可以用来接受下次运算的数据,在实现连续多次FFT/IFFT运算时,节省了时间;另外使用了基-4和基-2相结合的方法实现任意2的L次幂(L为大于或等于3的正整数)点数的FFT和IFFT运算,在蝶形运算时,使用块浮点运算,即对蝶形运算的结果做溢出检测判断处理,解决了蝶形运算过程中乘法和加法造成的数据位宽的扩大,节省了存储空间,同时对该结果做原址存储操作,实现近似的蝶形运算级间流水。The present invention is a dual-purpose system of FFT and IFFT, which sends the points to be transformed to the controller, so that the points can be allocated; two pieces of storage RAM are used in the transformation process, one of which is used to store the input data, so that each time When the FFT/IFFT operation completes its first-stage butterfly operation, the RAM can be used to accept the data of the next operation, which saves time when realizing multiple consecutive FFT/IFFT operations; in addition, base-4 and base- The method of combining 2 realizes the FFT and IFFT operation of any number of L powers of 2 (L is a positive integer greater than or equal to 3). In the butterfly operation, the block floating point operation is used, that is, the result of the butterfly operation is performed The overflow detection and judgment processing solves the expansion of the data bit width caused by multiplication and addition in the butterfly operation process, saves storage space, and at the same time performs the in-site storage operation on the result to realize the approximate butterfly operation inter-stage pipeline.

附图说明Description of drawings

图1是本发明的全部模块以及连接框图;Fig. 1 is all modules of the present invention and connection block diagram;

图2是本发明中蝶形运算模块的电路框图;Fig. 2 is the circuit block diagram of butterfly computing module among the present invention;

图3是本发明中块浮点机制的比特数变化图;Fig. 3 is the change diagram of the number of bits of the block floating-point mechanism in the present invention;

图4是本发明中块浮点操作流程图。Fig. 4 is a flow chart of block floating point operation in the present invention.

具体实施方式Detailed ways

如图1所示,点数可变的混合基FFT/IFFT实现装置包括模块:输入数据变换模块、存储模块A、数据选择器、蝶形运算模块、溢出检测模块、存储模块B、移位模块、输出数据变换模块以及控制模块,输入数据变换模块与存储模块A、数据选择器、蝶形运算模块、溢出检测模块、存储模块B、移位模块依次连接,存储模块B与输出数据变换模块相连,移位模块与数据选择器相连;在控制模块控制下,将串行输入数据变换后存储到存储模块A,然后控制模块控制存储模块A中所有数据完成第一级蝶形运算,结果完成溢出检测,同时也存入存储模块B;当存储模块A中所有数据均完成了第一级蝶形运算后,控制模块向外给出存储模块A空闲可用的标志信号,预示着下一次运算数据可以输入,同时控制模块控制移位模块、存储模块B、蝶形运算模块以及溢出检测模块完成接下来的所有蝶形运算;当所有蝶形运算全部完成之后,控制模块控制存储模块B、输出数据变换模块,将存储模块B中的数据串行读出经过移位、实部虚部变换后输出最终的块浮点运算结果,当存储模块B中数据全部输出后,输出数据变换模块向控制模块给出存储模块B空闲可用标志信号,新一次FFT/IFFT运算开始进行。As shown in Figure 1, the variable-point mixed-radix FFT/IFFT implementation device includes modules: input data conversion module, storage module A, data selector, butterfly operation module, overflow detection module, storage module B, shift module, The output data transformation module and the control module, the input data transformation module is connected with the storage module A, the data selector, the butterfly operation module, the overflow detection module, the storage module B, and the shift module in sequence, and the storage module B is connected with the output data transformation module, The shift module is connected to the data selector; under the control of the control module, the serial input data is converted and stored in the storage module A, and then the control module controls all the data in the storage module A to complete the first-level butterfly operation, and the overflow detection is completed as a result , and also stored in the storage module B; when all the data in the storage module A have completed the first-level butterfly operation, the control module sends out a sign signal that the storage module A is free and available, indicating that the next calculation data can be input , while the control module controls the shift module, the storage module B, the butterfly operation module and the overflow detection module to complete all subsequent butterfly operations; when all the butterfly operations are completed, the control module controls the storage module B, the output data conversion module , read the data in the storage module B serially and output the final block floating-point operation result after shifting and transforming the real part and the imaginary part. When all the data in the storage module B is output, the output data conversion module gives the control module The storage module B is idle and available flag signal, and a new FFT/IFFT operation starts.

如图2所示,蝶形运算模块包括相连接的旋转因子存储模块、乘法器模块和加法器模块。As shown in Figure 2, the butterfly operation module includes a connected twiddle factor storage module, a multiplier module and an adder module.

点数可变的混合基FFT/IFFT实现方法包括如下步骤:The mixed-radix FFT/IFFT implementation method with variable points comprises the following steps:

1)根据本次运算为FFT或者IFFT,在控制模块的控制下,将串行输入数据处理后按照分块倒叙方式存入存储模块A;1) According to whether the operation is FFT or IFFT, under the control of the control module, the serial input data is processed and stored in the storage module A in a block-by-block reverse order;

2)处理后串行输入数据全部写入存储模块A后,控制模块控制存储模块A、蝶形运算模块、和溢出检测判断模块,从存储模块A中读取四个数据完成一次基-4蝶形运算;对蝶形运算结果数据做溢出检测判断后,按原址存储到存储模块B中,当存储模块A中的所有数据均完成第一级蝶形运算,控制模块向外给出信号,下一次FFT或者IFFT运算的数据流进入存储模块A;2) After the processed serial input data are all written into the storage module A, the control module controls the storage module A, the butterfly operation module, and the overflow detection and judgment module, and reads four data from the storage module A to complete a base-4 butterfly Shape operation; after performing overflow detection and judgment on the butterfly operation result data, it is stored in the storage module B according to the original address. When all the data in the storage module A have completed the first-level butterfly operation, the control module sends out a signal, and the The data stream of an FFT or IFFT operation enters the storage module A;

3)将FFT或者IFFT运算的点数记为N,且N=2L,L为大于或等于3的正整数:若L为偶数,则蝶形运算级数为L/2;若L为奇数,则蝶形运算级数为(L+1)/2,在控制模块的控制下,L为偶数情况下的第二级到第L/2级或者L为奇数情况下的第二级到第(L-1)/2级的每一次蝶形运算均从存储模块B中读取四个数据,经过移位模块移位之后完成一次基-4蝶形运算,结果经过溢出检测判断后按原址存入存储模块B;当L为奇数时,第(L+1)/2级蝶形运算按照每次从存储模块B中读取两个数据,在控制模块下进行基-2蝶形运算,结果经过溢出检测判断后按原址存入存储模块B中;3) Record the points of FFT or IFFT operation as N, and N=2 L , L is a positive integer greater than or equal to 3: if L is an even number, the number of butterfly operation stages is L/2; if L is an odd number, Then the number of stages of the butterfly operation is (L+1)/2, under the control of the control module, L is the second stage to the L/2 stage in the case of an even number or the second stage to the ( Each butterfly operation of level L-1)/2 reads four data from storage module B, completes a radix-4 butterfly operation after being shifted by the shift module, and stores the result at the original address after being judged by overflow detection into the storage module B; when L is an odd number, the (L+1)/2-level butterfly operation reads two data from the storage module B each time, and performs the base-2 butterfly operation under the control module, and the result Store in storage module B according to the original address after overflow detection and judgment;

4)在所有蝶形运算完成之后,跟据本次运算为FFT或者IFFT,将存储模块B中的数据做相应处理后串行输出,得到输入数据的FFT或者IFFT块浮点运算结果,将该结果与最后输出的块浮点指数组合为实际FFT或者IFFT结果。4) After all the butterfly operations are completed, according to this operation as FFT or IFFT, the data in the storage module B is processed accordingly and then serially output to obtain the FFT or IFFT block floating-point operation results of the input data. The result is combined with the final output block floating-point exponent into the actual FFT or IFFT result.

所述的根据本次运算为FFT或者IFFT,在控制模块的控制下,将串行输入数据处理后按照分块倒叙方式存入存储模块A的步骤包括;The described operation is FFT or IFFT according to this time, under the control of the control module, the steps of storing the serial input data into the storage module A according to the block flashback mode include;

1)FFT/IFFT变换的输入数据为复数,点数为N,N=2L,L为大于或等于3的正整数,若输入数据要求进行FFT运算,则输入复数数据不需做处理;若输入数据要求进行IFFT运算,则输入复数数据实部不变,虚部取反;1) The input data of FFT/IFFT transformation is a complex number, the number of points is N, N=2 L , L is a positive integer greater than or equal to 3, if the input data requires FFT operation, the input complex data does not need to be processed; if the input If the data requires IFFT operation, the real part of the input complex data remains unchanged, and the imaginary part is reversed;

在实施例中,我们根据实际应用的需求,L的取值范围设定为5~14,即点数N的范围为32~16384之间为2的正整数次幂的数,输入的N点复数数据为:In the embodiment, we set the value range of L to 5 to 14 according to the actual application requirements, that is, the range of the number of points N is a number that is a positive integer power of 2 between 32 and 16384, and the input N-point complex number The data is:

x(n)=I(n)+jQ(n)                        n=0,1,2,…,N-1(1)x(n)=I(n)+jQ(n) n=0, 1, 2,..., N-1(1)

式(1)中的I(n)为输入数据的实部,Q(n)为输入数据的虚部,I(n) in formula (1) is the real part of the input data, Q(n) is the imaginary part of the input data,

N点输入数据的FFT和IFFT运算的表达式分别为:The expressions of FFT and IFFT operations of N-point input data are respectively:

Xx FFTFFT (( kk )) == ΣΣ nno == 00 NN -- 11 xx (( nno )) ee -- jj 22 ππ NN nknk

== ΣΣ nno == 00 NN -- 11 [[ II (( nno )) ++ jQjQ (( nno )) ]] [[ coscos (( 22 ππ NN nknk )) -- jj (( 22 ππ NN nknk )) ]]

= Re { X FFT ( k ) } + jIm { X FFT ( k ) } k=0,1,2,…,N-1(2) = Re { x FFT ( k ) } + jIm { x FFT ( k ) } k=0, 1, 2, . . . , N-1(2)

式(2)中, Re { X FFT ( k ) } = Σ n = 0 N - 1 [ I ( n ) cos ( 2 π N nk ) + Q ( n ) sin ( 2 π N nk ) ] In formula (2), Re { x FFT ( k ) } = Σ no = 0 N - 1 [ I ( no ) cos ( 2 π N nk ) + Q ( no ) sin ( 2 π N nk ) ]

ImIm {{ Xx FFTFFT (( kk )) }} == ΣΣ nno == 00 NN -- 11 [[ QQ (( nno )) coscos (( 22 ππ NN nknk )) ++ II (( nno )) sinsin (( 22 ππ NN nknk )) ]]

Xx IFFTIFFT (( kk )) == 11 NN ΣΣ nno == 00 NN -- 11 xx (( nno )) ee -- jj 22 ππ NN nknk

== 11 NN ΣΣ nno == 00 NN -- 11 [[ II (( nno )) ++ jQjQ (( nno )) ]] [[ coscos (( 22 ππ NN nknk )) -- jj sinsin (( 22 ππ NN nknk )) ]]

= Re { X IFFT ( k ) } + jIm { X IFFT ( k ) } k=0,1,2,…,N-1(3) = Re { x IFFT ( k ) } + jIm { x IFFT ( k ) } k=0, 1, 2, . . . , N-1 (3)

式(3)中, Re { X IFFT ( k ) } = 1 N Σ n = 0 N - 1 [ I ( n ) cos ( 2 π N nk ) + ( - Q ( n ) ) sin ( 2 π N nk ) ] In formula (3), Re { x IFFT ( k ) } = 1 N Σ no = 0 N - 1 [ I ( no ) cos ( 2 π N nk ) + ( - Q ( no ) ) sin ( 2 π N nk ) ]

ImIm {{ Xx IFFTIFFT (( kk )) }} == -- 11 NN ΣΣ nno == 00 NN -- 11 [[ (( -- QQ (( nno )) )) coscos (( 22 ππ NN nknk )) -- II (( nno )) sinsin (( 22 ππ NN nknk )) ]]

本发明中,FFT和IFFT采用相同的旋转因子值,因此,我们以FFT为标准,由式(2)和(3)可以看出,在完成IFFT运算时,我们将输入复数数据的虚部取反之后进行FFT运算,并将最后结果的虚部再取反后输出,这样就可以做到使用与FFT相同的控制方式就可以实现IFFT,简化了中间蝶形计算的控制逻辑;In the present invention, FFT and IFFT adopt the same twiddle factor value, therefore, we take FFT as the standard, as can be seen from formulas (2) and (3), when completing the IFFT operation, we take the imaginary part of the input complex data as Perform FFT operation after inversion, and output the imaginary part of the final result after inversion, so that IFFT can be realized using the same control method as FFT, which simplifies the control logic of the intermediate butterfly calculation;

2)存储模块A包括四个大小相同的子存储模块,分别为A1、A2、A3、A4,每个子存储模块的大小为2×b×N/4比特,b为输入复数的实部或者虚部的位宽比特数,串行输入的N点处理后数据为x(n),其中n=0,1,2,......,N-1,将x(0)~x(N/4-1)、x(N/4)~x(2N/4-1)、x(2N/4)~x(3N/4-1)和x(3N/4)~x(N-1)分别按照倒叙存入A1、A2、A3、A4中;2) Storage module A includes four sub-storage modules of the same size, namely A1, A2, A3, and A4. The size of each sub-storage module is 2×b×N/4 bits, and b is the real or imaginary part of the input complex number The bit width bit number of the part, the processed data of N points serially input is x(n), wherein n=0,1,2,...,N-1, x(0)~x( N/4-1), x(N/4)~x(2N/4-1), x(2N/4)~x(3N/4-1) and x(3N/4)~x(N- 1) Store them in A1, A2, A3, and A4 in reverse order;

3)当输入数据点数达到N时,控制模块给出FFT/IFFT运算启动信号。3) When the number of input data points reaches N, the control module sends an FFT/IFFT operation start signal.

所述的处理后串行输入数据全部写入存储模块A后,控制模块控制存储模块A、蝶形运算模块和溢出检测判断模块,从存储模块A中读取四个数据完成一次基-4蝶形运算;对蝶形运算结果数据做溢出检测判断后,按原址存储到存储模块B中,当存储模块A中的所有数据均完成第一级蝶形运算,控制模块向外给出信号,下一次FFT或者IFFT运算的数据流可以进入存储模块A的步骤包括:After the processed serial input data are all written into the storage module A, the control module controls the storage module A, the butterfly operation module and the overflow detection and judgment module, and reads four data from the storage module A to complete a base-4 butterfly Shape operation; after performing overflow detection and judgment on the butterfly operation result data, it is stored in the storage module B according to the original address. When all the data in the storage module A have completed the first-level butterfly operation, the control module sends out a signal, and the The steps that the data stream of an FFT or IFFT operation can enter the storage module A include:

1)从子存储模块A1、A2、A3、A4中分别读出一个数据,经过三次复数乘法和八次复数加法,完成一次基-4蝶形运算;1) Read a piece of data from the sub-storage modules A1, A2, A3, and A4 respectively, and complete a radix-4 butterfly operation through three complex multiplications and eight complex additions;

假定从A1、A2、A3、A4中读出的数据分别为A、B、C、D,基-4蝶形运算表达式为:Assuming that the data read from A1, A2, A3, and A4 are A, B, C, and D respectively, the base-4 butterfly operation expression is:

A′=A+BWP+CW2P+DW3P=(A+CW2P)+(BWP+DW3P)(4.1)A'=A+BW P +CW 2P +DW 3P =(A+CW 2P )+(BW P +DW 3P )(4.1)

B′=A-jBWP-CW2P+jDW3P=(A-CW2P)-j(BWP-DW3P)(4.2)B'=A-jBW P -CW 2P +jDW 3P =(A-CW 2P )-j(BW P -DW 3P )(4.2)

C′=A-BWP+CW2P-DW3P=(A+CW2P)-(BWP+DW3P)(4.3)C'=A-BW P +CW 2P -DW 3P =(A+CW 2P )-(BW P +DW 3P )(4.3)

D′=A+jBWP-CW2P-jDW3P=(A-CW2P)+j(BWP-DW3P)(4.4)D'=A+jBW P -CW 2P -jDW 3P =(A-CW 2P )+j(BW P -DW 3P )(4.4)

式(4.1)~(4.4)中, W P = W N k = e - j 2 π N , In formula (4.1)~(4.4), W P = W N k = e - j 2 π N ,

由式(4.1)~(4.4)可知,完成一次基-4蝶形运算所需的三次复乘分别为:BWP、CW2P、DW3P,八次复加分别为:A+CW2P、BWP+DW3P、A-CW2P、BWP-DW3P、前两者的和、差以及后两者的和、差;From formulas (4.1) to (4.4), it can be seen that the three complex multiplications required to complete a radix-4 butterfly operation are: BW P , CW 2P , DW 3P , and the eight complex additions are: A+CW 2P , BW P +DW 3P , A-CW 2P , BW P -DW 3P , the sum and difference of the former two and the sum and difference of the latter two;

2)对每次蝶形运算的结果做溢出检测判断,记下该运算结果中最大值的溢出比特数;2) perform overflow detection and judgment on the result of each butterfly operation, and write down the overflow bit number of the maximum value in the operation result;

3)存储模块B也由四个子存储模块组成,分别为子存储模块B1、B2、B3、B4,每次蝶形运算结束将四个数据写入子存储模块B1、B2、B3、B4,写地址等于子存储模块A1、A2、A3、A4的读地址;3) The storage module B is also composed of four sub-storage modules, which are respectively sub-storage modules B1, B2, B3, and B4. After each butterfly operation, four data are written into the sub-storage modules B1, B2, B3, and B4. The address is equal to the read address of the sub-storage modules A1, A2, A3, A4;

4)重复上述三个步骤,直至存储模块A中所有数据完成蝶形运算,此时最大的溢出比特数即为该级蝶形运算结果最终的溢出比特数;4) Repeat the above three steps until all the data in the storage module A completes the butterfly operation, at this time the maximum overflow bit number is the final overflow bit number of the butterfly operation result of this level;

5)当存储模块A中所有数据完成第一级蝶形运算后,控制模块向外给出标志信号,表明下一次FFT/IFFT的数据流串行进入存储模块A等待。5) After all the data in the storage module A complete the first-stage butterfly operation, the control module sends a flag signal to the outside, indicating that the next FFT/IFFT data stream enters the storage module A in series and waits.

本发明中使用两块大小相同的存储模块A和B,存储模块A只用来存储输入的数据,而存储模块B用来存储蝶形运算结果,这样做的目的是,在连续完成多次FFT或者IFFT运算时,本次运算在完成了第一级的蝶形运算后,存储模块A就可以空闲以接受下次运算的串行输入数据,这样在进行本次运算后面若干级蝶形运算时,下次运算的输入数据可以同时串行进入存储模块A,等到本次运算结束且最终结果从存储模块B中完全输出后,若下次运算的输入数据准备完成,则可以立刻进行下次运算,节省了数据串行写入存储模块A的时间。In the present invention, two storage modules A and B with the same size are used. Storage module A is only used to store input data, while storage module B is used to store butterfly operation results. The purpose of doing this is to continuously complete multiple FFT Or in the IFFT operation, after the first-level butterfly operation is completed in this operation, the storage module A can be idle to accept the serial input data of the next operation, so that when several stages of butterfly operations are performed after this operation , the input data of the next operation can be serially entered into the storage module A at the same time, after the completion of this operation and the final result is completely output from the storage module B, if the input data of the next operation is ready, the next operation can be performed immediately , which saves the time for serially writing data into memory module A.

所述的将FFT或者IFFT运算的点数记为N,且N=2L,L为大于或等于3的正整数:若L为偶数,则蝶形运算级数为L/2;若L为奇数,则蝶形运算级数为(L+1)/2。在控制模块的控制下,L为偶数情况下的第二级到第L/2级或者L为奇数情况下的第二级到第(L-1)/2级的每一次蝶形运算均从存储模块B中读取四个数据,经过移位模块移位之后完成一次基-4蝶形运算,结果经过溢出检测判断后按原址存入存储模块B;当L为奇数时,第(L+1)/2级蝶形运算按照每次从存储模块B中读取两个数据,在控制模块下进行基-2蝶形运算,结果经过溢出检测判断后按原址存入存储模块B中的步骤包括:The number of points in the FFT or IFFT operation is recorded as N, and N=2 L , L is a positive integer greater than or equal to 3: if L is an even number, the number of butterfly operation stages is L/2; if L is an odd number , then the butterfly operation series is (L+1)/2. Under the control of the control module, each butterfly operation from the second stage to the L/2th stage when L is an even number or from the second stage to the (L-1)/2th stage when L is an odd number is from Read four data in the storage module B, complete a radix-4 butterfly operation after being shifted by the shift module, and store the result in the storage module B according to the original address after the overflow detection and judgment; when L is an odd number, 1)/2-level butterfly operation reads two data from storage module B each time, performs radix-2 butterfly operation under the control module, and stores the result in storage module B according to the original address after overflow detection and judgment include:

1)L为偶数情况下的第二级到第L/2级或者L为奇数情况下的第二级到第(L-1)/2级蝶形运算,在控制模块的控制下,每次分别从子存储模块B1、B2、B3、B4中各读取一个数据,数据移位模块按照前一级蝶形运算后溢出检测判断结果进行移位,移位结果完成一次基-4蝶形运算,结果经过溢出检测判断同时按照原址写入子存储模块B1、B2、B3、B4;1) The butterfly operation from the second stage to the L/2 stage when L is an even number or from the second stage to the (L-1)/2 stage when L is an odd number, under the control of the control module, every time Read one piece of data from each of the sub-storage modules B1, B2, B3, and B4, and the data shift module performs shifting according to the overflow detection judgment result after the previous butterfly operation, and the shift result completes a radix-4 butterfly operation , the result is written into the sub-storage modules B1, B2, B3, and B4 according to the original address after overflow detection and judgment;

若L为偶数,则N=2L=4L/2;若L为奇数,则N=2L=4(L-1)/2×2。因此,L为偶数时,所有的蝶形运算均为基-4蝶形运算;L为奇数时,第一级到第(L-1)/2级蝶形运算为基-4蝶形运算,最后一级为基-2蝶形运算。由于第一级蝶形运算是从存储模块A中读取数据进行,因此,从存储模块B中读取数据进行蝶形运算应该从第二级开始。If L is an even number, then N=2 L =4 L/2 ; if L is an odd number, then N=2 L =4 (L-1)/2 ×2. Therefore, when L is an even number, all butterfly operations are radix-4 butterfly operations; when L is an odd number, the butterfly operations from the first stage to the (L-1)/2th stage are radix-4 butterfly operations, The final stage is a radix-2 butterfly operation. Since the first-stage butterfly operation is performed by reading data from the storage module A, the butterfly operation for reading data from the storage module B should start from the second stage.

2)当L为奇数时,第(L+1)/2级蝶形运算为基-2蝶形运算,在控制模块的控制下,首先从子存储模块B1和B3中分别读出一个数据,移位之后完成一次基-2蝶形运算,结果经溢出检测判断后按原址存入子存储模块B1和B3,如此循环直至子存储模块B1、B3中所有数据均完成蝶形运算;之后,将子存储模块B2和B4组合,完成与子存储模块B1和B3相同的操作;2) When L is an odd number, the (L+1)/2-th stage butterfly operation is a radix-2 butterfly operation. Under the control of the control module, first read out a piece of data from the sub-storage modules B1 and B3 respectively, After the shift, a base-2 butterfly operation is completed, and the result is stored in the sub-storage modules B1 and B3 according to the original address after being judged by overflow detection, and this cycle is performed until all the data in the sub-storage modules B1 and B3 complete the butterfly operation; after that, the Sub-storage modules B2 and B4 are combined to complete the same operations as sub-storage modules B1 and B3;

3)此时,我们就顺利完成了N点数据FFT/IFFT运算的所有蝶形运算,结果存储在子存储模块B1、B2、B3、B4中。3) At this point, we have successfully completed all the butterfly operations of the N-point data FFT/IFFT operations, and the results are stored in the sub-storage modules B1, B2, B3, and B4.

所述的在所有蝶形运算完成之后,跟据本次运算为FFT或者IFFT,将存储模块B中的数据做相应处理后串行输出,得到输入数据的FFT或者IFFT块浮点运算结果,将该结果与最后输出的块浮点指数组合为实际FFT或者IFFT结果的步骤包括:After all the butterfly operations described above are completed, according to this operation being FFT or IFFT, the data in the storage module B is processed and then serially output to obtain the FFT or IFFT block floating-point operation results of the input data, and the The steps of combining the result with the final output block floating-point index into the actual FFT or IFFT result include:

1)在控制模块控制下,将数据从子存储模块B1、B2、B3、B4中按照一定的顺序串行输出,并根据本次运算为FFT或者IFFT作如下处理:若为FFT,则实部和虚部均不变;若为IFFT,则实部不变,虚部取反;1) Under the control of the control module, serially output the data from the sub-storage modules B1, B2, B3, and B4 in a certain order, and perform the following processing according to whether this operation is FFT or IFFT: if it is FFT, the real part and the imaginary part remain unchanged; if it is IFFT, the real part remains unchanged and the imaginary part is reversed;

通过上述对式(2)和(3)的分析可以得到,在完成IFFT运算时,在数据输入时,对虚部取反,在最终结果输出时再对虚部取反,就可以做到IFFT运算和FFT运算使用相同的旋转因子值,使控制逻辑简化。Through the above analysis of formulas (2) and (3), it can be obtained that when the IFFT operation is completed, the imaginary part is reversed when the data is input, and the imaginary part is reversed when the final result is output, so that IFFT can be achieved Operation and FFT operation use the same twiddle factor value, which simplifies the control logic.

2)完成实部和虚部转换后,按照最后一级蝶形运算的溢出检测判断结果,将串行输出数据做相应移位后即可输出,输出的结果即为输入N点复数数据的FFT/IFFT块浮点运算结果,当N点数据全部输出后,向控制模块给出标志信号,表明存储模块B可用,可以进行新一次的FFT/IFFT运算;2) After the conversion of the real part and the imaginary part is completed, according to the overflow detection judgment result of the last butterfly operation, the serial output data can be output after being shifted accordingly, and the output result is the FFT of the input N-point complex data /IFFT block floating-point calculation result, when all the N-point data is output, a flag signal is given to the control module, indicating that the storage module B is available, and a new FFT/IFFT operation can be performed;

3)实际的FFT/IFFT结果为:X(k)=X′(k)*2-exp(k=0,1,…N-1,N为输入数据点数),其中X(k)为实际FFT/IFFT结果,X′(k)为FFT/IFFT块浮点运算结果,exp为块浮点指数。3) The actual FFT/IFFT result is: X(k)=X′(k)*2 -exp (k=0, 1,...N-1, N is the number of input data points), where X(k) is the actual FFT/IFFT result, X'(k) is the FFT/IFFT block floating-point operation result, and exp is the block floating-point exponent.

所述的实际的FFT/IFFT结果为:X(k)=X′(k)*2-exp,k=0,1,...,N-1,N为输入数据点数,其中X(k)为实际FFT/IFFT结果,X′(k)为FFT/IFFT块浮点运算结果,exp为块浮点指数的步骤包括:The described actual FFT/IFFT result is: X(k)=X'(k)*2 -exp , k=0,1,...,N-1, N is the number of input data points, where X(k ) is the actual FFT/IFFT result, X'(k) is the FFT/IFFT block floating point operation result, and exp is the block floating point index. The steps include:

1)当运算类型为FFT时,exp初值为0,当运算类型为IFFT时,exp初值为log2N;1) When the operation type is FFT, the initial value of exp is 0; when the operation type is IFFT, the initial value of exp is log 2 N;

由式(2)和(3)可以看出,IFFT与FFT相比较,需要在前面乘以一个系数 1 / N = 2 - log 2 N , 所以,在完成IFFT运算时,exp的初值为log2N。It can be seen from formulas (2) and (3) that compared with FFT, IFFT needs to be multiplied by a coefficient in front 1 / N = 2 - log 2 N , Therefore, when completing the IFFT operation, the initial value of exp is log 2 N.

2)每一级蝶形运算之后,exp等于在该级蝶形运算开始之前的值减去本级蝶形运算的溢出比特数,当所有蝶形运算完成之后,所得到的exp即为最终的块浮点指数;2) After each level of butterfly operation, exp is equal to the value before the start of butterfly operation of this level minus the number of overflow bits of butterfly operation of this level. After all butterfly operations are completed, the obtained exp is the final block float exponent;

如图3所示,假设输入的数据实部和虚部位宽均为m,以实部或者虚部之一为例,存储器的位宽大小为该位宽为m的数据经过一次基-4运算后最大的可能位宽m+3,现在经过第一次蝶形运算之后,位宽扩展为m+M1(M1≤3),为了第二次蝶形运算之后,位宽仍然能够被限制在m+3内,我们在读出第一级的蝶形运算结果后进行第二级的蝶形运算之前,需要将其右移M1;以此类推,第三级蝶形运算开始之前需要将第二级蝶形运算结果右移M2位,......,第k+1级蝶形运算开始之前需要将第k级蝶形运算结果右移Mk位,......;如图4所示的即为第k+1级蝶形运算过程中块浮点的操作流程图,包括从存储器读取数据、右移Mk位、蝶形运算、溢出比特数检测以及蝶形运算结果写入存储器;As shown in Figure 3, assuming that the real part and imaginary part width of the input data are both m, taking one of the real part or imaginary part as an example, the bit width of the memory is that the data with a bit width of m undergoes a radix-4 operation After the maximum possible bit width m+3, now after the first butterfly operation, the bit width is expanded to m+M 1 (M 1 ≤3), for the second butterfly operation, the bit width can still be limited In m+3, we need to shift it to the right by M1 after reading the result of the first-stage butterfly operation before performing the second-stage butterfly operation; and so on, before the third-stage butterfly operation starts, we need to The result of the second-stage butterfly operation is shifted to the right by M 2 bits, ......, before the start of the k+1-th butterfly operation, the result of the k-th butterfly operation needs to be shifted to the right by M k bits,  … .; As shown in Figure 4, it is the operation flowchart of the block floating point in the k+1 stage butterfly operation process, including reading data from the memory, right shifting M k bits, butterfly operation, overflow bit number detection and The result of the butterfly operation is written into the memory;

经过上述右移过程,最终的蝶形结果右移了M1+M2+......+Mk+......位,因此,块浮点指数为:After the above right-shifting process, the final butterfly result is right-shifted by M 1 +M 2 +...+M k +...bits, therefore, the block floating-point index is:

exp=expini-(M1+M2+…+Mk+…)(5)exp=exp ini -(M 1 +M 2 +...+M k +...)(5)

expini为exp的初值,FFT运算为0,IFFT运算为log2N;exp ini is the initial value of exp, the FFT operation is 0, and the IFFT operation is log 2 N;

3)通过最后的块浮点结果X′(k)和块浮点指数exp即可得到实际的FFT/IFFT结果X(k),X(k)=X′(k)*2-exp,k=0,1,...,N-1,N为输入数据点数。3) The actual FFT/IFFT result X(k) can be obtained through the final block floating point result X'(k) and the block floating point exponent exp, X(k)=X'(k)*2 -exp ,k =0, 1, ..., N-1, N is the number of input data points.

由式(5)可知,实际的FFT/IFFT结果X(k)和最后输出的块浮点结果的关系表达式为:It can be seen from formula (5) that the relationship expression between the actual FFT/IFFT result X(k) and the final output block floating-point result is:

X ( k ) = X ′ ( k ) * 2 - exp ini + ( M 1 + M 2 + . . . + M k + . . . ) = X ′ ( k ) * 2 - exp - - - ( 6 ) x ( k ) = x ′ ( k ) * 2 - exp ini + ( m 1 + m 2 + . . . + m k + . . . ) = x ′ ( k ) * 2 - exp - - - ( 6 ) .

 the

Claims (8)

1.一种点数可变的混合基FFT/IFFT实现装置,其特征在于,包括模块:输入数据变换模块、存储模块A、数据选择器、蝶形运算模块、溢出检测模块、存储模块B、移位模块、输出数据变换模块以及控制模块,输入数据变换模块与存储模块A、数据选择器、蝶形运算模块、溢出检测模块、存储模块B、移位模块依次连接,存储模块B与输出数据变换模块相连,移位模块与数据选择器相连;在控制模块控制下,将串行输入数据变换后存储到存储模块A,然后控制模块控制存储模块A中所有数据完成第一级蝶形运算,结果完成溢出检测,同时也存入存储模块B;当存储模块A中所有数据均完成了第一级蝶形运算后,控制模块向外给出存储模块A空闲可用的标志信号,预示着下一次运算数据可以输入,同时控制模块控制移位模块、存储模块B、蝶形运算模块以及溢出检测模块完成接下来的所有蝶形运算;当所有蝶形运算全部完成之后,控制模块控制存储模块B、输出数据变换模块,将存储模块B中的数据串行读出经过移位、实部虚部变换后输出最终的块浮点运算结果,当存储模块B中数据全部输出后,输出数据变换模块向控制模块给出存储模块B空闲可用标志信号,新一次FFT/IFFT运算开始进行。1. A mixed base FFT/IFFT implementation device with variable points is characterized in that it comprises modules: input data conversion module, storage module A, data selector, butterfly operation module, overflow detection module, storage module B, shift The bit module, the output data conversion module and the control module, the input data conversion module and the storage module A, the data selector, the butterfly operation module, the overflow detection module, the storage module B, and the shift module are connected in sequence, and the storage module B is connected with the output data conversion module The modules are connected, and the shift module is connected with the data selector; under the control of the control module, the serial input data is converted and stored in the storage module A, and then the control module controls all the data in the storage module A to complete the first-level butterfly operation, and the result The overflow detection is completed, and it is also stored in the storage module B; when all the data in the storage module A has completed the first-level butterfly operation, the control module sends out a flag signal that the storage module A is free and available, indicating the next operation Data can be input, and the control module controls the shift module, storage module B, butterfly operation module and overflow detection module to complete all subsequent butterfly operations; when all butterfly operations are completed, the control module controls storage module B, output The data conversion module reads the data in the storage module B serially and outputs the final block floating-point operation result after shifting and transforming the real part and the imaginary part. When all the data in the storage module B is output, the output data conversion module sends to the control The module gives the free and available flag signal of storage module B, and a new FFT/IFFT operation starts. 2.根据权利要求1所述的一种点数可变的混合基FFT/IFFT实现装置,其特征在于,所述的蝶形运算模块包括相连接的旋转因子存储模块、乘法器模块和加法器模块。2. a kind of point number variable mixed-radix FFT/IFFT realization device according to claim 1, is characterized in that, described butterfly operation module comprises the connected twiddle factor storage module, multiplier module and adder module . 3.一种使用如权利要求1所述装置的点数可变的混合基FFT/IFFT实现方法,其特征在于包括如下步骤:3. A method for realizing the variable mixed-radix FFT/IFFT using the variable number of points of the device according to claim 1, characterized in that it comprises the steps: 1)根据本次运算为FFT或者IFFT,在控制模块的控制下,将串行输入数据处理后按照分块倒叙方式存入存储模块A;1) According to whether the operation is FFT or IFFT, under the control of the control module, the serial input data is processed and stored in the storage module A in a block-by-block reverse order; 2)处理后串行输入数据全部写入存储模块A后,控制模块控制存储模块A、蝶形运算模块、和溢出检测判断模块,从存储模块A中读取四个数据完成一次基-4蝶形运算;对蝶形运算结果数据做溢出检测判断后,按原址存储到存储模块B中,当存储模块A中的所有数据均完成第一级蝶形运算,控制模块向外给出信号,下一次FFT或者IFFT运算的数据流进入存储模块A;2) After the processed serial input data are all written into the storage module A, the control module controls the storage module A, the butterfly operation module, and the overflow detection and judgment module, and reads four data from the storage module A to complete a base-4 butterfly Shape operation; after performing overflow detection and judgment on the butterfly operation result data, it is stored in the storage module B according to the original address. When all the data in the storage module A have completed the first-level butterfly operation, the control module sends out a signal, and the The data stream of an FFT or IFFT operation enters the storage module A; 3)将FFT或者IFFT运算的点数记为N,且N=2L,L为大于或等于3的正整数:若L为偶数,则蝶形运算级数为L/2;若L为奇数,则蝶形运算级数为(L+1)/2,在控制模块的控制下,L为偶数情况下的第二级到第L/2级或者L为奇数情况下的第二级到第(L-1)/2级的每一次蝶形运算均从存储模块B中读取四个数据,经过移位模块移位之后完成一次基-4蝶形运算,结果经过溢出检测判断后按原址存入存储模块B;当L为奇数时,第(L+1)/2级蝶形运算按照每次从存储模块B中读取两个数据,在控制模块下进行基-2蝶形运算,结果经过溢出检测判断后按原址存入存储模块B中;3) Record the points of FFT or IFFT operation as N, and N=2 L , L is a positive integer greater than or equal to 3: if L is an even number, the number of butterfly operation stages is L/2; if L is an odd number, Then the number of stages of the butterfly operation is (L+1)/2, under the control of the control module, L is the second stage to the L/2 stage in the case of an even number or the second stage to the ( Each butterfly operation of level L-1)/2 reads four data from storage module B, completes a radix-4 butterfly operation after being shifted by the shift module, and stores the result at the original address after being judged by overflow detection into the storage module B; when L is an odd number, the (L+1)/2-level butterfly operation reads two data from the storage module B each time, and performs the base-2 butterfly operation under the control module, and the result Store in storage module B according to the original address after overflow detection and judgment; 4)在所有蝶形运算完成之后,跟据本次运算为FFT或者IFFT,将存储模块B中的数据做相应处理后串行输出,得到输入数据的FFT或者IFFT块浮点运算结果,将该结果与最后输出的块浮点指数组合为实际FFT或者IFFT结果。4) After all the butterfly operations are completed, according to this operation as FFT or IFFT, the data in the storage module B is processed accordingly and then serially output to obtain the FFT or IFFT block floating-point operation results of the input data. The result is combined with the final output block floating-point exponent into the actual FFT or IFFT result. 4.根据权利要求3所述的一种点数可变的混合基FFT/IFFT实现方法,其特征在于,所述的根据本次运算为FFT或者IFFT,在控制模块的控制下,将串行输入数据处理后按照分块倒叙方式存入存储模块A的步骤包括:4. a kind of point-number-variable mixed-radix FFT/IFFT realization method according to claim 3 is characterized in that, described operation is FFT or IFFT according to this time, under the control of control module, serial input After the data is processed, the steps of storing the data in the storage module A according to the reverse order of the blocks include: 1)FFT/IFFT变换的输入数据为复数,点数为N,N=2L,L为大于或等于3的正整数,若输入数据要求进行FFT运算,则输入复数数据不需做处理;若输入数据要求进行IFFT运算,则输入复数数据实部不变,虚部取反;1) The input data of FFT/IFFT transformation is a complex number, the number of points is N, N=2 L , L is a positive integer greater than or equal to 3, if the input data requires FFT operation, the input complex data does not need to be processed; if the input If the data requires IFFT operation, the real part of the input complex data remains unchanged, and the imaginary part is reversed; 2)存储模块A包括四个大小相同的子存储模块,分别为A1、A2、A3、A4,每个子存储模块的大小为2×b×N/4比特,b为输入复数的实部或者虚部的位宽比特数,串行输入的N点处理后数据为x(n),其中n=0,1,2,......,N-1,将x(0)~x(N/4-1)、x(N/4)~x(2N/4-1)、x(2N/4)~x(3N/4-1)和x(3N/4)~x(N-1)分别按照倒叙存入A1、A2、A3、A4中;2) Storage module A includes four sub-storage modules of the same size, namely A1, A2, A3, and A4. The size of each sub-storage module is 2×b×N/4 bits, and b is the real or imaginary part of the input complex number The bit width bit number of the part, the processed data of N points serially input is x(n), wherein n=0,1,2,...,N-1, x(0)~x( N/4-1), x(N/4)~x(2N/4-1), x(2N/4)~x(3N/4-1) and x(3N/4)~x(N- 1) Store them in A1, A2, A3, and A4 in reverse order; 3)当输入数据点数达到N时,控制模块给出FFT/IFFT运算启动信号。3) When the number of input data points reaches N, the control module sends an FFT/IFFT operation start signal. 5.根据权利要求3所述的一种点数可变的混合基FFT/IFFT实现方法,其特征在于,所述的处理后串行输入数据全部写入存储模块A后,控制模块控制存储模块A、蝶形运算模块和溢出检测判断模块,从存储模块A中读取四个数据完成一次基-4蝶形运算;对蝶形运算结果数据做溢出检测判断后,按原址存储到存储模块B中,当存储模块A中的所有数据均完成第一级蝶形运算,控制模块向外给出信号,下一次FFT或者IFFT运算的数据流可以进入存储模块A的步骤包括:5. a kind of point number variable mixed radix FFT/IFFT realization method according to claim 3 is characterized in that, after the serial input data after described processing is all written into memory module A, control module controls memory module A , the butterfly operation module and the overflow detection and judgment module, read four data from the storage module A to complete a radix-4 butterfly operation; after performing overflow detection and judgment on the butterfly operation result data, store it in the storage module B according to the original address , when all the data in the storage module A has completed the first-level butterfly operation, the control module sends a signal to the outside, and the data flow of the next FFT or IFFT operation can enter the storage module A. The steps include: 1)从子存储模块A1、A2、A3、A4中分别读出一个数据,经过三次复数乘法和八次复数加法,完成一次基-4蝶形运算;1) Read a piece of data from the sub-storage modules A1, A2, A3, and A4 respectively, and complete a radix-4 butterfly operation through three complex multiplications and eight complex additions; 2)对每次蝶形运算的结果做溢出检测判断,记下该运算结果中最大值的溢出比特数;2) perform overflow detection and judgment on the result of each butterfly operation, and write down the overflow bit number of the maximum value in the operation result; 3)存储模块B也由四个子存储模块组成,分别为子存储模块B1、B2、B3、B4,每次蝶形运算结束将四个数据写入子存储模块B1、B2、B3、B4,写地址等于子存储模块A1、A2、A3、A4的读地址;3) The storage module B is also composed of four sub-storage modules, which are respectively sub-storage modules B1, B2, B3, and B4. After each butterfly operation, four data are written into the sub-storage modules B1, B2, B3, and B4. The address is equal to the read address of the sub-storage modules A1, A2, A3, A4; 4)重复上述三个步骤,直至存储模块A中所有数据完成蝶形运算,此时最大的溢出比特数即为该级蝶形运算结果最终的溢出比特数;4) Repeat the above three steps until all the data in the storage module A completes the butterfly operation, at this time the maximum overflow bit number is the final overflow bit number of the butterfly operation result of this level; 5)当存储模块A中所有数据完成第一级蝶形运算后,控制模块向外给出标志信号,表明下一次FFT/IFFT的数据流串行进入存储模块A等待。5) After all the data in the storage module A complete the first-stage butterfly operation, the control module sends a flag signal to the outside, indicating that the next FFT/IFFT data stream enters the storage module A in series and waits. 6.根据权利要求3所述的一种点数可变的混合基FFT/IFFT实现方法,其特征在于,所述的将FFT或者IFFT运算的点数记为N,且N=2L,L为大于或等于3的正整数:若L为偶数,则蝶形运算级数为L/2;若L为奇数,则蝶形运算级数为(L+1)/2。在控制模块的控制下,L为偶数情况下的第二级到第L/2级或者L为奇数情况下的第二级到第(L-1)/2级的每一次蝶形运算均从存储模块B中读取四个数据,经过移位模块移位之后完成一次基-4蝶形运算,结果经过溢出检测判断后按原址存入存储模块B;当L为奇数时,第(L+1)/2级蝶形运算按照每次从存储模块B中读取两个数据,在控制模块下进行基-2蝶形运算,结果经过溢出检测判断后按原址存入存储模块B中的步骤包括:6. a kind of point number variable mixed-radix FFT/IFFT realization method according to claim 3 is characterized in that, the described point number of FFT or IFFT operation is denoted as N, and N= 2L , L is greater than Or a positive integer equal to 3: if L is an even number, the number of butterfly operations is L/2; if L is an odd number, the number of butterfly operations is (L+1)/2. Under the control of the control module, each butterfly operation from the second stage to the L/2th stage when L is an even number or from the second stage to the (L-1)/2th stage when L is an odd number is from Read four data in the storage module B, complete a radix-4 butterfly operation after being shifted by the shift module, and store the result in the storage module B according to the original address after the overflow detection and judgment; when L is an odd number, 1)/2-level butterfly operation reads two data from storage module B each time, performs radix-2 butterfly operation under the control module, and stores the result in storage module B according to the original address after overflow detection and judgment include: 1)L为偶数情况下的第二级到第L/2级或者L为奇数情况下的第二级到第(L-1)/2级蝶形运算,在控制模块的控制下,每次分别从子存储模块B1、B2、B3、B4中各读取一个数据,数据移位模块按照前一级蝶形运算后溢出检测判断结果进行移位,移位结果完成一次基-4蝶形运算,结果经过溢出检测判断同时按照原址写入子存储模块B1、B2、B3、B4;1) The butterfly operation from the second stage to the L/2 stage when L is an even number or from the second stage to the (L-1)/2 stage when L is an odd number, under the control of the control module, every time Read one piece of data from each of the sub-storage modules B1, B2, B3, and B4, and the data shift module performs shifting according to the overflow detection judgment result after the previous butterfly operation, and the shift result completes a radix-4 butterfly operation , the result is written into the sub-storage modules B1, B2, B3, and B4 according to the original address after overflow detection and judgment; 2)当L为奇数时,第(L+1)/2级蝶形运算为基-2蝶形运算,在控制模块的控制下,首先从子存储模块B1和B3中分别读出一个数据,移位之后完成一次基-2蝶形运算,结果经溢出检测判断后按原址存入子存储模块B1和B3,如此循环直至子存储模块B1、B3中所有数据均完成蝶形运算;之后,将子存储模块B2和B4组合,完成与子存储模块B1和B3相同的操作;2) When L is an odd number, the (L+1)/2-th stage butterfly operation is a radix-2 butterfly operation. Under the control of the control module, first read out a piece of data from the sub-storage modules B1 and B3 respectively, After the shift, a base-2 butterfly operation is completed, and the result is stored in the sub-storage modules B1 and B3 according to the original address after being judged by overflow detection, and this cycle is performed until all the data in the sub-storage modules B1 and B3 complete the butterfly operation; after that, the Sub-storage modules B2 and B4 are combined to complete the same operations as sub-storage modules B1 and B3; 3)此时,我们就顺利完成了N点数据FFT/IFFT运算的所有蝶形运算,结果存储在子存储模块B1、B2、B3、B4中。3) At this point, we have successfully completed all the butterfly operations of the N-point data FFT/IFFT operations, and the results are stored in the sub-storage modules B1, B2, B3, and B4. 7.根据权利要求3所述的一种点数可变的混合基FFT/IFFT实现方法,其特征在于,所述的在所有蝶形运算完成之后,跟据本次运算为FFT或者IFFT,将存储模块B中的数据做相应处理后串行输出,得到输入数据的FFT或者IFFT块浮点运算结果,将该结果与最后输出的块浮点指数组合为实际FFT或者IFFT结果的步骤包括:7. a kind of point-number-variable mixed-radix FFT/IFFT realization method according to claim 3 is characterized in that, after all the butterfly operations are completed, according to this operation being FFT or IFFT, the stored The data in module B is serially output after corresponding processing, and the FFT or IFFT block floating-point operation result of the input data is obtained. The steps of combining the result with the final output block floating-point index into the actual FFT or IFFT result include: 1)在控制模块控制下,将数据从子存储模块B1、B2、B3、B4中按照一定的顺序串行输出,并根据本次运算为FFT或者IFFT作如下处理:若为FFT,则实部和虚部均不变;若为IFFT,则实部不变,虚部取反;1) Under the control of the control module, serially output the data from the sub-storage modules B1, B2, B3, and B4 in a certain order, and perform the following processing according to whether this operation is FFT or IFFT: if it is FFT, the real part and the imaginary part remain unchanged; if it is IFFT, the real part remains unchanged and the imaginary part is reversed; 2)完成实部和虚部转换后,按照最后一级蝶形运算的溢出检测判断结果,将串行输出数据做相应移位后即可输出,输出的结果即为输入N点复数数据的FFT/IFFT块浮点运算结果,当N点数据全部输出后,向控制模块给出标志信号,表明存储模块B可用,可以进行新一次的FFT/IFFT运算;2) After the conversion of the real part and the imaginary part is completed, according to the overflow detection judgment result of the last butterfly operation, the serial output data can be output after being shifted accordingly, and the output result is the FFT of the input N-point complex data /IFFT block floating-point calculation result, when all the N-point data is output, a flag signal is given to the control module, indicating that the storage module B is available, and a new FFT/IFFT operation can be performed; 3)实际的FFT/IFFT结果为:X(k)=X′(k)*2-exp(k=0,1,…N-1,N为输入数据点数),其中X(k)为实际FFT/IFFT结果,X′(k)为FFT/IFFT块浮点运算结果,exp为块浮点指数。3) The actual FFT/IFFT result is: X(k)=X′(k)*2 -exp (k=0, 1,...N-1, N is the number of input data points), where X(k) is the actual FFT/IFFT result, X'(k) is the FFT/IFFT block floating-point operation result, and exp is the block floating-point exponent. 8.根据权利要求7所述的一种点数可变的混合基FFT/IFFT实现方法,其特征在于,所述的实际的FFT/IFFT结果为:X(k)=X′(k)*2-exp,k=0,1,...,N-1,N为输入数据点数,其中X(k)为实际FFT/IFFT结果,X′(k)为FFT/IFFT块浮点运算结果,exp为块浮点指数的步骤包括:8. a kind of point number variable mixed-radix FFT/IFFT realization method according to claim 7, is characterized in that, described actual FFT/IFFT result is: X(k)=X'(k)*2 -exp , k=0, 1, ..., N-1, N is the number of input data points, where X(k) is the actual FFT/IFFT result, X'(k) is the FFT/IFFT block floating point operation result, The steps for exp to be a block floating-point exponent include: 1)当运算类型为FFT时,exp初值为0,当运算类型为IFFT时,exp初值为log2N;1) When the operation type is FFT, the initial value of exp is 0; when the operation type is IFFT, the initial value of exp is log 2 N; 2)每一级蝶形运算之后,exp等于在该级蝶形运算开始之前的值减去本级蝶形运算的溢出比特数,当所有蝶形运算完成之后,所得到的exp即为最终的块浮点指数;2) After each level of butterfly operation, exp is equal to the value before the start of butterfly operation of this level minus the number of overflow bits of butterfly operation of this level. After all butterfly operations are completed, the obtained exp is the final block float exponent; 3)通过最后的块浮点结果X′(k)和块浮点指数exp即可得到实际的FFT/IFFT结果X(k),X(k)=X′(k)*2-exp,k=0,1,...,N-1,N为输入数据点数。3) The actual FFT/IFFT result X(k) can be obtained through the final block floating point result X'(k) and the block floating point exponent exp, X(k)=X'(k)*2 -exp ,k =0, 1, ..., N-1, N is the number of input data points.
CN201010039602XA 2010-01-08 2010-01-08 A mixed-radix FFT/IFFT implementation device and method with variable number of points Expired - Fee Related CN101763338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010039602XA CN101763338B (en) 2010-01-08 2010-01-08 A mixed-radix FFT/IFFT implementation device and method with variable number of points

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010039602XA CN101763338B (en) 2010-01-08 2010-01-08 A mixed-radix FFT/IFFT implementation device and method with variable number of points

Publications (2)

Publication Number Publication Date
CN101763338A true CN101763338A (en) 2010-06-30
CN101763338B CN101763338B (en) 2012-07-11

Family

ID=42494503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010039602XA Expired - Fee Related CN101763338B (en) 2010-01-08 2010-01-08 A mixed-radix FFT/IFFT implementation device and method with variable number of points

Country Status (1)

Country Link
CN (1) CN101763338B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102298570A (en) * 2011-09-13 2011-12-28 浙江大学 Hybrid-radix fast Fourier transform (FFT)/inverse fast Fourier transform (IFFT) implementation device with variable counts and method thereof
CN102375804A (en) * 2010-08-18 2012-03-14 中兴通讯股份有限公司 Device and method for realizing inverse fast Fourier transform (IFFT)
CN103605634A (en) * 2013-07-09 2014-02-26 北京理工大学 Data access address generation method based on mixed base FFT
CN104268122A (en) * 2014-09-12 2015-01-07 安徽四创电子股份有限公司 Point-changeable floating point FFT (fast Fourier transform) processor
CN104330673A (en) * 2014-11-18 2015-02-04 太原理工大学 FFT implementation method suitable for composite sampling numbe
CN106339353A (en) * 2015-07-13 2017-01-18 无锡华润矽科微电子有限公司 Method supporting 4375-point and 3780-point FFT/IFFT and processor thereof
CN106560800A (en) * 2015-10-05 2017-04-12 美国亚德诺半导体公司 Scaling Fixed-point Fast Fourier Transforms In Radar And Sonar Applications
CN107783933A (en) * 2016-08-31 2018-03-09 三星电子株式会社 Image processing method and equipment
CN110209506A (en) * 2019-05-09 2019-09-06 上海联影医疗科技有限公司 Data processing system, method, computer equipment and readable storage medium storing program for executing
CN111506294A (en) * 2020-04-13 2020-08-07 中国科学院自动化研究所 FPGA (field programmable Gate array) implementation device and method of FB L MS (field programmable Gate array) algorithm based on block floating point
WO2021082746A1 (en) * 2019-11-01 2021-05-06 中科寒武纪科技股份有限公司 Operation apparatus and related product
CN117389946A (en) * 2023-11-09 2024-01-12 合肥灿芯科技有限公司 FFT (fast Fourier transform) implementation structure capable of dynamically expanding points
CN117591784A (en) * 2024-01-19 2024-02-23 武汉格蓝若智能技术股份有限公司 FPGA-based twiddle factor calculation method and FPGA chip

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102375804A (en) * 2010-08-18 2012-03-14 中兴通讯股份有限公司 Device and method for realizing inverse fast Fourier transform (IFFT)
CN102298570A (en) * 2011-09-13 2011-12-28 浙江大学 Hybrid-radix fast Fourier transform (FFT)/inverse fast Fourier transform (IFFT) implementation device with variable counts and method thereof
CN103605634A (en) * 2013-07-09 2014-02-26 北京理工大学 Data access address generation method based on mixed base FFT
CN103605634B (en) * 2013-07-09 2016-08-10 北京理工大学 A Method of Data Access Address Generation Based on Mixed Radix FFT
CN104268122A (en) * 2014-09-12 2015-01-07 安徽四创电子股份有限公司 Point-changeable floating point FFT (fast Fourier transform) processor
CN104268122B (en) * 2014-09-12 2017-03-22 安徽四创电子股份有限公司 Point-changeable floating point FFT (fast Fourier transform) processor
CN104330673A (en) * 2014-11-18 2015-02-04 太原理工大学 FFT implementation method suitable for composite sampling numbe
CN106339353A (en) * 2015-07-13 2017-01-18 无锡华润矽科微电子有限公司 Method supporting 4375-point and 3780-point FFT/IFFT and processor thereof
CN106560800B (en) * 2015-10-05 2019-09-20 美国亚德诺半导体公司 The adjustment fixed point Fast Fourier Transform in radar and sonar applications
CN106560800A (en) * 2015-10-05 2017-04-12 美国亚德诺半导体公司 Scaling Fixed-point Fast Fourier Transforms In Radar And Sonar Applications
CN107783933B (en) * 2016-08-31 2024-01-09 三星电子株式会社 Image processing methods and equipment
CN107783933A (en) * 2016-08-31 2018-03-09 三星电子株式会社 Image processing method and equipment
CN110209506A (en) * 2019-05-09 2019-09-06 上海联影医疗科技有限公司 Data processing system, method, computer equipment and readable storage medium storing program for executing
CN110209506B (en) * 2019-05-09 2021-08-17 上海联影医疗科技股份有限公司 Data processing system, method, computer device, and readable storage medium
WO2021082746A1 (en) * 2019-11-01 2021-05-06 中科寒武纪科技股份有限公司 Operation apparatus and related product
CN111506294A (en) * 2020-04-13 2020-08-07 中国科学院自动化研究所 FPGA (field programmable Gate array) implementation device and method of FB L MS (field programmable Gate array) algorithm based on block floating point
CN117389946A (en) * 2023-11-09 2024-01-12 合肥灿芯科技有限公司 FFT (fast Fourier transform) implementation structure capable of dynamically expanding points
CN117389946B (en) * 2023-11-09 2024-05-28 合肥灿芯科技有限公司 FFT (fast Fourier transform) implementation structure capable of dynamically expanding points
CN117591784A (en) * 2024-01-19 2024-02-23 武汉格蓝若智能技术股份有限公司 FPGA-based twiddle factor calculation method and FPGA chip
CN117591784B (en) * 2024-01-19 2024-05-03 武汉格蓝若智能技术股份有限公司 FPGA-based twiddle factor calculation method and FPGA chip

Also Published As

Publication number Publication date
CN101763338B (en) 2012-07-11

Similar Documents

Publication Publication Date Title
CN101763338B (en) A mixed-radix FFT/IFFT implementation device and method with variable number of points
CN102298570A (en) Hybrid-radix fast Fourier transform (FFT)/inverse fast Fourier transform (IFFT) implementation device with variable counts and method thereof
CN103226543B (en) FFT processor with pipeline structure
CN101937424A (en) Method of Realizing High Speed FFT Processing Based on FPGA
CN108021781A (en) The FFT IP core designs and optimization method of a kind of parameterisable
CN108897716A (en) By memory read/write operation come the data processing equipment and method of Reduction Computation amount
CN103901405B (en) Block floating point frequency domain four road pulse shortener and impulse compression methods thereof in real time
KR102376492B1 (en) Fast Fourier transform device and method using real valued as input
CN119829005B (en) Butterfly computing unit, butterfly computing unit array, reconfigurable array and chip
JP2001101160A (en) Data storage pattern for fast fourier transform
CN111368250B (en) Data processing system, method and equipment based on Fourier transformation/inverse transformation
US10303736B2 (en) FFT device and method for performing a fast fourier transform
CN103049716A (en) First moment-based convolver
CN101833540B (en) Signal processing method and device
CN110321581A (en) A kind of design method of the two-dimensional Fourier transform IP kernel based on HLS
CN118245712A (en) Fast fourier transform circuit, method, electronic device and storage medium for data
Mookherjee et al. A hardware efficient technique for linear convolution of finite length sequences
CN116955899A (en) Signal processing method and device
Krishnegowda et al. Design and Synthesis of a 256-Point Radix-2 DIT FFT Core with Design Ware Library using Fixed-Point Number Representation
Hassan et al. FPGA Implementation of Parallel Fast Fourier Transform
Sarode et al. Mixed-radix and CORDIC algorithm for implementation of FFT
US20250322030A1 (en) Cryptographic System Pipelined Number Theoretic Transform Accelerator
CN201886472U (en) Variable-length fast Fourier transform circuit
Purushotham et al. Twiddle factor normalization based radix-2k factorization for improved spectral efficiency in subcarrier mapping
CN118312709A (en) Parallel computing system and method based on fast Fourier transform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120711

Termination date: 20150108

EXPY Termination of patent right or utility model