IF-ELSE statement in hspice

Status
Not open for further replies.

srini.pes

Member level 3
Joined
May 28, 2010
Messages
61
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
NIT calicut
Visit site
Activity points
1,725
Hi to all.,
While designing my hspice model, i have a conditional statement

like

.if (V<s1)

.PARAM CURRENT='A'


.else(V>=s1)

.PARAM CURRENT='B'

.endif



it was showing some error like

please contact encrypted file provider. For relaxed syntax check, please use '-R' command and retry.

Please clarify me if some thing wrong in my syntax.


Thanking you....
SRINI
 

I think the .else keyword doesn't have to be followed by a condition (V>=s1). It's redundant anyway.
 

Hi,

Again same error was coming.
Actually what is the meaning of this error exactly.

and the way i mentioned the if-else block was correct or not ??

Please clarify this and thanking you so much
----------
SRINI
 

Are you sure the dot should be there? e.g.
Code:
if (Ps > Weff)
   Cbs = AS * Cjbs + (PS - Weff) * Cjbssw + Weff *Cjbsswg
else
   Cbs = AS * Cjbs + PS * Cjbsswg

Keith
 

Hi keith,
It must be like .if,
i clarified with hspice command reference document also...


.IF (condition1)...
+ [.ELSEIF (condition2)... ]
+ [.ELSE ... ]
.ENDIF
 

I think it depends on where you are using it. In a netlist you use .if, as a compiler directive you use #if and within a model you use if with no prefix.

Keith
 

please contact encrypted file provider. For relaxed syntax check, please use '-R' command and retry.

Again same error was coming.
Actually what is the meaning of this error exactly.

I think this error message didn't result from HSPICE itself, but from a (SKILL decryption?) syntax checker.

Perhaps this error message doesn't really matter for the proper HSPICE analysis.
 

please contact encrypted file provider.
For relaxed syntax check, please use '-R' command and retry.


However i mention the if-else block having this same error.
Please tell me how to resolve this issue.
 

please contact encrypted file provider.
For relaxed syntax check, please use '-R' command and retry.


However i mention the if-else block having this same error.

Then probably your if-else block isn't the reason for the error message.

How did you try and start the hspice analysis? Show the command line, and - if possible - the full hspice command file you want to run.
 

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…