Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .trinity/seals/analog_AnalogMosPsp10350cData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"built_by": "t27c-bootstrap@0.5.2+ea35d9b72",
"closure": [
{
"spec": "specs/analog/mos_psp103_data.t27",
"spec_hash": "sha256:d5f3244ff1936f2b96e95b06e022d6b42b489ac49e025ec99486d6d36e6c6580"
},
{
"spec": "specs/analog/mos_table.t27",
"spec_hash": "sha256:9c0d1537ed5d8d60c4bdcb67d1e4c73ef80270e8cab224cb089c5b568fe11182"
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:277bd41ef2e98b05b10cd80d83c632c20ff90f8ff50c5f8b0bd8710b9c2b6ff0",
"gen_hash_rust": "sha256:6fcf9d9f5e5c577b7a8a14ad729ea68108509ba7fed79106187abb1f589fbb39",
"gen_hash_verilog": "sha256:16aaa6a244e03f397b0b6bae08bfe89793319614845c8fba614704078a3d112f",
"gen_hash_zig": "sha256:1ac65693f2030507c79047418c8a74dc4b24656dacbd336dc53c02c55f58a9a1",
"module": "AnalogMosPsp10350cData",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-19T05:32:08Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:ed4680506d435cdb660ecfdf28ec4f7091fa3c40ce08dc4aeb5bc4570b404976",
"spec_path": "specs/analog/mos_psp103_50c_data.t27",
"tests": {
"failed": 0,
"failing": [],
"forced": false,
"passed": 3,
"total": 3,
"vacuous": 0
},
"toolchain": {
"test_runner": "sha256:8512b80da533b79289110fca4a65f3336abd7a059ca4b72ea595d5e33ff8ad10",
"zig": "0.16.0"
}
}
12 changes: 6 additions & 6 deletions .trinity/seals/analog_AnalogSarComparator.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:13f523685de5d6085818b938b8d9596938d50da2fbba1dae8b9978e50bfbd936",
"gen_hash_rust": "sha256:e58bde7196705be96ecd9c21fb54a3cbcea6323bd29a01f8abb46ee3b834b427",
"gen_hash_verilog": "sha256:b54771cd79b42bbba9ee294e993e3e096420931b1b2f832c3d00f46a28d5e8d8",
"gen_hash_zig": "sha256:21ae8f9401db2831f43303ca4b0f2b15ef9d3ed6cd00196b90bedb15ef15ed91",
"gen_hash_c": "sha256:ce2ff93091397b6a53ed56e1691d9ae73b6442e57ce4249b7e3a8cc3106b7436",
"gen_hash_rust": "sha256:bab770f55aaa082e158dfef79f5933ee3d3a8d30b587db42f01ce97801234e6f",
"gen_hash_verilog": "sha256:6ca0ddc1b0377e8fd141a237e3c278358da98bcb8761a75c0846f57914388844",
"gen_hash_zig": "sha256:24ab5cb2621640efe1b3163a87657c83c718fb084c415d87ece7a9dc00736093",
"module": "AnalogSarComparator",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-19T02:37:52Z",
"sealed_at": "2026-10-19T05:32:25Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:b88d05d5d17937024580ab40e80b698b63962cab531164d4a94a5dddd05a72a8",
"spec_hash": "sha256:db347ab1845e5323822b3ab77ba3d43b9923d105cc717e7224ad54c7328d23a7",
"spec_path": "specs/analog/sar_comparator.t27",
"tests": {
"failed": 0,
Expand Down
53 changes: 53 additions & 0 deletions .trinity/seals/analog_AnalogSarComparatorPsp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"built_by": "t27c-bootstrap@0.5.2+ea35d9b72",
"closure": [
{
"spec": "specs/analog/linear.t27",
"spec_hash": "sha256:3ddef7be183aba583ed285334ee389b48a65b41335e98914514235db7c4e5d62"
},
{
"spec": "specs/analog/mos_psp103.t27",
"spec_hash": "sha256:c5bd55a847953654fbef792dcfc61da7f6434b8023341df9ab4a53e5d082bbe0"
},
{
"spec": "specs/analog/mos_psp103_50c_data.t27",
"spec_hash": "sha256:ed4680506d435cdb660ecfdf28ec4f7091fa3c40ce08dc4aeb5bc4570b404976"
},
{
"spec": "specs/analog/mos_psp103_data.t27",
"spec_hash": "sha256:d5f3244ff1936f2b96e95b06e022d6b42b489ac49e025ec99486d6d36e6c6580"
},
{
"spec": "specs/analog/mos_table.t27",
"spec_hash": "sha256:9c0d1537ed5d8d60c4bdcb67d1e4c73ef80270e8cab224cb089c5b568fe11182"
},
{
"spec": "specs/analog/sar_comparator.t27",
"spec_hash": "sha256:db347ab1845e5323822b3ab77ba3d43b9923d105cc717e7224ad54c7328d23a7"
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:91ecc16d5235374b1f17b5a5abefb43338070178edc91b2df7771304ddf2038b",
"gen_hash_rust": "sha256:eb6ab9e0ef8df48cb8d94f0767ed30a0e739e3ba62593b7e74028f98c4c1cb9d",
"gen_hash_verilog": "sha256:829e870bd7e38baf62be311768fe416788566409d10f7fad74b435f0b4359621",
"gen_hash_zig": "sha256:fff44d18247a8915aefe4158dfedcaeaa4c94240daac2f6c1d25e4d4bf923deb",
"module": "AnalogSarComparatorPsp",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-19T05:32:49Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:03fa3e42e50de0a06436cc2e57636a6b59c1be04243a9b836920832e8dae0c40",
"spec_path": "specs/analog/sar_comparator_psp.t27",
"tests": {
"failed": 0,
"failing": [],
"forced": false,
"passed": 13,
"total": 13,
"vacuous": 0
},
"toolchain": {
"test_runner": "sha256:8512b80da533b79289110fca4a65f3336abd7a059ca4b72ea595d5e33ff8ad10",
"zig": "0.16.0"
}
}
4 changes: 2 additions & 2 deletions .trinity/seals/analog_AnalogSarSwitch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
{
"spec": "specs/analog/sar_comparator.t27",
"spec_hash": "sha256:b88d05d5d17937024580ab40e80b698b63962cab531164d4a94a5dddd05a72a8"
"spec_hash": "sha256:db347ab1845e5323822b3ab77ba3d43b9923d105cc717e7224ad54c7328d23a7"
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
Expand All @@ -26,7 +26,7 @@
"module": "AnalogSarSwitch",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-19T03:59:52Z",
"sealed_at": "2026-10-19T05:37:38Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:122726502a51cb4c8980674b819ee3251bf8ee69a5586d6cd44a5eafcf284cb4",
"spec_path": "specs/analog/sar_switch.t27",
Expand Down
70 changes: 70 additions & 0 deletions specs/analog/decks/psp103_tab_tt50.cir
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
IHP SG13G2 PSP103 tables, corner mos_tt, 50 C
* specs/analog/decks/psp103_tab_tt50.cir -- table data for specs/analog/mos_psp103_50c_data.t27 (analog M4b-psp, #10856, epic #10486). A netlist plus a
* .control block that prints the numbers: psp103_tab_tt.cir (M3b, #10516) at the temperature of the golden SAR deck, nothing else changed. The
* golden deck says `.options TEMP = 50` (the converter's own run is at 50 C); M3b tabulated 27 C. The IHP corner file is read at run time and never
* copied here. Model: IHP-Open-PDK commit 21133f219b1a6da10d803e345761e77415ceff40, ihp-sg13g2/libs.tech/ngspice/models/cornerMOSlv.lib (PSP 103.6,
* revision 200310), section mos_tt; the model code is libs.tech/verilog-a/psp103/psp103.va of the same commit, compiled with OpenVAF-Reloaded
* v24.0.2mob to psp103.osdi (and psp103_nqs.osdi). TNOM is 27 C and the circuit temperature 50 C: `.temp 50`. Devices: sg13_lv_nmos w=1.0u l=0.45u
* ng=1 m=1 and sg13_lv_pmos w=3.0u l=0.45u ng=1 m=1. Solver options as in psp103_tab_tt.cir: reltol 1e-6, vntol 1e-9, abstol 1e-14.
* Paths are NOT in this file. ngspice reads two environment variables: IHP_PDK, the IHP-Open-PDK checkout, and IHP_OSDI, the directory that
* holds the compiled psp103.osdi and psp103_nqs.osdi.
* Run: IHP_PDK=<checkout> IHP_OSDI=<osdi dir> ngspice -b psp103_tab_tt50.cir > psp103_tab_tt50.out (ngspice-47)
* What it prints. Between "BEGIN name" and "END name" every row "<index> TAB <value>" is one number, in sweep order (the first sweep source runs
* fastest). The values are pasted into the spec in that order, none changed.
* grid_n Id of the nmos at Vgs = ix * 62.5 mV, Vds = iy * 62.5 mV, ix and iy 0..24, 625 rows, ix outer, in table units: nint(Id * 200 V/A *
* 2^24 units/V), the current times dt/C (200 V/A) in units of 2^-24 V, one unit 0.298 nA. Negative values (the gate current that leaves
* through the drain at Vds = 0) are held at 0: the table is unsigned.
* grid_p the same for the pmos at Vsg = ix * 62.5 mV, Vsd = iy * 62.5 mV (source and bulk on the 1.5 V rail; the current that leaves the drain).
* r2_n, r2_p Id in pA (nint(Id * 1e12)) at the first 200 held-out points of the R2 low-discrepancy sequence: point k is Vgs (Vsg) = 1.5 frac(k a1),
* Vds (Vsd) = 1.5 frac(k a2), a1 = 0.7548776662466927, a2 = 0.5698402909980532, k = 1..200: held-out points, never on a table node.
* nmos table device: drain VDN, gate VGN, source and bulk at 0 V
.lib $IHP_PDK/ihp-sg13g2/libs.tech/ngspice/models/cornerMOSlv.lib mos_tt
VDN dn 0 0
VGN gn 0 0
XMN dn gn 0 0 sg13_lv_nmos w=1.0u l=0.45u ng=1 m=1
* pmos table device: source and bulk at the 1.5 V rail, drain VDP and gate VGP, both swept downward from 1.5 V
VSP sp 0 1.5
VDP dp 0 1.5
VGP gp 0 1.5
XMP dp gp sp sp sg13_lv_pmos w=3.0u l=0.45u ng=1 m=1
* held-out points: B sources compute the R2 point from the sweep variable k; the zero-volt sources VRDN, VRDP measure the drain current
VK k 0 1
BRGN rgn 0 V = 1.5*(v(k)*0.7548776662466927-floor(v(k)*0.7548776662466927))
BRDN rdn0 0 V = 1.5*(v(k)*0.5698402909980532-floor(v(k)*0.5698402909980532))
VRDN rdn0 rdn 0
XRN rdn rgn 0 0 sg13_lv_nmos w=1.0u l=0.45u ng=1 m=1
BRGP rgp 0 V = 1.5-1.5*(v(k)*0.7548776662466927-floor(v(k)*0.7548776662466927))
BRDP rdp0 0 V = 1.5-1.5*(v(k)*0.5698402909980532-floor(v(k)*0.5698402909980532))
VRDP rdp rdp0 0
VRSP rsp 0 1.5
XRP rdp rgp rsp rsp sg13_lv_pmos w=3.0u l=0.45u ng=1 m=1
.temp 50
.options reltol=1e-6 vntol=1e-9 abstol=1e-14
.control
pre_osdi $IHP_OSDI/psp103.osdi
pre_osdi $IHP_OSDI/psp103_nqs.osdi
set numdgt=10
set noprintscale
echo BEGIN grid_n
dc VDN 0 1.5 0.0625 VGN 0 1.5 0.0625
let u = nint(-i(VDN) * 200 * 16777216)
let u = (u + abs(u)) / 2
print u
echo END grid_n
echo BEGIN grid_p
dc VDP 1.5 0 -0.0625 VGP 1.5 0 -0.0625
let u = nint(i(VDP) * 200 * 16777216)
let u = (u + abs(u)) / 2
print u
echo END grid_p
echo BEGIN r2_n
dc VK 1 200 1
let u = nint(i(VRDN) * 1e12)
print u
echo END r2_n
echo BEGIN r2_p
let u = nint(i(VRDP) * 1e12)
print u
echo END r2_p
.endc
.end
69 changes: 69 additions & 0 deletions specs/analog/decks/sar_cmp_psp_r2.cir
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
SAR ADC dynamic comparator on PSP103, charge swamped by 1e6: backward Euler on a fixed 0.1 us grid
* specs/analog/decks/sar_cmp_psp_r2.cir -- reference data for specs/analog/sar_comparator_psp.t27 (analog M4b-psp, #10856, epic #10486). A netlist plus a
* .control block that prints the numbers.
* Circuit: the subcircuit dynamic_comparator of the uberWAVE golden SAR deck (wp2-parser/golden/top.spice; GPL-2.0, fetched at run time, never vendored),
* thirteen sg13_lv transistors and the inverter x1 that makes n_clkc, PSP103 (IHP-Open-PDK 21133f219b1a6da10d803e345761e77415ceff40, cornerMOSlv.lib
* mos_tt, through OSDI), at 50 C, the temperature of the golden deck. The deck reads the subcircuit text from the file named by the environment
* variable SAR_GOLDEN_SUBCKTS, the subcircuit section of the fetched deck without its .end and .global lines:
* sed -n '/^.subckt tracking_switch/,$p' top.spice | grep -v -i -E '^\.(end|global)([[:space:]]|$)' > $SAR_GOLDEN_SUBCKTS
* ngspice reads IHP_PDK (the IHP-Open-PDK checkout), IHP_OSDI (the directory with the compiled psp103.osdi and psp103_nqs.osdi) and SAR_GOLDEN_SUBCKTS.
* Run: IHP_PDK=<checkout> IHP_OSDI=<osdi dir> SAR_GOLDEN_SUBCKTS=<file> ngspice -b sar_cmp_psp_r2.cir > sar_cmp_psp_r2.out (ngspice-47)
* THE SCALE. PSP103 has charge: gate and junction capacitance of the thirteen devices (m up to 36, a few hundred fF on a node) which the current tables
* of the spec do not have. To compare the CURRENTS alone, the lumped node capacitances of the spec (4 fF on ap, an, dp, dn; 6 fF on net1; 2 fF on
* net2, net3, n_clkc) are multiplied by 1e6 (4 nF, 6 nF, 2 nF) and the step by the same 1e6 (0.1 ps becomes 0.1 us), so dt / C is the spec's, and the
* devices' own capacitances, a few hundred fF, are 1e-4 of the 4 nF at the largest. The currents are the real ones. Between 1e4 and 1e5 the decision
* time moved by 0.83 % and the resolution time by 1.3 %, between 1e5 and 1e6 by a tenth of that: the charge left at 1e6 is about 0.01 %.
* Inputs: VDD 1.5 V, common mode 0.75 V, VDP = 0.75 + sg h / 2^24 and VDN = 0.75 - sg h / 2^24 for h in units of 2^-24 V (the spec's words: h = 16777 is
* 2h = 33554 units = 2 mV less 0.4 uV) and sg = +1 or -1. The clock is a B source of nint(time/dt): 0 for the first 10 grid points, then a ramp of 16
* steps of 1.5/16 V, then 1.5 V. Start: from .ic and uic, ap = an = net2 = net3 = n_clkc = 1.5 V, dp = dn = 0, net1 = 0.4009999632835388 V (5872026 units, the
* spec's max(VDP, VDN) - 0.35 V rounded to a word, an initial condition and not PSP103's own rest: net1 floats and an operating point would put it at
* 0.71 V on gmin). Integration: gear with maxord 1 is backward Euler, trtol 1e7 stops the truncation test from shrinking a step; reltol 1e-7, vntol 1e-10,
* abstol 1e-12, gmin 1e-12 (at 1e-9 / 1e-12 ngspice aborts at the first clock step). 150 grid points: step j of the spec is the row of the grid point j + 10.
* What it prints, per run, after "RUN <h> <sg>": tck, the clock through 0.75 V; tfirst, the first output through 0.75 V; tres, |dp - dn| through 0.75 V
* (those two are absent when the run does not reach it); dpend and dnend, the outputs at the last point; then eight rows "<row> v(ap) v(an) v(net1) v(net2)
* v(net3) v(dp) v(dn) v(n_clkc)" at the rows 39, 59, 71, 79, 87, 95, 109, 149 (steps 20, 40, 52, 60, 68, 76, 90, 130: ngspice's opening ramp puts nine rows before the grid, so
* the row of step j is j + 19, at the time (j + 10) dt - 4 ns, which the printed time[row] shows).
.lib $IHP_PDK/ihp-sg13g2/libs.tech/ngspice/models/cornerMOSlv.lib mos_tt
.include $SAR_GOLDEN_SUBCKTS
Vdd vdd 0 1.5
Vdp vdp 0 0.75
Vdn vdn 0 0.75
Bclk clkc 0 V = 1.5*min(max(nint(time/1e-7)-10,0),16)/16
Xc vdp vdn clkc vdd 0 dp dn dynamic_comparator
Cap xc.ap 0 4n
Can xc.an 0 4n
Cn1 xc.net1 0 6n
Cn2 xc.net2 0 2n
Cn3 xc.net3 0 2n
Cdp dp 0 4n
Cdn dn 0 4n
Cnc xc.n_clkc 0 2n
Bmx mx 0 V = max(v(dp),v(dn))
Bdiff diff 0 V = abs(v(dp)-v(dn))
.ic v(xc.ap)=1.5 v(xc.an)=1.5 v(xc.net1)=0.4009999632835388 v(xc.net2)=1.5 v(xc.net3)=1.5 v(dp)=0 v(dn)=0 v(xc.n_clkc)=1.5
.temp 50
.options method=gear maxord=1 trtol=1e7 reltol=1e-7 vntol=1e-10 abstol=1e-12 gmin=1e-12 itl4=200
.control
pre_osdi $IHP_OSDI/psp103.osdi
pre_osdi $IHP_OSDI/psp103_nqs.osdi
set numdgt=10
set noprintscale
foreach h 16777 4194 1049 262 84 8 1
foreach sg 1 -1
alter Vdp = 0.75 + $sg * $h / 16777216
alter Vdn = 0.75 - $sg * $h / 16777216
tran 100n 15.5u 0 100n uic
echo RUN $h $sg
meas tran tck when v(clkc)=0.75 rise=1
meas tran tfirst when v(mx)=0.75 rise=1
meas tran tres when v(diff)=0.75 rise=1
meas tran dpend find v(dp) at=15.5u
meas tran dnend find v(dn) at=15.5u
foreach r 39 59 71 79 87 95 109 149
echo ROW $r
print time[$r] v(xc.ap)[$r] v(xc.an)[$r] v(xc.net1)[$r] v(xc.net2)[$r] v(xc.net3)[$r] v(dp)[$r] v(dn)[$r] v(xc.n_clkc)[$r]
end
end
end
.endc
.end
90 changes: 90 additions & 0 deletions specs/analog/decks/sar_cmp_psp_r2b.cir
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
SAR ADC dynamic comparator on PSP103 with every bulk tied to its source, charge swamped by 1e6: backward Euler on a fixed 0.1 us grid
* specs/analog/decks/sar_cmp_psp_r2b.cir -- reference data for specs/analog/sar_comparator_psp.t27 (analog M4b-psp, #10856, epic #10486). A netlist plus a
* .control block that prints the numbers. The same run as sar_cmp_psp_r2.cir (read its header for the scale, the inputs, the clock, the start, the
* integration options and the printed rows) on the same thirteen transistors and the inverter x1, with ONE change: the bulk of every device is tied to its own
* source, which is what a 2-D table Id(Vgs, Vds) of M3b models. The golden deck ties the NMOS bulks to ground and the PMOS bulks to VDD, so the input pair
* XM3, XM4 (source net1, 0.15 .. 0.4 V above its bulk) and the PMOS XM8, XM9 (sources net3, net2, below their bulk) carry a body effect which the
* tables cannot have; the difference between this deck and sar_cmp_psp_r2.cir is that body effect and nothing else. W, L and m are the golden deck's
* (facts of the circuit); the text of the golden deck is not copied. The deck reads no golden file: IHP_PDK and IHP_OSDI only.
* Run: IHP_PDK=<checkout> IHP_OSDI=<osdi dir> ngspice -b sar_cmp_psp_r2b.cir > sar_cmp_psp_r2b.out (ngspice-47)
* Second part, "MM <m4> <d>": the input pair made unequal, XM4 (the device whose gate is VDP) at m = 35 and 34 instead of 36, with VDP - VDN = d units of
* 2^-24 V; it prints dpend and dnend only. The flip point of the unequal pair is the d at which the winner changes: dn wins below it, dp above. The
* four d are the pairs of neighbours found by bisection (a 2-unit bracket): 71579 and 71581 for m = 35, 145772 and 145774 for m = 34.
.lib $IHP_PDK/ihp-sg13g2/libs.tech/ngspice/models/cornerMOSlv.lib mos_tt
Vdd vdd 0 1.5
Vdp vdp 0 0.75
Vdn vdn 0 0.75
Bclk clkc 0 V = 1.5*min(max(nint(time/1e-7)-10,0),16)/16
XM1 xc.ap clkc vdd vdd sg13_lv_pmos w=3.0u l=0.45u ng=1 m=9
XM2 xc.an clkc vdd vdd sg13_lv_pmos w=3.0u l=0.45u ng=1 m=9
XM3 xc.ap vdn xc.net1 xc.net1 sg13_lv_nmos w=1.0u l=0.45u ng=1 m=36
XM4 xc.an vdp xc.net1 xc.net1 sg13_lv_nmos w=1.0u l=0.45u ng=1 m={m4}
XM5 xc.net1 clkc 0 0 sg13_lv_nmos w=1.0u l=0.45u ng=1 m=18
XM6 xc.net2 dp vdd vdd sg13_lv_pmos w=3.0u l=0.45u ng=1 m=30
XM7 xc.net3 dn vdd vdd sg13_lv_pmos w=3.0u l=0.45u ng=1 m=30
XM10 dn dp 0 0 sg13_lv_nmos w=1.0u l=0.45u ng=1 m=12
XM11 dp dn 0 0 sg13_lv_nmos w=1.0u l=0.45u ng=1 m=12
XM12 dn xc.n_clkc 0 0 sg13_lv_nmos w=1.0u l=0.45u ng=1 m=6
XM13 dp xc.n_clkc 0 0 sg13_lv_nmos w=1.0u l=0.45u ng=1 m=6
XM8 dp xc.an xc.net3 xc.net3 sg13_lv_pmos w=3.0u l=0.45u ng=1 m=30
XM9 dn xc.ap xc.net2 xc.net2 sg13_lv_pmos w=3.0u l=0.45u ng=1 m=30
XIP xc.n_clkc clkc vdd vdd sg13_lv_pmos w=3.0u l=0.45u ng=1 m=1
XIN xc.n_clkc clkc 0 0 sg13_lv_nmos w=1.0u l=0.45u ng=1 m=1
Cap xc.ap 0 4n
Can xc.an 0 4n
Cn1 xc.net1 0 6n
Cn2 xc.net2 0 2n
Cn3 xc.net3 0 2n
Cdp dp 0 4n
Cdn dn 0 4n
Cnc xc.n_clkc 0 2n
Bmx mx 0 V = max(v(dp),v(dn))
Bdiff diff 0 V = abs(v(dp)-v(dn))
.ic v(xc.ap)=1.5 v(xc.an)=1.5 v(xc.net1)=0.4009999632835388 v(xc.net2)=1.5 v(xc.net3)=1.5 v(dp)=0 v(dn)=0 v(xc.n_clkc)=1.5
.param m4=36
.temp 50
.options method=gear maxord=1 trtol=1e7 reltol=1e-7 vntol=1e-10 abstol=1e-12 gmin=1e-12 itl4=200
.control
pre_osdi $IHP_OSDI/psp103.osdi
pre_osdi $IHP_OSDI/psp103_nqs.osdi
set numdgt=10
set noprintscale
foreach h 16777 4194 1049 262 84 8 1
foreach sg 1 -1
alter Vdp = 0.75 + $sg * $h / 16777216
alter Vdn = 0.75 - $sg * $h / 16777216
tran 100n 15.5u 0 100n uic
echo RUN $h $sg
meas tran tck when v(clkc)=0.75 rise=1
meas tran tfirst when v(mx)=0.75 rise=1
meas tran tres when v(diff)=0.75 rise=1
meas tran dpend find v(dp) at=15.5u
meas tran dnend find v(dn) at=15.5u
foreach r 39 59 71 79 87 95 109 149
echo ROW $r
print time[$r] v(xc.ap)[$r] v(xc.an)[$r] v(xc.net1)[$r] v(xc.net2)[$r] v(xc.net3)[$r] v(dp)[$r] v(dn)[$r] v(xc.n_clkc)[$r]
end
end
end
alterparam m4 = 35
reset
foreach d 71579 71581
alter Vdp = 0.75 + ($d) / 2 / 16777216
alter Vdn = 0.75 - ($d) / 2 / 16777216
tran 100n 15.5u 0 100n uic
echo MM 35 $d
meas tran dpend find v(dp) at=15.5u
meas tran dnend find v(dn) at=15.5u
end
alterparam m4 = 34
reset
foreach d 145772 145774
alter Vdp = 0.75 + ($d) / 2 / 16777216
alter Vdn = 0.75 - ($d) / 2 / 16777216
tran 100n 15.5u 0 100n uic
echo MM 34 $d
meas tran dpend find v(dp) at=15.5u
meas tran dnend find v(dn) at=15.5u
end
.endc
.end
Loading
Loading