• 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. Transient and DC operating point are different

Stats

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

Transient and DC operating point are different

BaaB
BaaB over 9 years ago

Hi,

I just run DC and transient analyses to find the operating point. However, the result is different. 

Transient analysis will perform DC analysis first, so should they be equal?

I tried the two separately and the results are different. 

Here is the netlist (if necessary).

// Generated for: spectre
// Generated on: Apr 9 00:29:19 2016
// Design library name: Huan
// Design cell name: Differential_Amp
// Design view name: schematic
simulator lang=spectre
global 0 vdd!
include "/root/Desktop/SaveOpPoint.scs"
parameters x=1
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=dio3
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=dio_dnw
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=dio
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfres_sa
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfmvar
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfind
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rtmom
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_bbmvar
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfesd
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_mim
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfrtmom
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfres_hri
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfres_rpo
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_3vna
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_m
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfmos
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfmim
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfjvar
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_3m
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_res
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_bip3
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_bip
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_3v
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfmos33
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_na
include "/root/TSMC018/tsmc18rf/../models/spectre/rf018.scs" section=tt_rfsbd
include "/root/Desktop/SaveOpPoint.scs"

// Library name: Huan
// Cell name: Differential_Amp
// View name: schematic
R4 (vdd! VP) resistor r=1K
R3 (vdd! VN) resistor r=1K
V3 (net08 net07) vsource dc=600.0m type=dc
V2 (net016 0) vsource dc=x type=dc
V0 (vdd! 0) vsource dc=1.8 type=dc
V6 (Vin2 net016) vsource mag=1 type=sine ampl=1m sinephase=180 freq=1M
V5 (Vin net016) vsource mag=1 type=sine ampl=1m sinephase=0 freq=1M
I11 (VS 0) isource dc=1.6m type=dc
M3 (net015 net08 net07 net07) nch l=180n w=2u m=50 ad=5.4e-13 as=5.568e-13 \
pd=2.54u ps=2.6368u nrd=0.135 nrs=0.135
M1 (VP Vin2 VS VS) nch l=180n w=2u m=50 ad=5.4e-13 as=5.568e-13 pd=2.54u \
ps=2.6368u nrd=0.135 nrs=0.135
M0 (VN Vin VS VS) nch l=180n w=2u m=50 ad=5.4e-13 as=5.568e-13 pd=2.54u \
ps=2.6368u nrd=0.135 nrs=0.135
simulatorOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 temp=27 \
tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 maxnotes=5 maxwarns=5 \
digits=5 cols=80 pivrel=1e-3 sensfile="../psf/sens.output" \
checklimitdest=psf
dcOp dc write="spectre.dc" maxiters=150 maxsteps=10000 annotate=status
dcOpInfo info what=oppoint where=rawfile
dc dc param=x start=0 stop=1.8 lin=200 oppoint=rawfile maxiters=150 \
maxsteps=10000 annotate=status
tran tran stop=300u write="spectre.ic" writefinal="spectre.fc" \
annotate=status infotimes=[0] maxiters=5 infoname=tran_Info
finalTimeOP info what=oppoint where=rawfile
tran_Info info what=oppoint where=rawfile
modelParameter info what=models where=rawfile
element info what=inst where=rawfile
outputParameter info what=output where=rawfile
designParamVals info what=parameters where=rawfile
primitives info what=primitives where=rawfile
subckts info what=subckts where=rawfile
saveOptions options save=allpub

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Unknown said:
    They are actually very closed to each other (2pA difference) but should they be exact the same?

    You're really worried about 1 part in 40 million? Circuit simulators solve nonlinear differential equations. It's not possible to get an exact solution to such equations, so numerical methods are employed (e.g. Newton Raphson) which iterate towards a solution and determine that the solution has converged when the error is small (this is all part of a tradeoff between speed and reasonable accuracy). The criteria used to determine the error is generally in the form reltol*quantity+abstol (so this might be the change between two iterations, or the error in the sum of currents into a node).  reltol defaults to 1e-3, and vabstol is 1e-6V and iabstol is 1e-12A. The absolute tolerances are for when the signal levels are close to zero - because otherwise you'd have an ever increasing accuracy for tiny (insignificant) signals. So a difference of only 2pA is remarkably small (it's close to the abstol), especially in a current of 800uA. I didn't actually see that difference. Even if I had, the starting point for the two DC solutions may have been slightly different (it typically starts from whatever set of numbers were used previously - or it may have been that there was a small difference in the number of iterations - either way, the differences are well within the accuracy tolerances).

    There is a small amount of inaccuracy that appears in the DC solution with reltol=1e-3, which reduces if you tighten it to 1e-5 (note, I seriously doubt you need this level of accuracy for this circuit) - and if you compare the three operating points, they are very close:

    DC : M0:id = 0.00079999999976654 M1:id = 0.00079999999976654
    TRAN 0: M0:id = 0.00079999999976654 M1:id = 0.00079999999976654
    FINAL : M0:id = 0.00080000135675758 M1:id = 0.00079999851611377

    This was with this script:

    openResults("forum_oppoint.raw")
    ;println(results())
    ;println(results(?noAlias t))
    selectResult("dcOpInfo")
    printf("DC : M0:id = %.14g M1:id = %.14g\n" getData("M0:id") getData("M1:id"))
    selectResult("tran_info-tran_info")
    printf("TRAN 0: M0:id = %.14g M1:id = %.14g\n" value(getData("M0:id") 0) value(getData("M1:id") 0))
    selectResult("finalTimeOP-info")
    printf("FINAL : M0:id = %.14g M1:id = %.14g\n" getData("M0:id") getData("M1:id"))

    Note I did this with MMSIM14.1 ISR18 so your results may be slightly different (although not significantly different). All the results there are well within the tolerances. There's probably some longer term settling effect - I found this reduced if I ran a much longer simulation with a lower frequency sine wave too. There's also some error that occurs (local truncation error) during transient which also will give a small error in each instantaneous time point, but this won't accumulate over time.

    So I would say you're worrying about a level of accuracy that really isn't warranted.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Unknown said:
    They are actually very closed to each other (2pA difference) but should they be exact the same?

    You're really worried about 1 part in 40 million? Circuit simulators solve nonlinear differential equations. It's not possible to get an exact solution to such equations, so numerical methods are employed (e.g. Newton Raphson) which iterate towards a solution and determine that the solution has converged when the error is small (this is all part of a tradeoff between speed and reasonable accuracy). The criteria used to determine the error is generally in the form reltol*quantity+abstol (so this might be the change between two iterations, or the error in the sum of currents into a node).  reltol defaults to 1e-3, and vabstol is 1e-6V and iabstol is 1e-12A. The absolute tolerances are for when the signal levels are close to zero - because otherwise you'd have an ever increasing accuracy for tiny (insignificant) signals. So a difference of only 2pA is remarkably small (it's close to the abstol), especially in a current of 800uA. I didn't actually see that difference. Even if I had, the starting point for the two DC solutions may have been slightly different (it typically starts from whatever set of numbers were used previously - or it may have been that there was a small difference in the number of iterations - either way, the differences are well within the accuracy tolerances).

    There is a small amount of inaccuracy that appears in the DC solution with reltol=1e-3, which reduces if you tighten it to 1e-5 (note, I seriously doubt you need this level of accuracy for this circuit) - and if you compare the three operating points, they are very close:

    DC : M0:id = 0.00079999999976654 M1:id = 0.00079999999976654
    TRAN 0: M0:id = 0.00079999999976654 M1:id = 0.00079999999976654
    FINAL : M0:id = 0.00080000135675758 M1:id = 0.00079999851611377

    This was with this script:

    openResults("forum_oppoint.raw")
    ;println(results())
    ;println(results(?noAlias t))
    selectResult("dcOpInfo")
    printf("DC : M0:id = %.14g M1:id = %.14g\n" getData("M0:id") getData("M1:id"))
    selectResult("tran_info-tran_info")
    printf("TRAN 0: M0:id = %.14g M1:id = %.14g\n" value(getData("M0:id") 0) value(getData("M1:id") 0))
    selectResult("finalTimeOP-info")
    printf("FINAL : M0:id = %.14g M1:id = %.14g\n" getData("M0:id") getData("M1:id"))

    Note I did this with MMSIM14.1 ISR18 so your results may be slightly different (although not significantly different). All the results there are well within the tolerances. There's probably some longer term settling effect - I found this reduced if I ran a much longer simulation with a lower frequency sine wave too. There's also some error that occurs (local truncation error) during transient which also will give a small error in each instantaneous time point, but this won't accumulate over time.

    So I would say you're worrying about a level of accuracy that really isn't warranted.

    Regards,

    Andrew.

    • 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