The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 9:06am
Pages: 1 2 
Send Topic Print
Assert statement with cadence spectre (spectre.scs) (Read 5653 times)
Gp
Community Member
***
Offline



Posts: 35

Assert statement with cadence spectre (spectre.scs)
Aug 01st, 2017, 4:27am
 
Hi All,

I want to add the assert statement in spectre (spectre.scs) file. I have try using following way:


vdd_chk assert sub=INV_1 expr="(V(vdd_ext_por_3v))" min=1.65  max=3.65 message="ERROR: por_vdd is out of range"
vdd_chklimit checklimit checkallasserts=yes enable=["por_vdd_chk"] severity=none
thresold_chk dyn_actnode subckt=INV_1 node=vdd_ext_por_3v dv=1.68  
myopt options dochecklimit=yes save=allpub checklimitdest=file checklimitfile="myfile"




In this way, Simulator will check from 1.65V to 3.65V only. But I want to add some dynamic voltage level. Like, In ramp period after 1.65 V my checkers will consider the given range. So, how to apply in this file?

Right now this checker checks from the initial period (0 ns). I have already know about time frame feature check_windows= [start stop]. But I want to check with voltage level.

So, kindly give me suggestions for dynamic voltage.
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Assert statement with cadence spectre (spectre.scs)
Reply #1 - Aug 2nd, 2017, 9:11pm
 
I don't understand what you're asking - please clarify what you mean. What do you mean by "in the ramp period after 1.65V"?

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Gp
Community Member
***
Offline



Posts: 35

Re: Assert statement with cadence spectre (spectre.scs)
Reply #2 - Aug 2nd, 2017, 9:20pm
 
I mean, I want to check only voltage level after 1.65. Ignore initial period from zero to voltage ramp start(i.e 1.65V).
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Assert statement with cadence spectre (spectre.scs)
Reply #3 - Aug 2nd, 2017, 9:43pm
 
If you mean that you don't want it to flag until the signal has at least crossed 1.65 the first time, then this would be one way of doing it:

Code:
vdd_chk assert sub=INV_1 expr="cross(V(vdd_ext_por_3v),'rise,1,1.65)>0 ? V(vdd_ext_por_3v) : 1.65" min=1.65  max=3.65 message="ERROR: por_vdd is out of range"  



In other words, it uses the cross function to check that there had been at least one crossing - if so, it uses the value of the signal, otherwise it uses a value that is within the allowed range.

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Gp
Community Member
***
Offline



Posts: 35

Re: Assert statement with cadence spectre (spectre.scs)
Reply #4 - Aug 2nd, 2017, 10:50pm
 
Hi Andrew,

I have tried this option. There is no any compilation issue but generated the following warnings. From this warning, I cannot understand the tool is take this option or not. and this option also not dump in waveform.



WARNING (SPECTRE-17003): Assert `vdd_chk' contains an expression that
       needs to be evaluated by MDL. Using this assert frequently may lead to
       performance issues because the MDL evaluator is slower than the native
       assert evaluator.

***************************************
Checklimit Analysis  `vdd_chklimit'
***************************************
The following asserts will be enabled for all subsequent analyses until the
       next checklimit analysis statement is found:
por_vdd_chk : ON

Warning from spectre during transient analysis `transient'.
   WARNING (MDL-351): por_vdd_chk, instance
       sensor_test_top.sip_top_u.chip_top_u.Icore_top.Ianalog_top.I_POR:
       Unable to bind function `cross'.
   WARNING (MDL-1305): Argument 'dir' cannot be cast from 'integer' to
       'name'.
   WARNING (MDL-1306): Argument 'sig' cannot be cast scalar to the waveform.
Back to top
 
 
View Profile   IP Logged
Gp
Community Member
***
Offline



Posts: 35

Re: Assert statement with cadence spectre (spectre.scs)
Reply #5 - Aug 3rd, 2017, 12:10am
 
Hi Andrew,

I have fixed the issue and now working fine.

Thanks a lot.
Back to top
 
 
View Profile   IP Logged
Gp
Community Member
***
Offline



Posts: 35

Re: Assert statement with cadence spectre (spectre.scs)
Reply #6 - Aug 3rd, 2017, 5:27am
 
Hi Andrew,

I have done the simulation successful with assert statement. But, I have a confusion about cross function with rise, fall and both direction.

expr="cross(V(vdd_ext_por_3v),'rise,1,1.65)>0 ? V(vdd_ext_por_3v)

In this statement, rise condition is working fine. But how to use fall and both direction?

I have tried with +1, -1 direction but, it generates following warning and I think, tool is not consider this way.

 WARNING (MDL-351): por_vdd_chk, instance
      sensor_test_top.sip_top_u.chip_top_u.Icore_top.Ianalog_top.I_POR:
      Unable to bind function `cross'.
  WARNING (MDL-1305): Argument 'dir' cannot be cast from 'integer' to
      'name'.
  WARNING (MDL-1306): Argument 'sig' cannot be cast scalar to the waveform.

Back to top
 
 
View Profile   IP Logged
Frank Wiedmann
Community Fellow
*****
Offline



Posts: 677
Munich, Germany
Re: Assert statement with cadence spectre (spectre.scs)
Reply #7 - Aug 4th, 2017, 1:07am
 
The MDL cross function is documented in chapter 2 of the "Spectre Circuit Simulator Measurement Description Language User Guide and Reference" (https://support.cadence.com/apex/techpubDocViewerPage?path=mdlref/mdlref16.1/cha...). The expressions for rising, falling and both directions are 'rise, 'fall, and 'cross, respectively. (This is different from the calculator cross function, where the expressions are "rising", "falling", and "either".)
Back to top
 
 
View Profile WWW   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Assert statement with cadence spectre (spectre.scs)
Reply #8 - Aug 5th, 2017, 2:02am
 
I'm assuming the question is unrelated to your original question, but more of a question about cross in general - because I presume if it's ramping up, the first crossing would always be in the 'rise direction. All this is doing is trying to check if you've crossed once before applying the limit.

Frank is of course right in pointing out the difference between the MDL function cross and the OCEAN function cross.

Regards,

Andrew
Back to top
 
 
View Profile WWW   IP Logged
Gp
Community Member
***
Offline



Posts: 35

Re: Assert statement with cadence spectre (spectre.scs)
Reply #9 - Aug 5th, 2017, 2:28am
 
Hi Andrew,

'rise function is working fine but when I use 'cross or 'fall for clock signal ,than simulator shouted error message. I am using following way:

clk_chk assert sub=INV_1 expr="cross(V(clk),'cross,1,0.8)>0 ? V(clk ):0.8" min=0.8  max=1.6 message="ERROR: clk is out of range" level=error


From this statement, I want to check voltage level of 0.8V to 1.6V.  But 0.8V cross on falling edge than shouted error. so, How can I check voltage level for this clock signal.
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Assert statement with cadence spectre (spectre.scs)
Reply #10 - Aug 5th, 2017, 2:44am
 
Well, unless you show what the error was when it "shouted" it's rather hard to know. I tried the expression you gave and it worked fine.

In the unlikely event of this being version-specific, knowing the spectre version you're using would be useful too (at the very top of the spectre log file, or what you get from typing "spectre -W" in the terminal window).

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Gp
Community Member
***
Offline



Posts: 35

Re: Assert statement with cadence spectre (spectre.scs)
Reply #11 - Aug 5th, 2017, 3:19am
 
spectre version is 15.20.602

Error Scenario: when I am using 'cross function, simulator check the rising edge first. At this edge when crossing 0.8V than it's check up to threshold 1.6. It's working fine as per my expectation.
But during falling edge when voltage change from higher to lower (1.6V to 0.8V) , it's cross less than 0.8 (0.8,0.7 and so on...).
At this point, checkers failed.
Similarly I faced the 'fall condition.

So, How can I this scenario fix?
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Assert statement with cadence spectre (spectre.scs)
Reply #12 - Aug 5th, 2017, 6:32am
 
It's not clear what you want the check to do. Clearly in the fall direction if the threshold is the same as the minimum value of the assert, then the first transition will fail.

Did you perhaps want to do:

clk_chk assert sub=INV_1 expr="cross(V(clk),'fall,1,1.6)>0 ? V(clk ):0.8" min=0.8  max=1.6 message="ERROR: clk is out of range" level=error

This will flag only the first time it goes out of the range 0.8 to 1.6 once it first comes into the range from above 1.6V.

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Gp
Community Member
***
Offline



Posts: 35

Re: Assert statement with cadence spectre (spectre.scs)
Reply #13 - Aug 5th, 2017, 10:12am
 
If I want to check either direction (rise and fall together) than I think, 'cross can use insted of ' fall or 'rise.

But, when I use' cross than what wii be our expression? (I am confused about thresold value defined in expression)
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Assert statement with cadence spectre (spectre.scs)
Reply #14 - Aug 5th, 2017, 2:48pm
 
As I've said before, it's unclear what you actually want. Maybe you want this:

cross(V(clk),'fall,1,1.6)>0 || cross(V(clk),'rise,1,0.8)>0 || (V(clk)@0 >=0.8 && V(clk)@0 <=1.6) ? V(clk ):0.8

This is untested. What it's saying is if you've crossed from above 1.6 to below 1.6, or you've crossed from below 0.8 to above 0.8, or it was between 0.8 and 1.6 at time 0, then check the voltage on the clock between the min and max range (I only wrote the expression part above).

But I'm guessing...

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1 2 
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.