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 个)
Tim McBrayer
2018-3-15
0 个投票
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 个评论
DEEKSHA GUPTA
2018-3-19
Bharath Venkataraman
2018-3-19
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).
DEEKSHA GUPTA
2018-3-19
Bharath Venkataraman
2018-3-20
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
DEEKSHA GUPTA
2018-3-20
Bharath Venkataraman
2018-3-20
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!