Does HDL Coder always introduce delays to balance delay due to resource sharing?

2 ビュー (過去 30 日間)
Ali
Ali 2012 年 7 月 15 日
Hello,
In my Simulink model I have a lot of multipliers, and for HDL generation I try to use resource sharing optimization. I understand that the output of the optimized block will be delayed by N clock cycles where the N is the number of multipliers to be shared (sharing factor). The question is that does HDL coder always introduce balance delay blocks to parellel signals if the delay balancing option is selected or do we have to do it manually sometimes? I've tried that but I do not see any introduced delays in the code. Thank you.

回答 (2 件)

Ali
Ali 2012 年 7 月 20 日
It seems that every subsystem that is optimized for resource sharing delays its outputs by 1 unit delay regardless of how much resource sharing is used. So every parallel signal has to be delayed by one unit. This has to be done manually in Simulink, even if the Delay Balancing option is selected in the HDL Code generation options.

Girish Venkataramani
Girish Venkataramani 2012 年 7 月 24 日
Yes, delay balancing is always on by default in HDL Coder since R2011a. Each group of shared resource introduces a single unit delay on its path, which is balanced by delay balancing on parallel paths. Only a single delay is needed since the implementation appropriately oversamples to do time-multiplexing.
You can see these additional delays in the HDL code as well as in the validation model, which is generated every time resource sharing successfully runs (for a model xx.mdl, the validation model will be called gm_xx_vnl.mdl). Thus, you don't need to manually balance these delays.
If for whatever reason, delay balancing fails, a warning is generated in the command window and a more detailed explanation can be found in the optimization report (can be turned on through the HDL code generations tab of the model's configuration settings dialog; look for 'Generate Optimization Report').
Hope this clarifies.

Community Treasure Hunt

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

Start Hunting!

Translated by