Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 analysis 

Last post Thu, Sep 26 2013 2:11 AM by Andrew Beckett. 29 replies.
Started by yeong 26 Jun 2013 08:54 PM. Topic has 29 replies and 1706 views
Page 1 of 2 (30 items) 1 2 Next >
Sort Posts:
  • Wed, Jun 26 2013 8:54 PM

    • yeong
    • Not Ranked
    • Joined on Thu, Jun 27 2013
    • Posts 15
    • Points 240
    analysis Reply
    hello
    • Post Points: 20
  • Thu, Jun 27 2013 12:06 AM

    Re: analysis Reply

    You seem to have removed the contents of your post. Was that intentional?

     

    • Post Points: 20
  • Sun, Jun 30 2013 7:29 PM

    • yeong
    • Not Ranked
    • Joined on Thu, Jun 27 2013
    • Posts 15
    • Points 240
    Re: analysis using ocean Reply

    Hello,

    I dont know what happened then.

    I want to ask about oceanscript to run corner.

    Setup to run for -40, 27 150degC separately. There is no problem when I run 27deg and 150, however in -40deg, it is not able to run.

    error mgs: is unbound variable - temp

    error while loading file - "xxx.ocn"

    problem resolve if i remove temp in ocnPrint and use temp instead of foreach loop?

    How can I run -40degC and print the result?

     

    Here is my part of my script; 

    myCors=list("ff_lib" "ss_lib")

    for each(corner myCors

    modelFile(

    list("/xxxxx" corner)

    foreach(y1 '(-40)

    temp(y1)

    run()

    vgs=OP("/I212/M12' "vgs") 

    ocnPrint("corner" corner "temp" y1 "vgs" vgs)

     

    Filed under:
    • Post Points: 20
  • Sun, Jun 30 2013 8:14 PM

    • smlogan
    • Top 150 Contributor
    • Joined on Thu, Jul 17 2008
    • Boston, MA
    • Posts 48
    • Points 855
    Re: analysis using ocean Reply

    Dear Yen,

     Have you tried defining y1 as a double prior to the foreach() statement? Specifically, prior to your foreach() statement, use a statement such as:

     

    y1 = -40.0

    foreach(y1 '(27.0 150.0 -40.0)

    ... 

    In this fashion, y1 is declared as a double. I have experienced similar errors if y1 is not defined prior to its use in temp().

     

    Shawn 

     

    • Post Points: 35
  • Mon, Jul 1 2013 12:01 AM

    • yeong
    • Not Ranked
    • Joined on Thu, Jun 27 2013
    • Posts 15
    • Points 240
    Re: analysis using ocean Reply

    Hello Shawn,

     I have used the same script for 27 and 150 deg. Both works fine. 

    I have define temp previous which is not included in the scipt in my first post. 

    this is my full script. 

    ocnWaveformTool( 'wavescan )
    simulator( 'spectre )
    out=outfile("test.txt" "w")
    design(     "/xxx/spectre/schematic/netlist/netlist")
    resultsDir( "/xxx/spectre/schematic" )
    analysis('ac ?start "1"  ?stop "1G"  ?dec "50"  )
    analysis('dc ?saveOppoint t  )
    desVar(       "cap_factor" 1  )
    desVar(       "iled" 16m      )
    desVar(       "i" 848u  )
    option(     'temp  "150.0"
    )
    saveOption( 'subcktprobelvl "5" )
    temp( 150.0 )
    myCors=list("ff_lib" "tt_lib" "ss_lib")
    foreach(corner myCors
    modelFile(
    list("/xxx.scs" corner)
    )
    foreach(y1 '(150)
    temp(y1)
    foreach(y2 '(1m 10m)
    desVar("iled" y2)
    foreach(y3 '(1u 5u)
    desVar("i" y3)
    run()

    differnetial_psrr = dB20((VF("/psrr") - VF("/ref")))
    plot( differnetial_psrr ?expr '( "differnetial psrr" ) )
    differential_psrr_3dB_BW = cross(dB20(VF("/psrr")) (value(dB20(VF("/psrr")) 1) + 3) 1 "either" nil nil)
    ;plot( differential_psrr_3dB_BW ?expr '( "differential_psrr_3dB BW" ) )
    differential_psrr_dB_DC = value(dB20((VF("/psrr") - VF("/ref"))) 1)
    ;plot( differential_psrr_dB_DC ?expr '( "differential_psrr_dB_DC" ) )
    differential_psrr_dB_max = ymax(dB20((VF("/psrr") - VF("/ref"))))
    ctr = VAR("ctr")
    iled = VAR("iled")

    ocnPrint("corner" corner "temp" y1 "iled" iled "ctr" ctr "differnetial_psrr_dc" differential_psrr_dB_DC "differential_psrr_dB_MIN" differential_psrr_dB_max ?output out)

    )

     

     y 

    • Post Points: 5
  • Mon, Jul 1 2013 2:27 AM

    Re: analysis using ocean Reply

    smlogan:

    y1 = -40.0

    foreach(y1 '(27.0 150.0 -40.0)

     

     

    Shawn - this is absolutely unnecessary. SKILL doesn't require you to "declare" variables - and the type of a variable may change over time. In fact the foreach will cause a local variable y1 to be defined for the duration of the foreach - when the foreach completes, the previous value will become visible again (or if it was not defined, it will be unbound). That's fine...

    I looked at the latest code posted by Yen, and it works OK (I had to adjust it to reflect signal names in my own testcase ,but apart from that it worked fine).

    The most likely issue was that you may have accidentally had:

     temp (y1)

    rather than

     temp(y1)

    i.e. a space between the temp and the open parenthesis. This would have caused temp to be seen as a variable, followed by a function call to a function called y1. And that would result in:

    *Error* eval: unbound variable - temp
    *Error* load: error while loading file - "forum.ocn" at line 43

    Regards,

    Andrew.

     

    • Post Points: 20
  • Mon, Jul 1 2013 2:47 AM

    • yeong
    • Not Ranked
    • Joined on Thu, Jun 27 2013
    • Posts 15
    • Points 240
    Re: analysis using ocean Reply

    Hello Andrew,

    There is no space btw temp and the open parenthesis.

    Does it work for you if you set the temp to -40, ie

    .....
    foreach(y1 '(-40)
    temp(y1)
    ....

    I see the following:

    *Error* for each: second argument must be a list -40
    *Error* load: error while loading file - "ps.ocn"

     

    No problem if i run the following:

     .....
    foreach(y1 '(-40 150)
    temp(y1)
    ....

    or  

     .....
    foreach(y1 '(150)
    temp(y1)
    ... 

    I'm running each temp as it as because for each temp has different i variable.

    • Post Points: 20
  • Mon, Jul 1 2013 3:00 AM

    Re: analysis using ocean Reply

    Ah, I see. This seems to be an odd quirk of the parser. I don't really see a good reason for this - it seems peculiar to me.

    Replace '(-40) with list(-40) and it will then work fine.

    You can see this directly if you do:

    '(-40) => -40
    '(40) => (40)

    I'll have a chat with R&D about this. I think it's been this way forever though!

    Andrew.

    • Post Points: 5
  • Mon, Jul 1 2013 4:22 AM

    Re: analysis using ocean Reply

    I checked, and it's to allow removal of (potential) ambiguity between a binary and unary minus. So you can then use 1+(-40). Not sure it's strictly essential, but that's the way it is. It will only affect a quoted list of a single negative number - and using list() is a reasonable workaround.

    Regards,

    Andrew.

    • Post Points: 35
  • Mon, Jul 1 2013 8:37 AM

    • smlogan
    • Top 150 Contributor
    • Joined on Thu, Jul 17 2008
    • Boston, MA
    • Posts 48
    • Points 855
    Re: analysis using ocean Reply

     Hi Andrew,

     

    This is exactly the issue I have encountered numerous times. It was my motivation for suggesting declaring the variable. I fully realize that declaring a variable is  not necssary - but this is how I workaround the issue you note.

     

    Shawn

    • Post Points: 20
  • Mon, Jul 1 2013 9:01 AM

    Re: analysis using ocean Reply

    Shawn,

    But your workaround cannot possibly make a difference. Sorry!

    I'm not sure which issue you're referring to - but it won't help...

    Regards,

    Andrew.

    • Post Points: 5
  • Mon, Jul 1 2013 8:29 PM

    • yeong
    • Not Ranked
    • Joined on Thu, Jun 27 2013
    • Posts 15
    • Points 240
    Re: analysis using ocean Reply

    Andrew,

    Everything works fine. Thanks.

    Another question: 

    In ocean, how can i save the all corners simualtion results in a directory and retrieveit later? I tried to plot the from result brower, but it only save the last run.   

    • Post Points: 5
  • Mon, Jul 1 2013 9:02 PM

    • yeong
    • Not Ranked
    • Joined on Thu, Jun 27 2013
    • Posts 15
    • Points 240
    Re: analysis using ocean Reply
    i used this to group model corners togther, but what should i do for the variable, such as temp, iled, etc for model corners i use: myResultsDir=strcat("/xxx" corner) resultsDir(myResultsDir) y
    • Post Points: 20
  • Tue, Jul 2 2013 3:26 AM

    Re: analysis using ocean Reply

    Why not just use something like:

    sprintf(myResultsDir "/xxx%s_%d%g" corner temp iled)

    Regards,

    Andrew.

    • Post Points: 20
  • Wed, Jul 3 2013 7:16 PM

    • yeong
    • Not Ranked
    • Joined on Thu, Jun 27 2013
    • Posts 15
    • Points 240
    Re: analysis using ocean Reply

    Andrew,

    This works, however the file name doesnt match the variables used. 

    sprintf(myResultsDir "/xxx%s_%d%g" corner temp iled) 

     I have to use  sprintf(myResultsDir "/xxx%s_%d%g" corner y1 y2) instead. In this case the file name matches the variable.

     Any reason why? 

     

    • Post Points: 20
Page 1 of 2 (30 items) 1 2 Next >
Sort Posts:
Started by yeong at 26 Jun 2013 08:54 PM. Topic has 29 replies.