I'm using xrun for simulating a design. The full simulation takes pretty long (~2.5 hours) and I thought about saving a snapshot at the right point so next time I run the simulation with different tcl script I'll save some time. When I tried this approach, I saw that loading a saved snapshot takes about an hour (and this kind of defeats the purpose of having a snapshot for more fast validation)! I wanted to ask for your help in understanding what phase takes so long. The design is not re-elaborated as I tried with -noelab flag and the effect was the same. Also, I load the snapshot with xrun with the same arguments as were supplied to xrun when starting the simulation.
Would appreciate any help.
Normally once you've saved a snapshot of the simulation state, you would restart the simulation with a command like "xrun -r snapshot_name" so switches like -noelab would be totally unnecessary. What you've described makes it sound like you're going through a full recompilation, which is definitely not what you want in a save-and-restart flow.
It might be useful tell us how big the snapshot is, as that can have an impact on loading time (though an hour sounds excessive no matter how big the design is). You can infer the snapshot size from the final memory usage of the elaboration step when you elaborate with "-status -status3".
I would recommend to read the support article How to use Process-Based Save/Restart (PBSR) in a single-step and three-step flow to understand how to use save and restart correctly.
Thanks a lot, StephenH! PBSR was the key. Elaborating and simulating with -process_save flag did the job. Snapshot loading takes less than a minute now. I wonder why there is no a hint/warning when using the "old-style" save/restart. Something like "You use save/restart without PBSR. Loading might take longer than usual" will definitely be of much help.
Without the actual command-line arguments that you were using before, it's impossible to say why it was so slow, but I suspect it's because you were passing all the original compile arguments and thus forcing the design to be recompiled. As I mentioned before, the -noelab tells xrun to compile then skip the elaboration process, which is almost never what you want anyway, and certainly won't have helped your flow.
My cmd was pretty simple: xrun -r snap_name -gui -64BIT -sv_lib path_to_lib -input script.tcl.