Compare commits

..
7 Commits
Author SHA1 Message Date
etwenandClaude Opus 5.5 9c9ec5f4f5 docs: Record V1.2.7 in Script A's history and add the release note
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0131orciRKrejchsuDk6UpXk
2026-10-22 14:26:14 +08:00
etwenandClaude Opus 5.5 3395ba5873 build: Update the vendor NFC tool to v2.5
Replace blantons_nfc_validate.py (v2.3) with the customer's
qfx5252-nfc-validate v2.5, renamed so nfc_polling.sh keeps working
unchanged. The default 'test --debug' output is the same; bad
arguments now print [FAIL] and exit 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0131orciRKrejchsuDk6UpXk
2026-10-22 14:26:14 +08:00
etwenandClaude Opus 5.5 3264052949 fix(fdr): Limit blanton_fdr.sh to the cabled ports
The default '1-259,270-565' also covered the uncabled ports
(cd15..19, cd47..51, cd111..115, ...). Use the TL_PS_PORTS list of
blanton_traffic_linespeed.sh instead, the same one blanton_ber_debug.sh
uses. Port 268 (ce0) stays out; FDR_PORTS can add it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0131orciRKrejchsuDk6UpXk
2026-10-22 14:26:14 +08:00
etwenandClaude Opus 5.5 f02ba22924 feat(ttl): Read the FDR counters in every Script B soak round
Script B runs blanton_fdr.sh rdcnt after the Tray ID stress in each
round, so the FDR counters started before the loop are logged through
the soak, not only at Script C. The call is not gated by SWB_UNIT0 /
SWB_UNIT1. Recorded under V1.2.6 in Script A's history and the release
note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0131orciRKrejchsuDk6UpXk
2026-10-21 22:55:09 +08:00
etwenandClaude Opus 5.5 738f1dd1c6 docs: Record V1.2.6 in Script A's history and add the release note
Script A: header to V1.2.6; entries for blanton_fdr.sh, the unused
lanes off in Script A, and the FDR hooks in Script A, B and C, with
notes on the unverified STOp keyword, the lanes never being turned
back on, the both-units-only gating and the exec bits.

CLAUDE.md / ARCHITECTURE.md: status and release to V1.2.6, FDR and the
unused lanes in the overview, the Script A flow, the tree and the
commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0131orciRKrejchsuDk6UpXk
2026-10-21 22:50:25 +08:00
etwenandClaude Opus 5.5 0407bbe04f feat(ttl): Run FDR around the traffic test and turn off unused lanes
When both switch units are enabled, Script A wraps its traffic baseline
in blanton_fdr.sh start / clear / rdcnt / stop and runs the traffic for
40 s instead of 15 s, so the counters are read after the first 30 s
interval is published. Script B starts and clears FDR with the traffic
setup before the soak loop, and Script C reads and stops it around the
traffic stop, so the counters cover the whole soak. The single-unit
branches are unchanged.

Script A runs unused_lanes.sh off before the BER baseline. Nothing turns
the lanes back on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0131orciRKrejchsuDk6UpXk
2026-10-21 22:50:25 +08:00
etwenandClaude Opus 5.5 319ee07de3 feat(fdr): Add blanton_fdr.sh for phydiag fdrstat
start / clear / rdcnt / stop send fdrstat STArt bin_group=both
Interval=30 / clear / Counters / STOp through bcmcmd on ports
'1-259,270-565', unit 0 then unit 1, and print the output as is. -u
picks one unit, -i sets the interval, -n is a dry run, FDR_PORTS
overrides the port list.

The STOp keyword is inferred from prbsstat STOp and has not been
checked on the bench.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0131orciRKrejchsuDk6UpXk
2026-10-21 22:50:25 +08:00
9 changed files with 1202 additions and 23 deletions
+4 -3
View File
@@ -207,6 +207,7 @@ Blanton_TTL_Script/
├── blanton_ber.sh # 全機 SerDes BER 掃描(phydiag prbs / prbsstat) ├── blanton_ber.sh # 全機 SerDes BER 掃描(phydiag prbs / prbsstat)
│ # V1.2.2 起含 port 268(100G ce0),summary 每 unit 分 200G/100G/TOTAL │ # V1.2.2 起含 port 268(100G ce0),summary 每 unit 分 200G/100G/TOTAL
├── blanton_ber_debug.sh # BER 原始輸出(p=p31、sleep 40、-u 0|1),不判定 ├── blanton_ber_debug.sh # BER 原始輸出(p=p31、sleep 40、-u 0|1),不判定
├── blanton_fdr.sh # FDR 統計(phydiag fdrstat start/clear/Counters/STOp),A/B/C 夾住流量
├── bcm_100g_dsc_cycle.sh # 100G link down/up 循環 + 每輪 DSC 與 retimer TX/RX 讀回(未驗證) ├── bcm_100g_dsc_cycle.sh # 100G link down/up 循環 + 每輪 DSC 與 retimer TX/RX 讀回(未驗證)
├── bcm_dsc_scan.sh # 全機 SerDes DSC dump(phydiag <port> dsc,~445 port × 2 unit) ├── bcm_dsc_scan.sh # 全機 SerDes DSC dump(phydiag <port> dsc,~445 port × 2 unit)
│ # 由 EN_TX_FIR 控制,A 與 C 各掃一次;單次約 10 分鐘 │ # 由 EN_TX_FIR 控制,A 與 C 各掃一次;單次約 10 分鐘
@@ -214,7 +215,7 @@ Blanton_TTL_Script/
├── blanton_multiphase_margin.sh # 多相 VRM margin(原生 i2c,38 條軌) ├── blanton_multiphase_margin.sh # 多相 VRM margin(原生 i2c,38 條軌)
├── pwr_brick.sh # PDB / CPB power brick 讀值(VI2C ch4) ├── pwr_brick.sh # PDB / CPB power brick 讀值(VI2C ch4)
├── nfc_polling.sh # NFC tag 背景輪詢 + PASS/FAIL 統計 ├── nfc_polling.sh # NFC tag 背景輪詢 + PASS/FAIL 統計
├── blantons_nfc_validate.py # NFC/NCI 驗證工具(廠商提供,未修改) ├── blantons_nfc_validate.py # NFC/NCI 驗證工具(廠商提供,未修改;V1.2.7 起為 v2.5)
├── blanton_tr518.sh # TR518 封包測試,量功耗前的負載來源 ├── blanton_tr518.sh # TR518 封包測試,量功耗前的負載來源
├── TH6_SWB0_power_readback.sh # SWB0 19 條軌 V×I + 總功耗 ├── TH6_SWB0_power_readback.sh # SWB0 19 條軌 V×I + 總功耗
├── TH6_SWB1_power_readback.sh # SWB1 同上 ├── TH6_SWB1_power_readback.sh # SWB1 同上
@@ -387,7 +388,7 @@ PROFILE_CHANNELS=( "0:high:8" "1:low:8" ... ) # "channel:operation:change_perc
| 模組 | 進入點 | 功能 | | 模組 | 進入點 | 功能 |
|------|--------|------| |------|--------|------|
| **Script A(Pre-test)** | `1_Blanton_Script_A.ttl` V1.2.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 設定與狀態 → **BER 基線掃描**(依 `SWB_UNIT`,V1.2.1 新增)→ **一輪流量基線** → **SerDes DSC 基線**(`EN_TX_FIR`)→ `show uptime` | | **Script A(Pre-test)** | `1_Blanton_Script_A.ttl` V1.2.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 設定與狀態 → **`unused_lanes.sh off`**(V1.2.6)→ **BER 基線掃描**(依 `SWB_UNIT`,V1.2.1 新增)→ **一輪流量基線**(V1.2.6 起兩 unit 時夾 FDR,sleep 40) → **SerDes DSC 基線**(`EN_TX_FIR`)→ `show uptime` |
| **Script B(Stress)** | `2_Blanton_Script_B.ttl` | **V1.1.8 起 `mlucas-avx2 -cpu 0:15` 由 `systemd-run --unit=mlucas-amm`(`Type=exec`、`Restart=always`)啟動,不再是 shell 的 `&` 背景 job** + `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` 掛 `BMC_USB_RUNTIME` 秒的 ping,V1.1.8 前寫死 4 小時)→ 啟動 mgmt ping 監控 → **啟動 NFC 輪詢** → `jobs` / `systemctl is-active mlucas-amm` / `bgctl list` → traffic(依 `SWB_UNIT`)→ `while 1` 每輪 PMON + `bgctl list`/`jobs`/`systemctl is-active mlucas-amm` + `sleep 60`(**V1.1.4 起 margin 不在迴圈內**;V1.2.0 起等待走 DUT 端 `sleep` 而非 macro 端 `pause`)| | **Script B(Stress)** | `2_Blanton_Script_B.ttl` | **V1.1.8 起 `mlucas-avx2 -cpu 0:15` 由 `systemd-run --unit=mlucas-amm`(`Type=exec`、`Restart=always`)啟動,不再是 shell 的 `&` 背景 job** + `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` 掛 `BMC_USB_RUNTIME` 秒的 ping,V1.1.8 前寫死 4 小時)→ 啟動 mgmt ping 監控 → **啟動 NFC 輪詢** → `jobs` / `systemctl is-active mlucas-amm` / `bgctl list` → traffic(依 `SWB_UNIT`)→ `while 1` 每輪 PMON + `bgctl list`/`jobs`/`systemctl is-active mlucas-amm` + `sleep 60`(**V1.1.4 起 margin 不在迴圈內**;V1.2.0 起等待走 DUT 端 `sleep` 而非 macro 端 `pause`)|
| **Script C(Post-test)** | `3_Blanton_Script_C.ttl` | `kill $(jobs -p)` + **`systemctl stop mlucas-amm`**(systemd unit 不是 shell job,`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(並 `cp` 進 job 目錄一起帶走)→ **NFC `report`** → traffic `stop` + `report` → **SerDes DSC 收尾**(`EN_TX_FIR`)→ **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 C(Post-test)** | `3_Blanton_Script_C.ttl` | `kill $(jobs -p)` + **`systemctl stop mlucas-amm`**(systemd unit 不是 shell job,`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(並 `cp` 進 job 目錄一起帶走)→ **NFC `report`** → traffic `stop` + `report` → **SerDes DSC 收尾**(`EN_TX_FIR`)→ **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`,V1.1.8 起與 Script B 同樣掛成 `mlucas-amm` systemd unit + `blanton_tr518.sh start`)→ `while 1`:PMON + `TH6_SWB0/1_power_readback.sh` + `avt_pmpower.sh`(CPU 封裝功耗,V1.2.3)+ `bgctl list` / `jobs` / `systemctl is-active mlucas-amm`,`pause 60`。**沒有收尾段** —— 中斷後 DUT 仍在 `port cd lb=mac` / `l2 learn off` / `test mode nr=yes`,且 CPU 仍滿載,要手動 `blanton_tr518.sh stop` + `systemctl stop mlucas-amm` | | **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`,V1.1.8 起與 Script B 同樣掛成 `mlucas-amm` systemd unit + `blanton_tr518.sh start`)→ `while 1`:PMON + `TH6_SWB0/1_power_readback.sh` + `avt_pmpower.sh`(CPU 封裝功耗,V1.2.3)+ `bgctl list` / `jobs` / `systemctl is-active mlucas-amm`,`pause 60`。**沒有收尾段** —— 中斷後 DUT 仍在 `port cd lb=mac` / `l2 learn off` / `test mode nr=yes`,且 CPU 仍滿載,要手動 `blanton_tr518.sh stop` + `systemctl stop mlucas-amm` |
@@ -818,7 +819,7 @@ margin status、全部 VRM 軌的 Vin/Vout/Iout/Temp、CB + ICB 溫感讀值,
- [ ] `CHANGELOG.md`:延續三支腳本頂端的 Version History,集中成一份 - [ ] `CHANGELOG.md`:延續三支腳本頂端的 Version History,集中成一份
- [ ] 三支腳本的 header 版號與 `CHANGELOG.md` 對齊,`config.ttl` 加 `script_version` 並寫進 log 開頭 - [ ] 三支腳本的 header 版號與 `CHANGELOG.md` 對齊,`config.ttl` 加 `script_version` 並寫進 log 開頭
- [ ] `docs/TTL_Script_Blanton_Status_*.xlsx` 更新為全 OK,或把剩餘項目移進 Future Extensions - [ ] `docs/TTL_Script_Blanton_Status_*.xlsx` 更新為全 OK,或把剩餘項目移進 Future Extensions
- [x] 打 git tag,push `nas` + `gitea`(已至 `V1.2.5`;`publish/` 依 Script A 檔頭版號打包) - [x] 打 git tag,push `nas` + `gitea`(已至 `V1.2.7`;`publish/` 依 Script A 檔頭版號打包)
**驗收條件:** 從 zip 解壓到一台乾淨的測試 NB,照 README 操作,不看原始碼就能完成一輪 A→B→C **驗收條件:** 從 zip 解壓到一台乾淨的測試 NB,照 README 操作,不看原始碼就能完成一輪 A→B→C
並產出 summary;`publish/` 內容與 git tag 一致。 並產出 summary;`publish/` 內容與 git tag 一致。
+14 -3
View File
@@ -9,7 +9,7 @@ DUT 端的取數能力由一組 **bash 工具庫** 提供(CB FPGA `pcimem` →
完整架構見 [ARCHITECTURE.md](ARCHITECTURE.md)。 完整架構見 [ARCHITECTURE.md](ARCHITECTURE.md)。
**目前狀態(2026-10-21)**:Script A 為 **V1.2.5**(A 集中記錄所有 TTL 的變更)。涵蓋 **目前狀態(2026-10-22)**:Script A 為 **V1.2.7**(A 集中記錄所有 TTL 的變更)。涵蓋
PCIe AER / DDR EDAC / PMON+TPM / 電壓 margin(9 顆 LTC2980)/ SWB loopback 線速流量 / PCIe AER / DDR EDAC / PMON+TPM / 電壓 margin(9 顆 LTC2980)/ SWB loopback 線速流量 /
10G+1G 管理網路 ping / BMC DDR 與 USB / NVMe 健康,壓力層走平台的 `bgctl`。 10G+1G 管理網路 ping / BMC DDR 與 USB / NVMe 健康,壓力層走平台的 `bgctl`。
switch unit 數量由 `config.ttl` 的 `SWB_UNIT0` / `SWB_UNIT1` 宣告,風扇轉速由 `FAN_SPEED` 指定 switch unit 數量由 `config.ttl` 的 `SWB_UNIT0` / `SWB_UNIT1` 宣告,風扇轉速由 `FAN_SPEED` 指定
@@ -43,11 +43,15 @@ NFC tag 讀取由 `nfc_polling.sh` 背景輪詢(A 做基線、B 起、C 停並
⚠️ Script 4 迴圈原本就自己讀一次,現在**每輪讀兩次**。V1.2.5 另有 `blanton_ber_debug.sh`(BER 原始輸出、`p=p31`、`sleep 40`)、 ⚠️ Script 4 迴圈原本就自己讀一次,現在**每輪讀兩次**。V1.2.5 另有 `blanton_ber_debug.sh`(BER 原始輸出、`p=p31`、`sleep 40`)、
`retimer_lanes.sh` / `unused_lanes.sh`(把沒接線的 retimer lane / TH6 port 關 TX),以及 `retimer_lanes.sh` / `unused_lanes.sh`(把沒接線的 retimer lane / TH6 port 關 TX),以及
`5_1_Blanton_Script_Boot_Cycle_Fast.ttl`(Script 5 拿掉流量那段,只留 `ps`)。 `5_1_Blanton_Script_Boot_Cycle_Fast.ttl`(Script 5 拿掉流量那段,只留 `ps`)。
**V1.2.6 起 FDR 統計(`blanton_fdr.sh`,`phydiag fdrstat`)接進流量**:A 包住流量基線(sleep 15→40)、
B 在 soak 前 start、每輪 rdcnt、C 收尾 rdcnt + stop,**只在兩個 unit 都開時才跑**。Script A 另在 BER 前先 `unused_lanes.sh off`,
⚠️ **沒有任何地方再 `on` 回來**。
**V1.2.7**:`blanton_fdr.sh` 預設 port 改成只含有接線的 port(同 traffic 的 `TL_PS_PORTS`,不含 268);`blantons_nfc_validate.py` 換成客戶 v2.5(`qfx5252-nfc-validate` 改名,`nfc_polling.sh` 不用改)。
以及 **`5_Blanton_Script_Boot_Cycle.ttl`**(重開機循環,**獨立跑不接 A→B→C**:登入 → 風扇 → 以及 **`5_Blanton_Script_Boot_Cycle.ttl`**(重開機循環,**獨立跑不接 A→B→C**:登入 → 風扇 →
Check Pt1~Pt13 → `reboot` → `wait "Booting in blind mode"`,`cnt_cycle` 每輪遞增,`while 1` 無止境, Check Pt1~Pt13 → `reboot` → `wait "Booting in blind mode"`,`cnt_cycle` 每輪遞增,`while 1` 無止境,
要停就關 Tera Term 的 macro)。**尚未上機驗證**。 要停就關 Tera Term 的 macro)。**尚未上機驗證**。
流程圖:`docs/Blanton_Test_Flow.drawio`。 流程圖:`docs/Blanton_Test_Flow.drawio`。
最後一次發布是 **V1.2.5**;SWB 的 I2C 通道與位址已於 2026-08-19 上機驗證。 最後一次發布是 **V1.2.7**;SWB 的 I2C 通道與位址已於 2026-08-19 上機驗證。
margin 的 `VNOM` 已於 2026-08-30 改為 Blanton 實測中位數(144 條軌中 86 條上調 0.8~2.5%)。 margin 的 `VNOM` 已於 2026-08-30 改為 Blanton 實測中位數(144 條軌中 86 條上調 0.8~2.5%)。
交付用 `./publish/publish.sh` 打包。 交付用 `./publish/publish.sh` 打包。
@@ -188,7 +192,14 @@ sleep 30 # 至少等一個 interval 再 rep
# 清單同 tools/BER_Test.txt,不含 268;BER_PORTS="...,268" 可加 # 清單同 tools/BER_Test.txt,不含 268;BER_PORTS="...,268" 可加
# ⚠️ 這支是 p=p31(已上機驗證),blanton_ber.sh 仍是 p=3 —— 兩者量的碼型可能不同 # ⚠️ 這支是 p=p31(已上機驗證),blanton_ber.sh 仍是 p=3 —— 兩者量的碼型可能不同
# ── 沒接線的 retimer lane / TH6 port 關 TX(V1.2.5,TTL 未接)── # ── FDR 統計(V1.2.6,A/B/C 已接,只在 SWB_UNIT0=SWB_UNIT1=1)──
~/Blanton_Script/blanton_fdr.sh start # fdrstat STArt bin_group=both Interval=30,unit 0 → 1
~/Blanton_Script/blanton_fdr.sh clear # fdrstat clear
~/Blanton_Script/blanton_fdr.sh rdcnt # fdrstat Counters(Interval 結算後才讀,A 用 sleep 40)
~/Blanton_Script/blanton_fdr.sh stop # fdrstat STOp ⚠️ 關鍵字是類推的,未上機驗證
# -u 0|1 單邊;-i <sec> 改 Interval;-n dry-run。ports 預設同 traffic 的 TL_PS_PORTS(只含有接線的 port,不含 268;FDR_PORTS 可改)
# ── 沒接線的 retimer lane / TH6 port 關 TX(V1.2.5;V1.2.6 起 Script A 會 off,沒人 on 回來)──
./Blanton_Script/unused_lanes.sh status # 兩 unit 全部列出 rx_lock / tx_off ./Blanton_Script/unused_lanes.sh status # 兩 unit 全部列出 rx_lock / tx_off
./Blanton_Script/unused_lanes.sh off [--asic 0] [--th6] # 預設 TX squelch;--th6 連 retimer 後面的 TH6 port 一起關 ./Blanton_Script/unused_lanes.sh off [--asic 0] [--th6] # 預設 TX squelch;--th6 連 retimer 後面的 TH6 port 一起關
./Blanton_Script/unused_lanes.sh on ./Blanton_Script/unused_lanes.sh on
+47
View File
@@ -0,0 +1,47 @@
# v1.2.6 — FDR statistics around the traffic run, and unused lanes turned off before the baseline
## ✨ New features
**`blanton_fdr.sh` — FDR statistics through `phydiag fdrstat`**
* Four sub-commands, each run on unit 0 then unit 1, over ports `'1-259,270-565'`:
`start` (`fdrstat STArt bin_group=both Interval=30`), `clear` (`fdrstat clear`), `rdcnt` (`fdrstat Counters`), `stop` (`fdrstat STOp`).
* Output is printed as is, under a `### [time] unit N: ...` header — no parsing, no PASS/FAIL.
* `-u 0` / `-u 1` for one switch unit, `-i <sec>` for the interval, `-n` for a dry run. `FDR_PORTS` overrides the port list.
**FDR runs alongside the traffic test in Script A, B and C**
* **Script A** wraps its traffic baseline: `fdr start` after `init`, `fdr clear` after `clear`, `fdr rdcnt` after the run, `fdr stop` after the traffic stop. The traffic run is now **40 s instead of 15 s**, so the counters are read after the first 30 s interval has been published — the same rule as `prbsstat Ber`.
* **Script B** starts and clears FDR with the traffic setup, before the soak loop — the counters run for the whole soak — and reads them (`rdcnt`) in every soak round, after the Tray ID stress.
* **Script C** reads them (`rdcnt`) before stopping the traffic and stops FDR after it — the closing read of the counters Script B started.
**Script A turns off the unused lanes before the BER baseline**
* `unused_lanes.sh off` — TX squelch on the unused retimer lanes and TSC31 (`cd112-cd115`) disabled on the TH6, on both switch boards.
## 📦 Downloads
| File | Contents |
|---|---|
| `Script_ABC_Blanton_V1.2.6.zip` | The full Tera Term working directory, including `Blanton_Script/` to copy onto the DUT |
```bash
chmod +x ~/Blanton_Script/*.sh
grep -rlU $'\r' ~/Blanton_Script # expect no output
```
## ⚠️ Before you run
* **`chmod +x` after deploying.** `blanton_fdr.sh`, `unused_lanes.sh` and `retimer_lanes.sh` are all called by path; `unused_lanes.sh` also refuses to start if `retimer_lanes.sh` is not executable.
* **`blanton_fdr.sh stop` sends `fdrstat STOp` — that keyword is inferred from `prbsstat STOp` and has not been checked on the bench.** `bcmcmd` exits 0 even when the BCM shell rejects a command, so if it is wrong, FDR keeps running and only the log shows it. Check the first run.
* **FDR only runs when both switch units are enabled** (`SWB_UNIT0 = SWB_UNIT1 = 1`). The single-unit branches have no FDR, and Script A's single-unit traffic run is still 15 s.
* **Script B's per-round `fdr rdcnt` is not gated by the unit settings** — with one unit enabled, FDR was never started and each round just logs whatever `fdrstat Counters` returns.
* **Nothing turns the unused lanes back on.** Script C has no `unused_lanes.sh on`; run it by hand when the DUT is needed in its normal state. Whether a reboot clears it has not been checked.
* **`unused_lanes.sh off` is not gated by `SWB_UNIT0` / `SWB_UNIT1`** — it always acts on both boards.
* **`blanton_ber.sh` (Script A / C) still uses `p=3` and `sleep 30`**; see v1.2.5.
* **Script 4 has no teardown**: finish it with `blanton_tr518.sh stop` **and** `systemctl stop mlucas-amm`.
* **`FAN_SPEED` is 100.**
## 🔗 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
**Full changelog:** [V1.2.5...V1.2.6](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/compare/V1.2.5...V1.2.6)
+47
View File
@@ -0,0 +1,47 @@
# v1.2.7 — FDR on the cabled ports only, and the vendor NFC tool updated to v2.5
## 🐛 Bug fixes
**`blanton_fdr.sh` no longer prints the uncabled ports** (v1.0.1)
* The default port list was `'1-259,270-565'`, which also covered ports nothing is cabled to (cd15..19, cd47..51, cd111..115, ...).
* It is now the cabled-port list from `blanton_traffic_linespeed.sh` (`TL_PS_PORTS`), the same one `blanton_ber_debug.sh` uses:
`1-24,40-96,112-168,184-240,256-259,270-308,310-327,342-380,382-399,414-452,454-471,486-524,526-543,558-565`.
* Script A, B and C pick this up with no change to the TTLs.
## 📦 Vendor tool update
**`blantons_nfc_validate.py` v2.3 → v2.5** — the customer's `qfx5252-nfc-validate`, renamed to keep the name `nfc_polling.sh` calls.
* New: `--read-ndef` (Type 2 / Type 4 NDEF, Text and AMD FRU records), `--write-ndef` / `--set-location`, `--max-ndef-bytes`; NCI data packets with credit flow control.
* Fixed: a `FileNotFoundError` crash while listing the processes that hold the NFC device open.
* Bad arguments now print `[FAIL]` and exit 1 — `nfc_polling.sh` counts that as **FAIL**, not ERROR.
* The default `test --debug` output (`[PASS]` / `[FAIL]` lines, `NFCID1=`) is unchanged, so `nfc_polling.sh` is not modified.
## 📦 Downloads
| File | Contents |
|---|---|
| `Script_ABC_Blanton_V1.2.7.zip` | The full Tera Term working directory, including `Blanton_Script/` to copy onto the DUT |
```bash
chmod +x ~/Blanton_Script/*.sh
grep -rlU $'\r' ~/Blanton_Script # expect no output
python3 ~/Blanton_Script/blantons_nfc_validate.py --version # expect 2.5
```
## ⚠️ Before you run
* **Port 268 (ce0, 100G uplink) is not in the FDR list** — as before. Add it with `FDR_PORTS="...,268"` if FDR is wanted there.
* **The cabled-port list now lives in three scripts** — `blanton_traffic_linespeed.sh`, `blanton_ber_debug.sh`, `blanton_fdr.sh`. Change all three when the cabling changes.
* **Never put the NFC write flags (`--write-ndef`, `--set-location`, `--confirm-write`) in `NFC_ARGS`** — polling would rewrite the tag every round.
* **`blanton_fdr.sh stop` (`fdrstat STOp`) is still unverified on the bench**; see v1.2.6.
* **Nothing turns the unused lanes back on**; run `unused_lanes.sh on` by hand. See v1.2.6.
* **`blanton_ber.sh` (Script A / C) still uses `p=3` and `sleep 30`**; see v1.2.5.
* **Script 4 has no teardown**: finish it with `blanton_tr518.sh stop` **and** `systemctl stop mlucas-amm`.
* **`FAN_SPEED` is 100.**
## 🔗 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
**Full changelog:** [V1.2.6...V1.2.7](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/compare/V1.2.6...V1.2.7)
+66 -3
View File
@@ -1,7 +1,7 @@
; ============================================================================= ; =============================================================================
; Script A for Blanton ; Script A for Blanton
; Version : V1.2.5 ; Version : V1.2.7
; Date : 2026-10-21 ; Date : 2026-10-22
; Author : ETWen ; Author : ETWen
; ============================================================================= ; =============================================================================
; Version History: ; Version History:
@@ -848,6 +848,57 @@
; same as Script 5 ; same as Script 5
; tools/BER_Test.txt p=3 -> p=p31; add a unit 1 block, a both-units block and ; tools/BER_Test.txt p=3 -> p=p31; add a unit 1 block, a both-units block and
; port en=0 / en=1 for all cabled ports on each unit ; port en=0 / en=1 for all cabled ports on each unit
; V1.2.6 2026-10-21 Blanton_Script/blanton_fdr.sh Created v1.0.0 - FDR statistics through phydiag fdrstat
; start / clear / rdcnt / stop on ports '1-259,270-565':
; fdrstat STArt bin_group=both Interval=30 / clear / Counters /
; STOp. bcmcmd output printed as is, no parsing or PASS/FAIL
; -u 0 / -u 1 (default both), -i <sec> Interval, -n dry run
; !! 'stop' sends 'fdrstat STOp', by analogy with prbsstat STOp
; - NOT verified on the bench. If the BCM shell rejects it,
; FDR keeps running and only the log shows it (bcmcmd exits 0)
; !! called by path - chmod +x ~/Blanton_Script/*.sh
; ScriptA Turn off unused lanes before the BER baseline
; unused_lanes.sh off - both units, TX squelch on the unused
; retimer lanes and TSC31 (cd112-cd115) disabled on the TH6
; !! nothing turns them back on: no 'unused_lanes.sh on' in
; Script C. They stay off until 'unused_lanes.sh on' is run
; by hand (whether a reboot clears them is not checked)
; !! not gated by SWB_UNIT0 / SWB_UNIT1 - always both units
; !! needs the exec bit on unused_lanes.sh AND retimer_lanes.sh
; ScriptA FDR around the traffic baseline (SWB_UNIT0 = SWB_UNIT1 = 1 only)
; init -> fdr start -> clear -> fdr clear -> ... -> start ->
; sleep 40 -> fdr rdcnt -> traffic stop -> fdr stop -> report
; Traffic sleep 15 -> 40 so rdcnt reads after the first 30 s
; Interval is published (same rule as prbsstat Ber)
; !! the single-unit branches have no FDR and still sleep 15
; ScriptB fdr start + fdr clear with the traffic setup, before the loop
; (SWB_UNIT0 = SWB_UNIT1 = 1 only) - the counters run for the
; whole soak
; fdr rdcnt in every soak round, after the Tray ID stress
; !! not gated by SWB_UNIT0 / SWB_UNIT1, unlike the start -
; with one unit enabled FDR was never started, and the
; round just logs whatever fdrstat Counters returns
; ScriptC fdr rdcnt before traffic stop, fdr stop after it
; (SWB_UNIT0 = SWB_UNIT1 = 1 only) - the closing read of the
; counters Script B started, bracketing the soak
; V1.2.7 2026-10-22 Blanton_Script/blanton_fdr.sh v1.0.1 - default ports are the cabled ports only
; '1-259,270-565' -> the TL_PS_PORTS list of
; blanton_traffic_linespeed.sh (same as blanton_ber_debug.sh)
; The old range also printed the uncabled ports (cd15..19,
; cd47..51, cd111..115, ...)
; !! port 268 (ce0) is still left out - add ',268' through
; FDR_PORTS if FDR is wanted on the 100G uplink
; !! the port list now lives in three scripts (traffic,
; BER debug, FDR) - change all three when the cabling changes
; Blanton_Script/blantons_nfc_validate.py Vendor tool v2.3 -> v2.5 (qfx5252-nfc-validate, renamed)
; Adds --read-ndef / --write-ndef / --set-location, NCI data
; packets with credit flow control; fixes a FileNotFoundError
; crash while listing the processes holding the NFC device
; Bad arguments now print [FAIL] and exit 1, so nfc_polling
; counts them as FAIL instead of ERROR
; The default "test --debug" output ([PASS]/[FAIL], NFCID1=)
; is unchanged - nfc_polling.sh is not modified
; !! never put the write flags in NFC_ARGS
; ============================================================================= ; =============================================================================
include "config.ttl" include "config.ttl"
@@ -1061,6 +1112,10 @@ sendln "config feature state lldp disabled"
wait prompt_sonic_root wait prompt_sonic_root
sendln "config save -y" sendln "config save -y"
; ========== Turn off unused lanes ==========
wait prompt_sonic_root
sendln "~/Blanton_Script/unused_lanes.sh off"
; ========== BER ========== ; ========== BER ==========
; Baseline sweep, taken BEFORE the traffic run - ScriptC takes the closing ; Baseline sweep, taken BEFORE the traffic run - ScriptC takes the closing
; one after its traffic report, so the pair brackets the soak. ; one after its traffic report, so the pair brackets the soak.
@@ -1117,18 +1172,26 @@ if SWB_UNIT0 = 1 && SWB_UNIT1 = 1 then
wait prompt_sonic_root wait prompt_sonic_root
sendln "blanton_traffic_linespeed init" sendln "blanton_traffic_linespeed init"
wait prompt_sonic_root wait prompt_sonic_root
sendln "~/Blanton_Script/blanton_fdr.sh start"
wait prompt_sonic_root
sendln "blanton_traffic_linespeed clear" sendln "blanton_traffic_linespeed clear"
wait prompt_sonic_root wait prompt_sonic_root
sendln "~/Blanton_Script/blanton_fdr.sh clear"
wait prompt_sonic_root
sendln "sleep 5" sendln "sleep 5"
wait prompt_sonic_root wait prompt_sonic_root
sendln "blanton_traffic_linespeed show" sendln "blanton_traffic_linespeed show"
wait prompt_sonic_root wait prompt_sonic_root
sendln "blanton_traffic_linespeed start" sendln "blanton_traffic_linespeed start"
wait prompt_sonic_root wait prompt_sonic_root
sendln "sleep 15" sendln "sleep 40"
wait prompt_sonic_root
sendln "~/Blanton_Script/blanton_fdr.sh rdcnt"
wait prompt_sonic_root wait prompt_sonic_root
sendln "blanton_traffic_linespeed stop" sendln "blanton_traffic_linespeed stop"
wait prompt_sonic_root wait prompt_sonic_root
sendln "~/Blanton_Script/blanton_fdr.sh stop"
wait prompt_sonic_root
sendln "blanton_traffic_linespeed report" sendln "blanton_traffic_linespeed report"
elseif SWB_UNIT0 = 1 && SWB_UNIT1 = 0 then elseif SWB_UNIT0 = 1 && SWB_UNIT1 = 0 then
wait prompt_sonic_root wait prompt_sonic_root
@@ -138,8 +138,12 @@ if SWB_UNIT0 = 1 && SWB_UNIT1 = 1 then
wait prompt_sonic_root wait prompt_sonic_root
sendln "blanton_traffic_linespeed init" sendln "blanton_traffic_linespeed init"
wait prompt_sonic_root wait prompt_sonic_root
sendln "~/Blanton_Script/blanton_fdr.sh start"
wait prompt_sonic_root
sendln "blanton_traffic_linespeed clear" sendln "blanton_traffic_linespeed clear"
wait prompt_sonic_root wait prompt_sonic_root
sendln "~/Blanton_Script/blanton_fdr.sh clear"
wait prompt_sonic_root
sendln "sleep 5" sendln "sleep 5"
wait prompt_sonic_root wait prompt_sonic_root
sendln "blanton_traffic_linespeed show" sendln "blanton_traffic_linespeed show"
@@ -190,6 +194,10 @@ while 1
; ========== Tray ID Stress Test ========== ; ========== Tray ID Stress Test ==========
wait prompt_sonic_root wait prompt_sonic_root
sendln "~/Blanton_Script/tray_id_stress.sh" sendln "~/Blanton_Script/tray_id_stress.sh"
; ========== FDR Counter Read ==========
wait prompt_sonic_root
sendln "~/Blanton_Script/blanton_fdr.sh rdcnt"
wait prompt_sonic_root wait prompt_sonic_root
sendln "sleep 60" sendln "sleep 60"
@@ -85,9 +85,13 @@ sendln "show interfaces status Ethernet513,Ethernet514"
; ========== CHECK Traffic counters ========== ; ========== CHECK Traffic counters ==========
if SWB_UNIT0 = 1 && SWB_UNIT1 = 1 then if SWB_UNIT0 = 1 && SWB_UNIT1 = 1 then
wait prompt_sonic_root
sendln "~/Blanton_Script/blanton_fdr.sh rdcnt"
wait prompt_sonic_root wait prompt_sonic_root
sendln "blanton_traffic_linespeed stop" sendln "blanton_traffic_linespeed stop"
wait prompt_sonic_root wait prompt_sonic_root
sendln "~/Blanton_Script/blanton_fdr.sh stop"
wait prompt_sonic_root
sendln "blanton_traffic_linespeed report" sendln "blanton_traffic_linespeed report"
elseif SWB_UNIT0 = 1 && SWB_UNIT1 = 0 then elseif SWB_UNIT0 = 1 && SWB_UNIT1 = 0 then
wait prompt_sonic_root wait prompt_sonic_root
@@ -0,0 +1,106 @@
#!/usr/bin/env bash
# =============================================================================
# blanton_fdr.sh -- SerDes FDR statistics (phydiag fdrstat), raw output
# =============================================================================
# Version History:
# V1.0.0 2026-10-21 First version. start / clear / rdcnt / stop over
# 'phydiag <ports> fdrstat ...' through bcmcmd, the same
# way blanton_ber_debug.sh drives prbsstat. Every bcmcmd
# output is printed as is -- no parsing, no PASS/FAIL.
# V1.0.1 2026-10-22 Change: default FDR_PORTS is now the cabled-port list of
# blanton_traffic_linespeed.sh (TL_PS_PORTS), not
# '1-259,270-565' -- the old range also printed the
# uncabled ports (cd15..19, cd47..51, ...). Port 268 (ce0)
# is still left out; add ',268' through FDR_PORTS.
#
# Sub-commands (each one runs on unit 0, then unit 1):
# start phydiag '<ports>' fdrstat STArt bin_group=both Interval=30
# clear phydiag '<ports>' fdrstat clear
# rdcnt phydiag '<ports>' fdrstat Counters
# stop phydiag '<ports>' fdrstat STOp
#
# ⚠️ 'stop' sends 'fdrstat STOp', by analogy with 'prbsstat STOp'. It has
# not been checked on the bench -- if the BCM shell rejects it, look at
# 'phydiag help' (or 'fdrstat' with no argument) for the right keyword.
# ⚠️ bcmcmd exits 0 even when the BCM shell refuses a command, so this
# script cannot tell success from failure. Read the output.
#
# Usage:
# ./blanton_fdr.sh <start|clear|rdcnt|stop> [-u 0|1] [-i <sec>] [-n]
# -u 0 | -u 1 one switch unit only (default: both, 0 then 1)
# -i <sec> start: fdrstat Interval (default 30)
# -n dry run: print the bcmcmd lines, do not run them
#
# Env overrides:
# BCMCMD_CMD=bcmcmd FDR_INTERVAL=30 FDR_BIN_GROUP=both
# FDR_PORTS="1-24,40-96,..." (default: the cabled ports, same list as
# TL_PS_PORTS in blanton_traffic_linespeed.sh
# and BER_PORTS in blanton_ber_debug.sh; no 268)
# =============================================================================
BCMCMD_CMD="${BCMCMD_CMD:-bcmcmd}"
FDR_UNITS="0 1"
# Cabled ports only -- keep in sync with TL_PS_PORTS in blanton_traffic_linespeed.sh
FDR_PORTS="${FDR_PORTS:-1-24,40-96,112-168,184-240,256-259,270-308,310-327,342-380,382-399,414-452,454-471,486-524,526-543,558-565}"
FDR_INTERVAL="${FDR_INTERVAL:-30}"
FDR_BIN_GROUP="${FDR_BIN_GROUP:-both}"
FDR_DRY_RUN=0
usage() {
sed -n '/^# Usage:/,/^# =====/p' "$0" | sed '$d; s/^# \{0,1\}//'
}
[ $# -ge 1 ] || { usage >&2; exit 2; }
ACT=$1; shift
case "$ACT" in
start|clear|rdcnt|stop) ;;
-h|--help|help) usage; exit 0 ;;
*) echo "[ERR ] unknown sub-command '$ACT'" >&2; usage >&2; exit 2 ;;
esac
while [ $# -gt 0 ]; do
case "$1" in
-u|--unit)
case "$2" in
0|1) FDR_UNITS="$2" ;;
*) echo "[ERR ] invalid unit '$2' (use 0 or 1)" >&2; exit 2 ;;
esac
shift 2 ;;
-i|--interval)
case "$2" in
''|*[!0-9]*) echo "[ERR ] invalid interval '$2'" >&2; exit 2 ;;
*) FDR_INTERVAL="$2" ;;
esac
shift 2 ;;
-n|--dry-run) FDR_DRY_RUN=1; shift ;;
-h|--help) usage; exit 0 ;;
*) echo "[ERR ] unknown option '$1'" >&2; usage >&2; exit 2 ;;
esac
done
# bcmcmd reads stdin -- keep it on /dev/null (see blanton_traffic_linespeed.sh V0.3.1)
_bcm() {
local unit="$1"; shift
local cmd="dsh -c \"phydiag '${FDR_PORTS}' fdrstat $*\""
echo
echo "### [$(date '+%F %T')] unit $unit: phydiag '${FDR_PORTS}' fdrstat $*"
if [ "$FDR_DRY_RUN" = "1" ]; then
echo "[DRY ] $BCMCMD_CMD -n $unit -c ' ${cmd} '"
return 0
fi
"$BCMCMD_CMD" -n "$unit" -c " ${cmd} " </dev/null 2>&1
}
case "$ACT" in
start) SUB="STArt bin_group=${FDR_BIN_GROUP} Interval=${FDR_INTERVAL}" ;;
clear) SUB="clear" ;;
rdcnt) SUB="Counters" ;;
stop) SUB="STOp" ;;
esac
for u in $FDR_UNITS; do
_bcm "$u" "$SUB"
done
echo
echo "### [$(date '+%F %T')] FDR_${ACT^^}_DONE units: $FDR_UNITS"
File diff suppressed because it is too large Load Diff