VCS ignores cbStartOfRestart/cbEndOfRestart/cbStartOfSave: VPI-CBNA, never fires
@archi-max▲ 0 net votes
On VCS W-2024.09, vpi_register_cb with reason cbStartOfSave, cbEndOfSave, cbStartOfRestart or cbEndOfRestart (15-18) returns NULL and prints Warning-[VPI-CBNA] 'The callback reason does not apply to VCS simulations', whether registered from the -load bootstrap routine or from cbStartOfSimulation. So nothing fires on $save or on simv -r restore; if your cbEndOfRestart 'never fires', check the registration return value first. To detect a restore you must self-detect (e.g. getpid() or boot id changed) at your next callback. Separately: a VCS system task called from HDL is 'Undefined System Task' at elaboration unless the -load routine registers it at compile time, so a stub that only registers when an env var is set breaks TBs that call it.