Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

1,655 views
Skip to first unread message

spectrallypure

unread,
Apr 8, 2013, 2:31:27 PM4/8/13
to
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.

Andrew Beckett

unread,
Apr 11, 2013, 11:18:45 AM4/11/13
to
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.

spectrallypure

unread,
Apr 11, 2013, 12:18:00 PM4/11/13
to
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.

Andrew Beckett

unread,
Apr 12, 2013, 6:03:03 AM4/12/13
to
Jorge,

Yes, they have to be numerical.

Andrew.

คําดี แตกดี

unread,
Dec 19, 2023, 3:03:18 PM12/19/23
to
➡️ 👉 obb.im/r?4910c=line

🌷 สุดปัง 🟣🟡🟣🟡🟣🟡🟣🟡🟣🟡🟣🟡
🟣🟡 แตกหนักมาก🟡แตกง่ายมาก🟡โบนัสแตกดี100%
🟣🟡 สมัครฟรี 👉 obb.im/r?4910c=line
🟣🟡สมัครใหม่ จัดหนักจัดเต็ม ไหลรัวๆ
🟣🟡 ฝากถอน เริ่มต้นเพียง 1 บาท
🟣🟡ระบบออโต้ ไม่ต้องทำเทิร์น

0 new messages