Hi liuwenj,
That is correct. One slight modification to your statement: currently the Signal Switch is only changing the output of the delay unit. It does not affect the input. If you need to control what is being fed into the delay element, then the switch needs to be placed before the z⁻¹ block.
I ran the simulation file you provided and observed the following:
- When
nRst = 0, the output is correctly initialized to0.1 / 0.5, as expected. - When
nRst = 1, the output correctly comes from thez⁻¹block.
This behavior is consistent with your stated implementation.
It is possible I am misunderstanding the intended behavior. Could you clarify what you were expecting to see differently in the results?
