• 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 SKILL
  3. Displaying waveform from Skill script as expression

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 13325
  • 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

Displaying waveform from Skill script as expression

shlomo34
shlomo34 over 4 years ago

I can create and plot a waveform within a Skill script, but when I try to save the waveform as a Maestro measurement, it cannot then be plotted.

Details:

I have a Skill function which creates, plots, and returns a waveform. Selected lines from function:

jitter = drCreateWaveform( drCreateVec( `double vectorToList(jitter_x) ) drCreateVec( `double vectorToList(jitter_y) ))
plot(jitter ?expr list( "jitter" ))
return( jitter )

In my Maestro outputs I run this function and store its output as expression "jit1". As I run the function, the "plot" command works correctly and shows a waveform plot.

In Maestro simulation results, "jit1" appears as a waveform. But when I doubleclick this waveform and open it as a plot, it returns an error:

ERROR (ADE-1057): Could not evaluate expression
Name:'jit1'
Expression:'fxn_jitter("/net0")'
because of the following error(s)
("ilGetString" 0 t nil ("*Error* ilGetString: arg must be symbol or string" (1.019251e-09 1.088974e-09 1.158697e-09 1.22842e-09 1.298143e-09...


What is going wrong?

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

    I suspect the issue is that you're not dealing with family data in the function. Your function should also not plot anything, since that will interfere with the ADE plotting mechanism (and won't work with plotting templates, data sheets and so on). In order to understand this, I'd probably need to see the entire function, not just pieces of it.

    If you can't post that here, would it be OK if I contact you directly since I have your contact details because of the duplicate CCR that was filed on your behalf the other day? I can then create a case and we can follow it up that way.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • shlomo34
    shlomo34 over 4 years ago in reply to Andrew Beckett

    Please contact me and we can add the postmortem here when we're done. Thanks :)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to shlomo34

    As promised, here's a summary of the solution.

    As I suspected, it was indeed that the code didn't handle family data. Whilst much of the time calculator functions called from ADE Explorer/Assembler (when they return scalar values) only see single results and not family data, if they return a waveform the expression gets called again when you plot the results from the ADE UI. This then sees the family of results, which allows the plot to indicate which sweep points it's against, but does mean that the function needs to handle family data.

    I solved it in this case by introducing a function inside which got passed a waveform object, and then followed the usual pattern:

    cond(

       (drIsWaveform(sig)
           ; handle single signals
       )
       (famIsFamily(sig)
            famMap('theFunc sig arg1 arg2 arg3 …)
       )
       (t
            error("report an error because it's an unknown argument")
       )
    )

    The idea is that the function calls a function which maps over the family, calling the function for each member of the family, and then reassembles the results.

    You'll see similar code in many of my calculator functions, such as those found in this forum, but also at Custom IC Calculator SKILL Function Library.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to shlomo34

    As promised, here's a summary of the solution.

    As I suspected, it was indeed that the code didn't handle family data. Whilst much of the time calculator functions called from ADE Explorer/Assembler (when they return scalar values) only see single results and not family data, if they return a waveform the expression gets called again when you plot the results from the ADE UI. This then sees the family of results, which allows the plot to indicate which sweep points it's against, but does mean that the function needs to handle family data.

    I solved it in this case by introducing a function inside which got passed a waveform object, and then followed the usual pattern:

    cond(

       (drIsWaveform(sig)
           ; handle single signals
       )
       (famIsFamily(sig)
            famMap('theFunc sig arg1 arg2 arg3 …)
       )
       (t
            error("report an error because it's an unknown argument")
       )
    )

    The idea is that the function calls a function which maps over the family, calling the function for each member of the family, and then reassembles the results.

    You'll see similar code in many of my calculator functions, such as those found in this forum, but also at Custom IC Calculator SKILL Function Library.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Frank Wiedmann
    Frank Wiedmann over 4 years ago in reply to Andrew Beckett

    Some simple example code is also shown at support.cadence.com/.../ArticleAttachmentPortal

    • 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