CR85
12/30/2021, 8:22 AM.options nonlin continuation=gmin
.options timeint method=trap
.options device temp=25
**.options output initial_interval=1e-8 # DONOT USE THIS SEEMS TO GO CRAZY EVEN WITH INPUT SIGNAL
.options parser model_binning=True
.options parser scale=1e-6
**** Oscillator specific options
.options timeint newlte=0
.options timeint erroption=1 delmax=1.0e-12
* Model Includes and Std Cell Includes
.param mc_mm_switch=0
.param mc_pr_switch=0
.lib ../../PDK/open_pdks/sky130/sky130A/libs.tech/ngspice/sky130.lib.spice ss
**.include "../../PDK//open_pdks/sky130/sky130A/libs.ref/sky130_fd_sc_hd/cdl/sky130_fd_sc_hd_Xyce.cdl"
.include ../../PDK/open_pdks/sky130/sky130A/libs.ref/sky130_fd_sc_hd/spice/sky130_fd_sc_hd.spice
.include ../../PDK/open_pdks/sky130/sky130A/libs.ref/sky130_fd_sc_hs/spice/sky130_fd_sc_hs.spice
.include ../../PDK/open_pdks/sky130/sky130A/libs.ref/sky130_fd_sc_ms/spice/sky130_fd_sc_ms.spice
.include ../../PDK/open_pdks/sky130/sky130A/libs.tech/ngspice/sky130_fd_pr__model__inductors.model.spice
*.include ../../PDK/open_pdks/sky130/sky130A/libs.tech/ngspice/capacitors/sky130_fd_pr__model__cap_mim.model.spice
** LC Core
.subckt LC_Cell Ibias outn outp ind_sub VDD GND
*.ipin Ibias
*.opin outn
*.opin outp
XM1 outp outn net2 GND sky130_fd_pr__nfet_01v8 L=0.15 W=1 nf=10
XM2 outn outp net1 GND sky130_fd_pr__nfet_01v8 L=0.15 W=1 nf=10
XM3 net2 Ibias GND GND sky130_fd_pr__nfet_01v8 L=0.15 W=4.8 nf=10
XL1 outp outn VDD ind_sub sky130_fd_pr__ind_05_220
XC1 outp outn sky130_fd_pr__cap_mim_m3_1 W=1 L=1 MF=2056 m=1
XM4 net1 Ibias GND GND sky130_fd_pr__nfet_01v8 L=0.15 W=4.8 nf=10
XM5 Ibias Ibias GND GND sky130_fd_pr__nfet_01v8 L=0.15 W=4.8 nf=5
.ends
.param pvdd = 1.8
.param bias = 1.0
.param Icurr = 30u
* --- Voltage Sources ---
**vvdd VDD 0 dc 'pvdd'
vvss GND 0 dc 0
vsig VDD 0 pwl(0 0 10n 0 20n 'pvdd')
*vtail tail_v 0 dc 'bias'
Idctail VDD tail_c 'Icurr'
* ---LCCell Subcircuit------
xlccore tail_c outp outn open VDD GND LC_Cell
** LC Circuit **
**.dcvolt v(outn)='pvdd/2'
**.dcvolt v(outp)='0'
*.ic v(tail)=1.6
* --- Transient Analysis ---
.op
*.dc vtail 0.4 1.4 0.01
**.dc Icurr 10u 11u 0.1u
.tran 0.01p 100n
* --- Measurement ---
*.print DC v(*)
.print tran v(outp)
.print tran v(outn)
.print tran v(*)
.print tran i(*)
.print tran v(VDD)
.print tran ID(XLCCORE:XM1:MSKY130_FD_PR__NFET_01V8)
.print tran ID(XLCCORE:XM2:MSKY130_FD_PR__NFET_01V8)
.print tran ID(XLCCORE:XM3:MSKY130_FD_PR__NFET_01V8)
.end
Robert Rogers
12/30/2021, 1:52 PMNOOP
to your
.tran
line to prevent the DC OP point calculation from running.
Just make sure your ICs aren't non-physical, and you should be good to go. Actually I think Xyce defaults to setting all voltage nodes to zero if DC OP is skipped, which should be fine in your case, but might introduce some high-order modes to the transient behavior at the start of the sim.CR85
12/30/2021, 7:39 PMCR85
12/31/2021, 1:55 AMCR85
12/31/2021, 4:57 AMNetlist warning: Excessively small current time step, incorrectly returning
with large value
Any ideas to what might be causing these?Eric Keiter
01/03/2022, 6:29 PMEric Keiter
01/03/2022, 6:32 PMNOOP
or UIC
on the tran line, the DCOP operating point calculation is skipped, and by default everything is set to zero. For some oscillators, they will only oscillate if one of the nodes is set to a nonzero value via .IC. When combined with NOOP
or UIC
, the DCOP is still skipped, but the .IC
statement will apply that as an initial condition. If your circuit oscillated without it, no need to bother with it, but you might keep that in mind for other oscillator circuits.Eric Keiter
01/03/2022, 6:38 PM(alpha*C/dt)
entries, where alpha is the leading term of the time integration formula. When dt is this small, it can lead to a style of failure we often call the “capacitive spiral of death”. The matrix solve becomes unreliable, which leads to a time step failure, which leads to Xyce cutting the step, which just makes the problem worse. Xyce attempts to mitigate this issue in the Jacobian, by scaling the (alpha*C/dt)
Jacobian entries when the time step is this small. The warning message was letting you know that Xyce is doing this. If your circuit is running all the way thru and giving you a reasonable answer I wouldn’t worry about this warning.CR85
01/05/2022, 2:42 AMCR85
01/05/2022, 4:25 AMNetlist warning: Excessively small current time step, incorrectly returning
with large value
*** Transient failure history:
Time Time Step Non-Linear Solver node node
(sec) Step Status Status Iters ||F|| index name
0.000e+00 1.026e-301 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 1.283e-302 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 1.603e-303 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 2.004e-304 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 2.505e-305 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 3.132e-306 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 3.914e-307 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 4.893e-308 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 6.116e-309 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 7.645e-310 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 9.557e-311 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 1.195e-311 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 1.493e-312 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 1.867e-313 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 2.333e-314 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 2.916e-315 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 3.646e-316 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 4.557e-317 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 5.696e-318 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 7.120e-319 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 8.900e-320 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 1.113e-320 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 1.393e-321 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 1.729e-322 fail F:NaN 1 0.000e+00 -1 N/A
0.000e+00 1.976e-323 fail F:NaN 1 0.000e+00 -1 N/A
Time step too small near step number: 0 Exiting transient loop.
***** Solution Summary *****
Number Successful Steps Taken: 0
Number Failed Steps Attempted: 345
Number Jacobians Evaluated: 345
Number Linear Solves: 345
Number Failed Linear Solves: 0
Number Residual Evaluations: 690
Number Nonlinear Convergence Failures: 345
Total Residual Load Time: 0.006 seconds
Total Jacobian Load Time: 0.001 seconds
Total Linear Solution Time: 0.002 seconds
CR85
01/11/2022, 8:44 AM