HDL Code Generation for Hit Crossing Block

2 次查看(过去 30 天)
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