• 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. Parameterizing variable which uses calcVal throws Error

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 125
  • Views 5948
  • 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

Parameterizing variable which uses calcVal throws Error

aviquid
aviquid over 2 years ago

Hi,

So I have a test named "calibrate" which is used to calculate a certain variable "vdiff" (just think of it as an offset). I then use this variable "vdiff" in another test called "opr1" where I want to sweep another variable cap_bias_diff from "-vdiff" to "+vdiff" in steps of 0.1V.

So, in "opr1" test, I want to sweep cap_bias_diff = -1*calcVal("Vdiff_final" "calibrate"):0.1:calcVal("Vdiff_final" "calibrate")

However, I see the error that parameter cap_bias_diff is not a valid range (attached screenshot below). Please do help. Thanks.

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    Using calcVal or other expressions that refer to other variables in sweep ranges is not supported. To be honest it would get horribly complicated and the number of sweep points would be pretty irregular (potentially) and it could be pretty hard to represent the results clearly (that’s only one of the challenges it would represent). Of course, you could have a uniform sweep that sweeps from (say) 0 to 1 in 0.1 steps and then use that sweep variable plus the calcVal in another variable’s expression - not quite all the freedom you want, but maybe a compromise that’s good enough?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • aviquid
    aviquid over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    I just gave an example of sweeping from -vdiff to + vdiff. Ideally, I want to sweep from vdiff-20m:1m:vdiff+20m, so 41 uniform steps in total for all corners.

    This aside, is there any way that I can accomplish this, either by using ocean scripting? Please advise. Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to aviquid

    I'd misread your original post - I'd thought you had a different calcVal at each end of the sweep. Because you don't, the approach I suggested will work - in other words, define two variables:

    sweep_offset => -20m:1m:20m
    sweep_var => sweep_offset+calcVal("Vdiff_final" "calibrate")

    This will achieve what you want.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • aviquid
    aviquid over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    This approach works. Just that I had to make this small alteration to the sweep_var => sweep_offset+calcVal("Vdiff_final" "calibrate" ?matchParams list(list("sweep_offset" 0))) . In "calibration" test, sweep_offset has no role to play, but it does have a role in the "opr" test. Hence, had to add this to matchParams for both the tests. Worked like a charm Slight smile

    But yes, thank you for this. Appreciate your help.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • aviquid
    aviquid over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    This approach works. Just that I had to make this small alteration to the sweep_var => sweep_offset+calcVal("Vdiff_final" "calibrate" ?matchParams list(list("sweep_offset" 0))) . In "calibration" test, sweep_offset has no role to play, but it does have a role in the "opr" test. Hence, had to add this to matchParams for both the tests. Worked like a charm Slight smile

    But yes, thank you for this. Appreciate your help.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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