HDL Code Generation for Hit Crossing Block

HDL Code generation is not supported for Hit Crossing block. How do you model this block for HDL Code generation using basic blocks?

 采纳的回答

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 个)

类别

帮助中心File Exchange 中查找有关 General Applications 的更多信息

产品

版本

R2021a

标签

Community Treasure Hunt

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

Start Hunting!

Translated by