Shifting the control to the DSP while the power stage stays in simulation gives you the flexibility to iterate the power stage design without needing to build a prototype, test the effects of changing operating conditions of the power stage, and easily set up intermediate DSP watch variables to aid with troubleshooting.
Setting up a PSIM PIL simulation is easy. After a few minor edits to the code you simply need to connect the DSP with a JTAG emulator to your PC and then PSIM handles the rest.
Once the simulation begins, the power stage simulates and passes information to the DSP which then executes the relevant code before passing it back to PSIM to allow the power stage to simulate further. The code on the DSP does not run in real-time, this allows users to have a very complex PSIM power stage.
While the PSIM PIL simulation is running, you can use the runtime graph windows to watch the simulation progress. When the simulation is finished the results are automatically loaded in SimView for post-simulation analysis.