• 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. Why OCEAN script produce different analysis result from...

Stats

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

Why OCEAN script produce different analysis result from ADE?

datao
datao over 14 years ago

Hi,

I uses a scripts to analyze phase noise of a VCO at different control voltage. I found some data points are significantly different from ADE produced. Then I saved script in ADE and load the script in ocean. The phase noise calculated with ocean script is -80. But at ADE, it is -100. Anyone can tell me how to solve this problem? Thanks! The save script is attached as below. The frequency calculated are consisten, but phase noise are different from ocean script.

 

 ocnWaveformTool( 'wavescan )
fp=outfile(sprintf(nil "%s/tmp.csv" resultPATH) "a")
fprintf(fp "vc ts cf wc freq amp vcom phasenoise\n")

simulator( 'spectre )
design(     "/users/dtgong/simulation/testLCVCO/spectre/schematic/netlist/netlist")
resultsDir( "/users/dtgong/simulation/testLCVCO/spectre/schematic" )
modelFile(
    '("/home/dtgong/peregrine/PSC_Release_3.8.1/Rel_3.8.1/gc/models/psa/spectre/modellib.scs" "Nominal")
)
analysis('tran ?stop "200n"  ?errpreset "conservative"  )
analysis('pnoise ?sweeptype "relative"  ?relharmnum "1"  ?start "10K"  
        ?stop "100M"  ?maxsideband "7"  ?p "/vp0"  ?n "/vn0"  
        ?oprobe ""  ?iprobe ""  ?refsideband ""  ?ppv ""  )
analysis('pss ?fund "5.0G"  ?harms "7"  ?errpreset "conservative"  
        ?tstab "500n"  ?p "/vp0"  ?n "/vn0"  ?ppv ""  )
desVar(      "wc" 30u    )
desVar(      "wb" 10u    )
desVar(      "cf" 220p    )
desVar(      "r" 10    )
desVar(      "global_use_preLPE" 1    )
desVar(      "vc" 1.1    )
desVar(      "cl" 60f    )
envOption(
    'autoDisplay  nil
)
save( 'i "/I0/I0/R0/MINUS" "/I0/I0/L0/PLUS" "/I0/I0/L1/PLUS" )
converge( 'ic "/vn0" "0.01" )
temp( 27 )
run()
selectResult( 'tran )
;plot(getData("/vp0") getData("/vn0") getData("/I0/vb") getData("/I0/I0/R0/MINUS") getData("/I0/I0/L0/PLUS") getData("/I0/I0/L1/PLUS") getData("/I0/I0/vtail") )
freq = frequency(clip((VT("/vp0") - VT("/vn0")) 1e-08 4e-08))
;plot( freq ?expr '( "freq" ) )
Phase\ Noise\;\ dBc\/Hz\,\ Relative\ Harmonic\ \=\ 1 = phaseNoise(1 "pss_fd" ?result "pnoise")
;plot( Phase\ Noise\;\ dBc\/Hz\,\ Relative\ Harmonic\ \=\ 1 ?expr '( "Phase Noise; dBc/Hz, Relative Harmonic = 1" ) )
ph_1M = value(phaseNoise(1 "pss_fd" ?result "pnoise") 1000000.0)
;plot( ph_1M ?expr '( "ph_1M" ) )
;freq0 = (freq (VT("/vp0") - VT("/vn0")) "rising" ?xName "time" ?mode "auto" ?threshold 0.0 ?histoDisplay nil ?noOfHistoBins nil)
;plot( freq0 ?expr '( "freq0" ) )
fprintf(fp "%.3fGHz %f\n"  freq*1e-9 ph_1M)
close(fp)

 

Thanks a lot,

 

Datao

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Datao,

    Given that in both cases a netlist for spectre is assembled and simulated, I would take the "input.scs" in the netlist directory as simulated in ADE - copy it elsewhere - and then do the same for the OCEAN script - and do a "diff" between the two to see what differences there are. There is bound to be some difference (otherwise the results would be the same) - maybe that will pinpoint the reason and it will become clear if there's something missing (or different) in the OCEAN script.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • datao
    datao over 14 years ago

     Hi, Andrew,

    I moved input.scs to a temporary directory. Then I ran simulation at ADE by press button "netlist and run", the phase noise at 1 MHz offset is -98.6. There is no input.scs in netlist direction created after the simulation. Then I ran the same job at OCEAN, the phase noise at 1MHz offset is -77 and input.scs is created, which is same as the one I moved to temporary directory. Any more comments on that?

    I am still confused.

     

    Thanks a lot,

     

    Datao

     

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

    Datao,

    Make sure you're not running OCEAN and ADE at the same time. Quite likely the ADE run was using spectre's interactive mode - so you had the previous netlist still in spectre's memory.

    So to be sure, start ADE from scratch and run the simulation; copy the input.scs. Close ADE and then run your OCEAN script - and then compare the input.scs in both cases.

    Check also the spectre.out from both runs - are you using the same versions?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • datao
    datao over 14 years ago

     Hi, Andrew,

    I quite ADE and run OCEAN script, I still get the phase noise at -77. Then I remove input.scs and start ADE. This time the phase noise from ADE is -77! But if I re-run the job in ADE by press button "netlist and run", it is -98.6. The third time run is also -98.6. Now, I at least partially reproduce the results at ADE. But which number is correct?  

    How to check their version, OCEAN and ADE? 

     Thanks a lot,

     

    Datao

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

    Hi Datao,

    When you hit the run button the second time, spectre will be re-running from what is in memory. It's possible that you have multiple operating points and your circuit is converging on a different solution after the first run.

    In order to find out the spectre version - this will appear at the top of the spectre output log, and also "spectre -W" will tell you from the UNIX command line - but I'd check the log file.

    You can also try setting "rebuildmatrix=yes" on the Simulator->Options->Analog form (if it's not on the form, type it in the additional parameters field). That said, if there is more than one operating point, maybe you need to investigate that. Perhaps you can check if the PSS simulation is finding the same oscillation frequency the first and second time you run it in ADE? It should tell you at the end of the PSS simulation what the final oscillation frequency is (and you can get this on the direct plot form too) - maybe it's converged on a different solution for the oscillation frequency?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • datao
    datao over 14 years ago

     Hi, Andrew,

    I checked the logFile, the spectre version is 6.2.0.466. In the spectre.out, I do not find the fundemental frequency change in pss analysis.   When the option "rebuildmatrix=yes" is checked, I simulated 4 times with ADE, the phase noise is not change, always -77.

    If I set "rebuildmatrix=no", then the first simulation get -77, the second simulation I get -98.6. Since frequency does not change, which number is more reasonable?

     

    Thanks,

     

    Datao

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago
    It could still be due to different operating points - you might want to check the PSS solution (both time and frequency domain) to see if that changes - maybe it is not fully amplitude settled.

    Also, MMSIM62 is quite old (there have been four major simulator release since then). Maybe it's worth trying a more recent simulator version.

    I have no way of telling which is the more reasonable - I'd probably need to see the data - at the moment I'm having to guess as to what the cause of the varying results is.

    Regards,

    Andrew
    • 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