Running .dll block at fixed step? or Evaluating at fixed steps

@RDunn and I worked on a PID example with an external clock (rising edge) to trigger input sampling and output update.

Direct GitHub link: https://github.com/robdunn4/QSpice/tree/main/PID_Controller
Reference Discussion: https://forum.qorvo.com/t/c-pid-controller-for-qspice-community-project/15690

SPICE uses dynamic timestep; the idea is to execute the algorithm when the timing condition is met (in your case, at a fixed period), making your DLL-block behave like a fixed step update.

Here is another example that samples input and updates output at fixed time intervals:
https://forum.qorvo.com/t/trunc-bug-simulator-occasionally-ignores-trunc-timestep/21895/9

1 Like