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
251
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
7,572
Helped
2,188
Reputation
4,382
Reaction score
2,082
Trophy points
1,393
Location
USA
Activity points
60,506
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,114
Helped
2,694
Reputation
5,368
Reaction score
2,294
Trophy points
1,393
Location
Germany
Activity points
44,061
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