if-else equivalent block for hdl code generation

8 visualizaciones (últimos 30 días)
DEEKSHA GUPTA
DEEKSHA GUPTA el 25 de Mzo. de 2018
Respondida: Vijayasagar Kommu el 27 de Mzo. de 2018
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 comentarios
Birdman
Birdman el 25 de Mzo. de 2018
Can you share your model?
Walter Roberson
Walter Roberson el 25 de Mzo. de 2018
I need to see the MATLAB Function Block code.

Iniciar sesión para comentar.

Respuesta aceptada

Kiran Kintali
Kiran Kintali el 26 de Mzo. de 2018
Editada: Walter Roberson el 26 de Mzo. de 2018
MATLAB Function block does not yet support Native Floating Point. This is a future enhancement under consideration.
https://www.mathworks.com/videos/hdl-coder-native-floating-point-123505.html please watch the video to see how to enable native floating point mode in the GUI to generate HDL for data type conversion block.

Más respuestas (1)

Vijayasagar Kommu
Vijayasagar Kommu el 27 de Mzo. de 2018
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.

Community Treasure Hunt

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

Start Hunting!

Translated by