|
|
@@ -14,14 +14,22 @@ import zipfile
|
|
|
|
|
|
WIN_HOST = "administrator@192.168.2.24"
|
|
|
WIN_BASE_DIR = "C:/Users/Administrator/Desktop/prod2u-delivery"
|
|
|
+VERSION_TAG = "20261019-v2.0-rc1"
|
|
|
+WIN_VER_DIR = f"{WIN_BASE_DIR}/{VERSION_TAG}"
|
|
|
ROOT = Path(__file__).resolve().parent.parent
|
|
|
|
|
|
-BITSTREAM_MRDIMM = Path("/data/prod2u/cpld-runs/mrdimm-chamber-td-20261012T013721Z-75871485/bitgen/prod2u_mrdimm.bit")
|
|
|
-RECEIPT_MRDIMM = Path("/data/prod2u/cpld-runs/mrdimm-chamber-td-20261012T013721Z-75871485/td-receipt.json")
|
|
|
-BITSTREAM_6400_V2 = Path("/data/prod2u/cpld-runs/6400-v2-td-20261012T013954Z-75871485/bitgen/prod2u_6400_v2.bit")
|
|
|
-RECEIPT_6400_V2 = Path("/data/prod2u/cpld-runs/6400-v2-td-20261012T013954Z-75871485/td-receipt.json")
|
|
|
+BITSTREAM_MRDIMM = Path("/data/prod2u/cpld-runs/mrdimm-chamber-td-20261019T170926Z-388e0e63/bitgen/prod2u_mrdimm.bit")
|
|
|
+RECEIPT_MRDIMM = Path("/data/prod2u/cpld-runs/mrdimm-chamber-td-20261019T170926Z-388e0e63/td-receipt.json")
|
|
|
+
|
|
|
+BITSTREAM_6400_V2 = Path("/data/prod2u/cpld-runs/6400-v2-td-20261019T170754Z-388e0e63/bitgen/prod2u_6400_v2.bit")
|
|
|
+RECEIPT_6400_V2 = Path("/data/prod2u/cpld-runs/6400-v2-td-20261019T170754Z-388e0e63/td-receipt.json")
|
|
|
+
|
|
|
+BITSTREAM_6400 = Path("/data/prod2u/cpld-runs/6400-front-rear-td-20261019T171324Z-388e0e63/bitgen/prod2u_6400_front_back.bit")
|
|
|
+RECEIPT_6400 = Path("/data/prod2u/cpld-runs/6400-front-rear-td-20261019T171324Z-388e0e63/td-receipt.json")
|
|
|
+
|
|
|
HW_RECEIPT = ROOT / "receipts/hardware_test_receipt.json"
|
|
|
|
|
|
+
|
|
|
def sha256_file(path: Path) -> str:
|
|
|
h = hashlib.sha256()
|
|
|
with open(path, "rb") as f:
|
|
|
@@ -29,24 +37,39 @@ def sha256_file(path: Path) -> str:
|
|
|
h.update(chunk)
|
|
|
return h.hexdigest()
|
|
|
|
|
|
+
|
|
|
def run_ssh(cmd: str, check: bool = True) -> subprocess.CompletedProcess:
|
|
|
res = subprocess.run(["ssh", "-o", "StrictHostKeyChecking=no", WIN_HOST, cmd], capture_output=True, text=True)
|
|
|
if check and res.returncode != 0:
|
|
|
raise RuntimeError(f"SSH command failed ({res.returncode}):\nCmd: {cmd}\nStderr: {res.stderr}\nStdout: {res.stdout}")
|
|
|
return res
|
|
|
|
|
|
+
|
|
|
def scp(local: Path, remote: str):
|
|
|
print(f"Uploading {local.name} -> {remote}...")
|
|
|
subprocess.run(["scp", "-o", "StrictHostKeyChecking=no", str(local), f"{WIN_HOST}:{remote}"], check=True)
|
|
|
|
|
|
+
|
|
|
def main():
|
|
|
- print("=== Step 1: Packaging latest clean codebase ===")
|
|
|
+ print(f"=== Step 1: Initializing versioned delivery directory: {WIN_VER_DIR} ===")
|
|
|
+ ps_init = (
|
|
|
+ f"if (!(Test-Path '{WIN_VER_DIR}')) {{ New-Item -ItemType Directory -Force -Path '{WIN_VER_DIR}' }}; "
|
|
|
+ f"New-Item -ItemType Directory -Force -Path '{WIN_VER_DIR}/MRDIMM-V1.2'; "
|
|
|
+ f"New-Item -ItemType Directory -Force -Path '{WIN_VER_DIR}/6400-V2.0'; "
|
|
|
+ f"New-Item -ItemType Directory -Force -Path '{WIN_VER_DIR}/6400-V1.1'; "
|
|
|
+ f"New-Item -ItemType Directory -Force -Path '{WIN_VER_DIR}/firmware'; "
|
|
|
+ f"New-Item -ItemType Directory -Force -Path '{WIN_VER_DIR}/tools'; "
|
|
|
+ f"New-Item -ItemType Directory -Force -Path '{WIN_VER_DIR}/reports'"
|
|
|
+ )
|
|
|
+ run_ssh(f'powershell -NoProfile -Command "{ps_init}"')
|
|
|
+
|
|
|
+ print("\n=== Step 2: Packaging latest clean codebase ===")
|
|
|
tar_path = Path("/tmp/cpld-temperature-control-latest.tar.gz")
|
|
|
zip_path = Path("/tmp/cpld-temperature-control-latest.zip")
|
|
|
-
|
|
|
+
|
|
|
exclude_dirs = {'.git', '.cache', '__pycache__', '.pytest_cache', 'scratch', 'dist', '.omo', 'tmp', 'cpld-runs'}
|
|
|
exclude_exts = {'.pyc', '.o', '.db', '.log'}
|
|
|
-
|
|
|
+
|
|
|
def is_valid(p: Path):
|
|
|
if any(part in exclude_dirs for part in p.parts):
|
|
|
return False
|
|
|
@@ -59,35 +82,35 @@ def main():
|
|
|
for path in sorted(ROOT.rglob('*')):
|
|
|
if not path.is_file() or not is_valid(path):
|
|
|
continue
|
|
|
- rel = path.relative_to(ROOT)
|
|
|
- tar.add(path, arcname=str(Path('latest-code') / rel))
|
|
|
-
|
|
|
- # Build zip (for user direct download)
|
|
|
- with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as z:
|
|
|
+ arcname = path.relative_to(ROOT)
|
|
|
+ tar.add(path, arcname=f"cpld-temperature-control/{arcname}")
|
|
|
+
|
|
|
+ # Build standalone zip archive
|
|
|
+ with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
|
|
|
for path in sorted(ROOT.rglob('*')):
|
|
|
if not path.is_file() or not is_valid(path):
|
|
|
continue
|
|
|
- rel = path.relative_to(ROOT)
|
|
|
- z.write(path, arcname=str(Path('cpld-temperature-control') / rel))
|
|
|
-
|
|
|
- print(f"Tar size: {tar_path.stat().st_size / 1024 / 1024:.2f} MB")
|
|
|
- print(f"Zip size: {zip_path.stat().st_size / 1024 / 1024:.2f} MB")
|
|
|
+ arcname = path.relative_to(ROOT)
|
|
|
+ zipf.write(path, arcname=f"cpld-temperature-control/{arcname}")
|
|
|
+
|
|
|
+ tar_sha = sha256_file(tar_path)
|
|
|
zip_sha = sha256_file(zip_path)
|
|
|
-
|
|
|
- print("\n=== Step 2: Uploading codebase to Windows ===")
|
|
|
+ print(f"Archive tar.gz size: {tar_path.stat().st_size / 1024 / 1024:.2f} MB, SHA256: {tar_sha}")
|
|
|
+ print(f"Archive zip size: {zip_path.stat().st_size / 1024 / 1024:.2f} MB, SHA256: {zip_sha}")
|
|
|
+
|
|
|
scp(zip_path, f"{WIN_BASE_DIR}/cpld-temperature-control-latest.zip")
|
|
|
-
|
|
|
- # Extract zip into cpld-temperature-control directory
|
|
|
- print("Extracting cpld-temperature-control directory on Windows...")
|
|
|
- run_ssh(f'cd /d "{WIN_BASE_DIR}" && powershell -NoProfile -Command "Expand-Archive -Path cpld-temperature-control-latest.zip -DestinationPath . -Force"')
|
|
|
-
|
|
|
- print("\n=== Step 3: Updating MRDIMM-V1.2 and 6400-V2.0 firmware ===")
|
|
|
+ scp(zip_path, f"{WIN_VER_DIR}/cpld-temperature-control-latest.zip")
|
|
|
+
|
|
|
+ print("\n=== Step 3: Updating MRDIMM-V1.2, 6400-V2.0, 6400-V1.1 firmware and receipts ===")
|
|
|
assert BITSTREAM_MRDIMM.is_file(), f"Missing {BITSTREAM_MRDIMM}"
|
|
|
mrdimm_sha = sha256_file(BITSTREAM_MRDIMM)
|
|
|
print(f"MRDIMM bitstream SHA256: {mrdimm_sha}")
|
|
|
scp(BITSTREAM_MRDIMM, f"{WIN_BASE_DIR}/MRDIMM-V1.2/prod2u_mrdimm.bit")
|
|
|
scp(BITSTREAM_MRDIMM, f"{WIN_BASE_DIR}/MRDIMM-V1.2/firmware/prod2u_mrdimm.bit")
|
|
|
scp(RECEIPT_MRDIMM, f"{WIN_BASE_DIR}/MRDIMM-V1.2/firmware/TD-BUILD-RECEIPT.json")
|
|
|
+ scp(BITSTREAM_MRDIMM, f"{WIN_VER_DIR}/MRDIMM-V1.2/prod2u_mrdimm.bit")
|
|
|
+ scp(BITSTREAM_MRDIMM, f"{WIN_VER_DIR}/firmware/prod2u_mrdimm.bit")
|
|
|
+ scp(RECEIPT_MRDIMM, f"{WIN_VER_DIR}/firmware/td-receipt-mrdimm.json")
|
|
|
|
|
|
assert BITSTREAM_6400_V2.is_file(), f"Missing {BITSTREAM_6400_V2}"
|
|
|
v2_sha = sha256_file(BITSTREAM_6400_V2)
|
|
|
@@ -95,24 +118,54 @@ def main():
|
|
|
scp(BITSTREAM_6400_V2, f"{WIN_BASE_DIR}/6400-V2.0/prod2u_6400_v2.bit")
|
|
|
scp(BITSTREAM_6400_V2, f"{WIN_BASE_DIR}/6400-V2.0/firmware/prod2u_6400_v2.bit")
|
|
|
scp(RECEIPT_6400_V2, f"{WIN_BASE_DIR}/6400-V2.0/firmware/TD-BUILD-RECEIPT.json")
|
|
|
+ scp(BITSTREAM_6400_V2, f"{WIN_VER_DIR}/6400-V2.0/prod2u_6400_v2.bit")
|
|
|
+ scp(BITSTREAM_6400_V2, f"{WIN_VER_DIR}/firmware/prod2u_6400_v2.bit")
|
|
|
+ scp(RECEIPT_6400_V2, f"{WIN_VER_DIR}/firmware/td-receipt-6400-v2.json")
|
|
|
+
|
|
|
+ assert BITSTREAM_6400.is_file(), f"Missing {BITSTREAM_6400}"
|
|
|
+ v1_sha = sha256_file(BITSTREAM_6400)
|
|
|
+ print(f"6400 V1.1 bitstream SHA256: {v1_sha}")
|
|
|
+ scp(BITSTREAM_6400, f"{WIN_BASE_DIR}/6400-V1.1/prod2u_6400_front_back.bit")
|
|
|
+ scp(BITSTREAM_6400, f"{WIN_VER_DIR}/6400-V1.1/prod2u_6400_front_back.bit")
|
|
|
+ scp(BITSTREAM_6400, f"{WIN_VER_DIR}/firmware/prod2u_6400_front_back.bit")
|
|
|
+ scp(RECEIPT_6400, f"{WIN_VER_DIR}/firmware/td-receipt-6400-v1.json")
|
|
|
|
|
|
exe_mrdimm = Path("/workspace/windows-exes/Prod2U-MRDIMM-GUI.exe")
|
|
|
if exe_mrdimm.is_file():
|
|
|
scp(exe_mrdimm, f"{WIN_BASE_DIR}/MRDIMM-V1.2/Prod2U-MRDIMM-GUI.exe")
|
|
|
+ scp(exe_mrdimm, f"{WIN_VER_DIR}/MRDIMM-V1.2/Prod2U-MRDIMM-GUI.exe")
|
|
|
+ scp(exe_mrdimm, f"{WIN_VER_DIR}/tools/Prod2U-MRDIMM-GUI.exe")
|
|
|
exe_6400_v2 = Path("/workspace/windows-exes/Prod2U-6400-V2-GUI.exe")
|
|
|
if exe_6400_v2.is_file():
|
|
|
scp(exe_6400_v2, f"{WIN_BASE_DIR}/6400-V2.0/Prod2U-6400-V2-GUI.exe")
|
|
|
+ scp(exe_6400_v2, f"{WIN_VER_DIR}/6400-V2.0/Prod2U-6400-V2-GUI.exe")
|
|
|
+ scp(exe_6400_v2, f"{WIN_VER_DIR}/tools/Prod2U-6400-V2-GUI.exe")
|
|
|
exe_6400 = Path("/workspace/windows-exes/Prod2U-6400-GUI.exe")
|
|
|
if exe_6400.is_file():
|
|
|
scp(exe_6400, f"{WIN_BASE_DIR}/6400-V1.1/Prod2U-6400-GUI.exe")
|
|
|
+ scp(exe_6400, f"{WIN_VER_DIR}/6400-V1.1/Prod2U-6400-GUI.exe")
|
|
|
+ scp(exe_6400, f"{WIN_VER_DIR}/tools/Prod2U-6400-GUI.exe")
|
|
|
+
|
|
|
+ # Upload load sweep tool
|
|
|
+ sweep_tool = ROOT / "tools/prod2u_load_sweep.py"
|
|
|
+ if sweep_tool.is_file():
|
|
|
+ scp(sweep_tool, f"{WIN_VER_DIR}/tools/prod2u_load_sweep.py")
|
|
|
+
|
|
|
+ # Upload coverage ledgers and reports
|
|
|
+ cov_json = ROOT / "evidence/coverage/all-files-review-coverage.json"
|
|
|
+ cov_csv = ROOT / "evidence/coverage/all-files-review-coverage.csv"
|
|
|
+ if cov_json.is_file():
|
|
|
+ scp(cov_json, f"{WIN_VER_DIR}/reports/all-files-review-coverage.json")
|
|
|
+ if cov_csv.is_file():
|
|
|
+ scp(cov_csv, f"{WIN_VER_DIR}/reports/all-files-review-coverage.csv")
|
|
|
|
|
|
- r3_zip = ROOT / "prod2u-final-delivery-20261012.r3.zip"
|
|
|
- if r3_zip.is_file():
|
|
|
- scp(r3_zip, f"{WIN_BASE_DIR}/prod2u-final-delivery-20261012.r3.zip")
|
|
|
+ pcb_rep = ROOT / "evidence/reports/pcb-topology-verification-20261019.md"
|
|
|
+ if pcb_rep.is_file():
|
|
|
+ scp(pcb_rep, f"{WIN_VER_DIR}/reports/pcb-topology-verification-20261019.md")
|
|
|
|
|
|
- if HW_RECEIPT.is_file():
|
|
|
- scp(HW_RECEIPT, f"{WIN_BASE_DIR}/MRDIMM-V1.2/firmware/hardware_test_receipt.json")
|
|
|
- scp(HW_RECEIPT, f"{WIN_BASE_DIR}/hardware_test_receipt.json")
|
|
|
+ ptc_guide = ROOT / "docs/hardware/PTC_EMPTY_LOAD_DISCHARGE_GUIDE.md"
|
|
|
+ if ptc_guide.is_file():
|
|
|
+ scp(ptc_guide, f"{WIN_VER_DIR}/reports/PTC_EMPTY_LOAD_DISCHARGE_GUIDE.md")
|
|
|
|
|
|
print("\n=== Step 4: Creating and Uploading Analysis Package ===")
|
|
|
analysis_zip = Path("/tmp/Prod2U-Analysis.zip")
|
|
|
@@ -130,8 +183,15 @@ def main():
|
|
|
az.write(RECEIPT_MRDIMM, arcname="receipts/mrdimm_td_receipt.json")
|
|
|
if RECEIPT_6400_V2.is_file():
|
|
|
az.write(RECEIPT_6400_V2, arcname="receipts/6400_v2_td_receipt.json")
|
|
|
+ if RECEIPT_6400.is_file():
|
|
|
+ az.write(RECEIPT_6400, arcname="receipts/6400_v1_td_receipt.json")
|
|
|
if HW_RECEIPT.is_file():
|
|
|
az.write(HW_RECEIPT, arcname="receipts/hardware_test_receipt.json")
|
|
|
+ # Include coverage
|
|
|
+ if cov_json.is_file():
|
|
|
+ az.write(cov_json, arcname="coverage/all-files-review-coverage.json")
|
|
|
+ if cov_csv.is_file():
|
|
|
+ az.write(cov_csv, arcname="coverage/all-files-review-coverage.csv")
|
|
|
# Include contracts
|
|
|
for cp in ROOT.glob("contracts/**/*"):
|
|
|
if cp.is_file():
|
|
|
@@ -147,88 +207,92 @@ def main():
|
|
|
analysis_sha = sha256_file(analysis_zip)
|
|
|
print(f"Prod2U-Analysis.zip size: {analysis_zip.stat().st_size / 1024 / 1024:.2f} MB, SHA256: {analysis_sha}")
|
|
|
scp(analysis_zip, f"{WIN_BASE_DIR}/Prod2U-Analysis.zip")
|
|
|
+ scp(analysis_zip, f"{WIN_VER_DIR}/Prod2U-Analysis.zip")
|
|
|
|
|
|
print("\n=== Step 5: Updating manifests, changelog and readmes ===")
|
|
|
- changelog_content = """Prod2U 交付变更与维护记录 (CHANGELOG)
|
|
|
+ changelog_content = f"""Prod2U 交付变更与维护记录 (CHANGELOG)
|
|
|
================================================================================
|
|
|
|
|
|
-【2026-10-12 最新发布:MRDIMM / 8000 FCB V1.2 全量接线纠正、固件精简与量产闭环 (r3)】
|
|
|
-1. 来源权威核验与r2撤销:
|
|
|
- - SHA-256 严格比对全部 6 项权威输入材料。
|
|
|
- - 确认 r2 存在约束名错漏、位流 SHA 不一致以及未按 8000 线束分配引脚等问题,正式标记为
|
|
|
- REVOKED_PENDING_REAUTH_WIRING_MISMATCH,生成 R2-REVOCATION-REASONS.md 等审计文件。
|
|
|
-
|
|
|
-2. 8000 FCB V1.2 全量 84 管脚接线纠正:
|
|
|
- - 依据 8000 电气图 V1.2 与 FCB_FPGA+MCU_V1.2 BRD 原生网络表交叉比对,核定全部 84 个物理管脚:
|
|
|
- * 12 轴步进电机 (M1..M12,机械顺序 U1/X1..A1, U2/X2..A2, U3/X3..A3):
|
|
|
- CON104..CON115 STEP 门控 (C12, L12, L14, G14, L13, K12, J14, G13, H13, H11, G11, F12)
|
|
|
- CON104..CON115 DIR 门控 (B12, J11, K14, G15, K11, K13, J12, F14, J13, H12, H14, D15)
|
|
|
- * 24 路限位开关 (LS1/HS1..LS12/HS12):
|
|
|
- CON12/126/127/128/129/138 (A5, B6, C8, A8, D7, E7, A4, C5, A3, B4, A12, B11, L16, L15, K15, J16, K16, J15, H15, H16, T3, R4, P4, T5)
|
|
|
- * 24 路物理 PTC (CON18/27/28/29)、4 路风扇 (CON25/8/24/26)、电机使能 (CON120.2 / C11)
|
|
|
- * 通信:RS232 (CON78 M10/N11)、TTL (CON140 T11/P13)、BMC (CON77 L10/M9)、CT7428 I2C (M8/N9)
|
|
|
- - 导出权威映射表 mrdimm_8000_v1_2_wiring.json / csv 及 CT7428-WIRING-MATRIX-r3.csv,84 引脚 0 冲突。
|
|
|
-
|
|
|
-3. 执行器极简重构与固件精简:
|
|
|
- - 彻底移除 12x32 BRAM 深队列与过度规划器,重构为 12 轴独立单段架构。
|
|
|
- - STEP 硬件上升沿精确计数,变频半周期定时,换向 10us 建立时间,到位电机停步保持。
|
|
|
- - 相应运动方向限位触发即刻硬件阻断;STOP_CLEAR 无锁清除。
|
|
|
- - 统一 TX 仲裁器确保上位机应答最高优先级,周期调试信标延长至 5 秒。
|
|
|
-
|
|
|
-4. 原生 TD 全流程综合布线与回归验证:
|
|
|
- - Anlogic TD 2026.1 SP2 构建通过:
|
|
|
- * MRDIMM V1.2: LUT 3761 / 4480 (82.48%), Fmax 54.585 MHz (时序零违例,Setup Slack +21.68ns),
|
|
|
- 位流 SHA256: 55993492ba4a6bac4bcf2d80388051a9743b69b75eb7da11523f813d638ccd09
|
|
|
- * 6400 V2.0: LUT 2204 / 4480, Fmax 71.418 MHz (时序零违例,Setup Slack +25.99ns),
|
|
|
- 位流 SHA256: 9961acbf912717641c88c7b45e575ecfc0fcc266cf7ea9a1450191765aaf5b0c
|
|
|
- - 837 项单元与回归测试 100% PASS;全链路 PTY 数字联合仿真 100% PASS。
|
|
|
- - Windows 192.168.2.24 原生 PyInstaller 编译 3 个独立 EXE,脱机 --self-test 全部 PASS。
|
|
|
+【2026-10-19 发布:20261019-v2.0-rc1 架构精简、全栈修复与量产闭环交付】
|
|
|
+1. MRDIMM V1.2 关键缺陷修复:
|
|
|
+ - 修复 FAN 第 4 路开机/看门狗后误为 0% 问题(bank_valid 握手对齐,恢复默认 20/20/20/20%)。
|
|
|
+ - 修复 BMC ASCII 轮询解析:固定 500ms 窗口,消除回显重叠与字符丢失风险。
|
|
|
+ - 调试信标周期由 500ms 调整为 5 秒,周期发送 ASCII 提示符与心跳帧。
|
|
|
+ - 12 轴执行器状态机与单段有限步进架构严密闭环,无缝响应 STOP_CLEAR 与双向限位阻断。
|
|
|
+
|
|
|
+2. 6400 V2.0 硬件拓扑与全功能落地:
|
|
|
+ - 完成 FCB_FPGA+MCU_V2.0 与 FCB_FAN_V2.0 原生 BRD 拓扑全面审计。
|
|
|
+ - 确认腔体 4 (Chamber 4) PTC 引脚物理连通性:CON150 引出 5 路并联加热网,第 6 路通过 CON149.13 (PTC27) 直连 CPLD 球号 P2。
|
|
|
+ - 确认风扇极性反转链路:母板 NMOS 驱动反相,风扇板 100% 直通铜箔,设定 FAN_BOARD_INVERT_MASK = 8'hFF。
|
|
|
+ - 确认 CON170 RJ45 8-Pin 管理口网络走线:Pin 3 TX, Pin 6 RX, Pin 4 GND,并联 BMC 接口。
|
|
|
+ - 补充独立空载 PTC 放电操作指南与电气安全防护规范。
|
|
|
+
|
|
|
+3. 独立压测与工具链交付:
|
|
|
+ - 开发独立 prod2u_load_sweep.py 工具,支持 all/walk/stagger/listen 模式与 5 秒周期 GET_ALL 轮询。
|
|
|
+ - 交付脚本 run_io_stress.sh 与 Makefile test 自动化集成。
|
|
|
+ - 维护包含 1678 个文件的全量审查覆盖账本 (all-files-review-coverage.json / csv)。
|
|
|
+
|
|
|
+4. 原生 Anlogic TD 2026.1 SP2 全流程综合布线与位流生成:
|
|
|
+ - 6400 V2.0: LUT 2275 / 4480 (50.78%), Setup Slack +25.98ns, Hold Slack +0.004ns, Fmax 71.3 MHz
|
|
|
+ 位流 SHA256: {v2_sha}
|
|
|
+ - MRDIMM V1.2: LUT 3810 / 4480 (85.04%), Setup Slack +23.58ns, Hold Slack +0.032ns, Fmax 60.9 MHz
|
|
|
+ 位流 SHA256: {mrdimm_sha}
|
|
|
+ - 6400 V1.1: LUT 1545 / 4480 (34.49%), Setup Slack +29.71ns, Hold Slack +0.055ns, Fmax 97.2 MHz
|
|
|
+ 位流 SHA256: {v1_sha}
|
|
|
+
|
|
|
+5. Windows 原生 PyInstaller 构建与自测:
|
|
|
+ - 在 192.168.2.24 上编译 Prod2U-6400-GUI.exe, Prod2U-6400-V2-GUI.exe, Prod2U-MRDIMM-GUI.exe
|
|
|
+ - 运行 --self-test 全部 PASS (exit=0)。
|
|
|
================================================================================
|
|
|
"""
|
|
|
tmp_changelog = Path("/tmp/CHANGELOG.txt")
|
|
|
tmp_changelog.write_text(changelog_content, encoding="utf-8")
|
|
|
scp(tmp_changelog, f"{WIN_BASE_DIR}/CHANGELOG.txt")
|
|
|
+ scp(tmp_changelog, f"{WIN_VER_DIR}/CHANGELOG.txt")
|
|
|
|
|
|
- readme_content = """===============================================================================
|
|
|
-Prod2U 交付系统使用说明 (最新维护日期: 2026-10-12 / PROD2U-MIN-20261012.r3)
|
|
|
+ readme_content = f"""===============================================================================
|
|
|
+Prod2U 交付系统使用说明 (版本: {VERSION_TAG})
|
|
|
===============================================================================
|
|
|
|
|
|
-【最新工程源代码位置】
|
|
|
-1. 完整最新代码解压目录:
|
|
|
- -> "cpld-temperature-control\\"
|
|
|
-2. 最新代码单体压缩包:
|
|
|
- -> "prod2u-final-delivery-20261012.r3.zip"
|
|
|
- -> "cpld-temperature-control-latest.zip"
|
|
|
-3. 全套代码与证据分析包:
|
|
|
- -> "Prod2U-Analysis.zip"
|
|
|
-
|
|
|
-【产品运行入口 (用户直接双击运行)】
|
|
|
-1. 6400 V1.1 温度控制系统:
|
|
|
- -> 进入 "6400-V1.1" 目录,双击运行 "Prod2U-6400-GUI.exe"
|
|
|
- -> 对应固件: prod2u_6400_front_back.bit
|
|
|
-
|
|
|
-2. 6400 V2.0 温度控制系统:
|
|
|
- -> 进入 "6400-V2.0" 目录,双击运行 "Prod2U-6400-V2-GUI.exe"
|
|
|
- -> 对应固件: prod2u_6400_v2.bit (SHA256: 9961acbf912717641c88c7b45e575ecfc0fcc266cf7ea9a1450191765aaf5b0c)
|
|
|
-
|
|
|
-3. MRDIMM / 8000 V1.2 腔体控制系统:
|
|
|
- -> 进入 "MRDIMM-V1.2" 目录,双击运行 "Prod2U-MRDIMM-GUI.exe"
|
|
|
- -> 对应固件: prod2u_mrdimm.bit (SHA256: 55993492ba4a6bac4bcf2d80388051a9743b69b75eb7da11523f813d638ccd09)
|
|
|
- * 默认波特率 115200 8N1,已纠正 8000 全量 12 轴步进电机与 24 路限位开关物理接线。
|
|
|
+【最新工程发布目录】
|
|
|
+本版本独立归档在: {WIN_VER_DIR}
|
|
|
+
|
|
|
+【包含内容】
|
|
|
+1. 固件目录 (firmware/):
|
|
|
+ - prod2u_6400_v2.bit (6400 V2.0 生产位流, SHA256: {v2_sha})
|
|
|
+ - prod2u_mrdimm.bit (MRDIMM V1.2 生产位流, SHA256: {mrdimm_sha})
|
|
|
+ - prod2u_6400_front_back.bit (6400 V1.1 生产位流, SHA256: {v1_sha})
|
|
|
+ - 原生 Anlogic TD 构建回执 (td-receipt-*.json)
|
|
|
+
|
|
|
+2. 可执行工具 (tools/):
|
|
|
+ - Prod2U-6400-V2-GUI.exe (6400 V2.0 图形界面)
|
|
|
+ - Prod2U-MRDIMM-GUI.exe (MRDIMM V1.2 图形界面)
|
|
|
+ - Prod2U-6400-GUI.exe (6400 V1.1 图形界面)
|
|
|
+ - prod2u_load_sweep.py (独立自动化负载压测工具)
|
|
|
+
|
|
|
+3. 审查与审计报告 (reports/):
|
|
|
+ - all-files-review-coverage.json / csv (1678 个文件全量诚实审查账本)
|
|
|
+ - pcb-topology-verification-20261019.md (PCB 原生拓扑与网络审计报告)
|
|
|
+ - PTC_EMPTY_LOAD_DISCHARGE_GUIDE.md (空载 PTC 放电安全操作指南)
|
|
|
+ - Prod2U-Analysis.zip (全量工程分析包)
|
|
|
+
|
|
|
+4. 源代码包:
|
|
|
+ - cpld-temperature-control-latest.zip
|
|
|
===============================================================================
|
|
|
"""
|
|
|
tmp_readme = Path("/tmp/README.txt")
|
|
|
tmp_readme.write_text(readme_content, encoding="utf-8")
|
|
|
scp(tmp_readme, f"{WIN_BASE_DIR}/README.txt")
|
|
|
scp(tmp_readme, f"{WIN_BASE_DIR}/使用说明.txt")
|
|
|
+ scp(tmp_readme, f"{WIN_VER_DIR}/README.txt")
|
|
|
|
|
|
manifest_data = {
|
|
|
- "schema": "prod2u-delivery-manifest-v5",
|
|
|
- "generated_at": "2026-10-12T01:50:00Z",
|
|
|
- "version": "PROD2U-MIN-20261012.r3",
|
|
|
+ "schema": "prod2u-delivery-manifest-v6",
|
|
|
+ "generated_at": "2026-10-19T17:26:00Z",
|
|
|
+ "version": VERSION_TAG,
|
|
|
"latest_source": {
|
|
|
"directory": "cpld-temperature-control",
|
|
|
- "zip_archive": "prod2u-final-delivery-20261012.r3.zip",
|
|
|
+ "zip_archive": "cpld-temperature-control-latest.zip",
|
|
|
"zip_sha256": zip_sha,
|
|
|
"analysis_zip": "Prod2U-Analysis.zip",
|
|
|
"analysis_sha256": analysis_sha
|
|
|
@@ -237,35 +301,44 @@ Prod2U 交付系统使用说明 (最新维护日期: 2026-10-12 / PROD2U-MIN-202
|
|
|
"6400-V2.0": {
|
|
|
"bitstream": "prod2u_6400_v2.bit",
|
|
|
"bitstream_sha256": v2_sha,
|
|
|
- "status": "TD_PASS"
|
|
|
+ "status": "TD_PASS_QUALIFIED"
|
|
|
},
|
|
|
"MRDIMM-V1.2": {
|
|
|
"bitstream": "prod2u_mrdimm.bit",
|
|
|
"bitstream_sha256": mrdimm_sha,
|
|
|
- "status": "TD_PASS_AND_SIM_PASS"
|
|
|
+ "status": "TD_PASS_QUALIFIED"
|
|
|
+ },
|
|
|
+ "6400-front-rear": {
|
|
|
+ "bitstream": "prod2u_6400_front_back.bit",
|
|
|
+ "bitstream_sha256": v1_sha,
|
|
|
+ "status": "TD_PASS_QUALIFIED"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
tmp_manifest = Path("/tmp/DELIVERY-MANIFEST.json")
|
|
|
tmp_manifest.write_text(json.dumps(manifest_data, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
|
scp(tmp_manifest, f"{WIN_BASE_DIR}/DELIVERY-MANIFEST.json")
|
|
|
+ scp(tmp_manifest, f"{WIN_VER_DIR}/DELIVERY-MANIFEST.json")
|
|
|
|
|
|
print("\n=== Step 6: Remote PowerShell SHA-256 Validation ===")
|
|
|
ps_cmd = (
|
|
|
- f"$h1 = (Get-FileHash -Path '{WIN_BASE_DIR}/cpld-temperature-control-latest.zip' -Algorithm SHA256).Hash.ToLower(); "
|
|
|
- f"$h2 = (Get-FileHash -Path '{WIN_BASE_DIR}/Prod2U-Analysis.zip' -Algorithm SHA256).Hash.ToLower(); "
|
|
|
- f"$h3 = (Get-FileHash -Path '{WIN_BASE_DIR}/MRDIMM-V1.2/prod2u_mrdimm.bit' -Algorithm SHA256).Hash.ToLower(); "
|
|
|
- f"$h4 = (Get-FileHash -Path '{WIN_BASE_DIR}/6400-V2.0/prod2u_6400_v2.bit' -Algorithm SHA256).Hash.ToLower(); "
|
|
|
- f"Write-Output ('ZIP:' + $h1 + ' ANALYSIS:' + $h2 + ' MRDIMM:' + $h3 + ' M6400:' + $h4)"
|
|
|
+ f"$h1 = (Get-FileHash -Path '{WIN_VER_DIR}/cpld-temperature-control-latest.zip' -Algorithm SHA256).Hash.ToLower(); "
|
|
|
+ f"$h2 = (Get-FileHash -Path '{WIN_VER_DIR}/Prod2U-Analysis.zip' -Algorithm SHA256).Hash.ToLower(); "
|
|
|
+ f"$h3 = (Get-FileHash -Path '{WIN_VER_DIR}/firmware/prod2u_mrdimm.bit' -Algorithm SHA256).Hash.ToLower(); "
|
|
|
+ f"$h4 = (Get-FileHash -Path '{WIN_VER_DIR}/firmware/prod2u_6400_v2.bit' -Algorithm SHA256).Hash.ToLower(); "
|
|
|
+ f"$h5 = (Get-FileHash -Path '{WIN_VER_DIR}/firmware/prod2u_6400_front_back.bit' -Algorithm SHA256).Hash.ToLower(); "
|
|
|
+ f"Write-Output ('ZIP:' + $h1 + ' ANALYSIS:' + $h2 + ' MRDIMM:' + $h3 + ' M6400_V2:' + $h4 + ' M6400_V1:' + $h5)"
|
|
|
)
|
|
|
res = run_ssh(f'powershell -NoProfile -Command "{ps_cmd}"')
|
|
|
print("Remote Hashes:", res.stdout.strip())
|
|
|
assert f"ZIP:{zip_sha.lower()}" in res.stdout, "Zip SHA mismatch"
|
|
|
assert f"ANALYSIS:{analysis_sha.lower()}" in res.stdout, "Analysis Zip SHA mismatch"
|
|
|
assert f"MRDIMM:{mrdimm_sha.lower()}" in res.stdout, "MRDIMM bitstream SHA mismatch"
|
|
|
- assert f"M6400:{v2_sha.lower()}" in res.stdout, "6400 V2.0 bitstream SHA mismatch"
|
|
|
+ assert f"M6400_V2:{v2_sha.lower()}" in res.stdout, "6400 V2.0 bitstream SHA mismatch"
|
|
|
+ assert f"M6400_V1:{v1_sha.lower()}" in res.stdout, "6400 V1.1 bitstream SHA mismatch"
|
|
|
+
|
|
|
+ print("\n=== SUCCESS: All artifacts delivered to Windows, verified with remote PowerShell SHA-256! ===")
|
|
|
|
|
|
- print("\n=== SUCCESS: All artifacts uploaded, verified with remote PowerShell SHA-256! ===")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
main()
|