📄 fft_model.m
字号:
% function [y] = fft_model(x,nps,inverse) % % Calculates the complex fixed-point FFT/IFFT for variable transform% sizes (stored in vector nps) of the complex input vector x.%% Uses the fixed point model of the Variable Streaming architecture.% % Inputs: x : Input complex vector. x will be split into blocks% of various sizes as specified by nps. The size of this% vector must greater than or equal to the sum of the% values in nps.% appended to the input sequence appropriately. % nps : A vector of transform Lengths to be applied on a block-by-block basis. % inverse : A vector specifying the FFT direction on a block-by-block basis. % 0 => FFT % 1 => IFFT% % Outputs y : The transform-domain complex vector output % % % 2001-2007 Altera Corporation, All Rights Reserved% % Automatically Generated: FFT MegaCore Function 7.2 Build 151 October, 2007 %% This file is automatically generated. DO NOT EDIT.% function [y] = fft_model(x,nps,inverse) addpath('c:/altera/72/ip/fft/lib//ip_toolbench//../');% Parameterization Space. N=2048;DATA_PREC=16;TWIDDLE_PREC=16;% Input is in natural order INPUT_ORDER=1; % Output is in bit-reversed orderOUTPUT_ORDER=0;% Fixed point data representationREPRESENTATION=0;% Data width at the input to each stage PRUNE=[0,0,0,0,0,0];y=[]; i=1;%for each block in the vector N, perform the transformfor i=1:length(nps) rin = real(x(1:nps(i))); iin = imag(x(1:nps(i))); [roc,ioc] = SVSfftmodel(rin,iin,DATA_PREC,TWIDDLE_PREC,N,nps(i),inverse(i), INPUT_ORDER, OUTPUT_ORDER,REPRESENTATION,PRUNE); y = [y, roc+j*ioc] ; %remove block from input vector x=x(nps(i)+1:end); end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -