• 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 16790
  • 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
  • fatcat1206
    fatcat1206 over 9 years ago

    Hi Andrew


    Thank you for the feedback.

    I have tried your suggestion about the "apply" function, it works, and makes the code looks simpler :)

    I cross check the manual "SKILL Language Reference", what you have mentioned is not written down there, that's a pity.

    According to the document, I assume the "apply" only accept two arguments.

    But it's good that I can have some deeper understanding about the API from you :)

    After these discussion between you and me, the main question of this post is still not answered:

    Why the spacial function has been called twice during the simulation of ADEXL.

    And VAR() returns different value on each time (1st time: number; 2nd time: waveform)

    Best Regards

    Yi

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • fatcat1206
    fatcat1206 over 9 years ago

    Hi Andrew


    Thank you for the feedback.

    I have tried your suggestion about the "apply" function, it works, and makes the code looks simpler :)

    I cross check the manual "SKILL Language Reference", what you have mentioned is not written down there, that's a pity.

    According to the document, I assume the "apply" only accept two arguments.

    But it's good that I can have some deeper understanding about the API from you :)

    After these discussion between you and me, the main question of this post is still not answered:

    Why the spacial function has been called twice during the simulation of ADEXL.

    And VAR() returns different value on each time (1st time: number; 2nd time: waveform)

    Best Regards

    Yi

    • 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