Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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?
 

dick_freebird

Advanced Member level 5
Joined
Mar 4, 2008
Messages
8,109
Helped
2,271
Reputation
4,552
Reaction score
2,291
Trophy points
1,393
Location
USA
Activity points
64,838
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).
 

erikl

Super Moderator
Staff member
Joined
Sep 9, 2008
Messages
8,108
Helped
2,694
Reputation
5,368
Reaction score
2,302
Trophy points
1,393
Location
Germany
Activity points
44,120
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top