• 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. Functional Verification
  3. I would like to see the values of a signal after some mathematical...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 65
  • Views 1590
  • 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 would like to see the values of a signal after some mathematical/logical function. How do I do this?

avidanefody
avidanefody over 3 years ago

Looking for a way to run a TCL procedure over all values of a signal, and if possible display these values in the wave on another "virtual" signal.

For example:

I would like to do the following transformation

limit_values = [0, 50, 100, 300, 400]

signal_values = [20, 60, 90, 220, 5000]

after transformation:

new_values = [0, 50, 50, 100, 400]

Basically finding the nearest lowest value to the signal value in the limit_values table.

  • Cancel
  • StephenH
    StephenH over 3 years ago

    You probably want the expression calculator for this, as it lets you define a Tcl expression to compute a new signal derived from one or more other signals: https://support.cadence.com/apex/techpubDocViewerPage?xmlName=expressioncalculator.xml&title=SimVision:%20Using%20the%20Expression%20Calculator%20--%20Contents%20-%20&hash=&c_version=21.03&path=ExpressionCalculator/ExpressionCalculator21.03/ExpressionCalculatorTOC.html

    There is also a cheat-sheet for the expression syntax here:

    https://support.cadence.com/apex/techpubDocViewerPage?path=expression_qrg/expression_qrg21.03/expression_qrgTOC.html

    To build a look-up table per your request, I think the simplest thing would be to build a tree of ternary expressions, something like:

    (mysig < 50) ? 0 : (mysig < 100) ? 50 : (mysig < 300) ? 100 : (mysig < 400) ? 300 : 400

    • Cancel
    • Vote Up +1 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