Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a06367ade | ||
|
|
1fbdcc23d6 | ||
|
|
0d2faef565 | ||
|
|
a9c56ee1d4 | ||
|
|
78a8f641c9 | ||
|
|
25e1ce0068 |
@@ -28,3 +28,6 @@ publish/*
|
||||
# 客戶板 schematic 原始檔(機密,勿入 repo)
|
||||
*.DSN
|
||||
*.dsn
|
||||
|
||||
# 尚未上機驗證的腳本暫存區(不入 repo,測過再搬進 src/)
|
||||
tmp/
|
||||
|
||||
+48
-10
@@ -112,7 +112,7 @@ Blanton_TTL_Script/
|
||||
│
|
||||
├── CLAUDE.md # 專案記憶 & 給 Claude 的指令
|
||||
├── ARCHITECTURE.md # 本架構文件
|
||||
├── .gitignore # secret/ + For_AI/ + logs + publish 產出
|
||||
├── .gitignore # secret/ + For_AI/ + tmp/ + logs + publish 產出
|
||||
├── .gitattributes # 換行符政策:.sh/.conf 釘 LF、.ttl 保持 CRLF
|
||||
│
|
||||
├── docs/ # 規格與狀態文件(客戶提供 / 專案產出)
|
||||
@@ -120,6 +120,7 @@ Blanton_TTL_Script/
|
||||
│ ├── Blantons_FPGA_Registers_draft.docx # 同上,客戶原始 docx
|
||||
│ ├── Blantons_FPGA_Registers_Map_draft.xlsx
|
||||
│ ├── Blantons_PCIe_AER_and_DDR_EDAC_checks.pdf # AER / EDAC 檢查點依據
|
||||
│ ├── ADPM12200CMLZxx_DS_Datasheet_*.pdf # PDB brick 手冊(PAGE 與 DIRECT 係數的來源)
|
||||
│ ├── Blanton_Test_Flow.drawio # A/B/C + 熱安規四支的測試流程圖(draw.io)
|
||||
│ ├── LTC2980_channel_map.csv # 9 個 settings/*.conf 合併:Board,CONN,Ch,NetName,Vnom(144 列)
|
||||
│ ├── TTL_Script_Blanton_Status_20260814.xlsx
|
||||
@@ -152,10 +153,14 @@ Blanton_TTL_Script/
|
||||
│ ├── publish.sh # ✅ committed — 打包工具(版號讀 Script A 檔頭)
|
||||
│ └── Script_ABC_Blanton_<Ver>/ # 🚫 產出,gitignored(-z 另出同名 .zip)
|
||||
│
|
||||
├── tmp/ # 🚫 gitignored — 尚未上機驗證的腳本暫存區
|
||||
│ └── blanton_reboottest.sh # 5_..._Reboot_Cycle.ttl 的 bash 版,測過再搬進 Blanton_Script/
|
||||
│
|
||||
└── src/
|
||||
└── Script_ABC_Blanton/ # ← Tera Term 的工作目錄(整包給測試員)
|
||||
│
|
||||
├── 4_Blanton_Script_thermal_safety.ttl # 熱 / 安規:獨立跑,不接 A→B→C
|
||||
├── 5_Blanton_Script_Reboot_Cycle.ttl # 重開機循環:獨立跑,while 1 無止境(未上機驗證)
|
||||
├── config.ttl # 全域設定:testcase 名、EN_Margin / EN_log、三個 prompt 字串
|
||||
├── 1_Blanton_Script_A.ttl # Pre-test:登入 → 對時 → source 工具 → 清 AER → 抓基線
|
||||
├── 2_Blanton_Script_B.ttl # Stress:開壓力程序 → while 1 每輪抓 fan/temp/margin
|
||||
@@ -193,6 +198,7 @@ Blanton_TTL_Script/
|
||||
├── port_prbs_monitor.sh # 100G uplink PRBS 測試(bcmcmd phy diag)
|
||||
├── blanton_ber.sh # 全機 SerDes BER 掃描(phydiag prbs / prbsstat)
|
||||
├── blanton_multiphase_margin.sh # 多相 VRM margin(原生 i2c,38 條軌)
|
||||
├── pwr_brick.sh # PDB / CPB power brick 讀值(VI2C ch4)
|
||||
├── nfc_polling.sh # NFC tag 背景輪詢 + PASS/FAIL 統計
|
||||
├── blantons_nfc_validate.py # NFC/NCI 驗證工具(廠商提供,未修改)
|
||||
├── blanton_tr518.sh # TR518 封包測試,量功耗前的負載來源
|
||||
@@ -209,6 +215,7 @@ Blanton_TTL_Script/
|
||||
├── settings/*.conf # 一個 .conf = 一顆 LTC2980(CB + SWB0/1 × CONN13~16)
|
||||
├── profiles/*.conf # 16-ch 批次組合。SWB 為 per-CONN:
|
||||
# # combo_SWB_CONN13~16_{high,low}(百分比對應該片的軌)
|
||||
# # comboA/comboB_{CB,SWB_CONN13~16}(互補棋盤配對)
|
||||
# # 通用:high3/5、low3/5、normal、all_off
|
||||
├── script/*_all.sh # 跨 9 顆 LTC2980 的批次 status / apply / save
|
||||
├── Ref/margin_command_trace.md # 指令追蹤參考(SWB 章節已標過期,見文件內警告)
|
||||
@@ -360,10 +367,11 @@ PROFILE_CHANNELS=( "0:high:8" "1:low:8" ... ) # "channel:operation:change_perc
|
||||
|
||||
| 模組 | 進入點 | 功能 |
|
||||
|------|--------|------|
|
||||
| **Script A(Pre-test)** | `1_Blanton_Script_A.ttl` V1.1.5 | root 登入 → `date -s` 對時 → 清 job log → **收掉前一輪殘留**(`hw-test-session finish` → `bgctl reset --yes` → `bgctl stop --all` → `bgctl list` 確認清空)→ `hw-test-session start` → **設定風扇轉速** → **等資料面就緒**(`wait_init.ttl`)→ DUT 清單(boot/version/fwutil/syseeprom/ssdhealth/TPM/NVMe)→ BMC enroll + version/status → source bash 工具 → 清/讀 7 組 PCIe AER + `ras-mc-ctl --summary` → `lspci` → margin → PMON → dmesg → **10G/1G 管理網路 ping** → **NFC 基線**(start → 30s → stop → report)→ 100G uplink 設定與狀態 → **一輪流量基線** → `show uptime` |
|
||||
| **Script B(Stress)** | `2_Blanton_Script_B.ttl` | `mlucas-avx2 -cpu 0:15` + `bgctl run` 的 `memtester` / SSD / USB 壓力(v1.1.5 起 SSD/USB `--runtime 86400`、BMC memtester 不帶次數 = 跑到被停) + BMC DDR(`bmc-manager run memtester`)→ BMC USB net test(探測 cdc_ncm 介面,`systemd-run` 掛 4 小時 ping)→ 啟動 mgmt ping 監控 → **啟動 NFC 輪詢** → `jobs` / `bgctl list` → traffic(依 `SWB_UNIT`)→ `while 1` 每輪 PMON + `bgctl list`/`jobs` + `pause 60`(**V1.1.4 起 margin 不在迴圈內**)|
|
||||
| **Script C(Post-test)** | `3_Blanton_Script_C.ttl` | `kill $(jobs -p)` + `bgctl stop --all` / `reset` + 停 BMC USB unit、mgmt ping 與 **NFC 輪詢** → PMON + dmesg → 7 組 AER + `ras-mc-ctl` → BMC USB `journalctl` → `ip -s link show eth0/eth1` → `cat` mlucas log → **NFC `report`** → traffic `stop` + `report` → **BER 掃描**(依 `SWB_UNIT`)→ NVMe 健康 → `show reboot-cause` → **margin 掃描**(`EN_Margin`,V1.1.4 由 Script B 移來)→ `uptime` → **job log 複製到 USB(帶時戳)** → `exit` + wait『Script done』→ `hw-test-session finish` |
|
||||
| **Script A(Pre-test)** | `1_Blanton_Script_A.ttl` V1.1.7 | root 登入 → `date -s` 對時 → 清 job log → **收掉前一輪殘留**(`hw-test-session finish` → `bgctl reset --yes` → `bgctl stop --all` → `bgctl list` 確認清空)→ `hw-test-session start` → **設定風扇轉速** → **等資料面就緒**(`wait_init.ttl`)→ DUT 清單(boot/version/fwutil/syseeprom/ssdhealth/TPM/NVMe)→ BMC enroll + version/status → source bash 工具 → 清/讀 7 組 PCIe AER + `ras-mc-ctl --summary` → `lspci` → margin → PMON → dmesg → **10G/1G 管理網路 ping** → **NFC 基線**(start → 30s → stop → report)→ 100G uplink 設定與狀態 → **一輪流量基線** → `show uptime` |
|
||||
| **Script B(Stress)** | `2_Blanton_Script_B.ttl` | `mlucas-avx2 -cpu 0:15` + `bgctl run` 的 `memtester` / SSD / USB 壓力(v1.1.7 起 SSD/USB 的 `--runtime`/`--passes` 讀 `config.ttl` 的 `SSD_RUNTIME`/`SSD_COUNT`、`USB_RUNTIME`/`USB_COUNT`;BMC memtester 不帶次數 = 跑到被停) + BMC DDR(`bmc-manager run memtester`)→ BMC USB net test(探測 cdc_ncm 介面,`systemd-run` 掛 4 小時 ping)→ 啟動 mgmt ping 監控 → **啟動 NFC 輪詢** → `jobs` / `bgctl list` → traffic(依 `SWB_UNIT`)→ `while 1` 每輪 PMON + `bgctl list`/`jobs` + `pause 60`(**V1.1.4 起 margin 不在迴圈內**)|
|
||||
| **Script C(Post-test)** | `3_Blanton_Script_C.ttl` | `kill $(jobs -p)` + `bgctl stop --all` / `reset` + 停 BMC USB unit、mgmt ping 與 **NFC 輪詢** → PMON + dmesg → 7 組 AER + `ras-mc-ctl` → BMC USB `journalctl` **寫進 `log/bmc_usb_net.log`**(不再印在 console) → `ip -s link show eth0/eth1` → `cat` mlucas log → **NFC `report`** → traffic `stop` + `report` → **BER 掃描**(依 `SWB_UNIT`)→ NVMe 健康 → `show reboot-cause` → **margin 掃描**(`EN_Margin`,V1.1.4 由 Script B 移來)→ `uptime` → **job log 複製到 USB(帶時戳)** → `exit` + wait『Script done』→ `hw-test-session finish` |
|
||||
| **Script 4(Thermal / Safety)** | `4_Blanton_Script_thermal_safety.ttl` | **獨立腳本,不接 A→B→C。** Script A 式的環境建立(登入 / session / 風扇 / `wait_init` / DUT 清單 / BMC / PCIe 清除 / `pcie_bus` / PMON / dmesg)→ **滿載**(`mlucas-avx2 -cpu 0:15` 背景 + `blanton_tr518.sh start`)→ `while 1`:PMON + `TH6_SWB0/1_power_readback.sh` + `bgctl list` / `jobs`,`pause 60`。**沒有收尾段** —— 中斷後 DUT 仍在 `port cd lb=mac` / `l2 learn off` / `test mode nr=yes`,要手動 `blanton_tr518.sh stop` |
|
||||
| **Script 5(Reboot Cycle)** | `5_Blanton_Script_Reboot_Cycle.ttl` | **獨立腳本,不接 A→B→C。** `while 1`:登入 → `sudo -i` → 對時 → 風扇 → **Check Pt1~Pt13**(DUT/BMC info、mgmt ping、NFC、SSD、USB、BMC USB、port status + 15s traffic、BER、NVMe、platform data、dmesg i2c、PCIe error counters)→ `show uptime` → `reboot` → `wait "Booting in blind mode"`。`cnt_cycle` 每輪 +1 印在標頭。**沒有結束條件** —— 要停就關掉 Tera Term 的 macro。**尚未上機驗證** |
|
||||
| **SWB loopback 流量** | `blanton_traffic_linespeed <sub> [-u 0\|1\|all]` | `init`(VLAN 30..137,成對 `cdN`/`cdN+32`)→ `clear` → `start`(`tx 200 length=324 PatternRandom=yes`,v0.7.0 起)→ `stop` → `report`(per-pair TX/RX 交叉比對 PASS/FAIL);另有 `ps`(link/speed)與 `run`(一條龍)。**V0.6.0 起含 100G uplink `ce0`**(VLAN 138):它沒有 loopback 對象,靠 **ingress mirror 打回自己**維持循環,`report` 最後一列就是它,底下再接一份跨 unit summary |
|
||||
| **FPGA 暫存器存取** | `cb_fpga <fn> <addr> [data]`、`fpga_rescan` | pcimem 打 `resource0` + BAR 相對 offset,32-bit word;BDF 於 source 時自動偵測;`pmc/icb/swb0/swb1_fpga` 走 VSPI 窗口 |
|
||||
| **CB I2C / PMBus** | `cb_i2c_init/scan/read/write`、`cb_pmbus_read/write/linear16` | FPGA F3 OpenCores master,**讀用 Repeated START**(SMBus/PMBus 裝置必需) |
|
||||
@@ -379,6 +387,7 @@ PROFILE_CHANNELS=( "0:high:8" "1:low:8" ... ) # "channel:operation:change_perc
|
||||
| **100G PRBS** | `port_prbs_monitor.sh {start [both\|a\|b]\|stop\|status\|report\|clear}` | 兩個 uplink 各一個 worker,可同時或單獨跑。setup(`lpmode off` → `prbs set` → `prbsstat STArt`)→ 週期 `prbs get`(判定)+ `prbsstat Ber`(只記錄)→ teardown(`STOp` + `prbs clear`)。輸出含 `PRBS OK!` 才算 PASS。**⚠️ A/B/C 的呼叫目前註解掉** |
|
||||
| **SerDes BER 掃描** | `blanton_ber.sh {init\|clear\|start\|stop\|report} [-u 0\|1\|all]` | 全機每個對接 port 的 PRBS BER:`prbs set p=3` + `prbs get`(確認每條 lane 都鎖上)→ `prbsstat STArt Interval=30` →(等一個 interval)→ `prbsstat Ber` → `STOp` → `prbs clear`。`report` 一列一條 lane,**BER < 1e-6 才 PASS**,最後跨 unit 的 summary 帶最差 lane。⚠️ PRBS 期間 link 顯示 DOWN、不過流量 |
|
||||
| **TR518 負載** | `blanton_tr518.sh {start\|stop} [-u 0\|1\|all]` | `port cd lb=mac` → `l2 learn off` → `test mode nr=yes` → `tr 518 ... testphase=1`,然後 settle `TR_SETTLE_SEC`(120s)再讓人量功耗。`stop` 只送 `port cd lb=none`(照 `TR518.txt`),L2 學習與 test mode **不會還原**,`TR_RESTORE_*=1` 才會 |
|
||||
| **PDB / CPB brick** | `pwr_brick.sh show [-r]` | 5 顆 brick 的 Vin / Iin / Vout / Iout / Temp(SWB0 `0x62`/`0x63`、SWB1 `0x60`/`0x61`、CPB `0x26`)。四顆 ADPM12200 **每個量各自一個 PMBus PAGE**(Vin 9、Iin 10、Vout 2、Iout 14、Temp 18),讀之前一定要先寫 PAGE —— `blanton_pwr_data.sh` 完全沒寫,所以整張 PDB 表都是 NA。換算用手冊 DIRECT 公式 `X=(1/m)(Y×10⁻ᴿ−b)`。每個值重讀到通過三道檢查為止(非 `0xFFFF`、非 `0x0000`、落在合理範圍)—— 這條匯流排**只壞高位元組**,`11.98 V` 會變成 `32.00 V`,全一過濾擋不住 |
|
||||
| **SWB 軌功耗** | `TH6_SWB{0,1}_power_readback.sh` | 讀 `show platform voltage/current` **各一次**,19 條軌 V×I 與總功耗。舊版每軌各讀一次(38 次呼叫、每軌不同時刻),總和是不同瞬間的加總 |
|
||||
| **NFC 讀取輪詢** | `nfc_polling.sh {start\|stop\|status\|tail\|report\|clear\|fg}` | 背景重複跑 `blantons_nfc_validate.py`,每輪追加一行機器可讀的 `RESULT=`(PASS/FAIL 取自工具自己的摘要行,兩者皆無則 **ERROR**,與 FAIL 分開計數)。`start` 會先清空 log;`report` **只讀 log,polling 中隨時可跑**,並標示 `RUNNING` 免得快照被當最終結果。`tail` **不 follow** |
|
||||
| **USB 目標偵測** | `usb_target.sh [-o dev\|mnt\|both\|id] [-n] [-r sec]` | 找出插入的 USB 儲存裝置,排除 `/` 與 `/host` 的底層碟(本平台可能從 USB DOM 開機),多顆時拒絕猜;掛載時會驗證真的可寫 |
|
||||
@@ -512,8 +521,13 @@ pwr_data
|
||||
`Permission denied`、Script C 的 `cat` 撲空(BMC 段全空但不會報錯)。
|
||||
14. **TTL 的 `timeout` 是全域的,設了就要還原**:`timeout = N` 之後**每一個** `wait` 都被限制在 N 秒,
|
||||
逾時的 `wait` 會直接返回而沒吃到 prompt,於是下一個指令在前一個還沒跑完就送出,之後整輪錯開一拍。
|
||||
`wait_init.ttl` 設 60 後還原 0;Script B 的 cdc_ncm 探測設 15,在 `:skip_ping`(兩條路徑的匯流點)還原。
|
||||
加新的 `timeout` 時務必配一個 `timeout = 0`。
|
||||
`wait_init.ttl` 設 60 後還原 0;Script B 的 cdc_ncm 探測設 15,成功路徑在 `endif` 之後還原、
|
||||
跳過路徑在 `:skip_ping` 還原(兩處各一次)。
|
||||
Script 5 抄了同一段,但它的 ping 區塊要 `wait` 一個 `sleep 10` —— DUT 一忙就逼近 15 s 上限,
|
||||
所以**還原點提前到 `if` 之前**:分支之前還原,一行就涵蓋兩條路徑,`:skip_ping` 的那行留作備援。
|
||||
加新的 `timeout` 時務必配一個 `timeout = 0`;**抄有 `goto` 的段落時連 `:label` 一起抄** ——
|
||||
標籤沒定義 Tera Term 不會在載入時報錯,要真的跳進那條分支才會彈錯誤視窗停住整輪
|
||||
(Script 5 原本就漏了 `:skip_ping`,只有抓不到 NCM 介面時才會發作,已補)。
|
||||
15. **兩張管理網卡同網段時會 ARP flux**:`mgmt_ping_monitor.sh` 讓 eth0/eth1 同時 up,若兩者在同一個
|
||||
/24(本專案預設 `192.168.1.99` / `.101`),對端 ARP 可能由任一張卡回應,回包落在沒送封包的那張,
|
||||
量到的數字不能歸屬。`ARP_STRICT=1` 會設 `arp_ignore=1` / `arp_announce=2` 擋掉;
|
||||
@@ -754,7 +768,7 @@ margin status、全部 VRM 軌的 Vin/Vout/Iout/Temp、CB + ICB 溫感讀值,
|
||||
- [ ] `CHANGELOG.md`:延續三支腳本頂端的 Version History,集中成一份
|
||||
- [ ] 三支腳本的 header 版號與 `CHANGELOG.md` 對齊,`config.ttl` 加 `script_version` 並寫進 log 開頭
|
||||
- [ ] `docs/TTL_Script_Blanton_Status_*.xlsx` 更新為全 OK,或把剩餘項目移進 Future Extensions
|
||||
- [ ] 打 git tag `v1.1.0`,push `nas` + `gitea`
|
||||
- [x] 打 git tag,push `nas` + `gitea`(已至 `V1.1.7`;`publish/` 依 Script A 檔頭版號打包)
|
||||
|
||||
**驗收條件:** 從 zip 解壓到一台乾淨的測試 NB,照 README 操作,不看原始碼就能完成一輪 A→B→C
|
||||
並產出 summary;`publish/` 內容與 git tag 一致。
|
||||
@@ -796,6 +810,13 @@ margin status、全部 VRM 軌的 Vin/Vout/Iout/Temp、CB + ICB 溫感讀值,
|
||||
複製到 USB。要確認 `bgctl` 的產出結構,必要時改成 `rm -rf .../jobs/*`。
|
||||
- **100G PRBS 尚未接進 A/B/C**:`port_prbs_monitor.sh` 已隨包交付、可手動執行,但三支腳本裡的呼叫
|
||||
都還註解著(bring-up 中)。要啟用時記得 PRBS 期間 link 會顯示 down,`stop` 之後才會回來。
|
||||
- **Script 5(Reboot Cycle)尚未上機驗證**:`5_Blanton_Script_Reboot_Cycle.ttl` 隨 V1.1.7 交付,
|
||||
但還沒在真 DUT 上跑過一輪完整循環。兩個要現場確認的點:`wait "Booting in blind mode"` 是否
|
||||
真的在每一版開機訊息裡出現(沒出現就會永遠等下去,而且沒有 `timeout` 保護);以及每輪重跑
|
||||
`bmc-first-enroll` 是否安全。**沒有結束條件**,測夠了要自己關掉 macro。
|
||||
- **`tmp/blanton_reboottest.sh`(bash 版重開循環)也未上機驗證**:不用 Tera Term、由 systemd 在
|
||||
每次開機跑一輪並自動 `reboot`,登入下 `stop` 才停。整個 `tmp/` 是 gitignored,**不會進交付包** ——
|
||||
驗證過再搬進 `Blanton_Script/`。未驗證的腳本混進 `Blanton_Script/` 之後,測試員分不出哪支能信。
|
||||
- **Script C 的 USB 掛載走 `mount` 而非 `usb_target.sh -o mnt`**:目前是 `-o dev` 取節點再自己
|
||||
`mount <dev> /mnt/usb`,繞過了工具內建的 `mkdir -p`、exfat/ntfs `modprobe` 與可寫性驗證。
|
||||
掛載點不存在、檔案系統模組沒載、或媒體唯讀時只會失敗一行,job log 就沒帶出來。
|
||||
@@ -808,9 +829,26 @@ margin status、全部 VRM 軌的 Vin/Vout/Iout/Temp、CB + ICB 溫感讀值,
|
||||
**`sleep 120` 的方向還沒驗證** —— 若 `tr 518` 的流量是有時限的(參數含 `runtime=1`、
|
||||
`CheckDataTime=200`),等 120 秒可能量到已經降下來的值,要上機比對 0s / 30s / 120s 三次;
|
||||
TTL 尚未呼叫它。
|
||||
- **`--runtime 86400` 是 24 小時的上限,不是「永遠」**:超過一天的 soak,SSD 與 USB 壓力會在
|
||||
第 24 小時安靜結束,剩下的時間那兩項是閒置的。Script B 每輪都印 `bgctl list`,數量變少會看得到,
|
||||
但**沒有任何東西會主動報警**。真的要跑更久,得把數字改大或加一段重啟 job 的邏輯。
|
||||
- **`--runtime` 是整個 job 的總時限,不是每個 pass 的**:V1.1.7 起由 `config.ttl` 宣告
|
||||
(`SSD_RUNTIME`/`SSD_COUNT`、`USB_RUNTIME`/`USB_COUNT`,COUNT 直接對應 `--passes`)。
|
||||
`qfx5252-stress-*` 跑滿 RUNTIME 秒就結束,**`--passes` 不會把它延長**,所以
|
||||
`RUNTIME=600, COUNT=720` 是 10 分鐘的壓力而不是 120 小時。要跑滿一天就把 RUNTIME 填 `86400`。
|
||||
壓力提早結束時 Script B 每輪的 `bgctl list` 數量會變少,但**沒有任何東西會主動報警**;
|
||||
要比 24 小時更久則得加一段重啟 job 的邏輯。
|
||||
- **BMC USB 的 service log 只剩隨身碟一份**:Script C 把 `journalctl` 導進
|
||||
`log/bmc_usb_net.log` 再 `cp` 到 job 目錄,**不再印在 master console log**。
|
||||
那個 `cp` 沒有檢查回傳值(`nfc_polling.log` 檔名打錯那次就是這樣安靜失敗的),
|
||||
失敗的話這份 log 就完全消失。要嘛在 `cp` 之後補一次 `ls` 驗證,要嘛保留一份
|
||||
`cat` 到 console。
|
||||
- **`READ_VIN` / `READ_IIN` 不在 ADPM12200 手冊的 Table 3 裡**:`pwr_brick.sh` 讓它們沿用
|
||||
Voltage / Current 那兩組係數。50 V 輸入算得出來、數量級也對,但**手冊沒有明說**。要定案
|
||||
得找 ADI 確認,或找一個能獨立比對輸入電壓的量測點(`READ_VOUT` 就是靠 `show platform
|
||||
voltage` 的 `PDB_IBC_*` 對上的)。
|
||||
- **VI2C 沒有硬體號誌**(`vi2c_muxsel` 的 help 自己寫了「VI2C has no SEM_REG」),而平台的
|
||||
sensor 驅動會週期性讀同一批 PDB 裝置。`pwr_brick.sh` 用「重讀到合理為止」繞過去,但根本
|
||||
問題沒解:`_vrd` 裡的 `_vwait` 逾時後仍然回傳半成品,呼叫端也沒檢查它的回傳值。修
|
||||
`blanton_icb_vi2c.sh` 會影響所有走 VI2C 的工具(ICB 溫感、風扇、EEPROM),值得先確認
|
||||
是不是跟 pmon 競爭再動。
|
||||
- **`blanton_multiphase_margin.sh` 與 `margin.sh` 沒有互斥機制**:兩支從不同側(原生 i2c vs
|
||||
LTC2980 PMBus)摸同一批軌,各自都假設自己是唯一的寫入者。目前只靠文件與 help 提醒,
|
||||
沒有任何執行期檢查。
|
||||
|
||||
@@ -9,7 +9,7 @@ DUT 端的取數能力由一組 **bash 工具庫** 提供(CB FPGA `pcimem` →
|
||||
|
||||
完整架構見 [ARCHITECTURE.md](ARCHITECTURE.md)。
|
||||
|
||||
**目前狀態(2026-09-01)**:Script A 為 **V1.1.5**(A 集中記錄所有 TTL 的變更)。涵蓋
|
||||
**目前狀態(2026-09-04)**:Script A 為 **V1.1.7**(A 集中記錄所有 TTL 的變更)。涵蓋
|
||||
PCIe AER / DDR EDAC / PMON+TPM / 電壓 margin(9 顆 LTC2980)/ SWB loopback 線速流量 /
|
||||
10G+1G 管理網路 ping / BMC DDR 與 USB / NVMe 健康,壓力層走平台的 `bgctl`。
|
||||
switch unit 數量由 `config.ttl` 的 `SWB_UNIT0` / `SWB_UNIT1` 宣告,風扇轉速由 `FAN_SPEED` 指定
|
||||
@@ -25,8 +25,11 @@ Script A 開頭會先收掉前一輪殘留(`hw-test-session finish` + `bgctl r
|
||||
NFC tag 讀取由 `nfc_polling.sh` 背景輪詢(A 做基線、B 起、C 停並 report)。
|
||||
另有 **`4_Blanton_Script_thermal_safety.ttl`**(熱 / 安規,**獨立跑不接 A→B→C**,滿載後每分鐘
|
||||
取 PMON + 兩片 SWB 的軌功耗;**沒有收尾段**,中斷後要手動 `blanton_tr518.sh stop`)。
|
||||
以及 **`5_Blanton_Script_Reboot_Cycle.ttl`**(重開機循環,**獨立跑不接 A→B→C**:登入 → 風扇 →
|
||||
Check Pt1~Pt13 → `reboot` → `wait "Booting in blind mode"`,`cnt_cycle` 每輪遞增,`while 1` 無止境,
|
||||
要停就關 Tera Term 的 macro)。**尚未上機驗證**。
|
||||
流程圖:`docs/Blanton_Test_Flow.drawio`。
|
||||
最後一次發布是 **V1.1.4**;SWB 的 I2C 通道與位址已於 2026-08-19 上機驗證。
|
||||
最後一次發布是 **V1.1.5**;SWB 的 I2C 通道與位址已於 2026-08-19 上機驗證。
|
||||
margin 的 `VNOM` 已於 2026-08-30 改為 Blanton 實測中位數(144 條軌中 86 條上調 0.8~2.5%)。
|
||||
交付用 `./publish/publish.sh` 打包。
|
||||
|
||||
@@ -117,6 +120,13 @@ bash ~/Blanton_Script/port_prbs_monitor.sh report # PASS/FAIL 統計(沒
|
||||
bash ~/Blanton_Script/port_prbs_monitor.sh stop # 收尾會跑 prbsstat STOp + prbs clear
|
||||
# ⚠️ PRBS 打起來時 link 會顯示 down,這是正常的 —— 所以 start 刻意不印 port status
|
||||
|
||||
# ── PDB / CPB power brick 讀值 ──────────────────────
|
||||
./Blanton_Script/pwr_brick.sh show # Vin/Iin/Vout/Iout/Temp × 5 顆
|
||||
./Blanton_Script/pwr_brick.sh show -r # 多印 raw word
|
||||
# 四顆 ADPM12200 每個量各一個 PMBus PAGE:Vin 9 / Iin 10 / Vout 2 / Iout 14 / Temp 18
|
||||
# CPB.PU37 (0x26) 是不同零件:不寫 PAGE,自己一套換算
|
||||
# PB_TRIES=1 ... show -r 可看未經重試的原始行為
|
||||
|
||||
# ── 多相 VRM margin(原生 i2c,38 條軌)──────────────
|
||||
./Blanton_Script/blanton_multiphase_margin.sh high3 # 全部 +3%
|
||||
./Blanton_Script/blanton_multiphase_margin.sh low3 # 全部 -3%
|
||||
@@ -232,8 +242,20 @@ Tera Term 連 COM port (115200-8-N-1)
|
||||
- ⚠️ **ICB/PDB 一律走 VI2C(`blanton_icb_vi2c.sh`),不要走 VSPI**:VSPI ~18 ms/reg 會讓 I2C
|
||||
byte 相間隔拉到 ~50 ms,踩中 SMBus 25–35 ms timeout,裝置直接 NACK。實測全掃 9.4 s vs 34.0 s。
|
||||
- ⚠️ **I2C 讀一律 Repeated START**(不是 STOP + START),否則 PMBus/SMBus 裝置(VRM、EFUSE)不理。
|
||||
- ⚠️ **`--runtime 86400` 是 24 小時上限**:超過一天的 soak,SSD / USB 壓力會安靜結束,
|
||||
剩下的時間那兩項閒置。`bgctl list` 的數量變少是唯一的線索,**不會報警**
|
||||
- ⚠️ **Script C 的 BMC USB service log 不進 master log**:改成
|
||||
`journalctl ... > log/bmc_usb_net.log` 再複製到隨身碟,**那是唯一一份**。
|
||||
收工後翻不到就先確認 job 目錄裡有沒有這個檔
|
||||
- ⚠️ **VI2C 這條路的壞法是「只壞高位元組」**,不是整包壞掉。`11.98 V` 會變成 `32.00 V`
|
||||
—— 正的、數量級也不誇張,**擋全一/全零的過濾完全攔不到**。寫任何 VI2C 讀值工具都要有
|
||||
合理範圍檢查 + 重讀,光靠 `PDB_REJECT_FFFF` 那種是不夠的(`pwr_brick.sh` 的教訓)
|
||||
- ⚠️ **PMBus 的 PAGE 不是只有 VRM 通道在用**:ADPM12200 把每個量測放在不同 PAGE
|
||||
(Vin 9 / Iin 10 / Vout 2 / Iout 14 / Temp 18),沒寫 PAGE 就讀,回的是 `0xFFFF` 或
|
||||
`0x0000`。`blanton_pwr_data.sh` 的 PDB 表 page 是 `-`,這就是它整張表 NA 的原因
|
||||
- ⚠️ **`--runtime` 是整個 job 的總時限,不是每個 pass 的**:V1.1.7 起由 `config.ttl` 的
|
||||
`SSD_RUNTIME`/`SSD_COUNT`、`USB_RUNTIME`/`USB_COUNT` 指定(COUNT 就是 `--passes`)。
|
||||
`qfx5252-stress-*` 跑滿 RUNTIME 秒就停,**`--passes` 不會把它延長** —— `RUNTIME=600` 就是
|
||||
10 分鐘,不是 600×COUNT。要 24 小時就填 `86400`。壓力提早結束時 `bgctl list` 數量變少是
|
||||
唯一線索,**不會報警**
|
||||
- ⚠️ **多相 VRM 與 LTC2980 是同一批軌的兩條路**:`blanton_multiphase_margin.sh`(原生 i2c)
|
||||
和 `margin.sh`(LTC2980 PMBus)都假設自己是唯一寫入者,**沒有互斥檢查**,只靠人記得
|
||||
- ⚠️ **traffic 的計數器基準在 v0.7.0 變了**:`tx 100 length=512` → `tx 200 length=324`,
|
||||
@@ -280,7 +302,12 @@ Tera Term 連 COM port (115200-8-N-1)
|
||||
(`--renormalize` 只在進 index 的路上轉換)。驗證要看 byte:`grep -rlU $'\r' <dir>`
|
||||
- ⚠️ **TTL 的 `timeout` 是全域的**:`timeout = N` 之後**每一個** `wait` 都被限制在 N 秒。逾時的 `wait`
|
||||
直接返回而沒吃到 prompt,下一個指令就在前一個還沒跑完時送出,之後整輪錯開一拍。**設了一定要
|
||||
配一個 `timeout = 0` 還原**(`wait_init.ttl` 60→0;Script B 的 cdc_ncm 探測 15→0 在 `:skip_ping`)
|
||||
配一個 `timeout = 0` 還原**(`wait_init.ttl` 60→0;Script B 的 cdc_ncm 探測 15→0 兩處各還原一次
|
||||
—— `endif` 之後走成功路徑、`:skip_ping` 走跳過路徑;Script 5 同一段**直接還原在 `if` 之前**,
|
||||
一行涵蓋兩條路徑,因為它的 ping 區塊要 `wait` 一個 `sleep 10`,DUT 一忙就逼近 15 s 上限)
|
||||
- ⚠️ **`goto` 的標籤沒定義,Tera Term 是執行到才報錯**:Script 5 從 Script B 抄 cdc_ncm 探測時
|
||||
只帶走 `goto skip_ping` 沒帶 `:skip_ping`,平常測不出來 —— 只有真的抓不到 NCM 介面走進那條分支
|
||||
才會跳錯誤視窗停住整個循環(已補)。抄段落過去時**連標籤一起抄**
|
||||
- ⚠️ **兩張管理網卡同網段會 ARP flux**:`mgmt_ping_monitor.sh` 讓 eth0/eth1 同時 up,同一個 /24 下
|
||||
對端 ARP 可能由任一張卡回應,回包落在沒送封包的那張。`ARP_STRICT=1` 擋掉;判讀時看 `RESULT` 行的
|
||||
`nic_tx`/`nic_rx`(該卡自己的 packet delta)—— **ping 成功但 `nic_tx` 接近 0 = 封包從另一張卡出去的**
|
||||
@@ -323,7 +350,10 @@ Tera Term 連 COM port (115200-8-N-1)
|
||||
- `tools/` — Host / 離線端:`bcm_mibpair_report_V1.1.0.py`(drivshell log → per-pair 報表)、
|
||||
`traffic_loopback_*.txt`(bcmcmd 原始指令表,`blanton_traffic_linespeed.sh` 是其 bash 版,
|
||||
**改 loopback 線路時兩邊要同步**)、`100G_PRBS.txt` / `TR518.txt` / `fan_ctrl.txt`
|
||||
(上機手貼用的原始指令;PRBS 已有 `.sh`,TR518 尚未腳本化)
|
||||
(上機手貼用的原始指令;PRBS / TR518 / 100G traffic / multiphase normal 都已有對應 `.sh`)
|
||||
- `publish/` — `publish.sh`(打包工具,**進 git**)+ `Script_ABC_Blanton_<Ver>/` 產出(**gitignored**)
|
||||
- `tmp/` — 🚫 gitignored:**還沒上機驗證**的腳本暫存區(目前 `blanton_reboottest.sh`)。
|
||||
上機測過才搬進 `src/Script_ABC_Blanton/Blanton_Script/` 並進 git —— 未驗證的東西不該混在
|
||||
交付包裡,publish 時測試員分不出哪支能信
|
||||
- `secret/` — 🚫 gitignored(除 `README.md` 與 `*.example`):DUT 帳密、per-unit BDF 覆寫、COM 設定
|
||||
- `For_AI/` — 🚫 gitignored:AI 協作素材(波形截圖、草稿筆記)
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,74 @@
|
||||
# v1.1.6 — The PDB bricks were never being asked the right question
|
||||
|
||||
## 🐛 Bug fixes
|
||||
|
||||
**Every PDB reading was `NA`, and the cause was a page number written in the wrong base**
|
||||
* The four ADPM12200 bricks put each measurement on its own PMBus PAGE, and the page has to be written before every read. The bring-up spreadsheet listed those page numbers in decimal but with an `0x` prefix, so four of the five selected the wrong page:
|
||||
|
||||
| Reading | Datasheet PAGE | Should send | Spreadsheet said |
|
||||
|---|---|---|---|
|
||||
| Vin | 9 | `0x09` | `0x00` |
|
||||
| Iin | 10 | `0x0A` | `0x10` |
|
||||
| Vout | 2 | `0x02` | `0x02` ✅ |
|
||||
| Iout | 14 | `0x0E` | `0x14` |
|
||||
| Temp | 18 | `0x12` | `0x18` |
|
||||
|
||||
* Only Vout worked — because 2 reads the same in either base. That is why Iin and Iout answered `0xFFFF` and the temperature answered `0x0000`, and why a Vin scaling had to be invented to make 50 V appear.
|
||||
* `blanton_pwr_data.sh` sends no page at all (its PDB table has `page "-"`), which is the reason it reports the whole PDB section as `NA`.
|
||||
|
||||
## ✨ New features
|
||||
|
||||
**`pwr_brick.sh` — the five power bricks, read properly**
|
||||
* `show` prints Vin / Iin / Vout / Iout / Temp for all five: `SWB0.PU207` (0x62), `SWB0.PU13` (0x63), `SWB1.PU332` (0x60), `SWB1.PU85` (0x61) and `CPB.PU37` (0x26). `-r` adds the raw words.
|
||||
* Conversions come from the datasheet's DIRECT equation, `X = (1/m)(Y × 10⁻ᴿ − b)`, with Table 3's coefficients: voltage `Y × 8 mV`, current `Y × 0.04 A`, temperature `Y × 0.01 °C`.
|
||||
* **Cross-checked, not assumed**: `READ_VOUT` returns `0x05D4` → 1492 × 8 = 11936 mV, which is exactly the figure `show platform voltage` reports for that rail from a completely separate sensor path.
|
||||
* `CPB.PU37` is a different part — no page writes and its own scaling — and is handled separately.
|
||||
* The datasheet is now in the repo (`docs/ADPM12200CMLZxx_DS_*.pdf`) so the pages and coefficients can be checked without hunting for it.
|
||||
|
||||
**Every value is validated before it is printed**
|
||||
* This bus corrupts the **high byte only**. That turns `11.98 V` into `32.00 V` — positive, plausible in magnitude, and invisible to any "reject 0xFFFF" filter. Each value is re-read (up to `PB_TRIES`, default 8) until it is not `0xFFFF`, not `0x0000`, and lands inside a plausibility window.
|
||||
* `0x0000` is rejected as a raw word for the same reason: on the temperature register it decodes to a perfectly believable 0 °C.
|
||||
|
||||
**Complementary margin profiles per board**
|
||||
* `comboA` / `comboB` for CB and each SWB CONN. `comboB` is `comboA` with every direction flipped, so running both covers each rail high and low while its neighbours sit the other way.
|
||||
* NC channels stay at `nominal` in both — there is nothing to margin on an unused rail (CONN14 CH10/11/13, CONN15 CH10).
|
||||
|
||||
**The BMC USB service log is captured again — to a file**
|
||||
* Script C's `journalctl` dump had been commented out, so that service log reached nothing at all. It now runs with `-o short-iso` into `log/bmc_usb_net.log` and is copied into the job directory for the USB archive. The ISO timestamps line up with the other monitor logs, and `rm -f` first keeps the file to one run.
|
||||
* **It is no longer printed to the console**, so the USB copy is the only copy. If that `cp` fails — and nothing checks it — the service log is gone. Check the job directory before packing up.
|
||||
|
||||
## 📦 Downloads
|
||||
|
||||
| File | Contents |
|
||||
|---|---|
|
||||
| `Script_ABC_Blanton_V1.1.6.zip` | The full Tera Term working directory, including `Blanton_Script/` to copy onto the DUT |
|
||||
|
||||
**After copying to the DUT:**
|
||||
|
||||
```bash
|
||||
chmod +x ~/Blanton_Script/*.sh # see below
|
||||
grep -rlU $'\r' ~/Blanton_Script # expect no output
|
||||
```
|
||||
|
||||
`blanton_ber.sh`, `nfc_polling.sh`, `blanton_tr518.sh`, `blanton_multiphase_margin.sh`, `pwr_brick.sh` and the two `TH6_SWB*_power_readback.sh` are invoked through `./` or `~/`, so they need the execute bit along with `bmc_monitor.sh` and `usb_target.sh` — neither git nor a Windows/USB copy carries it reliably.
|
||||
|
||||
## ⚠️ Before you run
|
||||
|
||||
* **`READ_VIN` and `READ_IIN` are not in the datasheet's coefficient table.** They are decoded here with the voltage and current coefficients — consistent with a ~50 V input, but not stated by the datasheet. Anything quoting brick Vin should have that confirmed first. `PB_VIN_M` / `PB_IIN_M` are where to change it.
|
||||
* **The BMC USB service log only exists on the USB stick.** It is not in the master console log any more.
|
||||
* **`NA` has two meanings**: nothing readable, or read but outside its plausibility window. Use `PB_TRIES=1 ./Blanton_Script/pwr_brick.sh show -r` to see the unretried raw words and tell them apart.
|
||||
* **Margin profiles are positional.** `comboA_SWB_CONN13` applied to a CONN16 board margins the wrong rails and nothing detects it.
|
||||
* **`blanton_multiphase_margin.sh save` is permanent**, and it must not be mixed with `margin.sh` — same rails, two access paths, no interlock.
|
||||
* **A soak longer than 24 hours needs the stress runtimes raised** — `--runtime 86400` is a ceiling.
|
||||
* **Script 4 (thermal/safety) has no teardown** — finish with `blanton_tr518.sh stop` and `kill $(jobs -p)`.
|
||||
* **These three cannot share the switch**: `blanton_ber.sh`, `blanton_tr518.sh`, `blanton_traffic_linespeed`.
|
||||
* **`FAN_SPEED` is 100.**
|
||||
* **The three items listed as unverified in v1.1.0 are still unverified**: the `ce0` ingress mirror, the 120s settle in `blanton_tr518.sh`, and `test mode nr=no` on stop.
|
||||
|
||||
## 🔗 Links
|
||||
|
||||
* [ARCHITECTURE.md](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/src/branch/main/ARCHITECTURE.md) — test flow, data models, constraints
|
||||
* [CLAUDE.md](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/src/branch/main/CLAUDE.md) — commands and the bench gotchas
|
||||
* [Blanton_Test_Flow.drawio](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/src/branch/main/docs/Blanton_Test_Flow.drawio) — the four scripts side by side
|
||||
|
||||
**Full changelog:** [V1.1.5...V1.1.6](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/compare/V1.1.5...V1.1.6)
|
||||
@@ -0,0 +1,73 @@
|
||||
# v1.1.7 — A way back from a margin, and a reboot cycle that runs itself
|
||||
|
||||
## ✨ New features
|
||||
|
||||
**`blanton_multiphase_margin.sh normal` — put the rails back without a power cycle**
|
||||
* `normal` returns all 38 multiphase rails to their nominal set point, with the same per-rail reporting as the margin profiles (`SWB0_0V9_ANLG0 - 0.930V Configure Done`). `-u 0|1|all` as usual.
|
||||
* Until now the only way out of a margin was to power-cycle the DUT. That mattered more than it sounds: `save` run while the board was still margined would have written the offsets into NVM, where a power cycle does not help either.
|
||||
* The commands it sends are in `tools/Multiphase_Normal.txt` for anyone driving the bench by hand.
|
||||
|
||||
> ⚠️ `TH6_CORE` is 0.8 V nominal but settles near **0.8591 V** once the load line is active. Reading back 0.859 after `normal` is the load line doing its job, not a failed write.
|
||||
|
||||
**`5_Blanton_Script_Reboot_Cycle.ttl` — an unattended reboot-cycle run**
|
||||
* A standalone macro, like Script 4: it does **not** chain to A → B → C and does not use `hw-test-session`. Every cycle is a fresh boot, so there is nothing to carry over and nothing to tear down.
|
||||
* Each round: login → `sudo -i` → `date -s` → fan speed → `wait_init` → **Check Pt1 … Pt13** → `show uptime` → `reboot` → wait for the next boot. The cycle number is printed in the banner of every round.
|
||||
|
||||
| | | | |
|
||||
|---|---|---|---|
|
||||
| **Pt1** DUT info | **Pt2** BMC info + tools | **Pt3** mgmt ping | **Pt4** NFC poll |
|
||||
| **Pt5** SSD stress | **Pt6** USB stress | **Pt7** BMC USB net | **Pt8** port status + 15 s traffic |
|
||||
| **Pt9** BER sweep | **Pt10** NVMe errors | **Pt11** platform data | **Pt12** dmesg i2c |
|
||||
| **Pt13** PCIe error counters | | | |
|
||||
|
||||
* The USB step takes its device node from `usb_target.sh`, not a hard-coded `/dev/sda1`.
|
||||
|
||||
**The SSD and USB stress durations are declared in `config.ttl`**
|
||||
* `SSD_RUNTIME` / `SSD_COUNT` and `USB_RUNTIME` / `USB_COUNT` replace the values that were hard-coded in Script B, so a site changes them in one place. `COUNT` is passed straight through as `--passes`.
|
||||
|
||||
## 🐛 Bug fixes
|
||||
|
||||
**Script B left the global `timeout` at 15 s for the rest of the cdc_ncm section**
|
||||
* The NCM probe sets `timeout = 15` and restored it only at `:skip_ping` — which the *success* path reaches several `wait`s later. Until then every `wait` gave up after 15 s instead of blocking, and a `wait` that returns without eating the prompt puts the whole macro a beat ahead of the DUT. It is now restored on the success path too.
|
||||
|
||||
**`goto skip_ping` in the reboot-cycle macro had no label to jump to**
|
||||
* The probe was copied out of Script B without its `:skip_ping` label. Tera Term does not check labels when it loads a macro — it raises the error only when it actually jumps, which here means only when the NCM interface is missing. The failure mode was an error dialog stopping the whole cycle, on the one run where something was already wrong. The label is there now, and the `timeout` is restored **before** the branch so one line covers both paths.
|
||||
|
||||
**Two check points both numbered 12**
|
||||
* `Dmesg_i2c` and `PCIE Error Counters` both announced themselves as `Check Pt12`. The second is now `Pt13`; Pt1 … Pt13 are unique.
|
||||
|
||||
## 📦 Downloads
|
||||
|
||||
| File | Contents |
|
||||
|---|---|
|
||||
| `Script_ABC_Blanton_V1.1.7.zip` | The full Tera Term working directory, including `Blanton_Script/` to copy onto the DUT |
|
||||
|
||||
**After copying to the DUT:**
|
||||
|
||||
```bash
|
||||
chmod +x ~/Blanton_Script/*.sh # see below
|
||||
grep -rlU $'\r' ~/Blanton_Script # expect no output
|
||||
```
|
||||
|
||||
`blanton_ber.sh`, `nfc_polling.sh`, `blanton_tr518.sh`, `blanton_multiphase_margin.sh`, `pwr_brick.sh` and the two `TH6_SWB*_power_readback.sh` are invoked through `./` or `~/`, so they need the execute bit along with `bmc_monitor.sh` and `usb_target.sh` — neither git nor a Windows/USB copy carries it reliably.
|
||||
|
||||
## ⚠️ Before you run
|
||||
|
||||
* **`--runtime` is the job's overall limit, not a per-pass one.** `qfx5252-stress-*` stops after `RUNTIME` seconds whatever `--passes` says, so `SSD_RUNTIME=600` is a **10 minute** stress, not 600 × `SSD_COUNT`. For a 24 hour soak set `RUNTIME` to `86400`. The shipped defaults are 600.
|
||||
* **Script 5 has not been run on hardware yet.** Two things to confirm on the bench: that `wait "Booting in blind mode"` really appears in this build's boot output — it has no `timeout` guard, so a changed string waits forever — and that re-running `bmc-first-enroll` every cycle is safe.
|
||||
* **Script 5 has no exit condition.** `while 1` with a `reboot` at the end of each round; stop it by closing the Tera Term macro.
|
||||
* **`blanton_multiphase_margin.sh save` is permanent**, and must not be mixed with `margin.sh` — same rails, two access paths, no interlock. Never run it while the board is margined.
|
||||
* **`READ_VIN` and `READ_IIN` are still not in the ADPM12200 coefficient table** — `pwr_brick.sh` decodes them with the voltage and current coefficients. Confirm before quoting brick Vin.
|
||||
* **The BMC USB service log only exists on the USB stick.**
|
||||
* **Script 4 (thermal/safety) has no teardown** — finish with `blanton_tr518.sh stop` and `kill $(jobs -p)`.
|
||||
* **These three cannot share the switch**: `blanton_ber.sh`, `blanton_tr518.sh`, `blanton_traffic_linespeed`.
|
||||
* **`FAN_SPEED` is 100.**
|
||||
* **Still unverified from v1.1.0**: the `ce0` ingress mirror, the 120 s settle in `blanton_tr518.sh`, and `test mode nr=no` on stop.
|
||||
|
||||
## 🔗 Links
|
||||
|
||||
* [ARCHITECTURE.md](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/src/branch/main/ARCHITECTURE.md) — test flow, data models, constraints
|
||||
* [CLAUDE.md](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/src/branch/main/CLAUDE.md) — commands and the bench gotchas
|
||||
* [Blanton_Test_Flow.drawio](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/src/branch/main/docs/Blanton_Test_Flow.drawio) — the scripts side by side
|
||||
|
||||
**Full changelog:** [V1.1.6...V1.1.7](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/compare/V1.1.6...V1.1.7)
|
||||
@@ -1,7 +1,7 @@
|
||||
; =============================================================================
|
||||
; Script A for Blanton
|
||||
; Version : V1.1.5
|
||||
; Date : 2026-09-01
|
||||
; Version : V1.1.7
|
||||
; Date : 2026-09-04
|
||||
; Author : ETWen
|
||||
; =============================================================================
|
||||
; Version History:
|
||||
@@ -233,6 +233,114 @@
|
||||
; counter totals are not comparable across this
|
||||
; build - the PASS/FAIL cross-check is unaffected
|
||||
; tools/Multiphase_*.txt Bench command references for the new script
|
||||
; V1.1.6 2026-09-02 Blanton_Script/pwr_brick.sh Add PDB / CPB power brick readings
|
||||
; 5 devices, Vin / Iin / Vout / Iout / Temp:
|
||||
; SWB0.PU207 0x62 SWB0.PU13 0x63
|
||||
; SWB1.PU332 0x60 SWB1.PU85 0x61
|
||||
; CPB.PU37 0x26
|
||||
; The four ADPM12200 put each measurement on its own
|
||||
; PMBus PAGE, so a PAGE write has to precede every
|
||||
; read - blanton_pwr_data.sh sends none, which is why
|
||||
; it reports the whole PDB table as NA
|
||||
; Vin PAGE 9 Iin PAGE 10 Vout PAGE 2
|
||||
; Iout PAGE 14 Temp PAGE 18
|
||||
; !! the bring-up spreadsheet wrote those page numbers
|
||||
; in decimal but with an 0x prefix (10 -> 0x10,
|
||||
; 14 -> 0x14, 18 -> 0x18). Only Vout worked,
|
||||
; because 2 reads the same either way
|
||||
; Conversions are the datasheet DIRECT equation
|
||||
; X = (1/m)(Y x 10^-R - b), Table 3: voltage Y x 8mV,
|
||||
; current Y x 0.04A, temperature Y x 0.01C
|
||||
; Checked: READ_VOUT 0x05D4 -> 11936 mV, the same
|
||||
; figure show platform reports for that rail
|
||||
; !! Table 3 does NOT list READ_VIN / READ_IIN; they
|
||||
; borrow the voltage / current coefficients here
|
||||
; Each value is re-read until it passes: not 0xFFFF,
|
||||
; not 0x0000, and inside a plausibility window. This
|
||||
; bus corrupts the HIGH BYTE only, which turns 11.98 V
|
||||
; into 32.00 V - a value no all-ones filter catches
|
||||
; docs/ADPM12200..._Datasheet_2025_12_19.pdf The brick datasheet the pages and coefficients above
|
||||
; came from
|
||||
; ScriptC Re-enable the BMC USB service log, and send it to
|
||||
; a file instead of the console
|
||||
; journalctl ... -o short-iso > log/bmc_usb_net.log
|
||||
; then cp it into the job dir for the USB archive
|
||||
; rm -f first, so the file is this run only
|
||||
; -o short-iso gives it timestamps that line up with
|
||||
; the other monitor logs
|
||||
; !! it no longer appears in the master console log,
|
||||
; so the USB copy is now the ONLY copy - if that
|
||||
; cp fails the service log is gone
|
||||
; LTC2980_Margin_Script/profiles/ Add comboA / comboB per board (CB + SWB CONN13..16)
|
||||
; Checkerboard pair: comboB is comboA with every
|
||||
; direction flipped, so running both covers each rail
|
||||
; high and low while its neighbours sit the other way
|
||||
; NC channels stay nominal in both (CONN14 CH10/11/13,
|
||||
; CONN15 CH10) - nothing to margin on an unused rail
|
||||
; V1.1.7 2026-09-04 Blanton_Script/blanton_multiphase_margin.sh v1.1.0 Add the 'normal' sub-command
|
||||
; Puts all 38 rails back to their nominal set point,
|
||||
; from tools/Multiphase_Normal.txt - same rails and the
|
||||
; same per-rail reporting as the margin profiles
|
||||
; Until now the only way back from a margin was a power
|
||||
; cycle, and 'save' run while margined would have
|
||||
; committed the offsets to NVM, where a power cycle does
|
||||
; not help either
|
||||
; !! TH6_CORE is 0.8 V nominal but settles near 0.8591 V
|
||||
; once the load line is active - reading back 0.859
|
||||
; after 'normal' is the load line, not a failed write
|
||||
; tools/Multiphase_Normal.txt Bench command reference for the above
|
||||
; 5_Blanton_Script_Reboot_Cycle.ttl Created Reboot-cycle run - a STANDALONE script, not
|
||||
; chained to A -> B -> C and not using hw-test-session:
|
||||
; every cycle is a fresh boot, so there is nothing to
|
||||
; carry over and nothing to tear down
|
||||
; while 1: login -> sudo -i -> date -s -> fans -> wait_init
|
||||
; -> Check Pt1..Pt13 -> show uptime -> reboot ->
|
||||
; wait 'Booting in blind mode'
|
||||
; cnt_cycle is printed in the banner of every round
|
||||
; Pt1 DUT info (boot/version/fwutil/syseeprom/ssdhealth/
|
||||
; TPM/NVMe) Pt2 BMC info + source the bash tools
|
||||
; Pt3 mgmt ping Pt4 NFC poll (20 s)
|
||||
; Pt5 SSD stress Pt6 USB stress (node from
|
||||
; usb_target.sh, not a fixed sda1)
|
||||
; Pt7 BMC USB net Pt8 100G port status + 15 s traffic
|
||||
; Pt9 BER sweep Pt10 NVMe error info
|
||||
; Pt11 platform data Pt12 dmesg i2c
|
||||
; Pt13 PCIe error counters + ras-mc-ctl
|
||||
; !! there is NO exit condition - the only way to stop it
|
||||
; is to close the Tera Term macro
|
||||
; !! NOT verified on hardware yet
|
||||
; The cdc_ncm probe sets timeout = 15 and restores it to 0
|
||||
; BEFORE the if, so both branches are covered in one line -
|
||||
; the ping block below it waits on a 'sleep 10', which is
|
||||
; already two thirds of the cap on a loaded DUT
|
||||
; The probe was copied from Script B without its :skip_ping
|
||||
; label, so 'goto skip_ping' had no target. Tera Term only
|
||||
; raises that when it actually jumps, i.e. only when the
|
||||
; NCM interface is missing - the label is now there
|
||||
; Renumbered the second 'Check Pt12' (PCIe error counters)
|
||||
; to Pt13; Pt1..Pt13 are now unique
|
||||
; ScriptB Restore timeout = 0 on the cdc_ncm success path too
|
||||
; It was only restored at :skip_ping, which the success
|
||||
; path reaches several waits later - until then every wait
|
||||
; was capped at 15 s instead of blocking
|
||||
; .gitignore Ignore tmp/ - scripts not yet verified on hardware
|
||||
; blanton_reboottest.sh (the bash port of the reboot cycle,
|
||||
; for running without Tera Term) lives there until it has
|
||||
; been run on a DUT. Unverified scripts must not reach the
|
||||
; publish bundle: the tester cannot tell which ones to
|
||||
; trust once they are side by side in Blanton_Script/
|
||||
; config.ttl Add SSD_RUNTIME / SSD_COUNT / USB_RUNTIME / USB_COUNT
|
||||
; The SSD and USB stress durations were hard-coded in
|
||||
; ScriptB (--runtime 86400 --passes 5 / 1); they are now
|
||||
; declared in one place per site
|
||||
; !! --runtime is the job's OVERALL limit, not per pass:
|
||||
; qfx5252-stress-* stops at RUNTIME seconds whatever
|
||||
; --passes says. RUNTIME 600 = a 10 minute stress,
|
||||
; not 600 x COUNT. For a 24 h soak set RUNTIME 86400
|
||||
; ScriptB Build the SSD / USB stress commands from those knobs
|
||||
; sprintf2 cmd_ssd ... SSD_RUNTIME SSD_COUNT, and the same
|
||||
; for USB; the old hard-coded lines are left commented out
|
||||
; next to them
|
||||
; =============================================================================
|
||||
include "config.ttl"
|
||||
|
||||
|
||||
@@ -40,8 +40,10 @@ wait prompt_sonic_root
|
||||
sendln "bgctl run /usr/sbin/memtester 1G" ; Continue Execture
|
||||
|
||||
; ========== SSD read/write ==========
|
||||
sprintf2 cmd_ssd "bgctl run qfx5252-stress-ssd 1G --runtime %d --passes %d --write --force --log /host/hw-eval/jobs/qfx5252-stress-ssd.log" SSD_RUNTIME SSD_COUNT
|
||||
wait prompt_sonic_root
|
||||
sendln "bgctl run qfx5252-stress-ssd 1G --runtime 86400 --passes 5 --write --force --log /host/hw-eval/jobs/qfx5252-stress-ssd.log"
|
||||
;sendln "bgctl run qfx5252-stress-ssd 1G --runtime 86400 --passes 5 --write --force --log /host/hw-eval/jobs/qfx5252-stress-ssd.log"
|
||||
sendln cmd_ssd
|
||||
|
||||
; ========== USB read/write ==========
|
||||
; ---- Get USB partition node -> usb_dev ----
|
||||
@@ -52,7 +54,8 @@ waitregex '<<DEV=([^>]*)>>'
|
||||
usb_dev = groupmatchstr1
|
||||
|
||||
wait prompt_sonic_root
|
||||
sprintf2 cmd "bgctl run qfx5252-stress-usb %s 256M --runtime 86400 --passes 1 --write --log /host/hw-eval/jobs/qfx5252-stress-usb.log" usb_dev
|
||||
;sprintf2 cmd "bgctl run qfx5252-stress-usb %s 256M --runtime 86400 --passes 1 --write --log /host/hw-eval/jobs/qfx5252-stress-usb.log" usb_dev
|
||||
sprintf2 cmd "bgctl run qfx5252-stress-usb %s 256M --runtime %d --passes %d --write --log /host/hw-eval/jobs/qfx5252-stress-usb.log" usb_dev USB_RUNTIME USB_COUNT
|
||||
sendln cmd
|
||||
|
||||
;wait prompt_sonic_root
|
||||
@@ -73,6 +76,7 @@ if result = 0 then
|
||||
messagebox 'cdc_ncm interface not found. Ping test skipped.' 'ERROR'
|
||||
goto skip_ping
|
||||
endif
|
||||
timeout = 0
|
||||
strlen matchstr
|
||||
cut_len = result - 6 ; 'NCMIF=' = 6 chars
|
||||
strcopy matchstr 7 cut_len ncm_if ; -> ncm_if = "eth2" / "eth3"
|
||||
|
||||
@@ -78,8 +78,10 @@ wait prompt_sonic_root
|
||||
sendln "cat ./Blanton_Script/log/bmc_poll.log"
|
||||
|
||||
; ========== BMC USB Test result ==========
|
||||
;wait prompt_sonic_root
|
||||
;sendln "journalctl -u qfx5252-bmc-usb-net-test.service --no-pager"
|
||||
wait prompt_sonic_root
|
||||
sendln "rm -f ~/Blanton_Script/log/bmc_usb_net.log"
|
||||
wait prompt_sonic_root
|
||||
sendln "journalctl -u qfx5252-bmc-usb-net-test.service --no-pager -o short-iso > ~/Blanton_Script/log/bmc_usb_net.log"
|
||||
|
||||
|
||||
; ========== CHECK Stress results ==========
|
||||
@@ -209,12 +211,16 @@ sendln cmd
|
||||
|
||||
; ========== Copy Stress Log to USB ==========
|
||||
wait prompt_sonic_root
|
||||
sendln "cp ./Blanton_Script/log/bmc_usb_net.log /host/hw-eval/jobs/"
|
||||
wait prompt_sonic_root
|
||||
sendln "cp ./Blanton_Script/log/bmc_poll.log /host/hw-eval/jobs/"
|
||||
wait prompt_sonic_root
|
||||
sendln "cp ./Blanton_Script/log/mgmt_ping.log /host/hw-eval/jobs/"
|
||||
wait prompt_sonic_root
|
||||
sendln "cp ./Blanton_Script/log/nfc_poll.log /host/hw-eval/jobs/"
|
||||
|
||||
|
||||
|
||||
wait prompt_sonic_root
|
||||
getdate ts_date "%Y%m%d"
|
||||
gettime ts_time "%H%M"
|
||||
|
||||
@@ -0,0 +1,419 @@
|
||||
include "config.ttl"
|
||||
|
||||
flushrecv
|
||||
;================================================================
|
||||
; Log File Creation
|
||||
;================================================================
|
||||
gettime str_starttime "%Y%m%d-%H%M%S"
|
||||
getdir mdir
|
||||
|
||||
if EN_log = 1 then
|
||||
sprintf2 filename '%s\Logs\%s_%s_%s.log' mdir project_name "Reboot_Cycle" str_starttime
|
||||
logopen filename 0 1 1 1
|
||||
endif
|
||||
|
||||
cnt_cycle = 0
|
||||
|
||||
while 1
|
||||
cnt_cycle = cnt_cycle + 1
|
||||
; ========== Root Login ==========
|
||||
wait prompt_login
|
||||
sendln "admin"
|
||||
wait "Password:"
|
||||
sendln "YourPaSsWoRd"
|
||||
wait prompt_sonic
|
||||
sendln "sudo -i"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 10"
|
||||
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strTitle "echo -e '\033[1;32mReboot Cycle : %d \033[0m'" cnt_cycle
|
||||
sendln strTitle
|
||||
|
||||
; ========== Pre Setting ==========
|
||||
; Make log directory
|
||||
wait prompt_sonic_root
|
||||
sendln "mkdir ./logs"
|
||||
|
||||
; Setting System Time
|
||||
getdate datestr
|
||||
gettime timestr
|
||||
sprintf2 cmd 'sudo date -s "%s %s"' datestr timestr
|
||||
sendln cmd
|
||||
|
||||
; ========== FAN SPEED ==========
|
||||
wait prompt_sonic_root
|
||||
sendln "echo 18-0020 > /sys/bus/i2c/drivers/max31790/unbind"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep .5"
|
||||
wait prompt_sonic_root
|
||||
sendln "echo 18-0020 > /sys/bus/i2c/drivers/max31790/bind"
|
||||
wait prompt_sonic_root
|
||||
sendln "echo 25-0020 > /sys/bus/i2c/drivers/max31790/unbind"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep .5"
|
||||
wait prompt_sonic_root
|
||||
sendln "echo 25-0020 > /sys/bus/i2c/drivers/max31790/bind"
|
||||
|
||||
wait prompt_sonic_root
|
||||
sprintf2 fan_ctrl_cmd 'fan-speed-control.sh %d' FAN_SPEED
|
||||
sendln fan_ctrl_cmd
|
||||
|
||||
wait "Set all configured fan channels to"
|
||||
sendln "y"
|
||||
|
||||
; ========== Wait DUT Init ==========
|
||||
include "utils/wait_init.ttl"
|
||||
|
||||
; ========== DUT Info ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt1 "echo -e '\033[36mCheck Pt1 : DUT Info\033[0m'"
|
||||
sendln strCKPt1
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "show boot"
|
||||
wait prompt_sonic_root
|
||||
sendln "show version"
|
||||
wait prompt_sonic_root
|
||||
sendln "fwutil show status"
|
||||
wait prompt_sonic_root
|
||||
sendln "show system-memory"
|
||||
wait prompt_sonic_root
|
||||
sendln "show service"
|
||||
wait prompt_sonic_root
|
||||
sendln "show platform syseeprom"
|
||||
wait prompt_sonic_root
|
||||
sendln "show platform ssdhealth"
|
||||
wait prompt_sonic_root
|
||||
sendln "qfx5252-tpm-version"
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/nvme smart-log -H /dev/nvme0"
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/smartctl -x /dev/nvme0"
|
||||
|
||||
; ========== BMC version ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt2 "echo -e '\033[36mCheck Pt2 : BMC Info\033[0m'"
|
||||
sendln strCKPt2
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "bmc-first-enroll"
|
||||
wait prompt_sonic_root
|
||||
sendln "bmc-manager version"
|
||||
wait prompt_sonic_root
|
||||
sendln "bmc-manager status"
|
||||
|
||||
; ========== Load Shell Script ==========
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/blanton_fpga_pcimem.sh"
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/blanton_cb_i2c.sh"
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/blanton_icb_vi2c.sh"
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/blanton_pwr_data.sh"
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/blanton_traffic_linespeed.sh"
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/LTC2980_Margin_Script/margin.sh"
|
||||
|
||||
; ========== CLEAR PCIE Error ==========
|
||||
include "utils/show_pcie_error_reg_TH6_SWB0.ttl"
|
||||
include "utils/show_pcie_error_reg_TH6_SWB1.ttl"
|
||||
include "utils/show_pcie_error_reg_FPGA.ttl"
|
||||
include "utils/show_pcie_error_reg_BMC.ttl"
|
||||
include "utils/show_pcie_error_reg_DDR.ttl"
|
||||
include "utils/show_pcie_error_reg_I210.ttl"
|
||||
include "utils/show_pcie_error_reg_SSD.ttl"
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/ras-mc-ctl --summary"
|
||||
|
||||
; ========== Check PCIE tree + PCIE link status + GET PCIE bandwidth Test ==========
|
||||
include "utils/pcie_bus.ttl"
|
||||
|
||||
; ========== TAKE DATA ==========
|
||||
include "utils/setup_pmon.ttl"
|
||||
include "utils/show_dmesg.ttl"
|
||||
|
||||
; ========== 10G/1G MGMT Ping Test ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt3 "echo -e '\033[36mCheck Pt3 : Mgmt Ping Test\033[0m'"
|
||||
sendln strCKPt3
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/mgmt_ping_monitor.sh start"
|
||||
wait prompt_sonic_root
|
||||
pause 30
|
||||
sendln "~/Blanton_Script/mgmt_ping_monitor.sh stop"
|
||||
wait prompt_sonic_root
|
||||
sendln "cat ~/Blanton_Script/log/mgmt_ping.log"
|
||||
wait prompt_sonic_root
|
||||
sendln "~/Blanton_Script/mgmt_ping_monitor.sh clear"
|
||||
|
||||
; ========== NFC Test ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt4 "echo -e '\033[36mCheck Pt4 : NFC Test\033[0m'"
|
||||
sendln strCKPt4
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "~/Blanton_Script/nfc_polling.sh start"
|
||||
wait prompt_sonic_root
|
||||
sendln "~/Blanton_Script/nfc_polling.sh status"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 20"
|
||||
wait prompt_sonic_root
|
||||
sendln "~/Blanton_Script/nfc_polling.sh stop"
|
||||
wait prompt_sonic_root
|
||||
sendln "~/Blanton_Script/nfc_polling.sh report"
|
||||
|
||||
; ========== SSD read/write ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt5 "echo -e '\033[36mCheck Pt5 : SSD Test\033[0m'"
|
||||
sendln strCKPt5
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "qfx5252-stress-ssd 1G --runtime 30 --passes 2 --write --force --log /host/hw-eval/jobs/qfx5252-stress-ssd.log"
|
||||
wait prompt_sonic_root
|
||||
sendln "cat /host/hw-eval/jobs/qfx5252-stress-ssd.log"
|
||||
|
||||
; ========== USB read/write ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt6 "echo -e '\033[36mCheck Pt6 : USB Test\033[0m'"
|
||||
sendln strCKPt6
|
||||
|
||||
; ---- Get USB partition node -> usb_dev ----
|
||||
usb_dev = ''
|
||||
wait prompt_sonic_root
|
||||
sendln 'D=$(bash ~/Blanton_Script/usb_target.sh -o dev 2>/dev/null); echo "<<D""EV=${D:-NONE}>>"'
|
||||
waitregex '<<DEV=([^>]*)>>'
|
||||
usb_dev = groupmatchstr1
|
||||
|
||||
wait prompt_sonic_root
|
||||
sprintf2 cmd "qfx5252-stress-usb %s 256M --runtime 30 --passes 2 --write --log /host/hw-eval/jobs/qfx5252-stress-usb.log" usb_dev
|
||||
sendln cmd
|
||||
wait prompt_sonic_root
|
||||
sendln "cat /host/hw-eval/jobs/qfx5252-stress-usb.log"
|
||||
|
||||
; ========== BMC USB Test ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt7 "echo -e '\033[36mCheck Pt7 : BMC USB Test\033[0m'"
|
||||
sendln strCKPt7
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln 'echo "NCMIF=$(ls -d /sys/bus/usb/drivers/cdc_ncm/*/net/* 2>/dev/null | head -n 1 | xargs -r basename)"'
|
||||
; timeout is GLOBAL and sticky: left at 15, every 'wait' below gives up after
|
||||
; 15 s instead of blocking, the macro runs ahead of the DUT and the whole
|
||||
; cycle desynchronises. Restore it BEFORE the branch so both paths are
|
||||
; covered - the ping block below waits on 'sleep 10', which is already two
|
||||
; thirds of the 15 s cap on a loaded DUT.
|
||||
timeout = 15
|
||||
waitregex 'NCMIF=[A-Za-z0-9_-]+'
|
||||
ncm_found = result ; hold it: 'result' is reused below
|
||||
timeout = 0 ; restore, both paths
|
||||
if ncm_found = 0 then
|
||||
messagebox 'cdc_ncm interface not found. Ping test skipped.' 'ERROR'
|
||||
goto skip_ping
|
||||
endif
|
||||
strlen matchstr
|
||||
cut_len = result - 6 ; 'NCMIF=' = 6 chars
|
||||
strcopy matchstr 7 cut_len ncm_if ; -> ncm_if = "eth2" / "eth3"
|
||||
|
||||
sprintf2 cmd 'ip -br link show %s' ncm_if
|
||||
wait prompt_sonic_root
|
||||
sendln cmd
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln 'systemctl stop qfx5252-bmc-usb-net-test.service 2>/dev/null || true'
|
||||
wait prompt_sonic_root
|
||||
sendln 'systemctl reset-failed qfx5252-bmc-usb-net-test.service 2>/dev/null || true'
|
||||
sprintf2 cmd 'systemd-run --unit=qfx5252-bmc-usb-net-test --property=Type=exec /usr/bin/ping -I %s -i 1 -W 2 -w 14400 192.168.200.200' ncm_if
|
||||
wait prompt_sonic_root
|
||||
sendln cmd
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 10"
|
||||
wait prompt_sonic_root
|
||||
sendln "systemctl stop qfx5252-bmc-usb-net-test.service"
|
||||
wait prompt_sonic_root
|
||||
sendln "journalctl -u qfx5252-bmc-usb-net-test.service --no-pager"
|
||||
|
||||
:skip_ping
|
||||
timeout = 0 ; backstop, same as Script B
|
||||
|
||||
; ========== 100G Port Setting ==========
|
||||
wait prompt_sonic_root
|
||||
sendln "sudo sfputil lpmode off Ethernet513"
|
||||
wait prompt_sonic_root
|
||||
sendln "sudo sfputil lpmode off Ethernet514"
|
||||
wait prompt_sonic_root
|
||||
sendln "config interface -n asic0 startup Ethernet513"
|
||||
wait prompt_sonic_root
|
||||
sendln "config interface -n asic1 startup Ethernet514"
|
||||
wait prompt_sonic_root
|
||||
sendln "config save -y"
|
||||
|
||||
; ========== First Traffic Test ==========
|
||||
; Silent MAC
|
||||
wait prompt_sonic_root
|
||||
sendln "config feature state lldp disabled"
|
||||
wait prompt_sonic_root
|
||||
sendln "config save -y"
|
||||
|
||||
; ========== 100G Port Status ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt8 "echo -e '\033[36mCheck Pt8 : Port Status and 15sec Traffic \033[0m'"
|
||||
sendln strCKPt8
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "show interfaces status Ethernet513,Ethernet514"
|
||||
|
||||
; ========== Traffic Test ==========
|
||||
if SWB_UNIT0 = 1 && SWB_UNIT1 = 1 then
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed ps"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed init"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed clear"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed show"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed start"
|
||||
wait prompt_sonic_root
|
||||
pause 15
|
||||
sendln "blanton_traffic_linespeed stop"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed report"
|
||||
elseif SWB_UNIT0 = 1 && SWB_UNIT1 = 0 then
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed ps -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed init -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed clear -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed show -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed start -u 0"
|
||||
wait prompt_sonic_root
|
||||
pause 15
|
||||
sendln "blanton_traffic_linespeed stop -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed report -u 0"
|
||||
elseif SWB_UNIT0 = 0 && SWB_UNIT1 = 1 then
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed ps -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed init -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed clear -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed show -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed start -u 1"
|
||||
wait prompt_sonic_root
|
||||
pause 15
|
||||
sendln "blanton_traffic_linespeed stop -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed report -u 1"
|
||||
else
|
||||
|
||||
endif
|
||||
|
||||
; ========== BER ==========
|
||||
; PRBS takes the SerDes out of normal operation, so this runs AFTER the
|
||||
; traffic report. sleep 30 matches blanton_ber.sh BER_INTERVAL - reporting
|
||||
; earlier reads an interval that has not finished accumulating.
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt8 "echo -e '\033[36mCheck Pt9 : BER Test \033[0m'"
|
||||
sendln strCKPt8
|
||||
|
||||
if SWB_UNIT0 = 1 && SWB_UNIT1 = 1 then
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh init"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh start"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 30"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh report"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh stop"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh clear"
|
||||
elseif SWB_UNIT0 = 1 && SWB_UNIT1 = 0 then
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh init -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh start -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 30"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh report -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh stop -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh clear -u 0"
|
||||
elseif SWB_UNIT0 = 0 && SWB_UNIT1 = 1 then
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh init -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh start -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 30"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh report -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh stop -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh clear -u 1"
|
||||
else
|
||||
|
||||
endif
|
||||
|
||||
; ========== NVME Err Info ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt9 "echo -e '\033[36mCheck Pt10 : NVME Err Info \033[0m'"
|
||||
sendln strCKPt9
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/nvme smart-log -H /dev/nvme0"
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/smartctl -x /dev/nvme0"
|
||||
|
||||
; ========== TAKE DATA ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt10 "echo -e '\033[36mCheck Pt11 : Platform Data \033[0m'"
|
||||
sendln strCKPt10
|
||||
include "utils/setup_pmon.ttl"
|
||||
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt12 "echo -e '\033[36mCheck Pt12 : Dmesg_i2c \033[0m'"
|
||||
sendln strCKPt12
|
||||
include "utils/show_dmesg.ttl"
|
||||
|
||||
; ========== Check PCIE error counters ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt13 "echo -e '\033[36mCheck Pt13 : PCIE Error Counters \033[0m'"
|
||||
sendln strCKPt13
|
||||
include "utils/show_pcie_error_reg_TH6_SWB0.ttl"
|
||||
include "utils/show_pcie_error_reg_TH6_SWB1.ttl"
|
||||
include "utils/show_pcie_error_reg_FPGA.ttl"
|
||||
include "utils/show_pcie_error_reg_BMC.ttl"
|
||||
include "utils/show_pcie_error_reg_DDR.ttl"
|
||||
include "utils/show_pcie_error_reg_I210.ttl"
|
||||
include "utils/show_pcie_error_reg_SSD.ttl"
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/ras-mc-ctl --summary"
|
||||
|
||||
; ========== Show Power on uptime ==========
|
||||
wait prompt_sonic_root
|
||||
sendln "show uptime"
|
||||
|
||||
; ========== Show Power on uptime ==========
|
||||
wait prompt_sonic_root
|
||||
sendln "reboot"
|
||||
|
||||
wait "Booting in blind mode"
|
||||
endwhile
|
||||
@@ -0,0 +1,26 @@
|
||||
# Profile: comboA_CB - checkerboard, the complement of comboB_CB
|
||||
# Board: CB only. The channel list is positional, so applying this to a
|
||||
# different board margins the wrong rails and nothing detects it.
|
||||
# Run comboA then comboB to cover every rail in both directions while its
|
||||
# neighbours sit the other way.
|
||||
# Applied to whichever LTC2980 is currently loaded via margin_init
|
||||
# Format: "channel:operation:change_percent"
|
||||
|
||||
PROFILE_CHANNELS=(
|
||||
"0:low:5"
|
||||
"1:low:5"
|
||||
"2:high:5"
|
||||
"3:low:5"
|
||||
"4:high:5"
|
||||
"5:high:5"
|
||||
"6:high:5"
|
||||
"7:high:5"
|
||||
"8:low:5"
|
||||
"9:high:5"
|
||||
"10:high:5"
|
||||
"11:high:5"
|
||||
"12:low:5"
|
||||
"13:high:5"
|
||||
"14:high:5"
|
||||
"15:low:5"
|
||||
)
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# Profile: comboA_SWB_CONN13 - checkerboard, the complement of comboB_SWB_CONN13
|
||||
# Board: SWB_CONN13 only. The channel list is positional, so applying this to a
|
||||
# different board margins the wrong rails and nothing detects it.
|
||||
# Run comboA then comboB to cover every rail in both directions while its
|
||||
# neighbours sit the other way.
|
||||
# Applied to whichever LTC2980 is currently loaded via margin_init
|
||||
# Format: "channel:operation:change_percent"
|
||||
|
||||
PROFILE_CHANNELS=(
|
||||
"0:high:3"
|
||||
"1:high:3"
|
||||
"2:low:3"
|
||||
"3:low:3"
|
||||
"4:high:5"
|
||||
"5:low:5"
|
||||
"6:high:5"
|
||||
"7:high:5"
|
||||
"8:high:5"
|
||||
"9:high:3"
|
||||
"10:high:3"
|
||||
"11:low:3"
|
||||
"12:low:3"
|
||||
"13:high:3"
|
||||
"14:high:3"
|
||||
"15:low:5"
|
||||
)
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# Profile: comboA_SWB_CONN14 - checkerboard, the complement of comboB_SWB_CONN14
|
||||
# Board: SWB_CONN14 only. The channel list is positional, so applying this to a
|
||||
# different board margins the wrong rails and nothing detects it.
|
||||
# Run comboA then comboB to cover every rail in both directions while its
|
||||
# neighbours sit the other way.
|
||||
# CH 10, 11, 13 stay nominal: they are NC on this board, so there is
|
||||
# nothing to margin.
|
||||
# Applied to whichever LTC2980 is currently loaded via margin_init
|
||||
# Format: "channel:operation:change_percent"
|
||||
|
||||
PROFILE_CHANNELS=(
|
||||
"0:high:3"
|
||||
"1:low:3"
|
||||
"2:low:3"
|
||||
"3:high:5"
|
||||
"4:high:5"
|
||||
"5:high:5"
|
||||
"6:low:5"
|
||||
"7:low:5"
|
||||
"8:low:3"
|
||||
"9:low:3"
|
||||
"10:nominal:5"
|
||||
"11:nominal:5"
|
||||
"12:high:3"
|
||||
"13:nominal:5"
|
||||
"14:high:5"
|
||||
"15:high:3"
|
||||
)
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# Profile: comboA_SWB_CONN15 - checkerboard, the complement of comboB_SWB_CONN15
|
||||
# Board: SWB_CONN15 only. The channel list is positional, so applying this to a
|
||||
# different board margins the wrong rails and nothing detects it.
|
||||
# Run comboA then comboB to cover every rail in both directions while its
|
||||
# neighbours sit the other way.
|
||||
# CH 10 stay nominal: they are NC on this board, so there is
|
||||
# nothing to margin.
|
||||
# Applied to whichever LTC2980 is currently loaded via margin_init
|
||||
# Format: "channel:operation:change_percent"
|
||||
|
||||
PROFILE_CHANNELS=(
|
||||
"0:low:3"
|
||||
"1:low:3"
|
||||
"2:high:3"
|
||||
"3:high:3"
|
||||
"4:low:3"
|
||||
"5:low:3"
|
||||
"6:high:5"
|
||||
"7:high:3"
|
||||
"8:high:5"
|
||||
"9:low:5"
|
||||
"10:nominal:5"
|
||||
"11:low:5"
|
||||
"12:low:3"
|
||||
"13:high:3"
|
||||
"14:high:3"
|
||||
"15:high:5"
|
||||
)
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# Profile: comboA_SWB_CONN16 - checkerboard, the complement of comboB_SWB_CONN16
|
||||
# Board: SWB_CONN16 only. The channel list is positional, so applying this to a
|
||||
# different board margins the wrong rails and nothing detects it.
|
||||
# Run comboA then comboB to cover every rail in both directions while its
|
||||
# neighbours sit the other way.
|
||||
# Applied to whichever LTC2980 is currently loaded via margin_init
|
||||
# Format: "channel:operation:change_percent"
|
||||
|
||||
PROFILE_CHANNELS=(
|
||||
"0:high:3"
|
||||
"1:high:5"
|
||||
"2:high:5"
|
||||
"3:low:5"
|
||||
"4:high:5"
|
||||
"5:low:5"
|
||||
"6:high:5"
|
||||
"7:high:3"
|
||||
"8:high:3"
|
||||
"9:high:3"
|
||||
"10:low:3"
|
||||
"11:low:3"
|
||||
"12:low:3"
|
||||
"13:low:3"
|
||||
"14:low:3"
|
||||
"15:high:3"
|
||||
)
|
||||
@@ -0,0 +1,26 @@
|
||||
# Profile: comboB_CB - checkerboard, the complement of comboA_CB
|
||||
# Board: CB only. The channel list is positional, so applying this to a
|
||||
# different board margins the wrong rails and nothing detects it.
|
||||
# Run comboB then comboA to cover every rail in both directions while its
|
||||
# neighbours sit the other way.
|
||||
# Applied to whichever LTC2980 is currently loaded via margin_init
|
||||
# Format: "channel:operation:change_percent"
|
||||
|
||||
PROFILE_CHANNELS=(
|
||||
"0:high:5"
|
||||
"1:high:5"
|
||||
"2:low:5"
|
||||
"3:high:5"
|
||||
"4:low:5"
|
||||
"5:low:5"
|
||||
"6:low:5"
|
||||
"7:low:5"
|
||||
"8:high:5"
|
||||
"9:low:5"
|
||||
"10:low:5"
|
||||
"11:low:5"
|
||||
"12:high:5"
|
||||
"13:low:5"
|
||||
"14:low:5"
|
||||
"15:high:5"
|
||||
)
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# Profile: comboB_SWB_CONN13 - checkerboard, the complement of comboA_SWB_CONN13
|
||||
# Board: SWB_CONN13 only. The channel list is positional, so applying this to a
|
||||
# different board margins the wrong rails and nothing detects it.
|
||||
# Run comboB then comboA to cover every rail in both directions while its
|
||||
# neighbours sit the other way.
|
||||
# Applied to whichever LTC2980 is currently loaded via margin_init
|
||||
# Format: "channel:operation:change_percent"
|
||||
|
||||
PROFILE_CHANNELS=(
|
||||
"0:low:3"
|
||||
"1:low:3"
|
||||
"2:high:3"
|
||||
"3:high:3"
|
||||
"4:low:5"
|
||||
"5:high:5"
|
||||
"6:low:5"
|
||||
"7:low:5"
|
||||
"8:low:5"
|
||||
"9:low:3"
|
||||
"10:low:3"
|
||||
"11:high:3"
|
||||
"12:high:3"
|
||||
"13:low:3"
|
||||
"14:low:3"
|
||||
"15:high:5"
|
||||
)
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# Profile: comboB_SWB_CONN14 - checkerboard, the complement of comboA_SWB_CONN14
|
||||
# Board: SWB_CONN14 only. The channel list is positional, so applying this to a
|
||||
# different board margins the wrong rails and nothing detects it.
|
||||
# Run comboB then comboA to cover every rail in both directions while its
|
||||
# neighbours sit the other way.
|
||||
# CH 10, 11, 13 stay nominal: they are NC on this board, so there is
|
||||
# nothing to margin.
|
||||
# Applied to whichever LTC2980 is currently loaded via margin_init
|
||||
# Format: "channel:operation:change_percent"
|
||||
|
||||
PROFILE_CHANNELS=(
|
||||
"0:low:3"
|
||||
"1:high:3"
|
||||
"2:high:3"
|
||||
"3:low:5"
|
||||
"4:low:5"
|
||||
"5:low:5"
|
||||
"6:high:5"
|
||||
"7:high:5"
|
||||
"8:high:3"
|
||||
"9:high:3"
|
||||
"10:nominal:5"
|
||||
"11:nominal:5"
|
||||
"12:low:3"
|
||||
"13:nominal:5"
|
||||
"14:low:5"
|
||||
"15:low:3"
|
||||
)
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# Profile: comboB_SWB_CONN15 - checkerboard, the complement of comboA_SWB_CONN15
|
||||
# Board: SWB_CONN15 only. The channel list is positional, so applying this to a
|
||||
# different board margins the wrong rails and nothing detects it.
|
||||
# Run comboB then comboA to cover every rail in both directions while its
|
||||
# neighbours sit the other way.
|
||||
# CH 10 stay nominal: they are NC on this board, so there is
|
||||
# nothing to margin.
|
||||
# Applied to whichever LTC2980 is currently loaded via margin_init
|
||||
# Format: "channel:operation:change_percent"
|
||||
|
||||
PROFILE_CHANNELS=(
|
||||
"0:high:3"
|
||||
"1:high:3"
|
||||
"2:low:3"
|
||||
"3:low:3"
|
||||
"4:high:3"
|
||||
"5:high:3"
|
||||
"6:low:5"
|
||||
"7:low:3"
|
||||
"8:low:5"
|
||||
"9:high:5"
|
||||
"10:nominal:5"
|
||||
"11:high:5"
|
||||
"12:high:3"
|
||||
"13:low:3"
|
||||
"14:low:3"
|
||||
"15:low:5"
|
||||
)
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# Profile: comboB_SWB_CONN16 - checkerboard, the complement of comboA_SWB_CONN16
|
||||
# Board: SWB_CONN16 only. The channel list is positional, so applying this to a
|
||||
# different board margins the wrong rails and nothing detects it.
|
||||
# Run comboB then comboA to cover every rail in both directions while its
|
||||
# neighbours sit the other way.
|
||||
# Applied to whichever LTC2980 is currently loaded via margin_init
|
||||
# Format: "channel:operation:change_percent"
|
||||
|
||||
PROFILE_CHANNELS=(
|
||||
"0:low:3"
|
||||
"1:low:5"
|
||||
"2:low:5"
|
||||
"3:high:5"
|
||||
"4:low:5"
|
||||
"5:high:5"
|
||||
"6:low:5"
|
||||
"7:low:3"
|
||||
"8:low:3"
|
||||
"9:low:3"
|
||||
"10:high:3"
|
||||
"11:high:3"
|
||||
"12:high:3"
|
||||
"13:high:3"
|
||||
"14:high:3"
|
||||
"15:low:3"
|
||||
)
|
||||
@@ -3,6 +3,12 @@
|
||||
# blanton_multiphase_margin.sh -- multiphase VRM margin over the native i2c bus
|
||||
# =============================================================================
|
||||
# Version History:
|
||||
# V1.1.0 2026-09-04 Add 'normal' - puts every rail back to its nominal set
|
||||
# point, from tools/Multiphase_Normal.txt. Same 38 rails
|
||||
# and the same per-rail reporting as the margin profiles.
|
||||
# Without it the only way back from a margin was a power
|
||||
# cycle, and 'save' would have committed the margined
|
||||
# values to NVM where a power cycle does not help either.
|
||||
# V1.0.0 2026-09-01 First version. Bash port of tools/Multiphase_*.txt.
|
||||
# high3 / low3 / comboA / comboB / save, -u 0|1|all.
|
||||
# =============================================================================
|
||||
@@ -31,6 +37,7 @@
|
||||
# ./blanton_multiphase_margin.sh low3 # all rails -3%
|
||||
# ./blanton_multiphase_margin.sh comboA # mixed high/low, set A
|
||||
# ./blanton_multiphase_margin.sh comboB # mixed high/low, set B
|
||||
# ./blanton_multiphase_margin.sh normal # back to the nominal set point
|
||||
# ./blanton_multiphase_margin.sh save # commit to NVM (permanent)
|
||||
# ./blanton_multiphase_margin.sh high3 -u 0 # SWB0 only
|
||||
# ./blanton_multiphase_margin.sh high3 -n # print commands, touch nothing
|
||||
@@ -811,6 +818,200 @@ i2cset -f -y 14 0x20 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x20 0x21 0x2D 0x01
|
||||
"
|
||||
|
||||
# --- normal ---------------------------------------------------------------
|
||||
# Back to the nominal set point. TH6_CORE is 0.8 V nominal but settles near
|
||||
# 0.8591 V once the load line is active, so a margin_status style read after
|
||||
# this will not show exactly 0.8 V on that rail - that is the load line, not
|
||||
# a failed write.
|
||||
MP_DATA_normal="\
|
||||
@ SWB0_0V9_ANLG0 0.900V
|
||||
i2cset -f -y 13 0x25 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x25 0x21 0x83 0x00
|
||||
i2cset -f -y 13 0x25 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x25 0x0D 0x74 0x10
|
||||
@ SWB0_0V9_ANLG1 0.900V
|
||||
i2cset -f -y 15 0x26 0x00 0
|
||||
i2ctransfer -f -y 15 w3@0x26 0x21 0x83 0x00
|
||||
i2cset -f -y 15 0x26 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x26 0x0D 0x74 0x10
|
||||
@ SWB0_0V75_ANLG0 0.75V
|
||||
i2cset -f -y 13 0x25 0x00 1
|
||||
i2ctransfer -f -y 13 w3@0x25 0x21 0x65 0x00
|
||||
i2cset -f -y 13 0x25 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x25 0x1D 0x5A 0x06
|
||||
@ SWB0_0V75_ANLG1 0.75V
|
||||
i2cset -f -y 15 0x26 0x00 1
|
||||
i2ctransfer -f -y 15 w3@0x26 0x21 0x65 0x00
|
||||
i2cset -f -y 15 0x26 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x26 0x1D 0x5A 0x06
|
||||
@ SWB0_PHYTILE_P0 0.75V
|
||||
i2cset -f -y 13 0x21 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x21 0x21 0x65 0x00
|
||||
i2cset -f -y 13 0x21 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x21 0x0D 0xB2 0x0C
|
||||
@ SWB0_PHYTILE_P1 0.75V
|
||||
i2cset -f -y 13 0x21 0x00 1
|
||||
i2ctransfer -f -y 13 w3@0x21 0x21 0x65 0x00
|
||||
i2cset -f -y 13 0x21 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x21 0x1D 0x5A 0x06
|
||||
@ SWB0_PHYTILE_P2 0.75V
|
||||
i2cset -f -y 13 0x22 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x22 0x21 0x65 0x00
|
||||
i2cset -f -y 13 0x22 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x22 0x0D 0xB2 0x0C
|
||||
@ SWB0_PHYTILE_P3 0.75V
|
||||
i2cset -f -y 13 0x22 0x00 1
|
||||
i2ctransfer -f -y 13 w3@0x22 0x21 0x65 0x00
|
||||
i2cset -f -y 13 0x22 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x22 0x1D 0x5A 0x06
|
||||
@ SWB0_PHYTILE_P4 0.75V
|
||||
i2cset -f -y 15 0x23 0x00 0
|
||||
i2ctransfer -f -y 15 w3@0x23 0x21 0x65 0x00
|
||||
i2cset -f -y 15 0x23 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x23 0x0D 0xB2 0x0C
|
||||
@ SWB0_PHYTILE_P5 0.75V
|
||||
i2cset -f -y 15 0x23 0x00 1
|
||||
i2ctransfer -f -y 15 w3@0x23 0x21 0x65 0x00
|
||||
i2cset -f -y 15 0x23 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x23 0x1D 0x5A 0x06
|
||||
@ SWB0_PHYTILE_P6 0.75V
|
||||
i2cset -f -y 15 0x24 0x00 0
|
||||
i2ctransfer -f -y 15 w3@0x24 0x21 0x65 0x00
|
||||
i2cset -f -y 15 0x24 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x24 0x0D 0xB2 0x0C
|
||||
@ SWB0_PHYTILE_P7 0.75V
|
||||
i2cset -f -y 15 0x24 0x00 1
|
||||
i2ctransfer -f -y 15 w3@0x24 0x21 0x65 0x00
|
||||
i2cset -f -y 15 0x24 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x24 0x1D 0x5A 0x06
|
||||
@ SWB0_PVDD1V5_CNDR0 1.5V
|
||||
i2cset -f -y 13 0x29 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x29 0x21 0xFB 0x00
|
||||
i2cset -f -y 13 0x29 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x29 0x0D 0x71 0x1F
|
||||
@ SWB0_PVDD1V5_CNDR1 1.5V
|
||||
i2cset -f -y 13 0x29 0x00 1
|
||||
i2ctransfer -f -y 13 w3@0x29 0x21 0xFB 0x00
|
||||
i2cset -f -y 13 0x29 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x29 0x1D 0xB9 0x0F
|
||||
@ SWB0_PVDDA_PHYT0 0.720V
|
||||
i2cset -f -y 13 0x27 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x27 0x21 0x5F 0x00
|
||||
i2cset -f -y 13 0x27 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x27 0x0D 0xF4 0x0B
|
||||
@ SWB0_PVDDA_PHYT1 0.720V
|
||||
i2cset -f -y 13 0x27 0x00 1
|
||||
i2ctransfer -f -y 13 w3@0x27 0x21 0x5F 0x00
|
||||
i2cset -f -y 13 0x27 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x27 0x1D 0xFC 0x05
|
||||
@ SWB0_PVDDA_PHYT2 0.720V
|
||||
i2cset -f -y 15 0x28 0x00 0
|
||||
i2ctransfer -f -y 15 w3@0x28 0x21 0x5F 0x00
|
||||
i2cset -f -y 15 0x28 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x28 0x0D 0xF4 0x0B
|
||||
@ SWB0_PVDDA_PHYT3 0.720V
|
||||
i2cset -f -y 15 0x28 0x00 1
|
||||
i2ctransfer -f -y 15 w3@0x28 0x21 0x5F 0x00
|
||||
i2cset -f -y 15 0x28 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x28 0x1D 0xFC 0x05
|
||||
@ SWB0_TH6_CORE 0.8V
|
||||
i2cset -f -y 13 0x20 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x20 0x21 0x57 0x01
|
||||
@ SWB1_0V9_ANLG0 0.900V
|
||||
i2cset -f -y 14 0x25 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x25 0x21 0x83 0x00
|
||||
i2cset -f -y 14 0x25 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x25 0x0D 0x74 0x10
|
||||
@ SWB1_0V9_ANLG1 0.900V
|
||||
i2cset -f -y 16 0x26 0x00 0
|
||||
i2ctransfer -f -y 16 w3@0x26 0x21 0x83 0x00
|
||||
i2cset -f -y 16 0x26 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x26 0x0D 0x74 0x10
|
||||
@ SWB1_0V75_ANLG0 0.75V
|
||||
i2cset -f -y 14 0x25 0x00 1
|
||||
i2ctransfer -f -y 14 w3@0x25 0x21 0x65 0x00
|
||||
i2cset -f -y 14 0x25 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x25 0x1D 0x5A 0x06
|
||||
@ SWB1_0V75_ANLG1 0.75V
|
||||
i2cset -f -y 16 0x26 0x00 1
|
||||
i2ctransfer -f -y 16 w3@0x26 0x21 0x65 0x00
|
||||
i2cset -f -y 16 0x26 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x26 0x1D 0x5A 0x06
|
||||
@ SWB1_PHYTILE_P0 0.75V
|
||||
i2cset -f -y 14 0x21 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x21 0x21 0x65 0x00
|
||||
i2cset -f -y 14 0x21 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x21 0x0D 0xB2 0x0C
|
||||
@ SWB1_PHYTILE_P1 0.75V
|
||||
i2cset -f -y 14 0x21 0x00 1
|
||||
i2ctransfer -f -y 14 w3@0x21 0x21 0x65 0x00
|
||||
i2cset -f -y 14 0x21 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x21 0x1D 0x5A 0x06
|
||||
@ SWB1_PHYTILE_P2 0.75V
|
||||
i2cset -f -y 14 0x22 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x22 0x21 0x65 0x00
|
||||
i2cset -f -y 14 0x22 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x22 0x0D 0xB2 0x0C
|
||||
@ SWB1_PHYTILE_P3 0.75V
|
||||
i2cset -f -y 14 0x22 0x00 1
|
||||
i2ctransfer -f -y 14 w3@0x22 0x21 0x65 0x00
|
||||
i2cset -f -y 14 0x22 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x22 0x1D 0x5A 0x06
|
||||
@ SWB1_PHYTILE_P4 0.75V
|
||||
i2cset -f -y 16 0x23 0x00 0
|
||||
i2ctransfer -f -y 16 w3@0x23 0x21 0x65 0x00
|
||||
i2cset -f -y 16 0x23 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x23 0x0D 0xB2 0x0C
|
||||
@ SWB1_PHYTILE_P5 0.75V
|
||||
i2cset -f -y 16 0x23 0x00 1
|
||||
i2ctransfer -f -y 16 w3@0x23 0x21 0x65 0x00
|
||||
i2cset -f -y 16 0x23 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x23 0x1D 0x5A 0x06
|
||||
@ SWB1_PHYTILE_P6 0.75V
|
||||
i2cset -f -y 16 0x24 0x00 0
|
||||
i2ctransfer -f -y 16 w3@0x24 0x21 0x65 0x00
|
||||
i2cset -f -y 16 0x24 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x24 0x0D 0xB2 0x0C
|
||||
@ SWB1_PHYTILE_P7 0.75V
|
||||
i2cset -f -y 16 0x24 0x00 1
|
||||
i2ctransfer -f -y 16 w3@0x24 0x21 0x65 0x00
|
||||
i2cset -f -y 16 0x24 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x24 0x1D 0x5A 0x06
|
||||
@ SWB1_PVDD1V5_CNDR0 1.5V
|
||||
i2cset -f -y 14 0x29 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x29 0x21 0xFB 0x00
|
||||
i2cset -f -y 14 0x29 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x29 0x0D 0x71 0x1F
|
||||
@ SWB1_PVDD1V5_CNDR1 1.5V
|
||||
i2cset -f -y 14 0x29 0x00 1
|
||||
i2ctransfer -f -y 14 w3@0x29 0x21 0xFB 0x00
|
||||
i2cset -f -y 14 0x29 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x29 0x1D 0xB9 0x0F
|
||||
@ SWB1_PVDDA_PHYT0 0.720V
|
||||
i2cset -f -y 14 0x27 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x27 0x21 0x5F 0x00
|
||||
i2cset -f -y 14 0x27 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x27 0x0D 0xF4 0x0B
|
||||
@ SWB1_PVDDA_PHYT1 0.720V
|
||||
i2cset -f -y 14 0x27 0x00 1
|
||||
i2ctransfer -f -y 14 w3@0x27 0x21 0x5F 0x00
|
||||
i2cset -f -y 14 0x27 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x27 0x1D 0xFC 0x05
|
||||
@ SWB1_PVDDA_PHYT2 0.720V
|
||||
i2cset -f -y 16 0x28 0x00 0
|
||||
i2ctransfer -f -y 16 w3@0x28 0x21 0x5F 0x00
|
||||
i2cset -f -y 16 0x28 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x28 0x0D 0xF4 0x0B
|
||||
@ SWB1_PVDDA_PHYT3 0.720V
|
||||
i2cset -f -y 16 0x28 0x00 1
|
||||
i2ctransfer -f -y 16 w3@0x28 0x21 0x5F 0x00
|
||||
i2cset -f -y 16 0x28 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x28 0x1D 0xFC 0x05
|
||||
@ SWB1_TH6_CORE 0.8V
|
||||
i2cset -f -y 14 0x20 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x20 0x21 0x57 0x01
|
||||
"
|
||||
|
||||
# --- save: STORE_USER_ALL per controller, no per-rail mapping ---------------
|
||||
MP_DATA_save="\
|
||||
i2cset -f -y 13 0x25 0x00 0
|
||||
@@ -1007,6 +1208,7 @@ blanton_multiphase_margin.sh - multiphase VRM margin (native i2c, 38 rails)
|
||||
low3 every rail -3%
|
||||
comboA mixed high/low, set A
|
||||
comboB mixed high/low, set B
|
||||
normal back to the nominal set point (undo a margin without a power cycle)
|
||||
save commit to NVM -- PERMANENT, survives a power cycle
|
||||
|
||||
-u|--unit <0|1|all> SWB0 (i2c-13/15) / SWB1 (i2c-14/16); default both
|
||||
@@ -1041,6 +1243,7 @@ case "${SUB}" in
|
||||
low3) _mp_apply low3 "${MP_DATA_low3}" ;;
|
||||
comboA) _mp_apply comboA "${MP_DATA_comboA}" ;;
|
||||
comboB) _mp_apply comboB "${MP_DATA_comboB}" ;;
|
||||
normal) _mp_apply normal "${MP_DATA_normal}" ;;
|
||||
save) _mp_save ;;
|
||||
-h|--help|"") usage ;;
|
||||
*) _mp_err "unknown sub-command: ${SUB}"; usage; exit 1 ;;
|
||||
|
||||
@@ -0,0 +1,241 @@
|
||||
#!/usr/bin/env bash
|
||||
# =============================================================================
|
||||
# pwr_brick.sh -- PDB / CPB power brick Vin / Iin / Vout / Iout / Temp
|
||||
# =============================================================================
|
||||
# Version History:
|
||||
# V1.1.0 2026-09-02 PAGE values and conversions taken from the ADPM12200
|
||||
# datasheet instead of the bring-up spreadsheet.
|
||||
# The spreadsheet wrote every PAGE in decimal but with an
|
||||
# 0x prefix, so four of the five selected the wrong page:
|
||||
# Vin PAGE 9 -> it said 0x00 (should be 0x09)
|
||||
# Iin PAGE 10 -> it said 0x10 (should be 0x0A)
|
||||
# Vout PAGE 2 -> it said 0x02 correct by luck
|
||||
# Iout PAGE 14 -> it said 0x14 (should be 0x0E)
|
||||
# Temp PAGE 18 -> it said 0x18 (should be 0x12)
|
||||
# Only Vout worked, because 2 reads the same either way.
|
||||
# That is why Iin/Iout answered 0xFFFF and Temp 0x0000.
|
||||
# Conversions now use the datasheet DIRECT equation; the
|
||||
# reverse-engineered BRICK_VIN_LSB is gone.
|
||||
# V1.0.0 2026-09-02 First version.
|
||||
# =============================================================================
|
||||
#
|
||||
# Path: CB FPGA F3 VI2C ch4 -> TCA954x mux 0x72 ch0 -> the bricks
|
||||
#
|
||||
# The four ADPM12200 modules put each measurement on its own PMBus PAGE, so a
|
||||
# PAGE write has to precede every read. blanton_pwr_data.sh does not send one
|
||||
# at all (its PDB table has page "-"), which is why it reports them as NA.
|
||||
#
|
||||
# READ_VIN 0x88 PAGE 9
|
||||
# READ_IIN 0x89 PAGE 10
|
||||
# READ_VOUT 0x8B PAGE 2
|
||||
# READ_IOUT 0x8C PAGE 14
|
||||
# READ_TEMPERATURE_1 0x8D PAGE 18
|
||||
#
|
||||
# DIRECT format, datasheet Table 3 ("PMBus Command Code Coefficients"):
|
||||
#
|
||||
# X = (1/m) x (Y x 10^-R - b) Y = the 2-byte two's complement word
|
||||
#
|
||||
# Voltage m=0.125 b=0 R=0 units mV -> X = Y x 8 mV
|
||||
# Current m=0.25 b=0 R=2 units A -> X = Y x 0.04 A
|
||||
# Temperature m=1 b=0 R=2 units degC -> X = Y x 0.01 degC
|
||||
#
|
||||
# Sanity check: READ_VOUT 0x05D4 = 1492 -> 1492 x 8 = 11936 mV, which is exactly
|
||||
# what PDB_IBC_SWB1_A_VOUT reports in 'show platform voltage'.
|
||||
#
|
||||
# ⚠️ Table 3 does not list READ_VIN or READ_IIN. They are decoded here with the
|
||||
# Voltage and Current coefficients respectively - reasonable, and consistent
|
||||
# with a ~50 V input, but not stated by the datasheet. PB_VIN_M / PB_IIN_M
|
||||
# below are where to change that if the part turns out to differ.
|
||||
#
|
||||
# ⚠️ CPB.PU37 (0x26) is a DIFFERENT part: no PAGE writes, and its own scaling
|
||||
# (Vin 0.25 V, Vout 2^-11 V, Iout 0.5 A per count of the mantissa). Those
|
||||
# three were confirmed against words this DUT returns.
|
||||
#
|
||||
# Usage:
|
||||
# ./pwr_brick.sh show # the table
|
||||
# ./pwr_brick.sh show -r # add the raw words
|
||||
# ./pwr_brick.sh help
|
||||
# =============================================================================
|
||||
|
||||
# --- User Configurable Section ----------------------------------------------
|
||||
PB_CH="${PB_CH:-4}" # ICB VI2C channel
|
||||
PB_MUX="${PB_MUX:-0x72}" # TCA954x address
|
||||
PB_MUX_SEL="${PB_MUX_SEL:-0x01}" # control byte: bit0 = channel 0
|
||||
PB_TRIES="${PB_TRIES:-8}" # reads per value before giving up
|
||||
|
||||
# PMBus PAGE per measurement (ADPM12200). Decimal page numbers written in hex.
|
||||
PB_PAGE_VIN="${PB_PAGE_VIN:-0x09}" # 9
|
||||
PB_PAGE_IIN="${PB_PAGE_IIN:-0x0A}" # 10
|
||||
PB_PAGE_VOUT="${PB_PAGE_VOUT:-0x02}" # 2
|
||||
PB_PAGE_IOUT="${PB_PAGE_IOUT:-0x0E}" # 14
|
||||
PB_PAGE_TEMP="${PB_PAGE_TEMP:-0x12}" # 18
|
||||
|
||||
# DIRECT coefficients: m, R, and the divisor that takes the datasheet unit to
|
||||
# the displayed unit (mV -> V is 1000; A and degC are already right).
|
||||
PB_VOUT_M="${PB_VOUT_M:-0.125}"; PB_VOUT_R="${PB_VOUT_R:-0}"; PB_VOUT_DIV="${PB_VOUT_DIV:-1000}"
|
||||
PB_VIN_M="${PB_VIN_M:-0.125}"; PB_VIN_R="${PB_VIN_R:-0}"; PB_VIN_DIV="${PB_VIN_DIV:-1000}"
|
||||
PB_IOUT_M="${PB_IOUT_M:-0.25}"; PB_IOUT_R="${PB_IOUT_R:-2}"; PB_IOUT_DIV="${PB_IOUT_DIV:-1}"
|
||||
PB_IIN_M="${PB_IIN_M:-0.25}"; PB_IIN_R="${PB_IIN_R:-2}"; PB_IIN_DIV="${PB_IIN_DIV:-1}"
|
||||
PB_TEMP_M="${PB_TEMP_M:-1}"; PB_TEMP_R="${PB_TEMP_R:-2}"; PB_TEMP_DIV="${PB_TEMP_DIV:-1}"
|
||||
|
||||
# CPB.PU37 only (different part, no PAGE, mantissa-based)
|
||||
CPB_VIN_LSB="${CPB_VIN_LSB:-0.25}" # V per count of the mantissa
|
||||
CPB_IOUT_LSB="${CPB_IOUT_LSB:-0.5}" # A per count of the mantissa
|
||||
|
||||
# Plausibility windows. A decoded value outside its window is discarded and the
|
||||
# read retried; this is what rejects the corrupted words this bus produces - a
|
||||
# bad high byte turns 11.98 V into 32.00 V, which "reject 0xFFFF" never catches.
|
||||
PB_VIN_LO="${PB_VIN_LO:-30}"; PB_VIN_HI="${PB_VIN_HI:-70}"
|
||||
PB_VOUT_LO="${PB_VOUT_LO:-8}"; PB_VOUT_HI="${PB_VOUT_HI:-14}"
|
||||
PB_IIN_LO="${PB_IIN_LO:-0}"; PB_IIN_HI="${PB_IIN_HI:-100}"
|
||||
PB_IOUT_LO="${PB_IOUT_LO:-0}"; PB_IOUT_HI="${PB_IOUT_HI:-300}"
|
||||
PB_TEMP_LO="${PB_TEMP_LO:-0}"; PB_TEMP_HI="${PB_TEMP_HI:-125}"
|
||||
|
||||
# All-ones and all-zeros are the two ways this bus says "nobody answered", and
|
||||
# both can decode into a value that sits inside its window - 0x0000 on the
|
||||
# temperature register reads as a perfectly plausible 0 C. Rejected as raw
|
||||
# words, before any conversion, so no window has to be bent to catch them.
|
||||
PB_REJECT_FFFF="${PB_REJECT_FFFF:-1}"
|
||||
PB_REJECT_0000="${PB_REJECT_0000:-1}"
|
||||
|
||||
# "location:bricks:slave:netname:kind" kind = adpm (PAGE per read) | cpb
|
||||
PB_DEVS=(
|
||||
"SWB0.PU207:BRICKS1:0x62:P12V_SWB0_L:adpm"
|
||||
"SWB0.PU13:BRICKS2:0x63:P12V_SWB0_L:adpm"
|
||||
"SWB1.PU332:BRICKS1:0x60:P12V_SWB1_R:adpm"
|
||||
"SWB1.PU85:BRICKS2:0x61:P12V_SWB1_R:adpm"
|
||||
"CPB.PU37:BRICK:0x26:P12V_STBY:cpb"
|
||||
)
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
PB_NA="NA"
|
||||
PB_RAW=0
|
||||
PB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
|
||||
|
||||
_pb_err() { echo -e "[\033[31mERR \033[0m] $*" >&2; }
|
||||
|
||||
# --- backend -----------------------------------------------------------------
|
||||
if ! declare -F vi2c_read >/dev/null 2>&1; then
|
||||
if [ -r "$PB_DIR/blanton_icb_vi2c.sh" ]; then
|
||||
# shellcheck source=/dev/null
|
||||
source "$PB_DIR/blanton_icb_vi2c.sh" >/dev/null 2>&1
|
||||
else
|
||||
_pb_err "blanton_icb_vi2c.sh not found next to this script"; exit 1
|
||||
fi
|
||||
fi
|
||||
declare -F vi2c_read >/dev/null 2>&1 || { _pb_err "vi2c_read() still undefined"; exit 1; }
|
||||
|
||||
# --- decoders ----------------------------------------------------------------
|
||||
# DIRECT: X = (1/m) x (Y x 10^-R - b), b = 0. Y is two's complement, so a word
|
||||
# above 0x7FFF is negative - that matters for temperature, not for the rails.
|
||||
_pb_direct() {
|
||||
awk -v w=$(( $1 )) -v m="$2" -v r="$3" -v d="$4" 'BEGIN{
|
||||
if (w > 32767) w -= 65536
|
||||
printf "%.3f", ((w * (10 ^ -r)) / m) / d
|
||||
}'
|
||||
}
|
||||
# SLINEAR11 mantissa only (bits[10:0], two's complement) - CPB.PU37 path.
|
||||
_pb_mant() { awk -v w=$(( $1 )) 'BEGIN{ m = w % 2048; if (m > 1023) m -= 2048; print m }'; }
|
||||
_pb_mul() { awk -v a="$1" -v b="$2" 'BEGIN{ printf "%.3f", a * b }'; }
|
||||
_pb_lin11() { awk -v w=$(( $1 )) 'BEGIN{ printf "%.4f", w * (2.0 ^ -11) }'; }
|
||||
_pb_in() { awk -v x="$1" -v lo="$2" -v hi="$3" 'BEGIN{ exit !(x >= lo && x <= hi) }'; }
|
||||
|
||||
# _pb_word <slave> <page|-> <reg> -> "0xWWWW"
|
||||
_pb_word() {
|
||||
local slave="$1" page="$2" reg="$3" out
|
||||
[ "$page" != "-" ] && vi2c_write "$PB_CH" "$slave" 0x00 "$page" >/dev/null 2>&1
|
||||
out=$(vi2c_read "$PB_CH" "$slave" "$reg" 2 2>/dev/null \
|
||||
| sed -n 's/.*\[0x\(..\) 0x\(..\)\].*/0x\2\1/p')
|
||||
[ -n "$out" ] && echo "$out"
|
||||
}
|
||||
|
||||
# _pb_val <slave> <page|-> <reg> <decoder> <a1> <a2> <a3> <lo> <hi>
|
||||
# Retries until the decoded value lands inside the window; echoes "value raw".
|
||||
_pb_val() {
|
||||
local slave="$1" page="$2" reg="$3" dec="$4" a1="$5" a2="$6" a3="$7" lo="$8" hi="$9"
|
||||
local i w v
|
||||
for (( i = 0; i < PB_TRIES; i++ )); do
|
||||
w=$(_pb_word "$slave" "$page" "$reg") || continue
|
||||
[ -z "$w" ] && continue
|
||||
[ "$PB_REJECT_FFFF" = "1" ] && [ "$(( w ))" -eq 65535 ] && continue
|
||||
[ "$PB_REJECT_0000" = "1" ] && [ "$(( w ))" -eq 0 ] && continue
|
||||
case "$dec" in
|
||||
direct) v=$(_pb_direct "$w" "$a1" "$a2" "$a3") ;;
|
||||
mant) v=$(_pb_mul "$(_pb_mant "$w")" "$a1") ;;
|
||||
lin11) v=$(_pb_lin11 "$w") ;;
|
||||
esac
|
||||
_pb_in "$v" "$lo" "$hi" || continue
|
||||
echo "$v $w"; return 0
|
||||
done
|
||||
echo "$PB_NA -"; return 1
|
||||
}
|
||||
|
||||
_pb_mux_open() {
|
||||
# The mux takes a bare control byte and vi2c_write always sends a register
|
||||
# first, so passing 0x01 as both makes the part latch 0x01 either way.
|
||||
vi2c_init "$PB_CH" >/dev/null 2>&1
|
||||
vi2c_write "$PB_CH" "$PB_MUX" "$PB_MUX_SEL" "$PB_MUX_SEL" >/dev/null 2>&1
|
||||
return 0
|
||||
}
|
||||
|
||||
# --- show --------------------------------------------------------------------
|
||||
pwr_brick_show() {
|
||||
_pb_mux_open
|
||||
echo "==== PDB / CPB power bricks (VI2C ch${PB_CH} -> mux ${PB_MUX} ch0) ===="
|
||||
printf '%-3s %-12s %-8s %-7s %-14s %10s %10s %10s %10s %9s\n' \
|
||||
"No." "Location" "Bricks" "SlaveID" "Netname" \
|
||||
"Vin(V)" "Iin(A)" "Vout(V)" "Iout(A)" "Temp(C)"
|
||||
printf '%s\n' "--------------------------------------------------------------------------------------------------------------"
|
||||
|
||||
local n=0 entry loc bk slave net kind vi ii vo io tp
|
||||
for entry in "${PB_DEVS[@]}"; do
|
||||
IFS=':' read -r loc bk slave net kind <<< "$entry"
|
||||
n=$(( n + 1 ))
|
||||
if [ "$kind" = "cpb" ]; then
|
||||
vi=$(_pb_val "$slave" - 0x88 mant "$CPB_VIN_LSB" "" "" "$PB_VIN_LO" "$PB_VIN_HI")
|
||||
ii="$PB_NA -" # no input current on this part
|
||||
vo=$(_pb_val "$slave" - 0x8B lin11 "" "" "" "$PB_VOUT_LO" "$PB_VOUT_HI")
|
||||
io=$(_pb_val "$slave" - 0x8C mant "$CPB_IOUT_LSB" "" "" "$PB_IOUT_LO" "$PB_IOUT_HI")
|
||||
tp=$(_pb_val "$slave" - 0x8D direct 1 2 1 "$PB_TEMP_LO" "$PB_TEMP_HI")
|
||||
else
|
||||
vi=$(_pb_val "$slave" "$PB_PAGE_VIN" 0x88 direct "$PB_VIN_M" "$PB_VIN_R" "$PB_VIN_DIV" "$PB_VIN_LO" "$PB_VIN_HI")
|
||||
ii=$(_pb_val "$slave" "$PB_PAGE_IIN" 0x89 direct "$PB_IIN_M" "$PB_IIN_R" "$PB_IIN_DIV" "$PB_IIN_LO" "$PB_IIN_HI")
|
||||
vo=$(_pb_val "$slave" "$PB_PAGE_VOUT" 0x8B direct "$PB_VOUT_M" "$PB_VOUT_R" "$PB_VOUT_DIV" "$PB_VOUT_LO" "$PB_VOUT_HI")
|
||||
io=$(_pb_val "$slave" "$PB_PAGE_IOUT" 0x8C direct "$PB_IOUT_M" "$PB_IOUT_R" "$PB_IOUT_DIV" "$PB_IOUT_LO" "$PB_IOUT_HI")
|
||||
tp=$(_pb_val "$slave" "$PB_PAGE_TEMP" 0x8D direct "$PB_TEMP_M" "$PB_TEMP_R" "$PB_TEMP_DIV" "$PB_TEMP_LO" "$PB_TEMP_HI")
|
||||
fi
|
||||
printf '%-3s %-12s %-8s %-7s %-14s %10s %10s %10s %10s %9s\n' \
|
||||
"$n" "$loc" "$bk" "$slave" "$net" \
|
||||
"${vi%% *}" "${ii%% *}" "${vo%% *}" "${io%% *}" "${tp%% *}"
|
||||
[ "$PB_RAW" = "1" ] && printf '%-3s %-12s %-8s %-7s %-14s %10s %10s %10s %10s %9s\n' \
|
||||
"" "" "" "" "raw" "${vi##* }" "${ii##* }" "${vo##* }" "${io##* }" "${tp##* }"
|
||||
done
|
||||
# No trailing notes on stdout: this table gets pasted into reports and
|
||||
# captured into the master console log, and a caveat printed every run stops
|
||||
# being read after the second time. The caveats live in the file header -
|
||||
# the one that still matters is that READ_VIN / READ_IIN are not in the
|
||||
# datasheet coefficient table and borrow the Voltage / Current sets.
|
||||
}
|
||||
|
||||
pwr_brick_help() {
|
||||
echo -e "\033[1mpwr_brick.sh - PDB / CPB power brick readings\033[0m"
|
||||
echo ""
|
||||
echo -e " \033[33mshow\033[0m [-r] Vin / Iin / Vout / Iout / Temp for all 5 bricks (-r adds raw)"
|
||||
echo -e " \033[33mhelp\033[0m"
|
||||
echo ""
|
||||
echo -e " Path : VI2C ch$PB_CH -> mux $PB_MUX ch0"
|
||||
echo -e " The four ADPM12200 modules need a PMBus PAGE per measurement:"
|
||||
echo -e " Vin $PB_PAGE_VIN(9) Iin $PB_PAGE_IIN(10) Vout $PB_PAGE_VOUT(2) Iout $PB_PAGE_IOUT(14) Temp $PB_PAGE_TEMP(18)"
|
||||
echo -e " DIRECT format, datasheet Table 3: X = (1/m) x (Y x 10^-R - b)"
|
||||
echo -e " CPB.PU37 (0x26) is a different part - no PAGE, its own scaling."
|
||||
echo -e " \033[33mREAD_VIN / READ_IIN are not in Table 3; they borrow Voltage / Current.\033[0m"
|
||||
}
|
||||
|
||||
case "${1:-help}" in
|
||||
show)
|
||||
shift 2>/dev/null
|
||||
[ "${1:-}" = "-r" ] && PB_RAW=1
|
||||
pwr_brick_show ;;
|
||||
help|-h|--help) pwr_brick_help ;;
|
||||
*) _pb_err "unknown sub-command: $1"; pwr_brick_help; exit 1 ;;
|
||||
esac
|
||||
@@ -17,6 +17,14 @@ FAN_SPEED = 100
|
||||
SWB_UNIT0 = 1 ; 1 = this DUT has switch unit 0, wait for it ; 0 = skip
|
||||
SWB_UNIT1 = 1 ; 1 = this DUT has switch unit 1, wait for it ; 0 = skip
|
||||
|
||||
;================================================================
|
||||
; Stress_Test
|
||||
;================================================================
|
||||
SSD_RUNTIME = 600 ; Unit seconds, 600 = 10 minutes
|
||||
SSD_COUNT = 720 ; Total time = SSD_RUNTIME * SSD_COUNT
|
||||
USB_RUNTIME = 600 ; Unit seconds, 600 = 10 minutes
|
||||
USB_COUNT = 720 ; Total time = USB_RUNTIME * USB_COUNT
|
||||
|
||||
;================================================================
|
||||
; Prompt Definitions
|
||||
;================================================================
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
//0.900V (nominal)
|
||||
i2cset -f -y 13 0x25 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x25 0x21 0x83 0x00
|
||||
i2cset -f -y 13 0x25 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x25 0x0D 0x74 0x10
|
||||
//0.900V (nominal)
|
||||
i2cset -f -y 15 0x26 0x00 0
|
||||
i2ctransfer -f -y 15 w3@0x26 0x21 0x83 0x00
|
||||
i2cset -f -y 15 0x26 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x26 0x0D 0x74 0x10
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 13 0x25 0x00 1
|
||||
i2ctransfer -f -y 13 w3@0x25 0x21 0x65 0x00
|
||||
i2cset -f -y 13 0x25 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x25 0x1D 0x5A 0x06
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 15 0x26 0x00 1
|
||||
i2ctransfer -f -y 15 w3@0x26 0x21 0x65 0x00
|
||||
i2cset -f -y 15 0x26 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x26 0x1D 0x5A 0x06
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 13 0x21 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x21 0x21 0x65 0x00
|
||||
i2cset -f -y 13 0x21 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x21 0x0D 0xB2 0x0C
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 13 0x21 0x00 1
|
||||
i2ctransfer -f -y 13 w3@0x21 0x21 0x65 0x00
|
||||
i2cset -f -y 13 0x21 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x21 0x1D 0x5A 0x06
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 13 0x22 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x22 0x21 0x65 0x00
|
||||
i2cset -f -y 13 0x22 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x22 0x0D 0xB2 0x0C
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 13 0x22 0x00 1
|
||||
i2ctransfer -f -y 13 w3@0x22 0x21 0x65 0x00
|
||||
i2cset -f -y 13 0x22 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x22 0x1D 0x5A 0x06
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 15 0x23 0x00 0
|
||||
i2ctransfer -f -y 15 w3@0x23 0x21 0x65 0x00
|
||||
i2cset -f -y 15 0x23 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x23 0x0D 0xB2 0x0C
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 15 0x23 0x00 1
|
||||
i2ctransfer -f -y 15 w3@0x23 0x21 0x65 0x00
|
||||
i2cset -f -y 15 0x23 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x23 0x1D 0x5A 0x06
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 15 0x24 0x00 0
|
||||
i2ctransfer -f -y 15 w3@0x24 0x21 0x65 0x00
|
||||
i2cset -f -y 15 0x24 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x24 0x0D 0xB2 0x0C
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 15 0x24 0x00 1
|
||||
i2ctransfer -f -y 15 w3@0x24 0x21 0x65 0x00
|
||||
i2cset -f -y 15 0x24 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x24 0x1D 0x5A 0x06
|
||||
//1.5V (nominal)
|
||||
i2cset -f -y 13 0x29 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x29 0x21 0xFB 0x00
|
||||
i2cset -f -y 13 0x29 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x29 0x0D 0x71 0x1F
|
||||
//1.5V (nominal)
|
||||
i2cset -f -y 13 0x29 0x00 1
|
||||
i2ctransfer -f -y 13 w3@0x29 0x21 0xFB 0x00
|
||||
i2cset -f -y 13 0x29 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x29 0x1D 0xB9 0x0F
|
||||
//0.720V
|
||||
i2cset -f -y 13 0x27 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x27 0x21 0x5F 0x00
|
||||
i2cset -f -y 13 0x27 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x27 0x0D 0xF4 0x0B
|
||||
//0.720V
|
||||
i2cset -f -y 13 0x27 0x00 1
|
||||
i2ctransfer -f -y 13 w3@0x27 0x21 0x5F 0x00
|
||||
i2cset -f -y 13 0x27 0x00 2
|
||||
i2ctransfer -f -y 13 w3@0x27 0x1D 0xFC 0x05
|
||||
//0.720V
|
||||
i2cset -f -y 15 0x28 0x00 0
|
||||
i2ctransfer -f -y 15 w3@0x28 0x21 0x5F 0x00
|
||||
i2cset -f -y 15 0x28 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x28 0x0D 0xF4 0x0B
|
||||
//0.720V
|
||||
i2cset -f -y 15 0x28 0x00 1
|
||||
i2ctransfer -f -y 15 w3@0x28 0x21 0x5F 0x00
|
||||
i2cset -f -y 15 0x28 0x00 2
|
||||
i2ctransfer -f -y 15 w3@0x28 0x1D 0xFC 0x05
|
||||
//0.8V(nominal) , 0.8591V with load line
|
||||
i2cset -f -y 13 0x20 0x00 0
|
||||
i2ctransfer -f -y 13 w3@0x20 0x21 0x57 0x01
|
||||
|
||||
|
||||
//0.900V (nominal)
|
||||
i2cset -f -y 14 0x25 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x25 0x21 0x83 0x00
|
||||
i2cset -f -y 14 0x25 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x25 0x0D 0x74 0x10
|
||||
//0.900V (nominal)
|
||||
i2cset -f -y 16 0x26 0x00 0
|
||||
i2ctransfer -f -y 16 w3@0x26 0x21 0x83 0x00
|
||||
i2cset -f -y 16 0x26 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x26 0x0D 0x74 0x10
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 14 0x25 0x00 1
|
||||
i2ctransfer -f -y 14 w3@0x25 0x21 0x65 0x00
|
||||
i2cset -f -y 14 0x25 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x25 0x1D 0x5A 0x06
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 16 0x26 0x00 1
|
||||
i2ctransfer -f -y 16 w3@0x26 0x21 0x65 0x00
|
||||
i2cset -f -y 16 0x26 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x26 0x1D 0x5A 0x06
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 14 0x21 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x21 0x21 0x65 0x00
|
||||
i2cset -f -y 14 0x21 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x21 0x0D 0xB2 0x0C
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 14 0x21 0x00 1
|
||||
i2ctransfer -f -y 14 w3@0x21 0x21 0x65 0x00
|
||||
i2cset -f -y 14 0x21 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x21 0x1D 0x5A 0x06
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 14 0x22 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x22 0x21 0x65 0x00
|
||||
i2cset -f -y 14 0x22 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x22 0x0D 0xB2 0x0C
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 14 0x22 0x00 1
|
||||
i2ctransfer -f -y 14 w3@0x22 0x21 0x65 0x00
|
||||
i2cset -f -y 14 0x22 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x22 0x1D 0x5A 0x06
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 16 0x23 0x00 0
|
||||
i2ctransfer -f -y 16 w3@0x23 0x21 0x65 0x00
|
||||
i2cset -f -y 16 0x23 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x23 0x0D 0xB2 0x0C
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 16 0x23 0x00 1
|
||||
i2ctransfer -f -y 16 w3@0x23 0x21 0x65 0x00
|
||||
i2cset -f -y 16 0x23 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x23 0x1D 0x5A 0x06
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 16 0x24 0x00 0
|
||||
i2ctransfer -f -y 16 w3@0x24 0x21 0x65 0x00
|
||||
i2cset -f -y 16 0x24 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x24 0x0D 0xB2 0x0C
|
||||
//0.75V (nominal)
|
||||
i2cset -f -y 16 0x24 0x00 1
|
||||
i2ctransfer -f -y 16 w3@0x24 0x21 0x65 0x00
|
||||
i2cset -f -y 16 0x24 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x24 0x1D 0x5A 0x06
|
||||
//1.5V (nominal)
|
||||
i2cset -f -y 14 0x29 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x29 0x21 0xFB 0x00
|
||||
i2cset -f -y 14 0x29 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x29 0x0D 0x71 0x1F
|
||||
//1.5V (nominal)
|
||||
i2cset -f -y 14 0x29 0x00 1
|
||||
i2ctransfer -f -y 14 w3@0x29 0x21 0xFB 0x00
|
||||
i2cset -f -y 14 0x29 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x29 0x1D 0xB9 0x0F
|
||||
//0.720V (nominal)
|
||||
i2cset -f -y 14 0x27 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x27 0x21 0x5F 0x00
|
||||
i2cset -f -y 14 0x27 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x27 0x0D 0xF4 0x0B
|
||||
//0.720V (nominal)
|
||||
i2cset -f -y 14 0x27 0x00 1
|
||||
i2ctransfer -f -y 14 w3@0x27 0x21 0x5F 0x00
|
||||
i2cset -f -y 14 0x27 0x00 2
|
||||
i2ctransfer -f -y 14 w3@0x27 0x1D 0xFC 0x05
|
||||
//0.720V (nominal)
|
||||
i2cset -f -y 16 0x28 0x00 0
|
||||
i2ctransfer -f -y 16 w3@0x28 0x21 0x5F 0x00
|
||||
i2cset -f -y 16 0x28 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x28 0x0D 0xF4 0x0B
|
||||
//0.720V (nominal)
|
||||
i2cset -f -y 16 0x28 0x00 1
|
||||
i2ctransfer -f -y 16 w3@0x28 0x21 0x5F 0x00
|
||||
i2cset -f -y 16 0x28 0x00 2
|
||||
i2ctransfer -f -y 16 w3@0x28 0x1D 0xFC 0x05
|
||||
//0.8V(nominal) , 0.8591V with load line
|
||||
i2cset -f -y 14 0x20 0x00 0
|
||||
i2ctransfer -f -y 14 w3@0x20 0x21 0x57 0x01
|
||||
Reference in New Issue
Block a user