The die's strength vocabulary晶粒的強度詞彙

Toolbox study #2 (mechanism M1). A switch-level engine rules every contested node by fiat: a path to GND always wins. Real NMOS rules by conductance — and conductance is geometry, printed in the netlist column everyone skips: W/L. One Python script reads it for 27,788 transistors, audits the textbook 4:1 design law against the silicon, and maps the 538 sites where two drivers can actually fight.

工具箱研究 #2(機制 M1)。開關級引擎用一條霸王條款裁決所有爭端:有到 GND 的路,一律勝訴。真實的 NMOS 用電導裁決 —— 而電導就是幾何,印在網表裡人人跳過的那一欄:W/L。一隻 Python 讀完 27,788 顆電晶體,拿教科書的 4:1 設計律對矽對帳,並畫出538 個兩個驅動器真的會打起來的地點

M1 · drive strength m1_device_census.py 2A03 JSON 2C02 JSON 2026-07-17

The problem問題 GND wins by fiat, not by physicsGND 靠霸王條款贏,不是靠物理

In the engine's group resolution, priority is absolute: GND path > VCC/pull-up > external drive > hold. It never asks how strong the GND path is. On the die, that question decides real behaviour: the infamous LXA $AB "magic constant" exists because a weak driver and a data latch fight over the merged SB/IDB bus, and the outcome ($FF on this silicon) is a ratioed outcome — a fight between W/L values. Our engine can't express "almost wins", so the accuracy campaign patched it with LxaMagicShim, a hardcoded constant. Same story for the ALU input latches (AluLatchShim). The shims are honest — but they are answers copied from the back of the book.

引擎的群解析優先序是絕對的:GND 路徑 > VCC/上拉 > 外部驅動 > 保持。它從不問那條 GND 路徑有多壯。在晶粒上,這個問題決定真實行為:惡名昭彰的 LXA $AB「magic 常數」,就是一個弱驅動器和一個資料閂鎖在合併的 SB/IDB 匯流排上打架,而結果(這批矽上是 $FF)是一個比例式結果 —— W/L 之間的勝負。我們的引擎表達不了「差一點就贏」,所以精度戰役用 LxaMagicShim 硬寫常數打補丁,ALU 輸入閂鎖(AluLatchShim)同一個故事。這些 shim 很誠實 —— 但它們是抄書後解答的答案。

M1's bet: give every transistor its real strength (from geometry), resolve the rare both-sides-conducting groups by comparing strengths, and the magic constants should fall out of the die instead of being written in. This census is the parameter harvest and the target map for that mechanism.

M1 的賭注:把每顆電晶體的真實強度(從幾何)還給它,罕見的「兩邊同時導通」群改用強度比較裁決,那些 magic 常數就該從晶粒裡自己掉出來,而不是被寫進去。這份普查,就是那個機制的參數收割與目標地圖。

The physics物理 Ratioed logic: W/L is the whole game比例式邏輯:W/L 就是整場比賽

An NMOS transistor is a resistor when on, and its conductance scales as S = W/L — channel width over length. All of ratioed-NMOS design is arithmetic on S: an inverter works because its pull-down (S≈2–4) out-drives its depletion load (S≈0.5–1) by the cookbook factor of ~4:1, leaving a solid logic low. Two drivers of similar S fighting over one node end mid-rail — the next stage's threshold, not a priority list, decides. And strengths compose: devices in series are weaker than their weakest member (the reason a strong driver behind a narrow pass gate loses fights it "should" win — and the reason mechanism M1 will need MOSSIM-II-style strength classes, not exact resistances).

NMOS 電晶體導通時就是一顆電阻,電導正比於 S = W/L —— 通道寬除以長。整個比例式 NMOS 設計就是 S 的算術:反相器能動,是因為下拉管(S≈2–4)以教科書的 ~4:1 壓過 depletion 負載(S≈0.5–1),拉出紮實的低電位。兩個 S 相近的驅動器搶同一個節點,會停在中間電位 —— 由下一級的門檻決定,不是由優先序清單決定。而且強度會複合:串聯器件比最弱的成員更弱(壯驅動器接在窄 pass gate 後面會輸掉「照理該贏」的仗 —— 也是 M1 機制需要 MOSSIM II 式強度分級、而非精確電阻的原因)。

A pad driver from the census: the fight the LUT cannot see 普查裡的一個 pad 驅動級:LUT 看不見的那場架 VCC GND gate: "drive 1" 閘極:「輸出 1」 7 devices to VCC S_up ≈ 13 db0 gate: "drive 0" 閘極:「輸出 0」 9 devices to GND S_dn ≈ 13 Engine: both paths conduct → 引擎:兩條路都導通 → GND wins, by rule, at any strength. GND 勝訴,依規則,無論強度。 Physics: S 13 vs 13 — a dead heat. 物理:S 13 對 13 —— 勢均力敵。 Node sits mid-rail; the receiver's threshold 節點停在中間電位;接收端的門檻 (and temperature, and process) decides. (還有溫度、還有製程)決定勝負。 In a working design the two gates are never 正常設計裡兩個閘極不會同時為 1 —— 1 together — except in the bus overlaps and 除了匯流排交疊與閂鎖賽跑的瞬間 —— latch races where the LXA family lives. LXA 家族就住在那裡。 Numbers from the census: the db0 pad driver on the 2A03 — 7 up-devices vs 9 down-devices, S_up : S_dn = 1.00. 數字來自普查:2A03 的 db0 pad 驅動級 —— 上側 7 管、下側 9 管,S_up : S_dn = 1.00。
A totem/pad output stage found by the fight census. The engine's LUT would hand any overlap to GND; the die calls it 1:1.打架普查找到的推挽/pad 輸出級。任何交疊,引擎的 LUT 都判給 GND;晶粒說這是 1:1。

The data資料 The column everyone skipped — and the hole nobody can fill人人跳過的那一欄 —— 和一個沒人能補的洞

Every transdefs row carries a geometry record: ['t11891', gate, c1, c2, bbox, [54, 54, 6, 1, 324], false] — width 54, length 6, gate area 324. That last array is real, per-device data (S = W/L = 9 for this one; its neighbour t12798 is a puny 10/6 ≈ 1.7), and the Visual6502 → MetalNES → S1 lineage never read it. The census computes S = area / L² (robust for bent gates) for all 27,788 devices.

每一列 transdefs 都帶著幾何紀錄:['t11891', gate, c1, c2, bbox, [54, 54, 6, 1, 324], false] —— 寬 54、長 6、閘面積 324。最後那個陣列是真實的逐器件資料(這顆 S = W/L = 9;鄰居 t12798 是瘦小的 10/6 ≈ 1.7),而 Visual6502 → MetalNES → S1 這一脈從來沒讀過它。普查對全部 27,788 顆器件算 S = 面積 / L²(對彎折閘極較穩健)。

The hole: the depletion pull-up loads are not in transdefs — the extraction folded them into segdefs '+' node flags, so their W/L is lost. Every pull-up-vs-pull-down ratio has data on one side only. The census turns this around: instead of reading the load strength, it derives it from the die's own design discipline (next section) — the one constant M1 must otherwise calibrate by test. 那個洞:depletion 上拉負載不在 transdefs 裡 —— 抽取時被摺進 segdefs 的 '+' 節點旗標,W/L 就此遺失。所有「上拉 vs 下拉」的比例戰都只有單邊資料。普查把這件事反過來用:不去讀負載強度,而是從晶粒自己的設計紀律反推它(下一節)—— 這正是 M1 原本得靠測試校準的那一個常數。

The script程式 m1_device_census.py — four questionsm1_device_census.py —— 四個問題

python m1_device_census.py --transdefs visual2a03-transdefs.js --segdefs visual2a03-segdefs.js \
                           --nodenames visual2a03-nodenames.js --label 2A03 --outdir out/
# → console report + m1_2A03_summary.json + 3 SVG figures

Results結果 Small lattice, honest 4:1, and 194 close fights小格架、誠實的 4:1、以及 194 場勢均力敵

2A03 (CPU+APU)2C02 (PPU)
transistors電晶體10,91616,872
pull-down / pass / to-VCC下拉 / pass / 接 VCC7,147 / 2,869 / 7679,265 / 6,825 / 698
always-on ties / dead恆通 tie / 死管66 / 6738 / 46
distinct S values相異 S 值1,268204
half-octave lattice半八度強度格19 classes · top-8 = 93.3%16 classes · top-8 = 95.6%
'+' nodes with direct pull-downs帶 '+' 且有直接下拉的節點3,2162,675
median S: loaded pull-downs vs pass gates中位 S:帶載下拉 vs pass gate4.33 vs 2.00 (2.17×)4.00 vs 1.40 (2.86×)
implied depletion-load S (modal ÷ 4)反推負載強度(眾數 ÷ 4)0.580.95
fight sites (within 2×)打架地點(2× 以內)288 (80)250 (114)

What the numbers say數字在說什麼

2A03 strength by class
2A03: S = W/L distributions by device class. Pull-downs sit right of pass gates — drive discipline made visible.2A03:各器件類的 S = W/L 分佈。下拉管整體坐在 pass gate 右邊 —— 驅動紀律看得見。
2C02 strength by class
2C02: same picture; tighter, more regular — the standard-cell character of the PPU.2C02:同一張圖;更緊、更規則 —— PPU 的標準元件性格。
2A03 vocabulary
2A03 vocabulary: top W/L values and cumulative coverage.2A03 詞彙:最常用的 W/L 值與累積涵蓋率。
2C02 vocabulary
2C02 vocabulary: five values nearly halfway cover the die.2C02 詞彙:五個值就快蓋掉半顆晶粒。
2A03 fights
2A03 fight sites: S_up : S_dn ratios; red = within 2×, where GND-wins is a coin-toss call.2A03 打架地點:S_up : S_dn 比值;紅 = 2× 以內,GND-必勝在這裡等於擲銅板。
2C02 fights
2C02 fight sites: the io_db pads cluster exactly at 1:1.2C02 打架地點:io_db pad 群恰好聚在 1:1。

So what所以呢 What M1 the mechanism now knows in advanceM1 機制現在能預先知道的事

Honest limits誠實極限 What this census cannot say這份普查說不了的事