• 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. Applying calculator function to multiple signals at onc...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 13073
  • 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

Applying calculator function to multiple signals at once

SteveVrk
SteveVrk over 3 years ago

Hello,

Suppose I have multiple simulation outputs, like /VA, /VB, VC<1> and VC<2>.

I would like to apply a function (like slewRate or peakToPeak) to all of them and take the maximum of the result (which should be a single number per simulation run).

Is this possible?

  • Cancel
  • ShawnLogan
    ShawnLogan over 3 years ago

    Dear SteveVrk,

    Did you consider using the ocean command max() to provide the maximum values of your waveform expressions using the slewRate(0 or peakToPeak functions? Figure 1 from the Ocean reference manual shows the syntax. So, in your example if you define your waveforms as va, vb, vc_1, and vc_2:

    max(peakToPeak(va) (peakToPeak(vb) (peakToPeak(vc_1) (peakToPeak(vc_2))

    will provide the maximum value of the peak-to-peak waveforms.

    You can use this as an ocean script and add it to your outputs or make an expression with it in the calculator to import directly into Assembler/Explorer. In Figure 2, I used max() in the calculator and printed the values of the peak-to-peak of two waveforms individually and the result of using the max() function on the two peak-to-peak values in the table below the calculator expression.

    Shawn

    Figure 1

    from URL: support.cadence.com/.../techpubDocViewerPage

    Figure 2

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • SteveVrk
    SteveVrk over 3 years ago in reply to ShawnLogan

    Hi Shawn,

    That's a good point, thanks!

    For me, the list of signals is in the tens. With peakToPeak this still works well.

    With slewRate things get unpractical since I have to repeat the function call with arguments tens of times.

    With even more complicated functions, all bets are off.

    Hence I was hoping for a function which could first transform it into a vector and then I could apply arbitrary complex function to all of them in parallel.

    I will use this approach meanwhile.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to SteveVrk

    Steve,

    You could use abGroup from How to create a group of signals in the calculator?. Then you could use:

    ymax(peakToPeak(abGroup(VT("/VA" VT("/VB") VT("/VC<1>") VT("/VC<2>"))))

    or ymax(SomeComplicatedFunction(abGroup(...) extraArgsForComplicatedFunction))

    Unfortunately there's no elegant way to register abGroup with the calculator, so you probably just need to load the code from your .cdsinit and then gather the expressions in the calculator. One slightly messy way of doing it is to use the VT button, click on all the nodes in the schematic you want, repeatedly hit "+" in the calculator to get a sum of all those you want, and then add abGroup() around the whole expression and replace the + with space. Yes, it should be easier, but at the moment there isn't really an easy way other than typing it in... but at least the complicated function only needs to be wrapped around the entire group, rather than each individual signal.

    Andrew

    • 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