ADE: Using conditions (IF-like) in output expressions?

S

spectrallypure

Guest
Hello everyone! Does anybody know if it's possible to use conditions
(i.e. IF-like expressions) in the expressions for outputs in ADE? For
instance, would it be possible to define outputs where the expression
checks the value of a variable to decide what to calculate, or if a
certain simulation type results actually exist?

An application of this functionality would be the conditional
evaluation of outputs only if the associated simulations have been
run. For example, I normally have in a same testbench AC, STB and
NOISE analyses defined, along with many expressions associated to them
defined as outputs. However, most of the time I only run one of the
simulations and not the rest. But when I disable the other
simulations, their associated expressions are still evaluated,
generating fake errors (e.g. "ERROR (ADE-1057): Could not evaluate
expression"). So far I have been defining different states for
enabling the right outputs according to the different simulations, but
it would be easier if I could explicitly put in the expression a check
for the availability of the appropriate results.

Thanks in advance for any ideas!

Cheers,

Jorge.
 
On 04/08/13 19:31, spectrallypure wrote:
Hello everyone! Does anybody know if it's possible to use conditions
(i.e. IF-like expressions) in the expressions for outputs in ADE? For
instance, would it be possible to define outputs where the expression
checks the value of a variable to decide what to calculate, or if a
certain simulation type results actually exist?

An application of this functionality would be the conditional
evaluation of outputs only if the associated simulations have been
run. For example, I normally have in a same testbench AC, STB and
NOISE analyses defined, along with many expressions associated to them
defined as outputs. However, most of the time I only run one of the
simulations and not the rest. But when I disable the other
simulations, their associated expressions are still evaluated,
generating fake errors (e.g. "ERROR (ADE-1057): Could not evaluate
expression"). So far I have been defining different states for
enabling the right outputs according to the different simulations, but
it would be easier if I could explicitly put in the expression a check
for the availability of the appropriate results.

Thanks in advance for any ideas!

Cheers,

Jorge.
Jorge,

Sure, you could use something like:

if(member('tran results()) wantedExpression 0.0)

The wantedExpression would be what you would have put otherwise. If you
want to make it a bit more verbose you could put:

if(member('tran results()) then wantedExpression else 0.0)

but if there's only a single "then" and "else" expression, you can miss
out the keywords. I've arranged this one to return 0.0 if the results
didn't exist - you want to ensure that your expression returns a number.

Regards,

Andrew.
 
Thanks so much Andrew, it works like a charm! Just one doubt: this
means that expressions in the ADE output list can only evaluate to
numbers? I tried putting a string like

get_pname(concat("N/A"))

instead of 0.0 as the else parameter (to print "N/A", short for "Not
Available"), but it seems that ADE just ignores it (no error appears
in the CIW, though, which was my main goal).

Thanks again for your help.

Cheers,

Jorge.
 
On 04/11/13 17:18, spectrallypure wrote:
Thanks so much Andrew, it works like a charm! Just one doubt: this
means that expressions in the ADE output list can only evaluate to
numbers? I tried putting a string like

get_pname(concat("N/A"))

instead of 0.0 as the else parameter (to print "N/A", short for "Not
Available"), but it seems that ADE just ignores it (no error appears
in the CIW, though, which was my main goal).

Thanks again for your help.

Cheers,

Jorge.
Jorge,

Yes, they have to be numerical.

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top