2.4.17 save/restore

This is Veritak's unique feature because Veritak saves not only the state of simulator but also synchronized waveform as well.
Important note is no different version compatibility is considered for the time being.

The usage of this function is rather complicated ,let's look at this function by following examples.
Before trying the tutorial, please make sure you have a lot of disk space (at least 1.5GB on default project setting )

First, you must make another project

Let's begin with loading a sample project, samples/save_to_disk.vtakprj.
This is simple counter project. Press Pause button to stop.



Then save the project as " physical_to_disk_save" with Save to Physical Disk checked  (In this mode waveform manager is always ON.)




Then load the project as below.




You should see following screen. Project Loading should be un-successful.
Loading project was compiling the project, that is true for normal project.

However this project is for loading  Saved States of simulator or Saved waveforms,
First you should do, is Recompile the project to reset the state. 






Recompile makes normal compilation process. .


Run for about 1sec by Pressing Go button and press Pause button
You should see following screen.
Please look at status window. Time 324190 shows the time when state of the simulator is saved.

OK, then Reload the project.
Yes, the time 324190 is restored!

By pressing the button below will make the following screen.
All the simulator states and waveforms are now restored.
You may proceed simulation or add any signals to waveform view.
A



Let's make another waveform view..


Run for about 1sec by Pressing Go button and press Pause button




And Reload the project
All the simulator state and waveforms are resorted again.
Please note the last state of the project is saved to none-volatile disk.


In veritak waveforms are saved by two ways.

In large simulation history, it will take much time to get the target waveform history from entire compressed
archive. For example it will take 100sec if archive is 5GB and transfer rate of HDD is 50MB/sec.It will be the same result even if slow CPU is used because no cache mechanism will compensate in this area.
For this reason,current waveform view is saved by exclusive.

Another note is Disk capacity is actually consumed by setting Save to Physical Disk.
Default setting is 400MB +1000MB. Please note Each saved project consumes own disk space.

Simulator state is saved as another file (.vtaksave)
Once Simulator state has been saved , then next time project is restored from the saved archive except the reasons below.

In these cases, normal compilation begins. Kill operation in generating archive will generate invalid file.
Please start from ReCompilation for those invalid files.

Following are some example projects.

Project always starts at time 0
In very complicated and large project , compilation may take 10 minutes even written in RTL. If you would like to eliminate long compilation next time, this project will be useful.
See Fig. below. Save only one time at immediately after compilation.
Save -> Recompile


This project always start from time 0 ,but eliminates elaboration stages, therefore required memory for simulation engine will be typically less than 1/2. (For Example, 7minutes compilation with 600MB memory becomes 22sec loading time and 200MB required memory. Of course you need Recompile manually if HDL source is changed. However, it is noted the project once saved is no longer depended by any HDL source.

Project Waveform only

Recompile and Run until simulation is finished.
Next time you load the project, simulator does not run because it was saved as finished.
However all the history of all signals are saved.

Project, Not save Waveform until debug point comes
You do not like performance degradation due to saving waveforms until true debug point comes.
OK,Let's try with the sample above.
Check Disable Waveforms until ... ,$stop/$finish ,Every, then Save=>ReCompile=>Go




You will see following screen. At this $stop, save is not yet done. Actual save is done just before simulation time updates. So you need Go to save.


Finally, you will get following screen.




One note is you can not open WaveformView until save is done.

At last you will get following screen.
Meaning of display is as follows.

Time: 0 -<  1999990 ; save has not been done. WaveformView is Invalid between time 0 -< 1999990
Time: 1999990 ; Actual save starts;
Time: 2000070 ; save was done due to the trigger $stop
Time: 2800055; $finished

Usually Veritak stores per time block 1000. Actual save is done per 1000 time cycles.
This means actual save starts before 500 time cycle from save trigger by average.

Displayed signals are saved to .vtakwave file. These signals are visible  w/wo Disable Waveforms until ....
However when you add any signlas, you will notice invalid mark on waveform view.
Since the other signals are saved as compress archive. save of these signals is disabled until trigger
condition is met.

Checking one Instead of every , save is done at only one time. This feature will be useful if you have sequence problem and  would like to see the execution sequence on veripad repeatly.

Notes:


Limitations