• 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. VAR() returns a waveform instead of a number, after simulation...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 142
  • Views 16788
  • 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

VAR() returns a waveform instead of a number, after simulation finished in ADEXL

fatcat1206
fatcat1206 over 9 years ago

Hi All

I am developing some code to process the simulation data.

Where I want to use VAR() as one of the arguments (selExpr ) for the function. Please find the procedure below.

procedure(SIScalcWaveCase(selExpr listOfClauseList)
prog(
(
)     ;local variable

    foreach(clauseList listOfClauseList
        when(selExpr == car(clauseList)
            return(eval(cadr(clauseList)))    
        );when
    );foreach
);prog
);proc

I expect VAR() returns a number, thus I assume selExpr would be "float" type.

But somehow it returns a waveform.

Below is the expression I made for selecting the waveform due to the value of "ctrl" in the ADEXL.

SIScalcWaveCase(VAR("ctrl") list('(0 VT("/s<0>")) '(1 VT("/s<1>")) '(2 VT("/s<2>")) '(3 VT("/s<3>"))))

where "ctrl" is a variable, whose value is swept from 0 to 3, and s<3:0> are the nets saved in the schematic.

I set breaking point in the procedure.

I notice the procedure has been called twice during the simulation in ADEXL (only 1 run)

In the first time, the VAR() indeed passes a number, and on the second time it passes a waveform.

Thus in the end, there is nothing in the results tab in ADEXL.

I run the same thing inside ADE L, and the procedure works properly there.

From my point of view, inside ADE XL, the second triggering for the procedure causes the problem.

So, I'd like to ask, why the procedure has been called twice inside ADE XL; and how to retrieve the value from VAR() properly under this condition.

Best Regards

Yi

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

    Hi Yi,

    You're quite right. I misinterpreted your original intention and didn't spot the change in how you were calling the function in your revised version.

    Obviously famMap can't really be expected to identify waveform objects in some arbitrary location within a list structure, so what you're doing is reasonable (I have a similar example as the case where I'm using apply).

    Note you don't need to do the append that you're doing in your code. You should be able to just do:

    apply('famMap 'SIScalcWaveCase selExpr args)

    The way that apply works is that you can supply a number of positional arguments and then the last argument is a list of the remaining arguments.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Yi,

    You're quite right. I misinterpreted your original intention and didn't spot the change in how you were calling the function in your revised version.

    Obviously famMap can't really be expected to identify waveform objects in some arbitrary location within a list structure, so what you're doing is reasonable (I have a similar example as the case where I'm using apply).

    Note you don't need to do the append that you're doing in your code. You should be able to just do:

    apply('famMap 'SIScalcWaveCase selExpr args)

    The way that apply works is that you can supply a number of positional arguments and then the last argument is a list of the remaining arguments.

    Regards,

    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