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

1 view (last 30 days)
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!

Answers (1)

Kiran Kintali
Kiran Kintali on 2 Nov 2022
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.

Categories

Find more on Code Generation in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!