30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

15<br />

plus cycles from VectorCopy, and IFFTComplexIP.<br />

Note:In the description of VectorCopythe number of cycles reported<br />

includes 3 cycles of C-function call overhead. Thus, the number of<br />

actual cycles from VectorCopyto add to IFFTComplexis 3 less than<br />

whatever number is reported for a stand alone VectorCopy. In the<br />

same way, the number of actual cycles from IFFTComplexIPto add to<br />

IFFTComplexis 4 less than whatever number is reported for a stand<br />

alone IFFTComplexIP.<br />

IFFTComplex (Continued)<br />

DSP Library<br />

2004 Microchip Technology Inc. DS51456B-page 69<br />

IFFTComplexIP<br />

Description: IFFTComplexIPcomputes the Inverse Discrete Fourier Transform<br />

of<br />

a source complex vector in place..<br />

Include: dsp.h<br />

Prototype: extern fractcomplex*IFFTComplexIP (<br />

int log2N,<br />

fractcomplex* srcCV,<br />

fractcomplex* twidFactors,<br />

int factPage<br />

);<br />

Arguments: log2N based 2 logarithm of N (number of complex elements<br />

in source vector)<br />

srcCV pointer to source complex vector<br />

twidFactors base address of twiddle factors<br />

factPage memory page for transform factors<br />

Return Value: Pointer to base address of source complex vector.<br />

Remarks: N mustbe an integer power of 2.<br />

The elements in source complex vector are expected in bit reverse<br />

order. The resulting transform is stored in natural order.<br />

The srcCVvector must be allocated at a modulo alignment of N.<br />

To avoid saturation (overflow) duringcomputation, the magnitude of the<br />

values of the source complex vector shouldbe in the range [-0.5, 0.5].<br />

If the twiddle factors are stored in X-Data space, twidFactorspoints<br />

to the actual address where the factors are allocated. If the twiddle<br />

factors are stored in program memory, twidFactorsis the offset from<br />

the program page boundary where the factors are allocated. This latter<br />

BitReverseComplex.<br />

Từ chương trình (hướng dẫn 24-bit):<br />

11<br />

cộng thêm từ chương trình từ FFTComplexIP, và<br />

BitReverseComplex.<br />

Chu kỳ (bao gồm cả cuộc gọi C-chức năng và trả các chi phí):<br />

15<br />

cộng với chu kỳ từ FFTComplexIP, và BitReverseComplex.<br />

Lưu ý: Trong các mô tả về số FFTComplexIPthe của chu kỳ<br />

báo cáo bao gồm 3 chu kỳ của C-chức năng gọi điện trên không. Như vậy,<br />

số chu kỳ thực tế từ FFTComplexIPto thêm vào<br />

IFFTComplexIPis 3 ít hơn bất cứ số được báo cáo cho một<br />

đứng một mình<br />

FFTComplexIP. Trong cùng một cách, số chu kỳ thực tế từ<br />

BitReverseComplexto thêm vào IFFTComplexIPis 2 ít hơn<br />

bất cứ số được báo cáo cho một đứng một mình BitReverseComplex.<br />

TwidFactorInit<br />

Mô tả: TwidFactorInitgenerates nửa đầu tập hợp các yếu tố quay vòng<br />

yêu cầu của một Discrete Fourier Transform hoặc rời rạc Cosine Transform,<br />

và đặt kết quả trong vector đến phức tạp. Có hiệu quả,<br />

tập hợp chứa các giá trị:<br />

, Trong đó 0 ≤k ≤N / 2, cho conjFlag = 0<br />

, Trong đó 0 ≤k ≤N / 2, cho conjFlag! = 0<br />

Bao gồm: dsp.h<br />

Prototype: fractcomplex extern * TwidFactorInit (<br />

int log2N,<br />

fractcomplex * twidFactors,<br />

int conjFlag<br />

);<br />

Đối số: log2N dựa 2 logarit của N (số yếu tố phức tạp<br />

cần thiết bởi một DFT)<br />

twidFactors con trỏ đến các yếu tố quay vòng phức tạp<br />

conjFlag cờ để cho biết giá trị liên hợp ornot là<br />

để được tạo ra<br />

Quay trở lại giá trị: Con trỏ trỏ tới địa chỉ cơ sở các yếu tố quay vòng.<br />

IFFTComplexIP (Tiếp theo)<br />

WN k () e<br />

j<br />

2πk

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!