• 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. Problem with GUI for custom calculator function

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 125
  • Views 4201
  • 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

Problem with GUI for custom calculator function

Volker T
Volker T over 1 year ago

Dear all,

I wrote a very simple custom calculator function with the following function signature:

procedure( countSamples( signal )

 <code>

) ; countSamples

I also added - in the same SKILL file - the following GUI builder information

;;;;;;;;;;;;;;;;;;;;;;;;;; GUI builder information ;;;;;;;;;;;;;;;;;;;;;;;;;;;
ocnmRegGUIBuilder(
 '(nil
  function countSamples
  name countSamples
  description "Count the number of samples avaliable for the given signal."
  category ("Custom Functions")
  analysis (nil
      general (nil
        args ( signal )
          signals (nil
                signal (nil
                      prompt "Signal"
                      tooltip "The signal vector to count the number of samples for."
                      )
           )
        inputrange t
      )
  )
  outputs(result)
 )
)

This is pretty much like the example provided in the Cadence Help.

However, it acts a bit weird. If I click on it in Calculator, with no signal already selected in the buffer, nothing happens. With signal already in the buffer, it nicely wraps around it (e.g. countSamples(VT("/result")) ).

There are other calculator functions like Kf() as an example, which also just have one mandatory argument. When I click on it - again with an empty buffer - it adds "Kf()" to the buffer, such that I can then enter the argument in the brackets. This is a more intuitive behaviour: action by the user like a click on the function follows action in the Calculator window.

What am I doing wrong, that my function does not behave like this as well?

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    You're not doing anything wrong. The Kf() function does not have a mandatory argument, in fact it doesn't (normally) take any arguments and so it makes no sense for it to expect something in the buffer.

    For a function that must have something in the buffer, your code is correct. It's behaving as expected. Try pressing the dB20 function - that behaves the same way as your function does - it doesn't do anything unless something is in the buffer.

    Note, rather than writing the template code yourself, it's much easier to get the fx button to add it to your code for you (that's what I always do).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    You're not doing anything wrong. The Kf() function does not have a mandatory argument, in fact it doesn't (normally) take any arguments and so it makes no sense for it to expect something in the buffer.

    For a function that must have something in the buffer, your code is correct. It's behaving as expected. Try pressing the dB20 function - that behaves the same way as your function does - it doesn't do anything unless something is in the buffer.

    Note, rather than writing the template code yourself, it's much easier to get the fx button to add it to your code for you (that's what I always do).

    Andrew

    • 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