Repository navigation
analog: mos_table.t27 -- CMOS inverter with a tabulated square-law MOS, backward Euler and fixed Newton, against cpphdl (Closes #10515) - #10518
Merged
Conversation
…S, backward Euler and fixed Newton, against cpphdl (Closes #10515) M3a of the analog emulation epic (#10486). The device is a 25 x 25 Id(Vgs, Vds) table on a 0.05 V grid (Vdd and Vth are grid lines), read by exact-integer bilinear interpolation; gm and gds are the slopes of the same interpolant. The output node is integrated by backward Euler with K = 3 Newton iterations, fixed. One 2^20-unit cell is 0.05 V, so cell index, fraction and the interpolation divisor are shifts; the only division is Newton's. Tests (13, 0 vacuous): table against the law at the nodes and at all 576 cell midpoints; the fixed-point inverter run against cpphdl's requirement; the three errors kept apart and bounded from both sides (arithmetic 0.61 unit, table 0.428 mV, discretization 27.2 mV); the last residual at most 1 unit at every step; negative controls K = 1 and Vth = 0.30; bit-exact mirror symmetry. fold and fabs64 come from analog/linear (M1) by use; no board top, no PDK. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 18, 2026 16:08
Contributor
11 of 21 tasks
gHashTag
added a commit
that referenced
this pull request
Oct 18, 2026
…nXC7 path in the analog skill (Closes #10521) (#10523) The M3a seal (#10518) was written without ZIG_GLOBAL_CACHE_DIR, so its test run recorded a false "blocked" verdict carrying /Users/playom/.cache/zig; re-sealed it records 13 passed, 13 total, 0 vacuous and all hashes MATCH. The skill (#10520) named /Users/playom/t27/build/fpga/openxc7; it now uses "$(git rev-parse --git-common-dir)/../build/fpga/openxc7", which resolves to the main checkout from any worktree, and records the seal trap. Both made `scan` (tools/check_devhome_paths.py) red on master. Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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 #10515
M3a of the analog emulation epic (#10486):
specs/analog/mos_table.t27, a CMOS inverter whose MOS currents are read from anId(Vgs, Vds)table by bilinear interpolation, integrated by backward Euler with a fixed number of Newton iterations, checked against cpphdl's analytic square-law inverter (analog/examples/cmos_inverter: Vdd 1.2 V, input 0 -> 1.2 V at 2 us, 10 pF, dt 10 ns, stop 4 us).Result (13 tests,
vacuous passes 0 of 13;tri testexit 0; seal MATCH)inv_steptakes k so the tests can run K = 1 and 2;board_stephas a static trip count.K_NEWTON = 1, the law's Vth = 0.30, and a truncating table builder each make 4, 11 and 7 of the 13 tests FAIL.Hardware check
t27b verilog specs/analog/mos_table.t27: exit 0, but the module is empty (nothing in the file is a clocked top, and its f64 test locals do not lower). With a scratch top outside the repo: the scalar arithmetic (blend,blend1,newton_move,frac_of,cell_of,mag_diff,gate_at) lowers (exit 0, division included);board_stepitself exits 2 on two constructs: a slice parameter ("call of a fn with a parameter that is no integer or bool") and array indexing (ExprIndex). The table read (node_at) is the single access point M3b needs as a ROM. Awhileneeds a static trip bound, whichboard_stephas.Reuse
foldandfabs64come fromanalog/linear(M1, #10511) byuse.usebrings in all of that module's public names, sostep,residualandSTEPShere areboard_step,g_residandRUN_STEPS. The dupe ratchet prints ok.Not claimed
Nothing about a transistor (the table is the square law, not PSP103; that is M3b), a board, power, a second nonlinear node, or cpphdl's own 11.5 nV (quoted from its README, not re-run).
🤖 Generated with Claude Code