The present invention relates to Digital Signal Processing (DSP) in general, and more particularly to methods and apparatus for improved “in-place” memory management for Fast Fourier Transform (FFT) calculations.
A Digital Signal Processor (DSP) is a special-purpose computer that is designed to optimize digital signal processing tasks such as Fast Fourier Transformation (FFT), digital filtering, image processing, and speech recognition. DSP applications are typically characterized by real-time operation, high interrupt rates, and intensive numeric computations. In addition, DSP applications tend to be intensive in memory access operations and require the input and output of large quantities of data.
In DSP architectures that perform FFT calculations data are read from and written to memory in several stages. Some DSP architectures employ separate memory spaces for input data and output data. In order to reduce the amount of memory required for FFT, “in-place” memory management schemes have been developed whereby the FFT input data memory space is overwritten with the results of FFT calculations, thus eliminating the need for an additional memory space for storing the results at each stage of the FFT. Where a single memory space is used to store the FFT input data, two memory read cycles are generally needed to fetch the two data points (one data point comprises two data values, one real and one imaginary) required for each FFT multiplication operation. This may theoretically be reduced to one memory read cycle by using two memory spaces, each storing half of the FFT data points to be input, whereby one of the two data points is fetched from the first memory space at the same time the other data point is fetched from the second memory space. However, in order to ensure that every two FFT data points require only one memory read cycle throughout each stage of the FFT, the results of one stage of the FFT must be written in-place to the two memory spaces such that in the following stage each of the two data points in each data point grouping resides in a different memory space.
The following table labeled Table 1 illustrates the data point groupings required for each stage of a 16 data point FFT:
Assuming that prior to stage 0 data points 0-7 reside in a first memory space X and data points 8-16 reside in a second memory space Y, each of the data point groupings in stage 0 will require only one memory read cycle to be fetched from memory, as each data point in each grouping resides in a separate memory space (e.g., data points 0 and 8 in data point grouping 0,8 reside in separate memory spaces X and Y). However, should the results of stage 0 be written in-place such that the results of an FFT calculation upon a data point are written to the location in the memory space from which the data point was fetched, each of the data point groupings in stages 1-3 will require two memory read cycles to be fetched from memory, as each data point in each grouping resides in the same memory space (e.g., both of data points 0 and 4 in data point grouping 0,4 in stage 1 resides in memory space X).
The present invention seeks to provide methods and apparatus for improved “in-place” memory management for Fast Fourier Transform (FFT) calculations that ensure that every two FFT data points require only one memory read cycle throughout each stage of the FFT.
There is thus provided in accordance with a preferred embodiment of the present invention a method for in-place memory management in a Digital Signal Processing (DSP) architecture performing a Fast Fourier Transformation (FFT) upon a sequence of N data points, the sequence numbered from 0 to N-1, the method including storing each of the data points numbered from 0 to (N/2)-1 in a first memory space X and each of the data points numbered N/2 to N-1 in a second memory space Y, for each FFT stage 0 data point grouping including a first data point of the data points in the first memory space X and a corresponding second data point of the data points in the second memory space Y determining the parity of a data point memory index corresponding to the first and second data points, storing, if the parity is of a first parity value, the results of an FFT operation upon the first data point at the memory address in the first memory space X from which the first data point was fetched and the result of an FFT operation upon the second data point at the memory address in the second memory space Y from which the second data point was fetched, and storing, if the parity is of a second parity value, the results of an FFT operation upon the first data point at the memory address in the second memory space Y from which the second data point was fetched and the result of an FFT operation upon the second data point at the memory address in the first memory space X from which the first data point was fetched.
Further in accordance with a preferred embodiment of the present invention the method further includes for any FFT stage Z subsequent to stage 0 and each FFT stage Z data point grouping including a first data point in the first memory space X and a corresponding second data point in the second memory space Y, storing the results of an FFT operation upon the first data point at the memory address in the first memory space X from which the first data point was fetched and the results of an FFT operation upon the second data point at the memory address in the second memory space Y from which the second data point was fetched.
It is appreciated throughout the specification and claims that the term “data point” refers to a pairing of two data values, a real value and an imaginary value.
It is also appreciated throughout the specification and claims that the term “data point memory index” refers to the minimum number of addressing bits needed to uniquely identify one data point from another within a single memory space.
The present invention will be understood and appreciated more fully from the following detailed description taken in conjunction with the appended drawings in which:
Reference is now made to
The arrangement of the data points within memory spaces X and Y may be seen with particular reference to
A data point memory index 14 may be defined for each data point as the minimum number of addressing bits needed to uniquely identify one data point from another within a single memory space. Thus, where an FFT comprises 16 data points with data points 0-7 stored contiguously in memory space X and data points 8-15 stored contiguously in memory space Y, a data point memory index of three bits is required.
The method of
Returning now to the method of
The storage of FFT stage 0 results may be seen with particular reference to
It may be seen with particular reference to
The methods and apparatus disclosed herein have been described without reference to specific hardware or software. Rather, the methods and apparatus have been described in a manner sufficient to enable persons of ordinary skill in the art to readily adapt commercially available hardware and software as may be needed to reduce any of the embodiments of the present invention to practice without undue experimentation and using conventional techniques.
While the present invention has been described with reference to a few specific embodiments, the description is intended to be illustrative of the invention as a whole and is not to be construed as limiting the invention to the embodiments shown. It is appreciated that various modifications may occur to those skilled in the art that, while not specifically shown herein, are nevertheless within the true spirit and scope of the invention.
Number | Date | Country | |
---|---|---|---|
Parent | 09586775 | Jun 2000 | US |
Child | 10911524 | Aug 2004 | US |