Home > Community > Forums > Custom IC SKILL > Running multiple AC simulations with multiple stimulus files using Ocean Script

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: *

 Running multiple AC simulations with multiple stimulus files using Ocean Script 

Last post Tue, Oct 2 2012 10:19 PM by Andrew Beckett. 6 replies.
Started by lartola 19 Sep 2012 02:43 AM. Topic has 6 replies and 2349 views
Page 1 of 1 (7 items)
Sort Posts:
  • Wed, Sep 19 2012 2:43 AM

    • lartola
    • Not Ranked
    • Joined on Mon, Nov 8 2010
    • Toulouse, Garonne (Haute)
    • Posts 8
    • Points 115
    Running multiple AC simulations with multiple stimulus files using Ocean Script Reply

    Dear all,

    I would run multiple AC simulations (with Spectre simulator) using an Ocean Script. However I would change for each loop the stimulus file. I don't know how to specify the changing of the name of the stimulus file for each run.

     

    Thanks in advance for  your help

     

    laurent 

    Regards, Laurent
    • Post Points: 20
  • Wed, Sep 19 2012 6:55 AM

    Re: Running multiple AC simulations with multiple stimulus files using Ocean Script Reply

    simulator('spectre)
    design(...)
    analysis('ac ...)
    foreach(stimFile '("file1.scs" "file2.scs" "file3.scs")
       stimulusFile(stimFile)
       run()
       ; process the results as you wish
    )

    Something like that?

    Andrew

    • Post Points: 20
  • Wed, Sep 19 2012 7:00 AM

    • lartola
    • Not Ranked
    • Joined on Mon, Nov 8 2010
    • Toulouse, Garonne (Haute)
    • Posts 8
    • Points 115
    Re: Running multiple AC simulations with multiple stimulus files using Ocean Script Reply
    Actually, I would make a loop for strong number of stimulus files (10-1000 around). I've thought about of loop depending on n with "n" defines in the name of the stimulus file. Is it possible ? Thanks in advance Andrew Laurent
    Regards, Laurent
    • Post Points: 20
  • Wed, Sep 19 2012 7:02 AM

    Re: Running multiple AC simulations with multiple stimulus files using Ocean Script Reply

     Of course:

    for(i 1 1000
      stimulusFile(sprintf(nil "stimFile%d.scs" i))
      run()
       ...
    )

    Use something like sprintf() to build the filename as you go along.

    Regards,

    Andrew

    • Post Points: 35
  • Wed, Sep 19 2012 7:07 AM

    • lartola
    • Not Ranked
    • Joined on Mon, Nov 8 2010
    • Toulouse, Garonne (Haute)
    • Posts 8
    • Points 115
    Re: Running multiple AC simulations with multiple stimulus files using Ocean Script Reply
    Andrew, thanks so much for your answer I will work in this way. Regards Laurent
    Regards, Laurent
    • Post Points: 5
  • Tue, Oct 2 2012 5:25 AM

    • lartola
    • Not Ranked
    • Joined on Mon, Nov 8 2010
    • Toulouse, Garonne (Haute)
    • Posts 8
    • Points 115
    Re: Running multiple AC simulations with multiple stimulus files using Ocean Script Reply

    Dear Andrew,

    i've worked on the ocean script for running multiple AC simulation as you said me. However I get a problem. Actually the loop works perfectly but the simulator seems don't used the correct stimulus file. If I check the netlist file all of the used stimulus are present but when I check the simulated data something seems wrong.

    Actually, the simulator seems add loop after loop each the stimulus files. I Need to perform a reset for each run or something like that ? Following the current ocean script i'm using:

    ;------------- Initialization -------------------------------------

    simulator( 'spectre )

    design( "**********/spectre/schematic/netlist/netlist")

    definitionFile( "models.scs")

    stimulusFile( ?xlate nil "/*******/spectre/schematic/netlist/_graphical_stimuli.scs")

    temp( 23.0 )

    TotalRun = 3

    ;-----------------------------------------------------------------

    ;------------- Automatic electrical runs -------------------------

    ;-----------------------------------------------------------------

    Tempfile1 = outfile( "/************net6_testpostprocess.txt" "w")

    Tempfile2 = outfile( "/************net7_testpostprocess.txt" "w")

    for(i 1 TotalRun

    stimulusFile( ?xlate nil sprintf( nil "/*********Stimulis_test_MUSCA_SETcurrent_SRAM_%d.txt" i))

    analysis('tran ?stop "0.055E-6" ?method "trap")

    envOption( 'analysisOrder list("tran"))

    option( 'temp "23.0" )

    run()

    results()

    selectResult( 'tran )

    plot(getData("/I4/A") getData("/net06") getData("/net7") getData("/WL") getData("/BLbarre") getData("/BL"))

    ocnPrint( v("/net06") ?output Tempfile1 ?numberNotation 'none ?precision 15 ?width 20)

    ocnPrint( v("/net7") ?output Tempfile2 ?numberNotation 'none ?precision 15 ?width 20)

    )

    close(Tempfile1)

    close(Tempfile2)

    printf("Simulation complete")

    Thanks in advance for your time Regards Laurent

    Regards, Laurent
    • Post Points: 20
  • Tue, Oct 2 2012 10:19 PM

    Re: Running multiple AC simulations with multiple stimulus files using Ocean Script Reply

     Hi Laurent,

    The problem is that each time you call stimulusFile() with a different file, it adds to the list of stimulus files. The usual way of solving this with OCEAN is to use the delete() function to reset the particular item (you can delete analyses, saves etc), but unfortunately delete('stimulusFile) hasn't been implemented yet.

    This is described in my solution 1026408 on Cadence Online Support. The workaround is to use::

    asiSetEnvOptionVal(asiGetCurrentSession() 'stimulusFile list(stimFile))

    where stimFile is the file you want to set. This will override any previous stimulus file lists that have been set.

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (7 items)
Sort Posts:
Started by lartola at 19 Sep 2012 02:43 AM. Topic has 6 replies.