I have a synchronous subsystem that I want to enable only under certain conditions to avoid things like divide by zero errors. Unfortunately, adding an enable input seems to have no effect.
I created a very simple example that shows this problem:
Here is the top level of the model where I feed a sine wave into the subsystem and only enable when the value is greater than zero:
And here is the Enabled Synchronous Subsystem where I am simply calculating the reciprocal of the input.
If I run this simulation, I get divide by zero errors and the ouput appears as if the subsystem is always enabled:
Hwever, if i remove the Synchronous State Control Block, the output behaves as I would expect:
Why is this happening? Is this behavior as expected? I want to use Synchronous State Control because I will be generating HDL code from my model.