hdl code generation for function block

I am using MATLAB function block for doing bit reversal in simulink model,I want to convert this simulink model into HDL code,then it is showing error that.. "Matlab function block is unsupported for hdl code generation while using native floating point" how to resolve this error.

回答(1 个)

Are you attempting to process single data types with your MATLAB Function block? This isn't supported by HDL Coder. In addition, as a single is a number and not a bit pattern to Simulink, it won't even have bits to reverse.

6 个评论

I am using 'bitrevorder' command in matlab function block to reverse the order of bit of 512 samples to get natural order of output of FFT,but it is giving an error that "Matblab function block is unsupported for HDL code generation when in native floating-point mode" please suggest me instead of it which other block can be used to get bit reversed order of 512 samples of fft.
To reverse the order of samples, I suggest using a RAM block to store in the values and them read them in reverse order once it fills up. Note that you need to be able to store the entire frame and only then can you read it out in reverse order.
For the first frame, you should write it from the first to the last address, and read it out from the last address to the first. For the second frame, you should write it from last address to first, and read it from the first address to the last address.
If by some chance, you are only looking to bit reverse the output of the FFT, there is an option on the FFT block (Output in bit-reversed order).
I am giving vectored data to FFT block,for vectored data only option out of input bit reverse order or output bit reverse order can be selected,so it can not use this option, i have to use bitrevorder command to get natural order of bit-reversed order of output plz anybody suggest how to use matlab function block with native fixed point
Do you have access to R2018a? Bit natural output was enabled for vectored FFT in R2018a. https://www.mathworks.com/help/dsp/release-notes.html
I am using MATLAB 2017 a
Just to check - can you stream the samples into the FFT one at a time? What is prompting the move to send in multiple samples into the FFT at a time?

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 HDL Code Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by