HDLCODER support function invoke function?

8 ビュー (過去 30 日間)
satish guruma
satish guruma 2018 年 2 月 8 日
回答済み: Bharath Venkataraman 2018 年 2 月 8 日
Dear all
Currently I'm using HDLFFT, I think it works as well as using just one function.
But I want to modify as the below,
function [yOut,validOut,test] = HDLFFT8(yIn,validIn)
%HDLFFT8
% Processes one sample of FFT data using the dsp.HDLFFT System object(TM)
% yIn is a fixed-point scalar or column vector.
% validIn is a logical scalar value.
% You can generate HDL code from this function.
persistent fft8;
if isempty(fft8)
fft8 = dsp.HDLFFT('FFTLength',8 );
end
[yOut,validOut] = fft8(complex(yIn),validIn);
test = yOut.*conj(yOut)/(8*768);
end
Is this possible way to implement hdl by using hdl coder? If not, what am I supposed to do ?
  2 件のコメント
Birdman
Birdman 2018 年 2 月 8 日
Where does fft8 come from?
Walter Roberson
Walter Roberson 2018 年 2 月 8 日
It is assigned the dsp.HDLFFT system object the first time the function is called.

サインインしてコメントする。

採用された回答

Bharath Venkataraman
Bharath Venkataraman 2018 年 2 月 8 日
You can run this through the HDL code generation workflow. Any functions that are supported for HDL will generate HDL code. Functions not supported will be flagged.
Note that it is probably best for you to pipeline the scaling as well. You can do so by using the dsp.Delay System object at the output of the scaling.

その他の回答 (0 件)

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by