Can I do "if" "then" in Cadence expression?

Status
Not open for further replies.

cmosbjt

Full Member level 5
Joined
Apr 25, 2004
Messages
250
Helped
10
Reputation
20
Reaction score
2
Trophy points
1,298
Location
USA
Activity points
2,293
In Cadence schematic simulation, can I do something like:

vdc = if (SW=1) then (1) else (0)

How?
 

Well, there's the analogLib switch element which, if SW was
a node voltage, would do what you want. Not the form you
ask for, but the result. And it wouldn't look for strict equality,
but >= the threshold parameter.

You could stack switches, like relay logic, to get closer to
an = function (arbitrarily so, but finite slop).
 

In Cadence schematic simulation, can I do something like:

vdc = if (SW=1) then (1) else (0)

How?

In Cādence's SKILL language syntax:
Code:
vdc = if( (SW==1) then 1 else 0)
or, in short form:
Code:
vdc = if( (SW==1) 1 0)
You can either type this directly into the CIW, or define it as a SKILL function or procedure.

For more info, get sklangref.pdf (find it in $CDS_INST_DIR/doc/sklangref/sklangref.pdf or via G00GLE). Therein, search for examples by the search word else.

The Spectre simulator's OCEAN language should use a similar syntax.
See the Spectre® Circuit Simulator Reference or the Virtuoso® Simulator Measurement Description Language User Guide and Reference somewhere in the $CDS_INST_DIR/doc/ libs.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…