星期二, 5月 26, 2026

3D Models from text and applications

From image 



From text



Sagrada Família (Opus 4.5)

 

Banff National Park:  Ten Peaks from scratch (share)





Ten Peaks and Lake Moraine 12 (cali.), evolution



From image

animation of Leap 71 (launch)


Applications

navigation



星期三, 5月 20, 2026

EX#11 Circuit Optimization on PCB

課堂練習 

Deadline:  Saturday at 23:59 (one more week)

Send all the share links to  me chang212@gmail.com by email with subject EX#11 [your id, your name]


PCB Trace Routing and/or Parameter Tune-Up 

1. Optimize trace routing for the Differential Pair Circuit on PCB 


trace routing, share (artifact, more accurate schematic)


Steps

Starting from the imperfect design, complete the trace routing. Do trace routing ( 參考 share, share 2, share 3)






2. 設計Crystal 石英振盪電路的PCB


(3, 4 任選一題來做)
3. 使用鑽孔路徑演算法進行以下PCB 鑽孔(演算法 提供參考)


PCB 1





PCB 2



甚麼是 TSP?

Traveling Salesman Problem 簡稱TSP

 (一個推銷員要拜訪所有客戶城市,每個城市只能拜訪一次,最後要回到出發城市,請為他/她計算最短的拜訪路徑)

TSP在工業界有重要應用,包括物流(UPS/Amazon配送路線優化)、製造業(電路板鑽孔、機器人組裝路徑)、電信(網路路由、線路安裝)和能源(電網維護、管線檢查)。凡是需要造訪多個地點同時最小化成本、時間或距離的場合都適用。現代變體能處理容量限制、時間窗口等實際約束。企業使用OR-Tools、Gurobi等專業軟體解決這些問題,透過優化倉儲揀貨、切割模式、3D列印路徑和車隊管理等作業,往往能節省數百萬成本。


(樸素) Visualize TSP (Traveling Salesman Problem) by A* search 使其可以改變網路節點個數

(美學) 視覺化 A* for Traveling Salesman Problem 使其可以改變網路節點個數







星期四, 5月 14, 2026

Follow up EX#10

 這不是 benchmark

跑分需要載入你要跑分的標的程式
你都沒有載入程式
根本不可能為這隻程式進行跑分
這是亂數模擬

建議你先載入程式
我有提供原始程式給你了,下載後就可以使用了


Placement artifact 

下載方法,點選我的連結,按 customize, 會跳出程式畫面,然後選 download as HTML 然後用cowork 或是其他類似功能平台跑 benchmark或是直接用Claude Chat 跑 benchmark

星期三, 5月 13, 2026

EX#10 Routing and Placement

Benchmark  Two-stage Cascode Class-AB RF power amplifier targeting 5G n78 (3.5 GHz) in TSMC 28nm RF

Experiment with 30 seeds
Measure success, congestion, wirelength, overlap pairs (before/after)

 


Benchmark the P&R for OP 741.

Experiment with 3 seeds
Measure success, congestion, wirelength, overlap pairs (before/after), Vin length match

星期三, 5月 06, 2026

Follow up EX#9

This is not a benchmark. 你是再重寫一個新程式

我有提供原始程式給你了,下載後就可以使用了
schematic with parameter optimizer

下載方法,點選我的連結,按 customize, 會跳出程式畫面,然後選 download as HTML 然後用cowork 或是其他類似功能平台跑 benchmark或是直接用Claude Chat 跑 benchmark



Share 看不到畫面

只有文字

看不到benchmark  圖表
你的share內的圖表,我沒有你的密碼看不到

正確可靠的輸出畫面方式 How to publish a Claude artifact

聊天中的內嵌視覺內容(SVG 圖表、HTML 小工具、直接渲染在對話中的圖表)預設是暫時性的——它們作為 Claude 回應的一部分以內嵌方式存在,當對話繼續往下走時並不會被另外儲存。可以把它們想成白板上的草圖,而不是完成的檔案。因為沒有被持久化保存,所以分享聊天時它們不會跟著快照一起傳出去。

Artifacts(製品)就不一樣了——它們從一開始就是持久化、可分享的。所以如果想讓視覺內容在分享聊天時還能被看到,分享之前可以這樣做:

  • 存成 Artifact — 把內嵌視覺轉成可分享、可繼續迭代的持久化 artifact
  • 下載 — 存成本地的 .svg 或 .html 檔案
  • 複製為圖片 — 截一張靜態快照

至於上傳的檔案(您附加的 PNG),原因不太一樣:如果分享的聊天裡有附加檔案,檔案本身不會包含在分享快照中,會保持私密。只有對話內容和 Claude 的回應會被看到。這是一種隱私保護——即使對話被分享出去,您上傳的東西仍然屬於您。

簡單來說:

  • 內嵌的自製視覺 = 暫時性的(不在快照裡)
  • 上傳的檔案 = 為了隱私刻意被剝除
  • Artifacts = 本來就是設計用來分享的

如果有特定的圖想保留下來分享,可以叫 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.

1. BJT Diff Pair

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.


EX#9 Benchmark IC Design Quality

  課堂練習 

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


schematic with parameter optimizer


Hint: prompts for CoWork
Prompts for Claude Chat


Part 2

1. Benchmark the three algorithms (GD, NM, A*) and their cascades (one designed by you and the other design by AI )

  • For the five methods, each runs with 10 seeds
  • Tabulate Gain, Pout, PAE, OP1dB, S₁₁ (5 methods = 5 tables, each table with 5 metrics × 10 seeds = 40 cells).
  • Visualize all of your data

Two-stage Cascode Class-AB RF PA Driver targeting 5G n78 (3.5 GHz) in TSMC 28nm RF

Build Sub 6 GHz Power Amplifier Optimizer with Die Synced
shareartifact (Closed-Form)