• 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. I can't define my function in calculator

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 124
  • Views 1098
  • 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

I can't define my function in calculator

TiNat
TiNat over 13 years ago
Hello. I've read manuals about calculator- part "Defining Functions and Function Keys" but I can't implement it. I want to calculate threshold voltage of nmos. I wrote such function: vto=(ymax(deriv(IS("/M0/D")))*cross(deriv(IS("/M0/D")) ymax(deriv(IS("/M0/D"))) 1 "either" nil nil )-value(IS("/M0/D") cross(deriv(IS("/M0/D")) ymax(deriv(IS("/M0/D"))) 1 "either" nil nil ) ))/ymax(deriv(IS("/M0/D"))) where IS("/M0/D") is stack expression. I don't understand where I must write this expression. I need use only stack, no additional arguments. I don't find such problem in google in other forums. Help me please, how to organize such user function in calculator. Thank you for your answers.
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Try this. I reorganised the code a little (you should check this, because I didn't really have anything to check it). As you can see, I broke down the code to make the calculations simpler. You need to load this code (put it in a file and use load("filename.il") in the CIW or in your .cdsinit file), and then call MYthreshVoltageReg() to register it. There are quite a lot of solutions on Cadence Online Support for defining calculator functions. Note that in IC615 you also have the "Expression Editor" which allows you to define dependent expressions which would be an alternative to writing this code - but it depends on how often you're likely to use it, I guess.

    procedure(MYthreshVoltage(current)
    let((di diMax xMax vto)
      di=deriv(current)
      diMax=ymax(di)
      ; this can probably be done with xMax=xmax(di)
      ;xMax=cross(di diMax 1 "either" nil nil)
      xMax=xmax(di)
      ; last value in function is return value
      vto=(ymax(di)*xMax-value(di xMax))/diMax
      )
    )

    procedure(MYthreshVoltageCB()
      calSpecialFunctionInput('MYthreshVoltage nil)
    )

    procedure(MYthreshVoltageReg()
      calRegisterSpecialFunction(list("MYthreshVoltage" 'MYthreshVoltageCB))
    )

    ; call MYthreshVoltageReg() to register the function as a User Defined SKILL
    ; Function in the calculator
     

    • 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