MATLAB: Is it during balancing delays of the Simulink model that the added blocks do not include the initial condition of the already existing delay block

balancingclockcodedelayfeedbackgenerationHDL Coderlooppipeliningratescoped

I have a Simulink model for which I have prepared for HDL code generation. I have enabled scoped delay balancing for a masked subsystem which contains a feedback loop. One of the delays in my feedback loop contains an initial condition and when I generate the optimized HDL model, I noticed that the initial condition is not propagated to the added delays. 
Is there something that I am doing wrong? 

Best Answer

In general, when a model contains a feedback loop it is recommended to use delay balancing for the entire model instead of scoped delay balancing. This is recommended because it maintains functional behavior between the original model, the generated HDL optimized model, and the generated HDL code. 
It is also recommended that Clock Rate Pipelining be implemented for the entire model as this will allow for the initial condition to be propagated as expected from the delay block. 
Related Question