MATLAB Answers

HDL Code Generation for Hit Crossing Block

1 ビュー (過去 30 日間)
Kiran Kintali
Kiran Kintali 2021 年 8 月 31 日
回答済み: Kiran Kintali 2021 年 8 月 31 日
HDL Code generation is not supported for Hit Crossing block. How do you model this block for HDL Code generation using basic blocks?

採用された回答

Kiran Kintali
Kiran Kintali 2021 年 8 月 31 日
HDL code generation is currently not supported for Hit Crossing block. However Hit Crossing block functionality can be implemented using Detect blocks with Compare to Constant.
Hit Crossing with rising direction:
Hit Crossing with rising direction can be implemented using Detect increase block with Compare to constant. Output will be true when Detect increase block output is true and input equals to Hit crossing offset value.
Hit Crossing with falling direction:
Hit Crossing with rising direction can be implemented using Detect decrease block with Compare to constant. Output will be true when Detect decrease block output is true and input equals to Hit crossing offset value.
Hit Crossing with either direction:
Hit Crossing with either direction can be implemented using Compare to Constant block with constant value as 'Hit crossing offset'. In either direction, for the zero crossing detection output will be true. One detect block will be required to detect the zero crossing.
Attaching a HDL friendly Simulink model having workaround subsystems for rising, falling and either hit crossing blocks.

その他の回答 (0 件)

カテゴリ

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by