Benchmark Two-stage Cascode Class-AB RF power amplifier targeting 5G n78 (3.5 GHz) in TSMC 28nm RF
Benchmark the P&R for OP 741.
張老師與他的科技英文與科普傳播 Technical English for Engineering Students Using Claude
Benchmark Two-stage Cascode Class-AB RF power amplifier targeting 5G n78 (3.5 GHz) in TSMC 28nm RF
Benchmark the P&R for OP 741.
Share 看不到畫面
正確可靠的輸出畫面方式 How to publish a Claude artifact
聊天中的內嵌視覺內容(SVG 圖表、HTML 小工具、直接渲染在對話中的圖表)預設是暫時性的——它們作為 Claude 回應的一部分以內嵌方式存在,
Artifacts(製品)就不一樣了——
.svg 或 .html 檔案至於上傳的檔案(您附加的 PNG),原因不太一樣:如果分享的聊天裡有附加檔案,
簡單來說:
如果有特定的圖想保留下來分享,可以叫 Claude「把這個存成 artifact」,這樣下次分享時對方就看得到了。
To speed up the process, you may want to use Claude cowork to run the batch using Python which Claude will make one for you automatically.
Interesting result — the MNA contradicts the React optimizer. Let me sweep mirror mismatch to show what's going on:The MNA disagrees with the optimizer by oo dB. Here's why:
analytic (React) MNA (full nodal solve)
|Ad| 1286.7 1293.4
|Acm| 3.50×10⁻⁵ 1.70×10⁻³
CMRR (dB) 151.30 117.65
← 34 dB lower
Root cause: PNP mirror β-error, which the React formula completely omits.
The textbook expression Acm = 1/(2·gm·R_tail) assumes a perfect mirror — gain exactly 1. Real PNP mirrors lose 2/(β+2) of the reference current to base currents. With β_p ≈ 106:
δ_β = 2/(β+2) = 1.84%
Predicted Acm from β-loss: δ·Rout/(2·R_tail) = 1.66×10⁻³
Observed Acm (MNA): 1.70×10⁻³
→ β-error explains 98.1% of the actual CM gain
The tail-impedance term (3.5×10⁻⁵) is real but it's the floor, not the dominant contributor. The mirror β-error is 48× larger and sets the actual CMRR.
Mirror Is-mismatch sweep confirms the mechanism — there's an asymmetric peak where Is mismatch cancels β-loss:
ΔIs/Is CMRR
−5% 106.5
−2% 111.5
0% 117.7 ← matched (β-loss alone)
+1% 123.8
+2% 155.7 ← cancellation peak (Δ_Is exactly = δ_β)
+3% 123.5
+5% 114.2
That sharp 156 dB peak at +1.84% is real but useless — it's a single bias-trim point. Process variation puts every die somewhere else on the curve.
Monte Carlo with realistic process σ (0.5% Is, 1% β):
CMRR mean = 119.4 dB
CMRR median = 117.5 dB
CMRR p10 = 112.8 dB
CMRR p90 = 127.4 dB
CMRR std = 7.3 dB
Verdict on the optimizer's CMRR numbers: systematically optimistic by ~33 dB. The 117–120 dB result is in line with what real BJT diff pairs with active loads achieve (LM394: 120 dB typ; MAT02: 124 dB typ — both trimmed). The optimizer's 151 dB was the textbook ceiling for an idealized topology, not what the topology actually delivers.
Two-line fix for the React calcPerf:
const deltaBeta = 2 / (bp + 2); // mirror β-loss
const Acm_beta = deltaBeta * Rout / (2 * RoTail);
const AcmTotal = Math.hypot(AcmLin, Acm_beta); // RMS combine
const CMRR = 20 * Math.log10(AdLin / AcmTotal);
That alone pulls the reported CMRR from 151 to ~118 dB and aligns it with what an MNA — or a real chip — would show.
課堂練習
Deadline: This Saturday at 23:59
Send all the share links to me chang212@gmail.com by email with subject EX#9 [your id, your name]
Part 1
Use Claude CoWork or Claude.ai/aistudio to benchmark BJT Differential Pair
1. Experiments with 30 seeds
1. Benchmark the three algorithms (GD, NM, A*) and their cascades (one designed by you and the other design by AI )
Gain, Pout, PAE, OP1dB, S₁₁ (5 methods = 5 tables, each table with 5 metrics × 10 seeds = 40 cells).Two-stage Cascode Class-AB RF PA Driver targeting 5G n78 (3.5 GHz) in TSMC 28nm RF
LNA reality check in simulator, prompt for spec compliance
LNA v3 (closed-form), V3 pathway to tape-out (advanced, ok omitted)
建議工具
使用 Claude Sonnet 4.6 推理模式(手動切換,免費用戶額定時間內只能使用三次)
使用 ChatGPT 5 推理模式(自動切換)
使用 Gemini 3.0 Pro 免費額度最高 1M tokens (永遠推理模式)
使用 Grok 4 推理模式(自動切換)
How to publish a Claude artifact
作業繳交規範
Content share 作業繳交格式
課堂練習
Deadline: This Saturday at 23:59
Send all the share links to me chang212@gmail.com by email with subject EX#8 [your id, your name]
1. Study Apple iPhone Architecture & Design Guides
(a) make LNA schematic (TSMC N7 製程的完整設計流程,包含完整元件表、元件值推導公式、die 面積估算) LNA=Low Noise Amplifier
(b) make LNA Die
(c) Build LNA Optimizer (SMITH Chart, S-parameters, Frequency Response), Merit of Figure (share)
(d) Build a Simplified (closed-form) LNA optimizer (with GD, A*) on Die, 3.5 GHz LNA TSMC N7.
Note: LNA Optimizer with Die and sliders Synced (Optimizer with NM method added)
(e) (選作) 需要付費版算力,免費版可能無法完成
Build an MNA model (Modified Nodal Analysis, as used in Cadence Spectre engine) to optimize. Must verify your results to meet spec and parameters have to be realistic.
Hints: all the prompts used in the conversation, prompts lined up
Supplemental
ePlace vs. RePlAce
Two-stage Cascode Class-AB RF PA Driver targeting 5G n78 (3.5 GHz) in TSMC 28nm RF CMOS
Difference between this html TSMC 28nm RF CMOS and TSMC N3E jsx closed-form
SMITH Chart, Explain Smith Chart, S-parameters (read it if you are not familiar with these concepts.)
original , fixed (hardcoded), SA 1, QP, QP+SA (MNA, Small WireLen, non 0 viol.),
QP+ILP+PrePass (No A* or SA, viol.) comparison with ACS detail
Slides fit of SA for RF PA Layout
Two-stage Cascode Class-AB RF power amplifier targeting 5G n78 (3.5 GHz) in TSMC 28nm RF
RF Power Amp Driver TSMC N3E-RF (one stage)
(note: Apple C1 by TSMA N4P )
PA Lessons, PA Verified by computing the exact KCL residual at its converged solution, not because of blow up of MNA
SMITH Chart, Explain Smith Chart
RF PA driver with 10 dBm output (not PA itself) (code, artifact, realistic spec, not just renaming)