• 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. Custom IC SKILL
  3. Question regarding running parametric simulations using...

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 153
  • Views 20122
  • 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

Question regarding running parametric simulations using Ocean

gurusub
gurusub over 15 years ago

 Hi all,

I have a set of design variables in my schematic. I would like to input multiple data vectors to my schematic and save the output data in Ocean

For example, If P is a set of parameters P={p1,p2,p3,p4} (p1-p4 are the design variables in the schematic). I would create a matrix of data values with different instances of P ie my data matrix would look like 

Q=[-------P1---------

     --------P2---------

    ---------P3--------]

and so on where each Pi contain (p1i, p2i,p3i,p4i). (In other words I want to use the analogus of paramset command in Spectre for ocean). I would like to simulate my circuit for these values in Q and make some measurements using Calculator function and finally store the output data in the text file. Can somebody please go through the steps in accomplishing the same?

 

Thanks,

 

Guru

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Please read the forum guidelines. These tell you not to post on the end of old threads, and also to provide information about the version you're using. The Analog Design Environment hasn't been called "Analog Artist" for a very long time now, so I don't know if you're using an ancient version or are just using old terminology.

    I cannot see a good reason why this shouldn't work - but maybe if you gave some details as to how you're running your corner simulations (as well as the version), then that might help.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • andyadams
    andyadams over 10 years ago

    Hi,i am a student of datamatix generation of word barcode.I am analysing an NMOS ciruit for different CORNERS and also for different parametric simulatons sweep such as temperature and body voltage. Iam doing all my simulations using analog artist GUI. I could run my NMOS circuit for different CORNERS without any parametric sweep perfectly using Analog artist. But when i try to do parametric sweep and plot the same, iam not able to view the different parametric sweep curves for different CORNERS using analog artist. In regard to this problem, i also checked a previous post concerning parametric simulation for different CORNERS using OCEAN. But i could not understand the solution posted in that post very much since i am very new to this cadence and also to OCEAN script. I would like to know if there is any solution to this problem usinganalog artist ????Or I can only run this kind of simulation using OCEAN script ???If so i would be glad if some one can help me out to do the same using an OCEAN script.Also any tips using analog artist. Thankyou very much.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

     Ketan,

    You could use this:

     procedure(abSilentRun(@rest args)
      let(((nullport (outfile "/dev/null")))
        prog1(
          let(((poport nullport))
            apply('run args)
          )
          close(nullport)
        )
      )
    )

    Then call abSilentRun() instead of run(). This will take the same arguments as run(). The output gets saved in the psf directory anyway, even using this (because spectre itself will write spectre.out by virtue of a command line argument passed to the simulator).

    For anything better, you'd need to log a service request to get an enhancement request.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • KMan2011
    KMan2011 over 14 years ago

    Hi Andrew,

     Sorry to ping you again on this, but this command cuts out the verbiage, which isn't necessarily what I wanted.  I'm looking to avoid having the output.log of a simulation in CIW, and would instead like it printed to a file in the psf directory, or better still, open a new text window and print the entire log to that....pretty much like what running  a parametric sim using the GUI buttons does in Artist.

     CIW log goes nuts with so much logging.

     Thansk in advance

    Ketan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    You can cut down the verbiage by using these settings. Not sure you can suppress the output completely though (unless that's crept in without me noticing):

    (option ?categ 'analog 'info "no")
    (option ?categ 'analog 'warn "no")

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • KMan2011
    KMan2011 over 14 years ago

    Hello Andrew,

    Is there an instance when using the paramAnalysis and paramRun() functions that you may not output the indivdual 'case' data during a process simultion?  Interestingly, I output caluclated values for a t_delay parameter and also case for 2 signals which are independent of these parameters, but just not for the net which is dependent.  As if it doesn't know where to look.  

     On the theme of Parametric sims, can I ask how one prints the simulation verbose to a separate text window than the CIW?  When I say run a parametric sim using the Cadence GUI, 2 text windows automatically popup with one showing the transient/AC/...blah run data (I think this is spectre.out file), and the other captures the iterations/nesting parameters.  Yet when I write a Skill code using the paramAnalysis and  paramRun() functions, the spectre.out run data is printed in the CIW.

     

    Thanks

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Hi Guru,

    Apologies - I overlooked your earlier post. I've been travelling in Israel this week and so have only a little time to keep up with the forums.

    This could should give you some pointers. You might need to do a little work to cope with the fact that the s-parameter results will be complex numbers at each frequency point, so you might need to change it to print the real() and imag() or mag() and phase() at each frequency point, but I think it should give you the general principles:

    /* abDumpWaveform.il

    Author A.D.Beckett
    Group Custom IC, Cadence Design Systems Ltd.
    Machine SUN
    Date Oct 23, 1997
    Modified Jan 31, 2005
    By A.D.Beckett

    Functions for dumping a waveform to a file (few esoteric functions removed from this file when posted
    on Cadence Community Forums in order to stop it getting too long)
    Examples:

    abDumpWaveform(VT("/c") "data_c.out")
    abDumpWaveform(VT("/c") "data_c.out" "%e %e\n") ;; exponential format

    abDumpWaveformSplit() is equivalent to abDumpWaveform, but splits
    into files a little less than 2Gbytes (the split limit is an optional
    argument).

    ;; multi-variable output
    ;; all waveforms must share same x-axis, as it doesn't do any interpolation (for
    ;; speed reasons). Interpolation could be done by collecting all the x-values, and
    ;; then using the value function.
    abDumpWaveforms("data.out" VT("/c") VT("/z") VT("/a"))
    abDumpWaveforms("data.out" VT("/c") VT("/z") VT("/a") ?format "%-10g" ?separator ",")

    ;; can also write out multiple files if presented with a family
    abDumpFamily(VT("/c") "data.out")

    ***************************************************

    SCCS Info: @(#) abDumpWaveform.il 11/20/08.15:26:13 1.6

    */


    /*****************************************************************
    * *
    * (abDumpWaveform wave fileName @optional (format "%g %g\n")) *
    * *
    * Take a waveform object, write it out to the fileName specified *
    * with the format given. No sampling is done. *
    * *
    *****************************************************************/


    (procedure (abDumpWaveform wave fileName @optional (format "%g %g\n"))
    (let (port (xVec (drGetWaveformXVec wave))
    (yVec (drGetWaveformYVec wave)))
    (unless (setq port (outfile fileName))
    (error "Could not write to file %s\n" fileName))
    (for pos 0 (sub1 (drVectorLength xVec))
    (fprintf port format
    (drGetElem xVec pos)
    (drGetElem yVec pos))
    )
    (close port)
    ))

    /*****************************************************************
    * *
    * (abDumpWaveformSplit wave fileName @optional *
    * (format "%g %g\n") (split 2**31-512) ) *
    * *
    * Take a waveform object, write it out to the fileName specified *
    * with the format given. No sampling is done. Splits into *
    * multiple files when the number of bytes exceeds split *
    * *
    *****************************************************************/


    (procedure (abDumpWaveformSplit wave fileName @optional (format "%g %g\n") (split 2**31-512))
    (let (port (xVec (drGetWaveformXVec wave))
    (yVec (drGetWaveformYVec wave))
    str (len 0) (suffix 0))
    (unless (setq port (outfile fileName))
    (error "Could not write to file %s\n" fileName))
    (for pos 0 (sub1 (drVectorLength xVec))
    (sprintf str format
    (drGetElem xVec pos)
    (drGetElem yVec pos))
    (setq len (plus (strlen str) len))
    (when (greaterp len split)
    (close port)
    (postincrement suffix)
    (setq len (strlen str))
    (unless (setq port (outfile (sprintf nil "%s_%d" fileName suffix)))
    (error "Could not write to file %s_%d\n" fileName suffix))
    )
    (fprintf port "%s" str)
    )
    (close port)
    ))

    /********************************************************************
    * *
    * (abDumpFamily family fileNamePrefix @optional (format "%g %g\n")) *
    * *
    * Write out a sequence of files for a family. Could potentially do *
    * this automatically inside abDumpWaveform, but it's hard without *
    * using private functions. *
    * *
    ********************************************************************/


    (procedure (abDumpFamily family fileNamePrefix @optional (format "%g %g\n"))
    (let ((xVec (drGetWaveformXVec family))
    (yVec (drGetWaveformYVec family))
    index
    )
    (if (drIsWaveform family)
    ; then
    (abDumpWaveform family fileNamePrefix format)
    ;else
    (for pos 0 (sub1 (drVectorLength xVec))
    (setq index (drGetElem xVec pos))
    (unless (stringp index)
    (sprintf index "%L" index))
    (rexCompile "[^a-zA-Z0-9.]")
    (setq index (rexReplace index "_" 0))
    (abDumpWaveform
    (drGetElem yVec pos)
    (sprintf nil "%s_%s" fileNamePrefix index)
    format
    )
    )
    ) ; if
    ))

    /*********************************************************************************
    * *
    * (abDumpWaveforms fileName @key (format "%g") (separator " ") @rest waves) *
    * *
    * Write out a group of waveforms with a common x-axis to a file. It checks *
    * to see if the x-axis is the same, because otherwise some kind of interpolation *
    * would be necessary. An optional format string can be specified, so that *
    * the precision can be controlled. Also, an optional separator may be given. *
    * *
    *********************************************************************************/


    (procedure (abDumpWaveforms fileName @key (format "%g") (separator " ") @rest waves)
    (let (port xVec)
    (setq xVec (drGetWaveformXVec (car waves)))
    ;-----------------------------------------------------------------
    ; check to see if all waveforms have same X-axis
    ;-----------------------------------------------------------------
    (when (exists wave waves (neq xVec (drGetWaveformXVec wave)))
    (error "All waveforms must have same x-axis")
    )
    (unless (setq port (outfile fileName))
    (error "Could not write to file %s\n" fileName))
    (for pos 0 (sub1 (drVectorLength xVec))
    (fprintf port format
    (drGetElem xVec pos))
    (foreach wave waves
    (fprintf port "%s" separator)
    (fprintf port format (drGetElem (drGetWaveformYVec wave) pos))
    )
    (fprintf port "\n")
    )
    (close port)
    ))

    /**********************************************************************************
    * *
    * (abDumpSampledWaveform wave samplePoints fileName @optional (format "%g %g\n")) *
    * *
    * Dump the waveform at the sampled points passed in. wave is a waveform *
    * object, samplePoints is a list of x points to sample at, *
    * fileName is the file to write to, and format is an optional formatting string. *
    * *
    **********************************************************************************/


    (procedure (abDumpSampledWaveform wave samplePoints fileName @optional (format "%g %g\n"))
    (let (port)
    (unless (setq port (outfile fileName))
    (error "Could not write to file %s\n" fileName))
    (foreach point samplePoints
    (fprintf port format
    point
    (value wave point))
    )
    (close port)
    ))

    Regards,

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • gurusub
    gurusub over 15 years ago

     Hi Andrew,

    Can you please take time to answer my question as well?.

     

    Thanks,

     

    Guru

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    I filed CCR number  799087 to get the documentation fixed.

    I just did an awvPlotWaveform(winId list(v("node"))) and it worked fine with family data. If that doesn't work, perhaps you should contact customer support, providing your psf directory so that we can investigate. If you really want to pull it apart, you can do:

    sig=v("node")
    slice1=value(sig 'CAP 1.5p)
    slice2=value(slice1 'VDD 2)

    etc. You can either use the value() function without a parameter name, and then it finds the value against the innermost sweep (which might be time, frequency if it's a tran or ac analysis, or you can give one of the sweepNames.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • TjaartOpperman
    TjaartOpperman over 15 years ago
    I tried this out in IC6.10 and it works very well. Btw the IC6.10 oceanref documentation has no reference to the ?sweepType parameter (or perhaps I missed it?) Scenario: ======= I'm now using this command to build nested sweeps. For example: I have a circuit with range of switches that has to toggle over the entire set, and then I sweep this for different capacitances, over some temperature range. In any case, this command works quite well for my scenario. Problem: ======= The only problem I'm having is that, since that selectResuts('tran) v("node") returns family of waves, I cannot seem to plot the waveforms using awvPlotWaveform(..). It seems that one has to revert to using the ocean plot(..) function. Personally I don't really prefer using the plot(..) function. I also need the re-group the family of waves back into the respective nested sweep sets. Question: ======= Is there a way the extract a waveform from the family of waves and then use awvPlotWaveform(..) ?
    • 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