• 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 Design
  3. Ocean script for printing parametric sweep dcOp

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 125
  • Views 16437
  • 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

Ocean script for printing parametric sweep dcOp

Nader Fathy
Nader Fathy over 4 years ago

Hello,

I need to simulate multiple MOSFET parameters (gm, gmb, cgg, cdd, etc) on different bias conditions and export the output in a custom table in a text file.

I suppose the best way to do this is by using an ocean script. My test bench is as follows:

=> Single MOSFET M1 with 4 different vdc instances connected to M1 drain "Vd", gate "Vg", source "Vs" and bulk "Vb". I am varying Vg, Vb, and Vd, with constant Vs.

=> MOS device has fixed W, variable L.

=> For simplicity, I use two values for each parameter: [L: 60nm, 1um], [Vg: 0.2V, 0.5V], [Vb: 0V, 0.3V], [Vd: 0.5V, 1V]. ==> 16 different simulation runs

What I have done so far: I created the TB and saved the ocn script to add code to export the data I need in a file. However, I am completely lost on how to access DC operating points for a device in different parametric sweep loops using ocn script. The manuals does not cover this part as far as I have read. I can invoke the ocean script I exported and run the simulations without problems.

My question is: How do I loop on results of all runs and get the value of (gm of M1 for example), then print it in a table?

Example of text files I need (consider gm table first):

--------------------------------------------------------

L              Vg        Vd        Vb         gm

60nm      0.2        0.5        0           0.81e-6

60nm      0.2        0.5        0.3        0.67e-6

60nm      0.2        1           0           1.93e-6

60nm      0.2        1           0.3        1.75e-6

.. etc

---------------------------------------------------------

I am using:

Virtuoso: IC6.1.8-64b.500.15

Spectre: 19.1.0.541.isr14 

Any help is much appreciated

Kindest Regards,

Nader Fathy

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 4 years ago

    Dear Nadir,

    This is discussed in a couple of documents within the On-line support portal at Cadence. Perhaps the most extensive that covers accessing the information and all the parameters  available ( including how to access them in Assembler/Explorer and potentially include their values on a schematic) is at URL:

    support.cadence.com/.../ArticleAttachmentPortal

    The discussion of accessing operating point information with ocean starts on page 30.

    In addition, a separate troubleshooting note details accessing operating point information using an ocean script. It is at URL:

    support.cadence.com/.../ArticleAttachmentPortal

    It is rather brief, but may help supplement the information in the prior Portable Document Formatted presentation.

    I hope this helps Nadir!

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Nader Fathy
    Nader Fathy over 4 years ago in reply to ShawnLogan

    Dear Shawn,

    Thank you very much for your response.

    Unfortunately, I still can't find my answer in the links provided. Perhaps I can clarify what I am trying to do in my questions below:

    • How can I access M1:gm for a specific run? Example: gm=? at L=60nm, Vg=0.2V, Vd=1V, Vb=0.3V.
    • How can I iterate over all parametric sweep runs at the end of the simulation? Example (Using general syntax for illustration): foreach run_itr=get_test_itr() { gm=get_data(run_itr, OP(M1:gm) }

    Your help is much appreciated.

    Kindest Regards,

    Nader Fathy

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to Nader Fathy

    Dear Nader,

    Nader Fathy said:

    Unfortunately, I still can't find my answer in the links provided. Perhaps I can clarify what I am trying to do in my questions below:

    • How can I access M1:gm for a specific run? Example: gm=? at L=60nm, Vg=0.2V, Vd=1V, Vb=0.3V.
    • How can I iterate over all parametric sweep runs at the end of the simulation? Example (Using general syntax for illustration): foreach run_itr=get_test_itr() { gm=get_data(run_itr, OP(M1:gm) }

    What type of sweep are you running? In essence, are you using the former Parametric Analysis tool in ADE-L? I am not sure whether you are using ADE-L or Assembler/Explorer. If you are using Assembler/Explorer, I've posted in the past an ocean script shell that parses through all your simulation data to access the simulated output for each simulation. If you are using the former Parametric Tool in ADE-L, a totally different methodology is required to access the data for each run. As you may be aware, ADE-L and its Parametric analysis tool are no longer supported.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Nader Fathy
    Nader Fathy over 4 years ago in reply to ShawnLogan

    I am using Assembler with a maestro view test case. I have thousands of iterations all running on multiple processors in parallel.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to Nader Fathy

    Dear Nader,

    Nader Fathy said:
    I am using Assembler with a maestro view test case.

    I understand. Great!

    Nader Fathy said:
    I have thousands of iterations all running on multiple processors in parallel.

    The number of iterations does not really matter from an ocean script perspective. It will, obviously, require more CPU time to access all the results, but the basic algorithm and code remain the same. If you are intending to code using ocean, and not oceanXL, then accessing the maestro assembler results requires some understanding of the data structure Assembler creates during a set of corner or variable sweeps. It is not complex, but is necessary without using oceanXL. An outline of Assembler's data structure is provided on page 106 at URL:

    https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1O0V0000090tctUAA&pageName=ArticleContent

    and is nearly identical to the data structure used in the former ADE-XL. The following outline of an ocean script that will traverse the database is provided in the forum post at:

    https://community.cadence.com/cadence_technology_forums/f/custom-ic-design/43159/way-to-use-skill-script-to-save-waveform-into-a-file-in-ade-xl-run

    Modify the maximum number of corners to the number of sweeps in your analysis and provide the paths to your results directory as well as the name of your test in the sample code in the lines:

    base_results=strcat("<path_to_your_results>/maestro/results/maestro/Interactive.X/")

    Note: the code in the year old post shows the ADE-XL path - please use the slightly different line above for the Maestro results

    sub_dir = strcat("<Maestro test name>")

    Place your data access commands after the comment:

    ; Load waveform "vc"

    The data access commands for the operating point information are provided in the prior URL I referred you to regarding accessing operating information with ocean.

    The sample script I provided is for a transient analysis - which you are not doing - so change it to the DC operating point results. You can access your sweep values for each directory using the VAR("<sweep_variable>") function and you can write those with the resulting gm, for example, to a file. One of the two possible ASCII files in the ocean script contains the results for all the corner runs and hence will have {number_of_corners)+1 lines (+1 since you can include a header). 

    Does this provide enough of a shell to get you started Nader?

    Shawn

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Nader Fathy
    Nader Fathy over 4 years ago in reply to ShawnLogan

    Thank you very much Shawn, I managed to do it the way you mentioned it.

    I wish Cadence would implement an enhancement to ocean scripting to provide the user with a test iterator in a sweep simulation. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Nader Fathy
    Nader Fathy over 4 years ago in reply to ShawnLogan

    Thank you very much Shawn, I managed to do it the way you mentioned it.

    I wish Cadence would implement an enhancement to ocean scripting to provide the user with a test iterator in a sweep simulation. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to Nader Fathy

    Dear Nadir,

    Great! I am very happy to read you made some progress! Thank you for letting me know!

    With respect to your last comment, I did not describe it in any detail, but I believe if you are willing to consider using oceanXL, it supports new functions that facilitate accessing sweep results from Assembler. To be honest, I find using ocean to be sufficient for my needs.

    In case you are interested, from the oceanXL reference manual, the following is an example provided for running and then accessing and printing a sweep analysis:

    ;The following code snippet shows how the results can be opened for the test ;"opamplib:ampTest:1" at the end of simulation and use ocnPrint to print the ;outputs.
    ;
    ocnxlRun( ?mode 'sweepsAndCorners ?nominalCornerEnabled t ?allCornersEnabled t ?allSweepsEnabled t)
    ocnxlOutputSummary(?exprSummary t ?specSummary t ?detailed t ?wave t)
    ocnxlOpenResults(?testName "opamplib:ampTest:1")
    selectResults('tran)
    ocnPrint( ?output "./bandwidth.txt" ?width 20 ?numSpaces 1 bandwidth(VT("/out") 3 "low"))

    In any case, I am just happy to read you are on your way Nadir!

    Shawn

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Nader Fathy
    Nader Fathy over 4 years ago in reply to ShawnLogan

    Thank you Shawn, I really appreciate all your help.

    • 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