Conditional statement in HSPICE

Status
Not open for further replies.

msandhu

Newbie level 1
Joined
Dec 14, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
AZ/US
Activity points
1,291
Does anyone know how i can use .if statement with .measure in HSPICE ex:
.measure tran vol1 find v(outp,gnd!) at=3900n
.if (vol1>2)
.measure tran var1 param='slewrate_fallper20rise'
.else
.measure tran var1 param='slewrate_fallper20fall'
.endif
Now from above i get arithmetic evaluation error, i cant compare measured (vol1--getting measured from .measure statement from top) values (i.e. .measure statement is evaluated while simulation is going on whereas .if is checked before simulation starts).
I tried it with GnuCap simulator and it works (I guess eval command can have if statement which can compare two measureed values), ex:
.measure var1=eval({ if(vol2>vol1,slewrate_fallper20rise,slewrate_fallper20fall) })
Any help will be appreciated.
Thanx
 

May be **broken link removed** will help you?
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…