• 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 Design
  3. Ocean Script error--branch distance too far from generated...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 125
  • Views 3174
  • 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

Ocean Script error--branch distance too far from generated code

lunren
lunren over 15 years ago

I met a very wired question these days related to a error: branch distance too far from generated code.  Attached please find my ocean script. I will try to discribe the problem in detail, hope some super guys such as Andrew Beckett and skillUser see it and give me some hints.

In the attached script, it does not work because of the error: branch distance too far from generated code. If I deleted (not just commented them out):

     selectResults('noise)
     rmsNoise=rmsNoise( 1 10G )
     plot( sqrt(iinteg(VN2())) ?expr list("Noise_integ") )

The script works.

If I uncommented lines:

     LoopGaindB20 = db(mag(getData("loopGain" ?result "stb")))
     plot( LoopGaindB20 ?expr '( "Loop Gain dB20" ) )

It does not work, the same error reported.

If I only commented line: plot( LoopGaindB20 ?expr '( "Loop Gain dB20" ) )

It works.

If I commented lines: LoopGainPhase = phaseDegUnwrapped(getData("loopGain" ?result "stb"))
                               plot(LoopGainPhase)

and uncommented lines: LoopGaindB20 = db(mag(getData("loopGain" ?result "stb")))
                                    plot( LoopGaindB20 ?expr '( "Loop Gain dB20" ) )
it works. However, based on this, if I added lines:

     selectResults('noise)
     rmsNoise=rmsNoise( 1 10G )
     plot( sqrt(iinteg(VN2())) ?expr list("Noise_integ") )

it does not work and the same error reported.

ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design(  "/home/dexue/simulation/sim_ldo_D/spectre/schematic/netlist/netlist")

I should mention that the whole script works once when everything is uncommented or deleted.

By the way, how to measure the DC gain when I use stb to simulate the feedback loop? It seems Gain_DC = value (db(mag(getData("loopGain" ?result "stb"))) 1)  does not work. Thanks in advance.

 

; load("/home/dexue/managed/MandalayBay/Entheto/ocean/30mA_ldo_typeD_cn.ocn")
corner = list( "tt_high" )
;corner = list( "ss_high" "ff_high" "sf_high" "fs_high" )
;corner = list( "tt_high" "ss_high" "ff_high" "sf_high" "fs_high" "tt_low" "ss_low" "ff_low" "sf_low" "fs_low")
vsup = list( 3.6 )
;vsup = list(3.42 3.78 )
bip = list( "tt_bjt" )
;bip = list( "ff_bjt" "ss_bjt" )
res = list( "res3t_typ" )
;res = list( "res3t_low" "res3t_high" )
temp = list( 37.0 )
;temp = list( 5.0 60.0)
ilo=list( 16m )
;ilo=list( 5m 30m)
clo=list( 100p )
;clo=list( 10p 200p )

foreach( cn corner
  foreach( vd vsup
    foreach( bp bip
      foreach( tp temp
        foreach( re res
          foreach( il ilo
            foreach( cl clo
    
     a = resultsDir( sprintf( nil "/home/dexue/simulation/entheto/30mA_ldo_typeD/spectre/30mA_ldo_typeD_cn/%s+%g+%s+%g+%s+%g+%g" cn vd bp tp re il cl ) )
     b = list( "/home/dexue/managed/pdk/tower18_2008_12/model/tsl018_bjt.scs" sprintf( nil "%s" bp ))
     c = list( "/home/dexue/managed/pdk/tower18_2008_12/model/tsl018_res.scs" sprintf( nil "%s" re ))
     d = list( "/home/dexue/managed/pdk/tower18_2008_12/model/tls018_corner.scs" sprintf( nil "%s" cn ))
     printf( "%L\n" a )
     modelFile( b c d )
     ic("/I1/vstart2" 3.3 "/I1/crbiasp" 3.3 "/I1/bias2" 0 "/I1/bias1" 0 "/I1/vbiasn" 0 "/I1/vcascn" 0 "/I1/VRcascp" 3.3 "/I1/VRbiasp" 3.3 "/I1/vstart" 3.3 )
     analysis('ac ?start "1"  ?stop "10G" )
;     analysis('dc ?saveOppoint t )
     analysis('dc ?saveOppoint t ?param "temp"  ?start "5"
                ?stop "60"  ?lin "100"  )
     analysis('noise ?start "1"  ?stop "10G"  ?p "/v3p2"
                ?n ""  ?oprobe ""  ?iprobe ""  )
     analysis('stb ?start "1"  ?stop "10G"  ?probe "I0.IPRB0" )
     analysis('tran ?stop "55u" ?errpreset "conservative"  )   

     saveOption( 'currents "all" )
     saveOption( 'nestlvl "3" )
     saveOption( 'pwr "devices" )
     saveOption( 'save "allpub" )
              
     save( 'v "/v3p2" "/Power_in" )
     save( 'i "/R17/MINUS" )
     desVar( "Vtr" vd )   
     desVar( "power_in" vd )
     desVar( "iload" il )
     desVar( "cload" cl )
     desVar( "ilow" 5m )
     desVar( "ihigh" 30m )
     desVar( "culow" 5m )
     desVar( "cuhigh" 30m )

     option( 'dochecklimit "no" 'scale "1.0e-6" 'temp tp 'iabstol  "1e-12" 'vabstol  "1e-6" 'reltol  "1e-3")
;     option( 'dochecklimit "no" 'scale "1.0e-6" 'temp tp 'iabstol  "1e-16" 'vabstol  "1e-9" 'reltol  "1e-6")
     temp( tp )
     run()
    
     p = outfile( "/home/dexue/simulation/entheto/30mA_ldo_typeD/30mA_ldo_typeD_results" "a")
     DATA = sprintf( nil "%s %g %s %g %s $g %g" cn vd bp tp re il cl )
    
     selectResults('dc)
     v3p2 = VDC("/v3p2")
     plot( v("/v3p2") )

     selectResults('ac)
     plot( dB20(VF("/v3p2")) ?expr list("PSRR") )
     PSRR_1k = value(dB20(VF("/v3p2")) 1K)
     PSRR_DC = value(dB20(VF("/v3p2")) 1)

     selectResults('stb)
     LoopGainPhase = phaseDegUnwrapped(getData("loopGain" ?result "stb"))
     plot(LoopGainPhase)
;     LoopGaindB20 = db(mag(getData("loopGain" ?result "stb")))
;     plot( LoopGaindB20 ?expr '( "Loop Gain dB20" ) )
;     Gain_DC = value (db(mag(getData("loopGain" ?result "stb"))) 1) 
      PM = getData("phaseMargin" ?result "stb_margin")
      GM = getData("gainMargin" ?result "stb_margin") 
      UGBW = getData("phaseMarginFreq" ?result "stb_margin")

     selectResults('tran)
     plot( v("/Power_in") ?expr list("VAA_in") )
     plot( i("/R17/MINUS") )
     plot( v("/v3p2") )

     selectResults('noise)
     rmsNoise=rmsNoise( 1 10G )
     plot( sqrt(iinteg(VN2())) ?expr list("Noise_integ") )

;     fprintf(p "%g %g %g %g %g %g %g\n" rmsNoise PSRR_1k PSRR_DC Gain_DC PM GM UGBW )
     fprintf(p "%g %g %g %g %g %g\n" rmsNoise PSRR_1k PSRR_DC PM GM UGBW )
     close(p)


        )
       )
      )
     )
    )
   )
  )

  • Cancel
Parents
  • lunren
    lunren over 15 years ago

    Our subversion is: 5.10.41_USR6.127.29

    I will try Andrew's suggestion to see what will happened.

     By the way, I want to measure the DC gain of the stb simulation (I know how to meansure DC gain in AC simultion), can you give me some hints?

     Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • lunren
    lunren over 15 years ago

    Our subversion is: 5.10.41_USR6.127.29

    I will try Andrew's suggestion to see what will happened.

     By the way, I want to measure the DC gain of the stb simulation (I know how to meansure DC gain in AC simultion), can you give me some hints?

     Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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