Why do i get an error in the Fixed Point Conversion Step?
Mostra commenti meno recenti
Error: The function 'HDLIFFT128' contains persistent variables 'ifft128' and has specialization 'HDLIFFT128_s1' associated with it. Function specializations containing persistent variables are not supported for fixed-point conversion. Consider rewriting your algorithm such that it does not use persistent variables within functions that require specialization.
I am trying to generate HDL Code from this main function.
function [out1,out2] = main(x,y,z)
%call subfunction 1
out1 = sub1(x);
%call subfunction 2
out2 = sub2(y,z);
end
Sub-function 2 code:
function [yOut,validOut] = HDLIFFT128(yIn,validIn)
%HDLIFFT128
% Processes one sample of data using the dsp.HDLIFFT System object(TM)
% yIn is a fixed-point scalar or column vector.
% validIn is a logical scalar.
% You can generate HDL code from this function.
persistent ifft128;
if isempty(ifft128)
ifft128 = dsp.HDLIFFT('FFTLength',128);
end
[yOut,validOut] = step(ifft128,yIn,validIn);
end
Risposta accettata
Più risposte (1)
Bharath Venkataraman
il 13 Lug 2016
0 voti
Pablo, splitting the function into a main function and calling the IFFT function from it resulted in HDL code generation. Here are the functions split up. Please replace the testbench and design files as needed.
Categorie
Scopri di più su HDL-Optimized Filters and Transforms in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!