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

    What I want to achieve is kind of "case" function for dealing with the waveforms:
    Base on the variable value, the corresponding waveform would be sent to the output.

    It's part of my flow, where I want to make flexible output expression to verified the circuit.

    So in this case, the number of clauses for the "case" is undefined. Which means, I do not know all the arguments in advance.

    I have tried the exactly same thing as you mentioned:
    famMap('SIScalcWaveCase selExpr listOfClauseList)

    The bug I notice is that, if the waveform is an element of the "listofClauseList", then it would not been expanded, when passing by the "famMap()".
    As a results, not a single waveform, but a waveform family has been used.

    Finally, I find the method to use "apply" functions, then I can put the arbitrary number of waveforms as the direct argument in the "famMap" function. Most important is that I do not need to mention them separately.

    I hope I have explain the situation clear.

    Best Regards

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

    What I want to achieve is kind of "case" function for dealing with the waveforms:
    Base on the variable value, the corresponding waveform would be sent to the output.

    It's part of my flow, where I want to make flexible output expression to verified the circuit.

    So in this case, the number of clauses for the "case" is undefined. Which means, I do not know all the arguments in advance.

    I have tried the exactly same thing as you mentioned:
    famMap('SIScalcWaveCase selExpr listOfClauseList)

    The bug I notice is that, if the waveform is an element of the "listofClauseList", then it would not been expanded, when passing by the "famMap()".
    As a results, not a single waveform, but a waveform family has been used.

    Finally, I find the method to use "apply" functions, then I can put the arbitrary number of waveforms as the direct argument in the "famMap" function. Most important is that I do not need to mention them separately.

    I hope I have explain the situation clear.

    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