Repository navigation
analog M3c-2: a log-domain PSP103 current read with an integer exp meets the 1 percent bar in weak inversion (worst cell 0.705 percent), inverter delays within 0.025 percent of ngspice - #11146
Merged
Conversation
…orner from ngspice, 97 x 49 nodes, and 1000 held-out currents at cell centres psp103_idpa_tt.cir prints, for sg13_lv_nmos W 1.0 um and sg13_lv_pmos W 3.0 um (L 0.45 um, IHP-Open-PDK 21133f21, 27 C), the words log2(Id / F) in 1/65536 octave over 1.164 pA on a 97 x 49 grid (15.625 mV along Vgs, 31.25 mV along Vds), F = 1 - exp(-Vds / s(Vgs)), the 97 words rv = nint(4096 / s) of the gate scale, and 1000 currents in pA at cell centres of that grid. mos_psp103_data.t27 holds them (TT_LG_N, TT_LG_P, TT_CEN_N, TT_CEN_P) with the format constants, the header paragraph and the pins; the reader is the next commit. Updates #10881 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ith an integer exp, 1 % bar met at the midpoints, R2 points and cell centres, the inverter within 0.05 % at 500 fF and 10 pF mos_table.t27 generalizes the table read to any uniform grid (cell_w, blend_w, read_w: id_of is the 24 x 24 cell case, tested bit for bit) and adds the log-domain current: lg_fine = F * 2^(lam / 2^16) in 1/256 of a table word from a log table's four nodes, the Vds factor F = 1 - exp(-Vds rv / 2^36) by series and a 129-entry table, the exp by the same table and a shift, and gds_log read off the same words. cur_of / cur_gds dispatch on the tag word, so the Newton step, the charge path and M3a's pinned run are unchanged (17 tests of M3a pass as before). Measured against ngspice (tt, 27 C), relative error with a floor of 1e-9 A: NMOS 0.080 / 0.398 / 0.467 %, PMOS 0.094 / 0.527 / 0.705 % at the 576 midpoints, the 1000 R2 points and 1000 centres of the log grid's cells (the linear reader: 0.5 .. 0.73, 100 times more). The tt inverter on the log tables with the drain charge: delays within 0.0018 % and 0.025 % at 500 fF, within 0.0014 % and 0.0033 % at 10 pF with the charge scaled by 1/20, DC transfer 0.17 mV (was 5.5 mV). Updates #10881 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…or against the grid, the headers that said the bar is out of reach, one Zig-path fix in blend_w blend_w built its rounding half from a u64 constant that the Zig path read as u32 (a shift by 39 panicked in `t27c test-report`, where the native test passed); it is now the product of the two weights over two. The headers of mos_table.t27, mos_psp103.t27 and mos_psp103_data.t27 carry the design on paper (the log table, the Vds factor with a gate scale, the exp as a table and a shift, the slope, and the error against grid and format: 44 % and 0.78 % for a fixed scale at 62.5 and 15.6 mV, 6.1 % to 0.51 / 0.71 % with the gate scale at 62.5 x 62.5 to 15.6 x 31.2 mV), what the log reader measured against ngspice and what it does not say; the three constants of the data test are runtime asserts. test-report: mos_table 20, mos_psp103 35, mos_psp103_data 10, mos_psp103_50c_data 4, sar_comparator 20, sar_comparator_psp 13, sar_kick_net 20, sar_switch 14, sar_adc 15, sar_kick 10 tests, 0 failed, 0 vacuous. Updates #10881 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ets the 1 percent bar in weak inversion (worst cell 0.705 percent), inverter delays within 0.025 percent of ngspice (Closes #10881) Merge of master plus sealing, gates run on the merged tree with t27c from master: tests clean with vacuous passes 0, seal --verify MATCH, tri types ratchet CLEAN, dupe_scan failure set a subset of master's. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 19, 2026 19:26
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10881
analog M3c-2: a log-domain PSP103 current read with an integer exp meets the 1 percent bar in weak inversion (worst cell 0.705 percent), inverter delays within 0.025 percent of ngspice
Gates run on the merged tree (t27c from master): 10 spec(s) with tests clean and vacuous passes 0, seal --verify MATCH, tri types ratchet CLEAN, dupe_scan failure set a subset of master's (inherited red).
TEST specs/analog/mos_table.t27 tests=[20] fail=[0] vacuous=[0]
TEST specs/analog/mos_psp103.t27 tests=[35] fail=[0] vacuous=[0]
TEST specs/analog/mos_psp103_data.t27 tests=[10] fail=[0] vacuous=[0]
TEST specs/analog/mos_psp103_50c_data.t27 tests=[4] fail=[0] vacuous=[0]
TEST specs/analog/sar_comparator.t27 tests=[20] fail=[0] vacuous=[0]
TEST specs/analog/sar_comparator_psp.t27 tests=[13] fail=[0] vacuous=[0]
TEST specs/analog/sar_kick_net.t27 tests=[20] fail=[0] vacuous=[0]
TEST specs/analog/sar_switch.t27 tests=[14] fail=[0] vacuous=[0]
TEST specs/analog/sar_adc.t27 tests=[15] fail=[0] vacuous=[0]
TEST specs/analog/sar_kick.t27 tests=[10] fail=[0] vacuous=[0]
SEAL specs/analog/mos_table.t27 :: all hashes MATCH
SEAL specs/analog/mos_psp103.t27 :: all hashes MATCH
SEAL specs/analog/mos_psp103_data.t27 :: all hashes MATCH
SEAL specs/analog/mos_psp103_50c_data.t27 :: all hashes MATCH
SEAL specs/analog/sar_comparator.t27 :: all hashes MATCH
SEAL specs/analog/sar_comparator_psp.t27 :: all hashes MATCH
SEAL specs/analog/sar_kick_net.t27 :: all hashes MATCH
SEAL specs/analog/sar_switch.t27 :: all hashes MATCH
SEAL specs/analog/sar_adc.t27 :: all hashes MATCH
SEAL specs/analog/sar_kick.t27 :: all hashes MATCH
TYPES RATCHET: CLEAN
DUPE failing=0 extra-vs-master=[]
🤖 Generated with Claude Code