The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Other CAD Tools >> Entry Tools >> Conditional AEL in CDF (Cadence/icfb)? https://designers-guide.org/forum/YaBB.pl?num=1232654842 Message started by Haydar on Jan 22nd, 2009, 12:07pm |
Title: Conditional AEL in CDF (Cadence/icfb)? Post by Haydar on Jan 22nd, 2009, 12:07pm Can I have a conditional expression in the CDF to determine a device value? The AEL document lists "?:" as a valid operator but it didn't work for me. For example, assuming p1 is already defined and I try to make the value of the resistor r dependent on the value of parameter p1. (iPar("p1")==1) ? 10 : 20 Thanks, -Haydar |
Title: Re: Conditional AEL in CDF (Cadence/icfb)? Post by Andrew Beckett on Jan 22nd, 2009, 4:24pm The ternary operator is supported in AEL, as the code below shows: Code:
How did you test it? Was it for a particular netlister? For example, the spectre netlister wouldn't fully evaluate the expression (I think) - it would end up in the netlist (the iPar would get replaced), but spectre can also handle this expression. Regards, Andrew. |
Title: Re: Conditional AEL in CDF (Cadence/icfb)? Post by Haydar on Jan 23rd, 2009, 1:41pm I test this under the Tools->CDF->Edit tab, not through skill code. I tried some more and have somewhat puzzling results: For a resistor which has parameters p1, p2, p3 added, I make the resistor value r dependent on parameter values via a conditional and observe these: (iPar("p1")==1)?10:20 -> Works (iPar("p1")==1)?iPar("p2"):20 -> Works (iPar("p1")==1)?iPar("p2"):iPar("p3") -> Doesn't work When it doesn't work, Virtuoso schematic shows "*Error*" on the schematic, otherwise it shows the actual evaluated value. Thanks, -Haydar |
Title: Re: Conditional AEL in CDF (Cadence/icfb)? Post by Andrew Beckett on Jan 27th, 2009, 1:20pm I did some tests, and put together a component with CDF as you describe. I got an error on the label when it tried to evaluate it, so I called Code:
as suggested in the CIW. When I do this I get an error in the attached picture. I tried adding some extra parentheses, but it didn't help... You should contact Cadence customer support and report this. Regards, Andrew. |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |