User guide

4-5
Simulating Your Design
Example 4-1 Save and Restart Example
% cat test.v
module simple_restart;
initial begin
#10
$display("one");
$save("test.chk");
$display("two");
#0 // make the following occur at restart
$display("three");
#10
$display("four");
end
endmodule
Now compile the example source file:
% vcs test.v
Now run the simulation:
% simv
VCS displays the following:
one
two
$save: Creating test.chk from current state of simv...
three
four
To restart the simulation from the state saved in the check file, enter:
% test.chk
VCS displays the following:
Restart of a saved simulation
three