"Detect Increase" causes multiple identical HDL files to be generated with HDL coder

1 回表示 (過去 30 日間)
Christopher Shaffer
Christopher Shaffer 2022 年 11 月 1 日
回答済み: Kiran Kintali 2022 年 11 月 2 日
Hello,
I am encountering an issue with HDL code generation, simulink blocks from the HDL coder library are generating files for every instance in my model, this results in a lot of unnecessary clutter. I'm not able to make these blocks atomic because they are default library blocks.
Thanks!

回答 (1 件)

Kiran Kintali
Kiran Kintali 2022 年 11 月 2 日
Please consider this option to increase reuse of shared modules.
https://www.mathworks.com/help/hdlcoder/ug/generating-reusable-code-for-atomic-subsystems.html
makehdl(dut, 'SubsystemReuse', 'Atomic and Virtual')
The attached module has multiple Detect blocks. They all generate single shared module/entity.
### Working on test_detect_inc/Subsystem1/Subsystem/Detect Increase as hdlsrc\test_detect_inc\Detect_Increase.vhd.
### Working on test_detect_inc/Subsystem1/Subsystem as hdlsrc\test_detect_inc\Subsystem.vhd.
### Working on test_detect_inc/Subsystem1 as hdlsrc\test_detect_inc\Subsystem1.vhd.
### Code Generation for 'test_detect_inc' completed.

カテゴリ

Help Center および File ExchangeCode Generation についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by