• 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. Trouble with ocean script for parametric analysis using...

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 125
  • Views 17100
  • 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

Trouble with ocean script for parametric analysis using ADE L

saikatc
saikatc over 9 years ago

Hi,

I am using ocean scripting for parametric analysis of my design. There I came across a strange issue. My interest is to vary the supply voltage for that I am using a variable called v_supply. For single simulation when I am assigning a value to that variable, it is working. 

desVar( "v_supply" 300m)

But when I want to have a parametric analysis using the same, it is showing the following message.

*INFO* (icLic-25) License Analog_Design_Environment_GXL ("95220") was used to run ADE L.
The variable "v_supply" is not defined in the current
design.

I am using the following codes. 

paramAnalysis("v_supply" ?values '(300 425 550 675 800 ))
paramRun ()

I also tried with 

paramAnalysis("v_supply" ?start 300 ?stop 800 ?step 100)
paramRun ()

without any difference.

Any help will be appreciated.

Regards

Saikat Chatterjee

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Saikat,

    The only way I can get this error is by using the paramAnalysis() on a variable without having first having declared it with desVar(). If I do both, then it works fine.

    Are you defining it with desVar as well as paramAnalysis in the same run? If yes, which subversion are you using? (type getVersion(t) to report the version). If no, you'll have to define both...

    Regards

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • saikatc
    saikatc over 9 years ago

    Hi Andrew, thanks for your quick response. I tried declaring that without any improvement. I have checked the version, which is sub-version  IC6.1.6-64b.500.8.

    Here is the script I have written. My intention is to store the rise time at each input value, but it is returning only one value. Also showing the same warning, variable not define in the current design.

    simulator( 'spectre )
    design( "/homes/schatterjee/subvt_28/SUBVT28CORE_test/simulation/lslh_28nm_lvt_test_new/spectre/schematic/netlist/netlist")
    resultsDir( "/homes/schatterjee/subvt_28/SUBVT28CORE_test/simulation/lslh_28nm_lvt_test_new/spectre/schematic" )
    modelFile(
    '("/homes/schatterjee/subvt_28/SUBVT28CORE_test/corners.scs" "")
    )
    definitionFile(
    "models.scs"
    )

    getVersion(t)

    ;paramAnalysis("v_supply" ?values '(300 425 550 675 800 ))
    paramAnalysis("v_supply" ?start 300 ?stop 800 ?step 100))
    paramRun ()
    ;desVar( "v_supply" 300m)
    desVar( "v_supply" ) ;this is disabled so as not to run from the default ocean scripu
    ;transient analysis till 10 us
    analysis('tran ?stop "10u" )
    selectResult( 'tran )
    plot(getData("/A") getData("/Z") getData("/P1/s") getData("/P3/s") getData("/N1/d"))


    ;selectResult( 'tran )
    tr = riseTime( v("/Z" ?result "tran") 0 nil 1 nil 10 90 nil "time" ); rise time calculation
    tf = fallTime( v("/Z" ?result "tran") 1 nil 0 nil 10 90 nil "time" ); rise time calculation
    tpd = delay( v("/A" ?result "tran") 0.150 1 "rising" v("/Z" ?result "tran") 0.500 1 "rising" nil nil); propagation delay calculation
    printf("tr = %5.3f ns\n",tr*1e9)

    plot(getData("tr"))

    out = outfile("results_param.txt" "w")
    outputs()

    fprintf(out " rise time == %3.3f ns\n", tr*1e9);
    close(out)

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

    The desVar() has to be before the paramAnalysis(). Otherwise it doesn't know that the design variable exists because it hasn't been defined yet.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • saikatc
    saikatc over 9 years ago
    even after that, there is no improvement.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    I haven't tried that subversion (I'm out of the office this week so can't easily test), but I rather doubt it is version specific - this stuff hasn't changed in years, as far as I know.

    I tried your OCEAN script (with a few small changes to the paths at the beginning) and with desVar() before the paramAnalysis. I also removed the additional close parenthesis at the end of paramAnalysis and also the space between paramRun and the subsequent (). This worked perfectly for me.

    So you'll have to go to customer support if you can't get this working - I suspect it's something wrong in your setup rather than a tool bug, but hard for me to see from here.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • saikatc
    saikatc over 9 years ago

    I saw this working somewhat. There are two strange developments though.

    1. Out of 5 values chosen for v_supple, last 3 values are simulated only

    2. The following expression is throwing error all of a sudden which was working before.

        printf("tr = %5.3f ns\n",tr*1e9)

    the problem is showing at the multiplication with 1e9. Once I run clear at the end of simulation and rerun it, it is working.

    Regards

    Saikat

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

    OK - so you said it wasn't working - then it's working but failing due to another error? PLEASE be clearer in what you're saying - it makes it very hard to make suggestions if you're not actually explaining yourself very well.

    I see no reason why it would only simulate 3 out of 5 points. So maybe it is failing for some reason but we can't see the errors because you didn't post them.

    The multiplication problem (you didn't show the error, so I'm guessing) may be because the calculation for tr failed to find the rise time and so was nil and hence the multiplication failed.

    Kind Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • saikatc
    saikatc over 9 years ago

    Hi Andrew,

    to get rid of the weird behaviour I restarted virtuoso. After that I kept on getting more such weird behaviours. Later I figured out that it was using the old netlist which in turn was causing the failure. So the 1st hurdle regarding parametric analysis is over.

    Now I am struggling with printing the data into a file. The simulation is successful and plotting the waveform. I intend to calculate the rise time, propagation delay and store into a file. There are two issues.

    1. When I am using ocnPrint; the data are being stored but the name of column is printed as the expression.

    ocnPrint(?output "r.txt" rise_time ?numberNotation 'none)

    Result:

    v_supply riseTime v("/Z" ?resultsDir "/homes/schatterjee/subvt_28/SUBVT28CORE_test/simulation/lslh_28nm_lvt_test_new/spectre/schematic" ?result "tran") 0 1 10 90 "time"


    0.3         3.66751e-08
    0.325     3.19714e-08
    0.35       2.90787e-08
    0.375     2.68736e-08
    0.4         2.41881e-08

    2. If I am using fprintf, nothing is printed inside the file. I am using the following command

    fprintf(out "%f", rise_time)

    But in both the cases the output of the simulation is successful.

    Thanks in advance

    Saikat Chatterjee

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

    This is the expected behaviour of ocnPrint - it prints the column heading based on the expression for the waveform.

    If you don't want that, you could set the expression attribute on the waveform object - e.g. drGetWaveformYVec(risetime)->expression="newname" before using ocnPrint, or you could use abDumpWaveform as outlined in http://community.cadence.com/cadence_technology_forums/f/38/p/19646/1285946#1285946

    The fprintf won't work because the value is not a single floating point number - it's a waveform. fprintf() won't work (with %f) with a waveform object. It's the wrong kind of data.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • saikatc
    saikatc over 9 years ago

    Hi Andrew,

    I have followed the drGetWaveformYVec approach and used the following line of code.

    drGetWaveformYVec(tr)->riseTime( v("/Z" ?result "tran") 0 nil 1 nil 10 90 nil "time" )="rise_time"

    In the terminal I am seeing the following warning messages.

    drGetWaveformYVec(tr)->riseTime( v("/Z" ?result "tran") 0 nil 1 nil 10 90 nil "time" )="rise_time"
                                                                                                                                            ^
    PARSER WARNING at line 43 column 98 of file param.ocn
    *WARNING* (Parser): illegal left hand side of assignment operator - funcall((drGetWaveformYVec(tr)->riseTime) v("/Z" ?result "tran") 0 nil 1 nil 10 90 nil "time")
    t

    But nothing is printed out.

    • 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