Fast Fourier transform device and method based on storage and computing integration
By simulating the calculation of rotation factors and performing multiplication and accumulation operations in the integrated storage and calculation technology, the problems of low frequency resolution and high power consumption of the FFT calculation accelerator at high sampling frequencies are solved, and efficient and low-power FFT calculations are realized.
Patent Information
- Application Number
- CN202410778888.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-17
AI Technical Summary
When the sampling frequency is high, the existing FFT calculation accelerator has a low frequency resolution, which affects the calculation efficiency, and the power consumption is high during large-scale FFT calculations, making it difficult to meet the needs of efficient calculations.
An analog calculation scheme is used to calculate the rotation factor, and multiplication and accumulation operations are performed in the memory through integrated storage and calculation technology, and the FFT calculation points are divided into multiple sub-areas for calculation, thereby reducing computing power consumption and improving efficiency.
On the premise of ensuring a certain accuracy, it improves the efficiency of FFT calculation and reduces power consumption, and is suitable for high sampling frequency and large-scale FFT calculation scenarios.
Smart Images

Figure CN118349776B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of signal processing, and in particular to a fast Fourier transform device and method based on integrated storage and computing. Background Art
[0002] With the rapid development of electronic technology and integrated circuit technology, digital signal processing has been widely used in the fields of communication, medical treatment, automatic control, etc. In today's digital age, a series of electronic products have brought too many benefits to people's lives, and digital signal processing technology has also penetrated into all aspects of today's life. But in the final analysis, digital signal processing basically solves signal processing problems from two aspects: time domain and frequency domain, and convolution and discrete Fourier transform are the most important operations. At the same time, according to the relevant theoretical research on digital signals, convolution can also be realized by discrete Fourier transform. In fact, many algorithms, such as correlation, filtering, spectrum analysis, etc. can be converted into discrete Fourier transform to achieve. Therefore, the fast Fourier transform (FFT) of discrete Fourier transform can be called one of the basic technologies in the field of digital signal processing.
[0003] The FFT algorithm is a simplified algorithm for discrete Fourier transform. The algorithm is based on butterfly operation and can greatly reduce the computational complexity of the model. The number of FFT points can be decomposed into multiple factors, such as the common radix 2, radix 4, radix 8, and mixed radix is also a way to implement it. Generally speaking, the complexity of the butterfly unit determines the complexity of the FFT operation. The greater the complexity of the butterfly operation unit, the more difficult it is to control. The existing FFT calculation accelerators are generally designed according to 2048, 4096, and 8192 points. Therefore, if the sampling frequency is large, the frequency resolution will be low, affecting the calculation efficiency. Summary of the invention
[0004] The embodiment of the present invention provides a fast Fourier transform device and method based on integrated storage and computing, which can use an analog calculation scheme to calculate the rotation factor, and use integrated storage and computing technology to implement multiplication and accumulation operations. Under the premise of ensuring a certain accuracy, the computing efficiency can be improved and the computing power consumption can be reduced.
[0005] The embodiment of the present invention provides a fast Fourier transform device based on storage and computing integration, including: a system control register, a rotation factor management module, a scheduling management state module, a storage and computing integration module and a memory;
[0006] The system control register is used to set the number of FFT calculation points and to initialize and control the calculation of the fast Fourier transform device;
[0007] The rotation factor management module is used to generate the rotation factor by simulating the sampling circuit and according to the FFT calculation points and the iteration state, and send the generated rotation factor to the memory;
[0008] The scheduling management state module is used to retrieve the calculation data from the memory to the storage-computation integrated module, control the input of the storage-computation integrated module, and move the calculation results of the storage-computation integrated module to the memory;
[0009] The storage and calculation integrated module is used to divide the calculation data into a real part and an imaginary part, and perform multiplication and accumulation operations on the real part and the imaginary part respectively to output the calculation result.
[0010] In one embodiment, the rotation factor management module includes a sine wave generation circuit, a sampling clock circuit, an ADC, a sign control module, and an offset address calculation module;
[0011] After the sine wave generating circuit is started, the sampling clock circuit is used to receive an input signal;
[0012] The ADC is used to perform synchronous sampling and analog-to-digital conversion on the output signal of the sine wave generating circuit according to the sampling signal generated by the sampling clock circuit, so as to output a rotation factor;
[0013] The sign control module is used to control the positive and negative of the rotation factor according to the input signal;
[0014] The offset address calculation module is used to calculate the offset address and store the obtained rotation factor into the memory.
[0015] In one embodiment, the ADC is specifically used to synchronously sample and perform analog-to-digital conversion on the sine wave signal and the delayed cosine wave signal generated by the sine wave generating circuit, respectively, to obtain the imaginary part and the real part of the rotation factor at the current moment.
[0016] In one embodiment, the storage and calculation module includes a real number storage and calculation module and an imaginary number storage and calculation module to perform multiplication and addition operations of real signals and imaginary signals respectively, and during the calculation process, the FFT calculation points are divided into multiple sub-areas according to preset multiples for calculation.
[0017] In one embodiment, the scheduling management state module includes a pre-processing part and a post-processing part, the pre-processing part includes refreshing the rotation factor in each sub-area and counting the number of calculations, and the post-processing part includes storing the calculation results and generating an interrupt signal when all sub-areas are calculated.
[0018] In one embodiment, the memory includes three storage areas, namely a rotation factor area, an input signal area, and an output signal area.
[0019] In one embodiment, the number of iterations set in the rotation factor management module is half of the number of FFT calculation points.
[0020] The embodiment of the present invention further provides a fast Fourier transform method based on storage and computing integration, comprising the following steps:
[0021] Set the number of FFT calculation points;
[0022] Generate a rotation factor by simulating a sampling circuit and according to the number of FFT calculation points and iteration state;
[0023] Retrieving calculation data and dividing the calculation data into a real number part and an imaginary number part through the storage and calculation integrated module, and performing multiplication and accumulation operations on the real number part and the imaginary number part respectively through the storage and calculation integrated module to output a calculation result;
[0024] The calculation results are stored in the corresponding real number area and imaginary number area in the memory.
[0025] In one embodiment,
[0026] The method of generating the rotation factor by simulating the sampling circuit and according to the FFT calculation points and the iteration state comprises:
[0027] Set the number of iterations to half the number of FFT calculation points;
[0028] receiving an input signal to a sampling clock circuit to generate a sampling signal, and synchronously sampling and analog-to-digital converting an output signal of a sine wave generating circuit according to the sampling signal to output a rotation factor;
[0029] Controlling the rotation factor positively or negatively according to the input signal;
[0030] The offset address is calculated, and the obtained rotation factor is stored, and the above steps are repeated until the number of iterations is reached.
[0031] In one embodiment, the method further comprises:
[0032] Dividing the number of FFT calculation points into a plurality of calculation areas in the memory according to a preset multiple;
[0033] Memory access calculation is performed according to the rotation factors corresponding to each of the calculation areas, and an interrupt signal is generated after the calculation is completed.
[0034] As can be seen from the above, the fast Fourier transform device based on storage and calculation integration provided by the embodiment of the present application includes a system control register, a rotation factor management module, a scheduling management state module, a storage and calculation integration module and a memory, the system control register sets the FFT calculation points and initializes and controls the calculation of the fast Fourier transform device, the rotation factor management module generates the rotation factor by simulating the sampling circuit and according to the FFT calculation points and the iteration state, and sends the generated rotation factor to the memory, the scheduling management state module retrieves the calculation data from the memory to the storage and calculation integration module, controls the input of the storage and calculation integration module, and moves the calculation result of the storage and calculation integration module to the memory, and the storage and calculation integration module divides the calculation data into a real part and an imaginary part, and performs multiplication and accumulation operations on the real part and the imaginary part respectively to output the calculation result. The present invention adopts an analog calculation scheme to calculate the rotation factor, and adopts a storage and calculation integration module to realize the multiplication and accumulation calculation operation in the memory, which reduces the power consumption requirement during calculation and improves the calculation efficiency under the premise of ensuring a certain accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0036] Figure 1 is a top-level system block diagram of a fast Fourier transform device provided by an embodiment of the present invention;
[0037] Figure 2 is a structural diagram of a rotation factor management module provided by an embodiment of the present invention;
[0038] Figure 3 It is a schematic diagram of the workflow of the scheduling management status module provided by an embodiment of the present invention;
[0039] Figure 4 is a schematic flow chart of a method for calculating a fast Fourier transform provided by an embodiment of the present invention;
[0040] Figure 5 It is another flowchart of the method for calculating the fast Fourier transform provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0042] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0043] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0044] It should be noted that, in this article, step codes such as 101, 102, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute 102 first and then 101, etc., but these should all be within the scope of protection of this application.
[0045] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0046] like Figure 1 As shown, Figure 1 It is a top-level system block diagram of a fast Fourier transform device based on storage and computing integration provided by an embodiment of the present invention. The fast Fourier transform device includes: a system control register, a rotation factor management module, a scheduling management status module, a storage and computing integration module and a memory.
[0047] Among them, the system control register contains user-defined configuration information, including the current FFT calculation points, calculation enable, status of each module, etc. The user sets the calculation points and calculation enable, and then the system control register controls the initialization and calculation of the entire fast Fourier transform device. Specifically, when performing Fourier transform, the signal needs to be discretized, that is, the continuous signal is converted into a discrete signal. The FFT point number represents the number of sampling points of the discretized signal, which can be set by the user.
[0048] The rotation factor management module is used to generate rotation factors according to the FFT calculation points and iteration status through the analog sampling circuit, and send the generated rotation factors to the memory. The rotation factor management module works when the entire system is initialized and is responsible for calculating the rotation factor of each point. From the conjugate complex symmetry, it can be seen that the number of iterations set in the rotation factor management module is half of the number of FFT calculation points, and a total of N / 2 rotation factors need to be calculated, where N is the number of FFT calculation points configured by the user.
[0049] Among them, the rotation factor is related to the frequency of the AC signal. In the circuit, when the input signal is in the form of a sine wave or a complex exponential, the rotation factor can be used to simplify the calculation. The embodiment of the present application proposes a method of calculating the rotation factor by an analog sampling circuit. The rotation factor management module analog sampling circuit is used to replace the CORDIC (Coordinate Rotation Digital Computer) algorithm in the traditional FFT calculation to calculate the rotation factor, which can reduce the power consumption requirement during calculation while ensuring a certain accuracy.
[0050] In this embodiment, the rotation factors required for the FFT operation are obtained by storage plus calculation. The rotation factors stored in the SRAM used to store the rotation factors utilize the reducibility of the rotation factors, and the rotation factors read out are used to calculate the rotation factors required for the rotation factor adjustment process in other FFT operations. After the above-mentioned rotation factor management module is started, a read address and enable are generated according to the input current iteration state value, and the corresponding rotation factors are read out. Then, according to the number of FFT points, the current iteration state is combined with the read rotation factors, and the rotation factors required in the rotation factor adjustment process are calculated according to the iterative operation, and finally the end signal is pulled high to indicate the end of the operation.
[0051] The storage and computing module is mainly used to perform multiplication and accumulation operations. It should be noted that with the development of cloud computing and artificial intelligence (AI) applications in recent years, facing the data flood in the computing center, problems such as slow data transfer and high energy consumption have become key bottlenecks in computing. The transfer time of extracting data from the memory outside the processing unit is often hundreds or thousands of times the computing time. The useless energy consumption of the whole process is about 60%-90%, and the energy efficiency is very low. The biggest challenge of deep learning acceleration is the frequent movement of data between the computing unit and the storage unit. There are a large number of matrix multiplication calculations in artificial intelligence / deep learning calculations, which are essentially multiply-accumulate (MAC) operations. In-memory computing maps the calculation directly to the storage structure, with the highest energy efficiency and the lowest latency.
[0052] Therefore, this application realizes multiplication and accumulation operations by utilizing a storage-computation integrated architecture. The storage-computation integrated architecture can be understood as embedding computing power in the memory, and performing two-dimensional and three-dimensional matrix multiplication / addition operations with a new computing architecture, rather than optimizing the traditional logic operation unit or process. This can essentially eliminate unnecessary data movement delays and power consumption, improve the computing efficiency of artificial intelligence by hundreds or thousands of times, reduce costs, and break the "storage wall" and "power consumption wall". The basic idea is to move data calculations to the memory unit that stores data, thereby realizing in-situ calculations, eliminating bandwidth limitations and data movement costs. This technology embeds computing power in the memory and adopts a new computing architecture to realize matrix-vector multiplication and accumulation operations. The advantage of storage-computation integrated technology is that it can reduce the additional energy consumption caused by data handling and improve the efficiency of parallel processing of data. This technology is not only suitable for artificial intelligence computing, but can also be applied to sensor storage and computing integrated chips and brain-like chips, representing the mainstream direction of big data computing in the future.
[0053] In the basic architecture of the integrated memory and computing chip used in the embodiment of the present application, the weights of the neural network model can be mapped to the conductivity of the storage unit in the subarray, and the input feature map is loaded in parallel as the row voltage, and then multiplied in an analog manner (i.e., the input voltage is multiplied by the weighted conductivity), and the output vector is generated by summing the current on the column. This embodiment can effectively reduce the number of multipliers and adders by using the in-memory calculation scheme, thereby reducing power consumption. At the same time, the use of analog calculation can effectively reduce the calculation power consumption of the rotation factor.
[0054] Specifically, for FFT applications, the storage and calculation module needs to be divided into two parts for calculation: the real part and the imaginary part. Therefore, the storage and calculation module in this embodiment can include a real storage and calculation module and an imaginary storage and calculation module to perform multiplication and accumulation operations of real signals and imaginary signals respectively. In addition, the storage and calculation module needs to divide the FFT calculation points into multiple sub-areas for calculation according to a preset multiple during the calculation process. This is because the FFT calculation points in the embodiment of the present invention are generally large, so it is necessary to divide the calculation of N points into several sub-areas for calculation, where the sub-areas can be divided according to multiples of 64. For example, to calculate the FFT of 65536 points, 1024 sub-areas are required, and a total of 1024*1024 memory accesses are required to complete the calculation of the sub-areas. In the prior art, when the number of FFT calculation points is relatively large, the calculation efficiency is relatively low. The existing FFT calculation accelerators are generally designed according to 2048, 4096, and 8192 points. Therefore, if the sampling frequency is relatively high, the frequency resolution will be relatively low. The present invention expands the number of calculation points by increasing the SRAM memory to reach 65536 or even more points without affecting the calculation efficiency. At the same time, the embodiment of the present application uses an analog storage and calculation core to replace the multiplication and accumulation operation of the butterfly algorithm in the FFT transformation, which reduces the power consumption requirements during calculation while ensuring a certain accuracy, and the calculation efficiency is also improved.
[0055] Among them, the storage and computing integrated module includes multiple in-memory computing arrays, which are mainly composed of multiple in-memory computing units connected in rows and columns. The in-memory computing units in the same column are all connected to the same bit line, and the in-memory computing units in the same row are all connected to the same bit line. The in-memory computing units in the same column are connected in series to receive external input rotation factors, and the rotation factors are assigned to each in-memory computing unit; each bit line is connected to receive input data from the memory, and each bit line is connected to receive one of the input data. One of the input data is input into each in-memory computing unit on the bit line and multiplied with the rotation factor stored in the in-memory computing unit and then output through the bit line. Each bit line is connected to its own two digital-to-analog converters to output the calculation result data.
[0056] In a specific implementation, the in-memory computing unit adopts a 1R1T storage unit, which includes an RRAM resistor and a MOS tube connected in series. The source of the MOS tube is grounded through the RRAM resistor, the drains of all MOS tubes in the 1R1T storage unit in the same column are connected to the bit line, and the gates of all MOS tubes in the 1R1T storage unit in the same row are connected to their respective bit lines.
[0057] The top-level scheduling FSM module, also known as the scheduling management state module, is used to schedule the weight refresh, input control, and transfer of calculation results of the storage and computing module. Specifically, the scheduling management state module includes a pre-processing part and a post-processing part. The pre-processing part includes refreshing the rotation factor in each sub-area and counting the number of calculations. The post-processing part includes storing the calculation results and generating an interrupt signal when all sub-areas are calculated.
[0058] The memory SRAM is a large on-chip memory which is logically divided into three blocks according to its function, that is, the memory may include three storage areas, namely, a rotation factor area, an input signal area, and an output signal area.
[0059] It should be noted that the above-mentioned memory is generated by digital circuit design and is respectively connected to the in-memory computing array, address generation module, and data flow control module; the memory receives address data and timing control signals, and sends the original data that needs to be fast Fourier transformed and the data that needs to be fast Fourier transformed in each level to an in-memory computing array of the in-memory computing core to complete the calculation process, and receives the calculation result data generated by each level of calculation in the in-memory computing array.
[0060] In one embodiment, the rotation factor management module may include a sine wave generating circuit, a sampling clock circuit, an ADC, a sign control module, and an offset address calculation module. Figure 2 . After the sine wave generating circuit is started, the sampling clock circuit is used to receive the input signal. The ADC is used to synchronously sample the sampling signal generated by the sampling clock circuit to output the rotation factor. The sign control module is used to control the positive and negative rotation factors according to the input signal. The offset address calculation module is used to calculate the offset address and store the obtained rotation factor into the memory SRAM. The workflow of the above-mentioned rotation factor management module specifically includes:
[0061] 1. Set the number of iterations to N / 2, where N is the number of FFT calculation points configured by the user.
[0062] 2. Turn on the sine wave generating circuit.
[0063] 3. Input x to the sampling clock circuit, where the value of x ranges from [4PI / 1 - 4PI / N].
[0064] 4. After receiving the input, the sampling clock circuit will generate a sampling signal for the ADC to synchronously sample the sine wave signal and the delayed cosine wave signal to obtain the imaginary part and the real part of the rotation factor at time x.
[0065] 5. The main purpose of the sign control module is to control the positive and negative of the output signal according to the index of the input signal, that is, to make a positive and negative logical judgment on the output signal.
[0066] 6. Calculate the storage offset address according to the base address of the rotation factor, and store the obtained rotation factors into different SRAM areas respectively.
[0067] 7. Finally, repeat steps 3 to 6 until the number of iterations is reached.
[0068] Among them, the rotation factor in FFT (Fast Fourier Transform) refers to the element of the rotation matrix when calculating the Fourier transform, that is, the unit root on the complex plane. The rotation factor is the core of the FFT calculation. In the prior art, it can be calculated by recursive algorithm or coordinate rotation digital calculation method, etc. The embodiment of the present application innovatively uses analog sampling circuit to replace the CORDIC (Coordinate Rotation Digital Computer) algorithm in the traditional FFT calculation to calculate the rotation factor. While ensuring a certain accuracy, the power consumption requirement during calculation is reduced.
[0069] In one embodiment, when the sign control module performs positive and negative control on the output signal according to the index of the input signal, the index of the row and the index of the column corresponding to each element in the discrete Fourier transform matrix are brought into the Euler formula for calculation. For example, in the matrix The elements can be represented as ,in is the index of the row, is the index of the column. Each w represents a rotation factor, which can be known from Euler's formula:
[0070]
[0071] Where j is an imaginary number, satisfying j²=-1. Therefore, for a storage core, we only need to calculate the w matrix parameters in advance, store them in the storage core, and then input the x item to obtain the corresponding Fourier transformed data X.
[0072] In one embodiment, the workflow of the scheduling management status module is shown in Figure 3 The pre-processing part is responsible for refreshing the rotation factors of the sub-area and counting the number of calculations, while the post-processing part is mainly responsible for calculating the storage address of the calculation results, storing the results, and generating the interrupt signal. The specific state transfer process is as follows:
[0073] 1. The system is powered on, the state machine is reset, and the user is waiting for initialization operation.
[0074] 2. After the user performs the initialization operation, the rotation factor management module is called to initialize and calculate the rotation factor. After all modules are initialized, set the init_comp_flag configuration to 1.
[0075] 3. When init_comp_flag is 1 and global_start_flag is 0, it enters the sleep state and waits for user operation.
[0076] 4. When init_comp_flag is 1 and global_start_flag is 1, enter the pre-processing state. Specifically, in this pre-processing state, the sub-process is as follows: First, determine whether the counter cnt_cur_blocks of the current sub-area calculation has completed the calculation of all sub-areas. If completed, move new data from the user space, and add 1 to cnt_cur_signal, then clear the counter cnt_cur_blocks, and start a new signal calculation; if not completed, take out the rotation factor corresponding to the current sub-area from the storage factor SRAM area, and put it into the corresponding real number storage and calculation module and imaginary number storage and calculation module according to the real number signal and imaginary number signal respectively. Finally, after the data and counters are prepared, set preprocess_comp_flag to 1.
[0077] 5. When preprocess_comp_flag is 1, it enters the calculation state, and then triggers the storage and calculation module to perform calculations. After the calculation is completed, preprocess_comp_flag is reset and cim_comp_flag is set to 1.
[0078] 6. When cim_comp_flag is 1, enter the post-processing state. Specifically, in this post-processing state, the sub-process is as follows: first, store the calculation results in the corresponding SRAM real area and imaginary area, and then determine whether all user-given signals have been calculated according to cnt_cur_signal. If the calculation is completed, an interrupt signal is generated to notify the user, and all counters are cleared, and preprocess_comp_flag is set to 1, global_start_flag is set to 0, and enter the sleep state to wait for further user operations. If the calculation is not completed, only preprocess_comp_flag is set to 1 after the result is stored, and prepare to enter the preprocessing stage.
[0079] As can be seen from the above, the fast Fourier transform device based on storage and calculation integration provided in this embodiment includes a system control register, a rotation factor management module, a scheduling management state module, a storage and calculation integration module and a memory, the system control register sets the FFT calculation points and initializes and controls the calculation of the fast Fourier transform device, the rotation factor management module generates the rotation factor by simulating the sampling circuit and according to the FFT calculation points and the iteration state, and sends the generated rotation factor to the memory, the scheduling management state module retrieves the calculation data from the memory to the storage and calculation integration module, controls the input of the storage and calculation integration module, and moves the calculation result of the storage and calculation integration module to the memory, and the storage and calculation integration module divides the calculation data into a real part and an imaginary part, and performs multiplication and accumulation operations on the real part and the imaginary part respectively to output the calculation result. The present invention adopts an analog calculation scheme to calculate the rotation factor, and adopts in-memory calculation to calculate the multiplication and accumulation operation, which reduces the power consumption requirement during calculation and improves the calculation efficiency under the premise of ensuring a certain accuracy.
[0080] An embodiment of the present invention also provides a fast Fourier transform method based on storage and computing integration. The executor of the fast Fourier transform calculation method can be the fast Fourier transform device based on storage and computing integration provided by the embodiment of the present invention, or a server integrating the fast Fourier transform device based on storage and computing integration, wherein the fast Fourier transform device based on storage and computing integration can be implemented in hardware or software.
[0081] Please continue reading Figure 4 , Figure 4 : is a schematic diagram of a fast Fourier transform method based on storage and computing integration provided by an embodiment of the present invention. The specific process of the method can be as follows:
[0082] 101, set the number of FFT calculation points;
[0083] 102, generating a rotation factor by simulating a sampling circuit and according to the number of FFT calculation points and an iteration state;
[0084] 103, retrieve the calculation data and divide the calculation data into a real number part and an imaginary number part through the storage and calculation integrated module, and perform multiplication and accumulation operations on the real number part and the imaginary number part respectively through the storage and calculation integrated module to output the calculation result;
[0085] 104, storing the calculation results into the corresponding real number area and imaginary number area in the memory.
[0086] When calculating and generating the above rotation factors, it can be known from the conjugate complex symmetry that a total of N / 2 rotation factors need to be calculated, where N is the number of FFT calculation points configured by the user.
[0087] Further reading Figure 5, the above step 102 may specifically include:
[0088] 1021, set the number of iterations to half of the number of FFT calculation points.
[0089] 1022, receiving an input signal to a sampling clock circuit to generate a sampling signal, and synchronously sampling and analog-to-digital converting an output signal of a sine wave generating circuit according to the sampling signal to output a rotation factor.
[0090] 1023, positive or negative control of the rotation factor according to the input signal.
[0091] 1024, calculate the storage offset address, and store the obtained rotation factor, and repeat the above steps until the number of iterations is reached.
[0092] Specifically, the calculation process of the above-mentioned rotation factor can be implemented by a rotation factor management module, and the rotation factor management module can include a sine wave generating circuit, a sampling clock circuit, an ADC, a sign control module, and an offset address calculation module. Among them, after the sine wave generating circuit is started, the sampling clock circuit is used to receive an input signal. The ADC is used to synchronously sample and digital-to-analog convert the sampling signal generated by the sampling clock circuit to output the rotation factor. The sign control module is used to control the positive and negative of the rotation factor according to the input signal. The offset address calculation module is used to calculate the offset address and store the obtained rotation factor in the memory SRAM. Among them, the number of iterations required to be set when calculating the rotation factor is also N / 2. The specific calculation process is: turn on the sine wave generating circuit and input the signal x to the sampling clock circuit, x is a value between [4PI / 1-4PI / N]. After receiving the input, the sampling clock circuit will produce a sampling signal for the ADC to synchronously sample and digital-to-analog convert the sine wave signal output by the sine wave generating circuit and the delayed cosine wave signal, respectively, to obtain the imaginary part and the real part of the rotation factor at time x. Then, the output signal is positively and negatively controlled according to the index of the input signal, that is, positive and negative logic control, and finally the offset address is calculated, and the obtained rotation factors are stored in the corresponding SRAM area. Repeat the above steps of input sampling circuit to calculate the offset address and store the rotation factor until the number of iterations is reached to complete the calculation of all rotation factors.
[0093] In one embodiment, the above-mentioned storage and calculation integrated module is used to perform multiplication and accumulation operations, and for FFT applications, it is necessary to divide the calculation into two parts: the real part and the imaginary part. At the same time, since the number of points of the FFT of the present invention is generally large, the number of points of the FFT calculation can also be divided into multiple calculation areas in the memory according to the preset multiples, and the memory access calculation is performed according to the rotation factors corresponding to each of the calculation areas, and an interrupt signal is generated after the calculation is completed. That is, it is necessary to divide the calculation of N points into several sub-areas for calculation, wherein the sub-areas can be divided according to multiples of 64, such as to calculate the FFT of 65536 points, then 1024 sub-areas are required, and at this time a total of 1024*1024 memory accesses are required to complete the calculation of the sub-areas.
[0094] Among them, the storage and computing integrated module may include multiple in-memory computing arrays, which are mainly composed of multiple in-memory computing units connected in rows and columns. The in-memory computing units in the same column are all connected to the same bit line, and the in-memory computing units in the same row are all connected to the same bit line. The in-memory computing units in the same column are connected in series to receive external input rotation factors, and the rotation factors are assigned to each in-memory computing unit; each bit line is connected to receive input data from the memory, and each bit line is connected to receive one of the input data. One of the input data is input into each in-memory computing unit on the bit line and multiplied with the rotation factor stored in the in-memory computing unit and then output through the bit line. Each bit line is connected to its own two digital-to-analog converters to output the calculation result data.
[0095] All of the above technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described in detail here.
[0096] From the above, it can be seen that the fast Fourier transform method based on storage and calculation integration proposed in the embodiment of the present invention can set the number of FFT calculation points, generate rotation factors according to the number of FFT calculation points and iteration status through the analog sampling circuit, retrieve the calculation data and divide the calculation data into real part and imaginary part through the storage and calculation integration module, and perform multiplication and accumulation operations on the real part and the imaginary part respectively through the storage and calculation integration module to output the calculation results, and store the calculation results in the corresponding real area and imaginary area in the memory. The embodiment of the present application adopts an analog storage and calculation core to replace the multiplication and accumulation operation of the butterfly algorithm in the FFT transformation, and at the same time adopts an analog sampling circuit to replace the algorithm in the traditional FFT calculation to calculate the rotation factors. While ensuring a certain accuracy, the power consumption requirement during calculation is reduced.
[0097] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0098] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any one of the storage-computation-integrated fast Fourier transform methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:
[0099] Set the number of FFT calculation points;
[0100] Generate a rotation factor by simulating a sampling circuit and according to the number of FFT calculation points and iteration state;
[0101] Retrieving calculation data and dividing the calculation data into a real number part and an imaginary number part through the storage and calculation integrated module, and performing multiplication and accumulation operations on the real number part and the imaginary number part respectively through the storage and calculation integrated module to output a calculation result;
[0102] The calculation results are stored in the corresponding real number area and imaginary number area in the memory.
[0103] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0104] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0105] Since the computer program stored in the storage medium can execute the steps in any one of the fast Fourier transform calculation methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the fast Fourier transform calculation methods provided in the embodiments of the present application can be achieved. For details, please refer to the previous embodiments and will not be repeated here.
[0106] The above is a detailed introduction to a fast Fourier transform device and method based on storage and computing integration provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A fast Fourier transform device based on storage and computing integration, characterized in that: include: System control register, rotation factor management module, scheduling management status module, storage and computing module and memory; The system control register is used to set the number of FFT calculation points and to initialize and control the calculation of the fast Fourier transform device; The rotation factor management module is used to generate a rotation factor according to the FFT calculation points and the iteration state through an analog sampling circuit, and send the generated rotation factor to the memory. The rotation factor management module includes a sine wave generating circuit, a sampling clock circuit, an ADC, a sign control module and an offset address calculation module. After the sine wave generating circuit is started, the sampling clock circuit is used to receive an input signal. The ADC is used to perform synchronous sampling and analog-to-digital conversion on the output signal of the sine wave generating circuit according to the sampling signal generated by the sampling clock circuit to output the rotation factor. The sign control module is used to control the positive and negative of the rotation factor according to the input signal. The offset address calculation module is used to calculate the offset address and store the obtained rotation factor in the memory; The scheduling management state module is used to retrieve the calculation data from the memory to the storage-computation integrated module, control the input of the storage-computation integrated module, and move the calculation results of the storage-computation integrated module to the memory; The storage and calculation integrated module is used to divide the calculation data into a real number part and an imaginary number part, and perform multiplication and accumulation operations on the real number part and the imaginary number part respectively to output the calculation result; The memory divides the FFT calculation points into a plurality of calculation areas according to a preset multiple, performs memory access calculation according to the rotation factors corresponding to each of the calculation areas, and generates an interrupt signal after the calculation is completed.
2. The fast Fourier transform device according to claim 1, characterized in that: The ADC is specifically used to synchronously sample and perform analog-to-digital conversion on the sine wave signal generated by the sine wave generating circuit and the delayed cosine wave signal, respectively, so as to obtain the imaginary part and the real part of the rotation factor at the current moment.
3. The fast Fourier transform device according to claim 1, characterized in that: The storage and calculation integrated module includes a real number storage and calculation integrated module and an imaginary number storage and calculation integrated module, which respectively perform multiplication and accumulation operations of real signals and imaginary signals, and during the calculation process, the FFT calculation points are divided into multiple sub-areas according to preset multiples for calculation.
4. The fast Fourier transform device according to claim 3, characterized in that: The scheduling management state module includes a pre-processing part and a post-processing part. The pre-processing part is used to refresh the rotation factor in each sub-area and count the number of calculations. The post-processing part is used to store the calculation results and generate an interrupt signal when all sub-areas are calculated.
5. The fast Fourier transform device according to claim 1, characterized in that: The memory includes three storage areas, namely a rotation factor area, an input signal area and an output signal area.
6. The fast Fourier transform device according to claim 1, characterized in that: The number of iterations set in the rotation factor management module is half of the number of FFT calculation points.
7. A fast Fourier transform method based on storage and computing integration, characterized in that: The following steps are involved: Set the number of FFT calculation points; Generate the rotation factor by simulating the sampling circuit and according to the FFT calculation point number and iteration state, The method comprises: receiving an input signal to a sampling clock circuit to generate a sampling signal, synchronously sampling and analog-to-digital converting an output signal of a sine wave generating circuit according to the sampling signal to output a rotation factor, performing positive and negative control on the rotation factor according to the input signal, calculating an offset address, and storing the obtained rotation factor, and repeating the above steps until the number of iterations is reached; Retrieving calculation data and dividing the calculation data into a real part and an imaginary part through a storage-computation integrated module, and performing multiplication-accumulation operations on the real part and the imaginary part respectively through the storage-computation integrated module to output a calculation result, wherein the FFT calculation points are divided into a plurality of calculation areas in a memory according to a preset multiple, and memory access calculations are performed according to the rotation factors corresponding to each of the calculation areas, and an interrupt signal is generated after the calculation is completed; The calculation results are stored in the corresponding real number area and imaginary number area in the memory.
8. The fast Fourier transform method based on storage and calculation integration according to claim 7 is characterized in that: The method further comprises: Set the number of iterations to half the number of FFT calculation points.
