I have been working on creating examples on how to generate Digital PWM as fast as possible for Digital SMPS simulation.
Brief explanation presentation can be found here:
Three Complexity Levels of PWM Implementation for Digital Controller Simulation.pdf (866.2 KB)
Simulation file can be accessed in https://github.com/physicboy/QSPICE/tree/main/PWM_example_SRbuck
The technique explained briefly in this article explained the method to speed up the simulation by exploiting the Trunc() feature in C-block function in Qspice.
The same method has been used for Totem pole PFC simulation, that gives me 2 sec transient simulation in only 21 sec