General Description: Executing a Selective preset feature occasionally disrupts the functionality of state machines or counters.
After assigning D inputs of the counter flip-flops to some value (i.e. ff) using this feature, execute a preset, and step. Then, the counter either gets stuck at the preset value or starts counting incorrectly.
This happens to feedback-looped flip-flops (such as counters).
Solution
For selective preset functionality, follow these steps instead.
1. Use Signal->Add Signals to select all D pins of flip-flops that you want to set the preset value to: a. To select a flip flop pin, navigate the design hierarchy displayed on the right hand side of the Component Selection window. b. When the desired flip flop is listed in the center pane, double-click on it to bring up a list of pins for this flip flop on the right side. c. Now, double-click on the D input pin to add it to the Waveform Viewer. 2. Use Signal->Add Stimulators to assign stimulus (preset values) to all of these D inputs. 3. Step the simulation once. 4. Disable the stimulators by selecting the signal and clicking on the DS button in the Stimulator Selection window. 5. Now keep stepping the simulation.