• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Measures with spectre syntax (OCEAN measure)

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 143
  • Views 20060
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Measures with spectre syntax (OCEAN measure)

AnnaS
AnnaS over 15 years ago
Hello. Just wondering if someone could be able to help me to use FindWhen measure for DC analysis with spectre syntax.

Here is  corresponding hspice sample which I am trying to convert:

.MEASURE vtsat_sp find VTH(MN2) when v(vg1)=0.2

.MEASURE idsat    find i(vd3)   when V(Vg1)=0.2
 

Thanks in advance.

Anna

 
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago
    Anna,

    Given your subsequent post, I'm assuming you converted it to SpectreMDL? So don't need an OCEAN equivalent any more?

    Also spectre can simulate .MEASURE directly...

    Best Regards,

    Andrew
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AnnaS
    AnnaS over 15 years ago

    Andrew,

    Since there is a problem to run simulation with spectremdl, I woud like to run simulation with ocean script. Can you please help me to write the measures mentioned below:

    For DC analisis:

    1. .MEASURE vtsat_sp find VTH(MN2) when v(vg1)=0.2

    2. .MEASURE idsat    find i(vd3)   when V(Vg1)=0.2 

     

    Thanks in advance.

    Regards,

    Anna

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Anna,

    I think you'd need to save the operating point data for various components during the transient (assuming it's a transient) by including:

    save *:oppoint sigtype=dev

    in the netlist (or including a file containing that).

    Then in OCEAN you can do:

    openResults("/path/to/results.raw")
    selectResult('tran)
    threshTime=cross(v("Vg1") 0.2 1 "either" nil nil)
    vtsat_sp=value(getData("MN2:vth") threshTime)
    idsat=value(getData("vd3:i") threshTime)

    Something like that anyway...

    You may have to be cautious about the case of the names. If you interactively try typing outputs() after doing the selectResult, you'll see what's present. You can also use outputs(?map nil) which will give all the names in simulator names - I'm not sure whether you're doing this from ADE or from a standalone netlist.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AnnaS
    AnnaS over 15 years ago

    Hi Andrew,

    Thanks a lot for your reply. There are no problems with transiet analisis, but I couldn't do these measurments for DC.

     I'm using standalone netlist.

    I will appreciate your help.

    Thanks in advance.

    Best Regards,

    Anna

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Anna,

    So is it a DC sweep? If you can post the components and analyses part of the netlist (I don't need the models) it would help me better understand what you're doing, so I can give a better tuned answer - and avoids going backwards and forewards so much.

    Best Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AnnaS
    AnnaS over 15 years ago

    Andrew,

    Ok, it can really help me.

    This is a my spice netlist which I am trying to convert to spectre syntax:

     

     *-----------------------------------------------------------------------
    * MOSFET TRANSISTOR ANALYSIS
    *
    *-----------------------------------------------------------------------
    * 1.  Independent d,g,s, and b sources for each mos.
    * 2.  All measurements are from the sources, and not from mos.
    *     This allows simple syntax for all simulators and independent of
    *     subckt and model calls.
    *-----------------------------------------------------------------------
    * OPTIONS                        
    *-----------------------------------------------------------------------
    .options brief measdgt=6 scale=1e-06
    .options measout nomod
    .options ingold=2   *Formats output scientific
    .options runlvl=5   *Most Accurate
    .lib '...' TT

    *-----------------------------------------------------------------------
    * PARAMETERS                        
    *-----------------------------------------------------------------------
    .param VLIN=0.10  VHIGH=3.3  pvar=0

    *-----------------------------------------------------------------------
    * NETLIST                        
    *-----------------------------------------------------------------------
    * VTlin
    MN1  Vd1 Vg1  Vs1   Vb1   x_model  W=WID L=LEN
    Vd1  Vd1 0    VLIN
    Vg1  Vg1 0    pvar
    Vs1  Vs1 0    0
    Vb1  Vb1 0    0

    * VTsat
    MN2 Vd2 Vg2   Vs2   Vb2   x_model  W=WID L=LEN
    Vd2  Vd2 0    VHIGH
    Vg2  Vg2 0    pvar
    Vs2  Vs2 0    0
    Vb2  Vb2 0    0

    * sat on
    MN3  Vd3 Vg3  Vs3   Vb3   x_model  W=WID L=LEN
    Vd3  Vd3 0    VHIGH
    Vg3  Vg3 0    VHIGH
    Vs3  Vs3 0    0
    Vb3  Vb3 0    0

    * sat off
    MN4 Vd4 Vg4  Vs4    Vb4   x_model   W=WID L=LEN
    Vd4  Vd4 0    VHIGH
    Vg4  Vg4 0    0
    Vs4  Vs4 0    0
    Vb4  Vb4 0    0

    .dc PVAR 0 VHIGH 0.05 SWEEP DATA = all_pvt

    *****************stimuli*********************
    .PRINT dc idlin=par'-i(vd1)' gm=deriv('idlin')
    .PRINT dc idsat=par'-i(vd2)' idsatsqrt=par'sqrt(-i(vd2))'
    + gm_sqrt=deriv('idsatsqrt')

    *-----------------------------------------------------------------------
    * MEASURE                        
    *-----------------------------------------------------------------------
    .MEASURE vtlin_sp find VTH(MN1) when v(Vg1)=0.2 *Spice mod Vth
    .MEASURE vtsat_sp find VTH(MN2) when v(vg1)=0.2 *Spice mod Vth
    .MEASURE idsat    find i(vd3)   when V(Vg1)=0.2 *Saturation current
    .MEASURE idoff    find i(vd4)   when v(Vg1)=0.2 *Leak(off) current
    .MEASURE igon     find i(vg3)   when v(Vg1)=0.2 *Ig on current
    .MEASURE Igoff    find i(vg4)   when v(Vg1)=0.2 *Ig off current
    * "when v(Vg1)=0.2" has no meaning except taking data

    *-----------------------------------------------------------------------
    .DATA all_pvt
    +TEMP WID LEN
    + 25  1.0   1.0    25  1.0  0.35  25  0.22    1.0    25  0.22   0.35
    +125  1.0   1.0   125  1.0  0.35 125  0.22    1.0   125  0.22   0.35
    +-40  1.0   1.0   -40  1.0  0.35 -40  0.22    1.0   -40  0.22   0.35
    .ENDDATA

    ********************************************************
    ***************ALTERS FOR PVT CORNERS ******************
    ********************************************************

    .alter
    ************ Second pvt corner **************************
    *Corners Process Voltage Temp Width/Length
    *Corners FF 1x  125C and -40 with W/L permutations
    .del lib '...' TT
    .lib '...' FF
    .DATA all_pvt
    +TEMP WID LEN
    +125  1.0   1.0   125  1.0   0.35  125  0.22   1.0   125  0.22   0.35
    +-40  1.0   1.0   -40  1.0   0.35  -40  0.22   1.0   -40  0.22   0.35
    .ENDDATA

    .alter
    ************ Third pvt corner **************************
    *Corners Process Voltage Temp Width/Length
    *Corners SS 1x  125C and -40 with W/L permutations
    .del lib '...' FF
    .lib '...' SS
    .DATA all_pvt
    +TEMP WID LEN
    +125  1.0   1.0   125  1.0   0.35  125  0.22   1.0   125  0.22   0.35
    +-40  1.0   1.0   -40  1.0   0.35  -40  0.22   1.0   -40  0.22   0.35
    .ENDDATA

    .alter
    ************ Four pvt corner **************************
    *Corners Process Voltage Temp Width/Length
    *Corners TT 1.1x 125C and -40 with W/L permutations
    .param VHIGH=3.63
    .del lib '...'  SS
    .lib '...' TT
    .DATA all_pvt
    +TEMP WID LEN
    + 25  1.0   1.0    25  1.0   0.35  25  0.22   1.0    25  0.22   0.35
    +125  1.0   1.0   125  1.0   0.35 125  0.22   1.0   125  0.22   0.35
    +-40  1.0   1.0   -40  1.0   0.35 -40  0.22   1.0   -40  0.22   0.35
    .ENDDATA

    .alter
    ************ Fifth pvt corner **************************
    *Corners Process Voltage Temp Width/Length
    *Corners FF 1.1x 125C and -40 with W/L permutations
    .del lib '...'  TT
    .lib '...'  FF
    .DATA all_pvt
    +TEMP WID LEN
    +125  1.0   1.0   125  1.0   0.35  125  0.22   1.0   125  0.22   0.35
    +-40  1.0   1.0   -40  1.0   0.35  -40  0.22   1.0   -40  0.22   0.35
    .ENDDATA

    .alter
    ************ Sixth pvt corner **************************
    *Corners Process Voltage Temp Width/Length
    *Corners SS 1.1x 125C and -40 with W/L permutations
    .del lib '...'  FF
    .lib '...' SS
    .DATA all_pvt
    +TEMP WID LEN
    +125  1.0   1.0   125  1.0   0.35  125  0.22   1.0   125  0.22   0.35
    +-40  1.0   1.0   -40  1.0   0.35  -40  0.22   1.0   -40  0.22   0.35
    .ENDDATA

    .alter
    ************ Seventh pvt corner **************************
    *Corners Process Voltage Temp Width/Length
    *Corners TT 0.9x  125C and -40 with W/L permutations
    .param VHIGH=2.97
    .del lib '...' SS
    .lib '...' TT
    .DATA all_pvt
    +TEMP WID LEN
    + 25  1.0   1.0    25  1.0   0.35   25  0.22   1.0    25  0.22   0.35
    +125  1.0   1.0   125  1.0   0.35  125  0.22   1.0   125  0.22   0.35
    +-40  1.0   1.0   -40  1.0   0.35  -40  0.22   1.0   -40  0.22   0.35
    .ENDDATA

    .alter
    ************ Eighth pvt corner **************************
    *Corners Process Voltage Temp Width/Length
    *Corners FF 0.9x 125C and -40 with W/L permutations
    .del lib '...' TT
    .lib '...' FF
    .DATA all_pvt
    +TEMP WID LEN
    +125  1.0   1.0   125  1.0   0.35  125  0.22   1.0   125  0.22   0.35
    +-40  1.0   1.0   -40  1.0   0.35  -40  0.22   1.0   -40  0.22   0.35
    .ENDDATA

    .alter
    ************ Ninth pvt corner **************************
    *Corners Process Voltage Temp Width/Length
    *Corners SS 0.9x  125C and -40 with W/L permutations
    .del lib '...' FF
    .lib '...' SS
    .DATA all_pvt
    +TEMP WID LEN
    +125  1.0   1.0   125  1.0   0.35  125  0.22   1.0   125  0.22   0.35
    +-40  1.0   1.0   -40  1.0   0.35  -40  0.22   1.0   -40  0.22   0.35
    .ENDDATA

    .END

     

    Thanks and Regards,

    Anna

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Hi Anna,

    Better late than never, but I ran your example (changing the models, and just sticking to one alter to keep it simple), and the expression was:

    value(v("MN2:vth" ?result "sweep1_srcSweep-sweep") 0.2   )

    Note I had to put:

    save *:vth sigtype=dev

    in the netlist. Exactly what the ?result name will be depends on how the sweep was done, but you should be able to see this in the ViVA/Wavescan results browser. Since the x-axis is pvar, which is the voltage on source Vg1, just taking the value at 0.2 is equivalent to your measurement. 

    For the current, it would be:

    value(i("Vd3:p" ?result "sweep1_srcSweep-sweep") 0.2   )

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AnnaS
    AnnaS over 15 years ago

    Hi Andrew,

    Thanks!!!. I'm much obliged for your help.

    Best Regards,

    Anna

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information