if-else equivalent block for hdl code generation
显示 更早的评论
hello,I want to use if-else block in my simulink model to generate hdl code but when i am using if-else simulink block and trying to use hdl coder then it is showing an error that,"if-else block is unsupported for hdl code generation",then i tried to use matlab function block and within matlab function i have written logic of if-else then it is showing an error that"MATLAB function block is unsupported for hdl code generation while using floating data type" So plz suggest which block(hdl supported block) can be used in place of if-else simulink block.
4 个评论
Walter Roberson
2018-3-25
Rewrite the MATLAB Function Block to avoid using floating point data.
DEEKSHA GUPTA
2018-3-25
编辑:DEEKSHA GUPTA
2018-3-25
Birdman
2018-3-25
Can you share your model?
Walter Roberson
2018-3-25
I need to see the MATLAB Function Block code.
采纳的回答
更多回答(1 个)
Vijayasagar Kommu
2018-3-27
0 个投票
If you want to model if else equivalent in HDL coder you have to use switch block. For nested if else ,you have to Cascade switch blocks in priority order.
类别
在 帮助中心 和 File Exchange 中查找有关 Native Floating Point 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!