• 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. IUS 10.2 irun - how to re-run an already compiled snaps...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 66
  • Views 11125
  • 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

IUS 10.2 irun - how to re-run an already compiled snapshot

cubicle82
cubicle82 over 13 years ago

Under the old 3-step process (ncvlog+ncelab+ncsim), I could compile the testbench once.  Then call ncsim multiple times to run the sim again(without recompiling.)

How do I do that with irun? What are the proper command-line switches?

  • Cancel
  • Stewart
    Stewart over 13 years ago
    There are 2 options you can use depending on exactly what you are trying to achieve: 
      -R                         Simulate using the last ncelab generated snapshot
      -r <snapshot name>         Force simulation using snapshot
     
    -R is useful if you are in the same directory as the original compile and elaborate was done (probably using -elaborate)
     
    -r <snapshot name> is more general version of -R that allows you to specify the snapshot to use (this is useful for EManager regressions where the snapshot is compiled and elaborated in a central location then simulated by each test).
     
    Hope that helps,
     
    Stewart 
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • TAM1
    TAM1 over 13 years ago

    I'll also add that, if you haven't updated the source code, using the exact same irun command line as used to compile the first time will behave the way you've described. irun will compare the timestamps of the source code files and if they are earlier than the snapshot, they won't be recompiled. If nothing is recompiled, the elaborator won't be run again either.

    However, iIf you change the compiler's command-line options, then irun will recognize that and recompile when necessary.

    The -r and -R options that Stewart mentioned are especially useful if you have changed a source file, but want to hold off recompiling 'til later.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sivauvm
    sivauvm over 13 years ago

    Hi cubicle82,

    I also in need of the same, compiling once and simulating that snapshot(INCA_libs) many times. If you have a solution, please share.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Stewart
    Stewart over 13 years ago

    On the first invocation of irun, add -elaborate to the command line.  This will cause irun to perform compile and elaborate, creating a snapshot but not simulating.

     The snapshot can then be simulated by using the irun -R option (or -r <snapshot>) that I described previously.

     More detailed descrptions are availabe in the irun help: irun -helpall | grep "\-R"

     Hope that helps,

     Stewart 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sivauvm
    sivauvm over 13 years ago
    Hi Stewart,

    Thanks for the quick reply.

    As you said, on the first invocation of irun, I am adding  -elaborate. My working directory is /home/proj/compile. To simulate, irun is expecting the current working directory should be the directory where INCA_libs(/home/proj/compile) are stored. I want to simulate the tests in /home/proj/simulations/test1, /home/proj/simulations/test2... so on.

    Sofar, I was working without UVM. I used to compile and elaborate with IRUN and simulate from /home/proj/simulations/test1, test2... with NCSIM. It works. I used NCSIM to simulate because I had the same issue with IRUN as it is expecting to simulate in the directory where INCA_libs residing.

    Now I moved to UVM and I am able to compile with IRUN but while simulating with NCSIM(the old method) there is an error. In my IRUN/NCSIM simulation command I am providing the complete path of hdl.var and cds.lib files.
    "
    ncsim: *W,LIBRUN: Could not load the dynamic library:  ./INCA_libs/irun.lnx8664.10.20.nc/librun
    System ERROR:  ./INCA_libs/irun.lnx8664.10.20.nc/librun.so: cannot open shared object file: No such file or directory or file is not valid ELFCLASS64 library..
    ncsim: *F,FLDRUN: Failed to load dynamic library librun for DPI.
    OSDLERROR:  ./INCA_libs/irun.lnx8664.10.20.nc/librun.so: cannot open shared object file: No such file or directory or file is not valid ELFCLASS64 library..
    FATAL ERROR: NCSIM Simulation exited with error status 512
    "
    If I simulate from compile directory(/home/proj/compile), then it works(with both IRUN and NCSIM).
     
    Regards, Siva
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tpylant
    tpylant over 13 years ago
    One option is to try using “-nclibdirname <path to INCA_libs>” with “irun”.

    % irun -R -nclibdirname ../INCA_libs

    The other option is to use “ncsim” with the snapshot name and “-cdslib <path to INCA_libs>/irun.nc/cds.lib –hdlvar <path to INCA_libs>/irun.nc/hdl.var …”

    % ncsim worklib.test:sv -cdslib ../INCA_libs/irun.nc/cds.lib -hdlvar ../INCA_libs/irun.nc/hdl.var

     

    Tim
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sivauvm
    sivauvm over 13 years ago

    Thanks Tim.

    Now I am able to do "compile once and simulate the snapshot many times" with irun.

    One change in your command is it should be -nclibdirpath instead of -nclibdirname.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • GAO SHIYANG
    GAO SHIYANG over 12 years ago

    Hi Tim,

    I am also thinking about this one-step/multi-step irun flow.

     With one-step irun -nclibdirname $SNAPSHOT_DIR ... , my simulation works well and can be run anywhere. But later when I migrate this command into EManager, looks some of my cases terminated without running at all.

    I think it is probably related to this one-step command may not work well in EManager with parallel simulation at the same time.

    If I divide the irun by irun -c & irun -r , some questions below:

    1. first invocation of irun with "-c" option, do I need to supply case name "+UVM_TESTNAME=$testname" ?

    2, the second time when I want to sim only, what option is needed? Is it irun -R or irun -r ?

    3. how to merge ifv commands into irun ?

     

    I am now trying . if you can give some help meanwhile, very appreciated.

    • 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