• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. How do we use the concept of Save and Restore during real...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 65
  • Views 5091
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do we use the concept of Save and Restore during real developing(debugging)???/

techy99
techy99 over 5 years ago

Hi All,

I'm trying to understand checkpoint concept. When I found save and restart concept in cdnshelp, There is just describing about "$save" and "xrun -r "~~~".

and I found also the below link about save restart and it saves your time.

But I can't find any benefits from my experiment from save&restart article( I fully agree..the article)

Ok, So I'v got some experiment  Here.

1. I declared $save and got the below result as I expected within the simple UVM code.

In UVM code...

$display("TEST1");
$display("TEST2");
$save("SAVE_TEST");
$display("TEST3");
$display("TEST4");

And I restart at "SAVE_TEST" point by xrun -r "SAVE_TEST", I've got the below log

xcelium> run
TEST3
TEST4

Ok, It's Good what I expected.(The concept of Save and Restore is simple: instead of re-initializing your simulation every time you want to run a test, only initialize it once. Then you can save the simulation as a “snapshot” and re-run it from that point to avoid hours of initialization times. It used to be inconvenient. I agree..)

2. But The Problem is that I can't restart with modified code. Let's see the below example.

I just modified TEST5 instead of "TEST3"

$display("TEST1");
$display("TEST2");
$save("SAVE_TEST");
$display("TEST5"); //$display("TEST3");
$display("TEST4");

and I rerun with xrun -r "SAVE_TEST", then I've got the same log

xcelium> run
TEST3
TEST4

There is no "TEST5". Actually I expected "TEST5" in the log.From here We know $save can't support partially modified code after $save. 

Actually, through this, we can approach to our goal about saving developing time. 

So I want to know Is there any possible way that instead of re-initializing our simulation every time we want to run a test, only initialize it once and keep developing(debugging) our code ?

If we do, Could you let me know the simple example?

  • Cancel
  • StephenH
    StephenH over 5 years ago

    What you've used thus far is the simple save and restart technology, which just lets you save a simulation state and later reload it on top of the same simulation executable (you can think of this conceptually as saving the register values and memory contents then reloading them). If you want to run different tests from the saved state, you need the newer "dynamic test reload" feature, as documented here: https://support.cadence.com/apex/techpubDocViewerPage?xmlName=sysverilog.xml&title=SystemVerilog%20Reference%20--%20Dynamic%20Test%20Reload%20-%20%20Dynamic%20Test%20Reload%20&hash=&c_version=19.09&path=sysverilog/sysverilog19.09/Dynamic_Test_Reload.html

    This allows you to compile additional SV packages to provide new test tasks. This is typically easiest to do on top of UVM but can be used with any SV methodology provided you structure your base code in such a way that the "changed" test is not in the base compile and is referenced through an SV package.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • pvp kumar
    pvp kumar over 5 years ago

    Here is an article which lists out the difference between save restart and dynamic test reload. 

    Article (20484844) Title: Methodology or technology to improve overall simulation or elaboration time URL:      

    Dynamic test reload is more relevant for your requirement since you want to run something new from the saved point. 

    Here is a RAK with examples and testcases;

    Article (20484428) Title: Dynamic Test Loading with Xcelium (RAK) URL:      

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information