• 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. How to use getData() without hardcoded results path, for...

Stats

  • Replies 2
  • Subscribers 132
  • Views 506
  • Members are here 0

How to use getData() without hardcoded results path, for a DC sweep?

dontpanic
dontpanic 1 month ago

Hi! I am unable to get getData() to work without hardcoding the results path for sweeps.

For example if I define the following 3 outputs in a simple DC sweep (variable PATH_TO_DEVICE is a string equal to "DUT.MN"):

output1 getData("DUT.MN:gm" ?result "dc")
output2 getData(strcat(VAR("PATH_TO_DEVICE") ":gm") ?result "dc")
output3 getData(strcat(VAR("PATH_TO_DEVICE") ":gm") ?result "dcOpInfo")

then output1 and output3 evaluate / plot  properly, while output2 produces the error attached below.

The error seems to be that VAR("PATH_TO_DEVICE") returns a srrWave object instead of a string for the DC sweep results (the same expression works fine for the dcOpInfo results in output3!)

How can I workaround this problem? Thanks in advance for any help!

Jorge.

--------------------------------------

*Error* ("strcat" 0 t nil ("*Error* strcat: argument #1 should be either a string or a symbol (type template = \"S\")" srrWave:0x7094c0b0))

ERROR (ADE-1057): Could not evaluate expression
        Name:'output2'
        Expression:'getData(strcat(VAR("PATH_TO_DEVICE") ":gm") ?result "dc")'
     because of the following error(s)
        ("strcat" 0 t nil ("*Error* strcat: argument #1 should be either a string or a symbol (type template = \"S\")" srrWave:0x7094c0b0))
     Ensure that the definition of the expression is correct.

  • Cancel
  • Sign in to reply
Parents
  • dontpanic
    dontpanic 1 month ago

    * I meant, "without hardcoding the SIGNAL path" (the results path is not the issue here)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 1 month ago in reply to dontpanic

    Because the variable could (potentially) have different value per sweep point, it becomes a waveform (or family of waveforms, depending on on the depth of sweeps). 

    For output3 this works because the result for each simulation point will be a scalar value. Because of that, it's computed after each individual simulation and at that point the VAR() will be a string and so the expression works OK. For output2 the result at each simulation point is computed (it's OK, because the VAR is a string) and is determined to be a waveform (because it's from the dc sweep itself). Because it's a waveform, nothing is stored and you just get a waveform icon showing. When you try to plot the waveform at the end, it will then access the entire data set and at this point VAR() is returning a waveform - hence the problem.

    The solution is to use the leafMap function around your expression. This magically handles the fact that part of the expression is a waveform/ family:

    leafMap(getData(strcat(VAR("PATH_TO_DEVICE") ":gm") ?result "dc"))

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett 1 month ago in reply to dontpanic

    Because the variable could (potentially) have different value per sweep point, it becomes a waveform (or family of waveforms, depending on on the depth of sweeps). 

    For output3 this works because the result for each simulation point will be a scalar value. Because of that, it's computed after each individual simulation and at that point the VAR() will be a string and so the expression works OK. For output2 the result at each simulation point is computed (it's OK, because the VAR is a string) and is determined to be a waveform (because it's from the dc sweep itself). Because it's a waveform, nothing is stored and you just get a waveform icon showing. When you try to plot the waveform at the end, it will then access the entire data set and at this point VAR() is returning a waveform - hence the problem.

    The solution is to use the leafMap function around your expression. This magically handles the fact that part of the expression is a waveform/ family:

    leafMap(getData(strcat(VAR("PATH_TO_DEVICE") ":gm") ?result "dc"))

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • 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.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information