HDL Coder reset control
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Andrew
le 8 Fév 2013
Réponse apportée : xiaodong yu
le 20 Juin 2024
Hi, Simulink HDL Coder: is it possible to control the generation of the vhdl reset clause on a block by block basis?
In general, most flops in a datapath design dont require reset. we just reset the input of datapath, and wait long enough for the known input to propagate through the datapath and put the design in a well defined state. Anything with feedback requires a reset. By using reset only when required like this, we save fpga routing resource, and produce more efficient, higher performance designs.
However,HDL coder produces vhdl with a reset on every flop. (we use sychronous reset). Is there a way for us to prevent hdl coder adding resets on all flops? can we control it?
cheers andrew
0 commentaires
Réponse acceptée
Tim McBrayer
le 11 Fév 2013
Modifié(e) : Tim McBrayer
le 28 Fév 2017
Andrew,
There is a block-level parameter that allows the reset to be disabled on a block by block basis. You can access this parameter by right-clicking on a Delay block and choosing HDL Code -> HDL Block Properties. On this dialog, change ResetType from 'default' to 'none'. This sets the register generated from that Delay block to be generated with no reset.
The ResetType block parameter chooses whether a block will generate a reset or not. 'None' will not generate a reset; 'default' will generate whatever sort of reset is configured for HDL Coder in its Global Settings Configuration Parameters pane.
Since you have stated that you want the default to be no reset, the GUI-based interactive approach will be tedious. To script this, you can use the hdlset_param command, which has the syntax:
hdlset_param(block, parameter, value)
You can combine this with find_system to set all the Delay blocks in your model to have no reset:
hdlset_param(find_system('modelname', 'BlockType', 'Delay'), 'ResetType', 'none')
This will change the value of the HDL block parameter on all Delay blocks in your model to 'none'. Block parameters are persistent and are saved in the model, so this should be a one-time configuration. You can then go back and re-add a reset to those Delay blocks that require it.
3 commentaires
luckfy zhang
le 21 Avr 2018
Hello, you answer seems do not applicable for me since there are only asynchronous and synchronous choice for ResetType. And I cannot set this parameter to none. My Matlab version is R2015b. Could you provide me for some help?
Plus de réponses (1)
xiaodong yu
le 20 Juin 2024
Hi Androw
I want to find out all the delay module with "default reset". I use following command, but it is failed. do you have any suggestions?
find_system('modelname', 'BlockType', 'Delay','ResetType','default')
Apreciate your help.
Regards
XD
0 commentaires
Voir également
Catégories
En savoir plus sur Speed Optimization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!