Four-person daily workspace.yaml and ws commands (v0.2.0)

Codex 736f07ecc7 Add J6 BMC replay UART packages 4 месяцев назад
config 5efb87f209 Add dual real FAN PTC debug921 profiles 5 месяцев назад
constraints 736f07ecc7 Add J6 BMC replay UART packages 4 месяцев назад
docs ec5783b1eb docs add temp pwm scope manual debug guide 4 месяцев назад
reference f9488f1c17 Converge CPLD project on real FAN PTC diagnostic 5 месяцев назад
schemas 736f07ecc7 Add J6 BMC replay UART packages 4 месяцев назад
src 736f07ecc7 Add J6 BMC replay UART packages 4 месяцев назад
td 736f07ecc7 Add J6 BMC replay UART packages 4 месяцев назад
test_vectors f9488f1c17 Converge CPLD project on real FAN PTC diagnostic 5 месяцев назад
tests 736f07ecc7 Add J6 BMC replay UART packages 4 месяцев назад
tools 736f07ecc7 Add J6 BMC replay UART packages 4 месяцев назад
.gitignore f9488f1c17 Converge CPLD project on real FAN PTC diagnostic 5 месяцев назад
AGENTS.md f9488f1c17 Converge CPLD project on real FAN PTC diagnostic 5 месяцев назад
README.zh-CN.md f9488f1c17 Converge CPLD project on real FAN PTC diagnostic 5 месяцев назад

README.zh-CN.md

CPLD PID 顶层工程

本仓库只有一个正式工程入口:repo 顶层。旧 study、教学工程、运行副本和旧桌面调试路径不再作为活工程入口。

目录

  • src/rtl/:可综合 RTL,包括 24 路 PID、BMC UART 文本协议、物理 UART RX/TX、safety、debug 和执行域。
  • src/top/:正式 top,包括 system_contract_top.v 和 uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top.v。
  • tests/sim/、tests/formal/、tests/cocotb/、tests/fixtures/:RTL 仿真、形式验证、cocotb 和 detector selftest。
  • tools/:pid_harness.py、uart_receipts.py、static checks、toolchain probe、pin inventory 和 debug bundle 工具。
  • td/:TD 2026.1 source project file;当前唯一用户主入口是 td/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary.prj。
  • config/、constraints/、test_vectors/:工程合同、MINI 安全 IO 约束和 replay vectors。
  • schemas/:UART receipt、pin inventory 和 final-gate-v2 schema。
  • reference/original/:原始板卡资料和来源索引,不是活工程入口。

正式范围

当前工程声明以下能力进入正式开发范围:

  • 24 路 PID/control contract。
  • BMC UART text parser/poll 与 115200 8N1 物理 UART RX/TX。
  • safety supervisor、PTC force-off、fan fallback、10s stale 和 90C overtemp contract。
  • fake/model/replay、RTL/HDL sim、formal、detector selftest、TD elaboration、UART receipt 和 debug bundle。
  • RS232 只作为外部电平转换链路;FPGA IO 侧必须是 3.3V UART,不能直接接 RS232 电平。

机器 pass 只声明控制通讯链路和软件安全策略通过,不声明完整热性能认证。真实热性能必须由中文 runbook 中的人工/仪器记录承接。

常用命令

python tools\pid_harness.py static
python tools\pid_harness.py model
python tools\pid_harness.py hdl-sim --run --backend icarus --json
python tools\pid_harness.py formal --run --json
python tools\pid_harness.py detector-selftest --run --json
python tools\pid_harness.py td-build --run --top uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary --json
python tools\pid_harness.py uart-preflight --allowlist COM7 --json
python tools\pid_harness.py uart-protocol-offline --text-file <bmc_text.txt> --json
python tools\pid_harness.py uart-validate --receipt <uart_receipt.json> --strict --json
python tools\pid_harness.py final-gate-v2 --receipt <uart_board_sram_receipt.json> --rtl-sim --formal --detector-selftest --td-build --json
python tools\pid_harness.py clean-runtime --json

UART/RS232 边界

  • RJ45 只作为线缆/转接形态,不定义协议本身。
  • RS232 电平必须经过 MAX3232 类转换板再进 FPGA UART;FPGA 管脚只允许 3.3V TTL UART。
  • uart-preflight 只枚举 COM,不打开未知端口,不切 DTR/RTS。
  • uart-board-sram-receipt-v1 只允许 PROGRAM_SRAM,必须记录 bitstream hash、transcript hash、debug UART/register dump 和 counterparty。
  • blocked_* 和 fail_* 不能改写为 pass。

安全边界

  • 禁止 flash、驱动安装/重装、真实 PTC/fan/BMC 未受控动作。
  • 禁止 PROGRAM_FLASH、ERASE_FLASH、PROGRAM_SPIBIN、DIRECT_FLASH_WRITE。
  • td/build/、tmp/、TD GUI runtime、bit/bid/data/log/timing/area 都是运行产物,不是源码基线。