Home > Community > Forums > Functional Verification > IUS 10.2 irun - how to re-run an already compiled snapshot

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

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

Last post Tue, Jul 9 2013 11:29 PM by GAO SHIYANG. 8 replies.
Started by cubicle82 29 Mar 2012 03:52 PM. Topic has 8 replies and 8792 views
Page 1 of 1 (9 items)
Sort Posts:
  • Thu, Mar 29 2012 3:52 PM

    • cubicle82
    • Top 500 Contributor
    • Joined on Tue, Jan 27 2009
    • Aliso Viejo, CA
    • Posts 21
    • Points 360
    IUS 10.2 irun - how to re-run an already compiled snapshot Reply

    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?

    • Post Points: 50
  • Fri, Mar 30 2012 12:41 AM

    • Stewart
    • Not Ranked
    • Joined on Mon, Jul 14 2008
    • Livingston, Lothian
    • Posts 2
    • Points 40
    Re: IUS 10.2 irun - how to re-run an already compiled snapshot Reply
    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 
    • Post Points: 20
  • Fri, Mar 30 2012 5:39 AM

    • TAM1
    • Top 75 Contributor
    • Joined on Thu, Jul 17 2008
    • HOME, PA
    • Posts 83
    • Points 1,105
    Re: IUS 10.2 irun - how to re-run an already compiled snapshot Reply

    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.

    • Post Points: 5
  • Thu, Apr 26 2012 6:35 AM

    • sivauvm
    • Not Ranked
    • Joined on Mon, Dec 19 2011
    • Posts 3
    • Points 30
    Re: IUS 10.2 irun - how to re-run an already compiled snapshot Reply

    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.

    • Post Points: 20
  • Thu, Apr 26 2012 6:43 AM

    • Stewart
    • Not Ranked
    • Joined on Mon, Jul 14 2008
    • Livingston, Lothian
    • Posts 2
    • Points 40
    Re: IUS 10.2 irun - how to re-run an already compiled snapshot Reply

    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 

    Filed under:
    • Post Points: 20
  • Thu, Apr 26 2012 7:21 AM

    • sivauvm
    • Not Ranked
    • Joined on Mon, Dec 19 2011
    • Posts 3
    • Points 30
    Re: IUS 10.2 irun - how to re-run an already compiled snapshot Reply
    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
    • Post Points: 5
  • Thu, Apr 26 2012 2:37 PM

    • tpylant
    • Top 50 Contributor
    • Joined on Fri, Jul 11 2008
    • Austin, TX
    • Posts 135
    • Points 2,030
    RE: IUS 10.2 irun - how to re-run an already compiled snapshot Reply
    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
    • Post Points: 35
  • Thu, Apr 26 2012 9:01 PM

    • sivauvm
    • Not Ranked
    • Joined on Mon, Dec 19 2011
    • Posts 3
    • Points 30
    Re: RE: IUS 10.2 irun - how to re-run an already compiled snapshot Reply

    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.

     

    • Post Points: 5
  • Tue, Jul 9 2013 11:29 PM

    Re: RE: IUS 10.2 irun - how to re-run an already compiled snapshot Reply

    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.

    • Post Points: 5
Page 1 of 1 (9 items)
Sort Posts:
Started by cubicle82 at 29 Mar 2012 03:52 PM. Topic has 8 replies.