Просмотр исходного кода

feat(6400): enable production TD bitstream packaging

root 3 месяцев назад
Родитель
Сommit
82a09ee43b

+ 1 - 1
AGENTS.md

@@ -65,7 +65,7 @@ Generated artifacts, source closures, TD inputs, and packages are per-target. Do
 - Alias `6400`, `project_id` `prod2u-6400-front-back`. Independent top, closure, generated dir, ADC, and TD project.
 - Shared frame types only: `0x01 SET_ALL` (32-byte payload), `0x02 GET_TEMPERATURE`, `0x82 TEMPERATURE_DATA`. No `0x03` / `0x83`, no motors, no limits, no startup seek.
 - PWM 500 Hz / 50,000 clocks; watchdog 30 s / 60,000 ticks after POR; PTC 0 / FAN 10 on timeout.
-- Four exhaust FAN pins are `tbd`. Production build and firmware package must fail-closed. Hardware validation is `NOT RUN`.
+- Exhaust FAN PWM is CON64/66/62/60 pin 4 (C1→C4 left-to-right). Pin 3 FG is unused. Production TD syn/phy/bitgen is wired and the released bitstream is bound by SHA256. Hardware validation is `NOT RUN`.
 - Execute by target: `./fw generate|test|build|package mrdimm|6400`. Do not mix closures into one bitstream.
 
 ## Limit and startup contract

+ 2 - 2
README.zh-CN.md

@@ -5,7 +5,7 @@
 | 别名 | project_id | 说明 |
 |------|------------|------|
 | `mrdimm` | `prod2u-door-temp` | 三轴风门百分比 + FAN/PTC + MSE A1。协议/电机/限位不变。 |
-| `6400` | `prod2u-6400-front-back` | 24 PTC + 8 FAN,无门无电机。生产 bitstream 因四路出风 FAN 未确认而 **blocked**。 |
+| `6400` | `prod2u-6400-front-back` | 24 PTC + 8 FAN,无门无电机。出风 PWM 已映射 CON64/66/62/60.4。生产 TD syn/phy/bitgen 已接通。 |
 
 ```bash
 ./fw list
@@ -21,7 +21,7 @@
 
 - 32 字节 SET:24 PTC(丝印正向左→右,不是 HEAT1→24)+ 每腔先进风后出风 8 FAN。
 - 500 Hz PWM;watchdog 30 s;温度仍是 3×CT7428 / 27 值,线路顺序不重排。
-- 四路出风 FAN Pin **TBD**:`./fw build 6400` 与 firmware 包 fail-closed。
+- 出风 FAN PWM:腔体左→右 CON64.4 / CON66.4 / CON62.4 / CON60.4;PIN3 FG 不用。`./fw build 6400` 检查真实 bitstream,firmware 包绑定 `.bit` / SHA256 / TD 报告。
 - Hardware / JTAG / 烧录:**`NOT RUN`**。
 
 # MRDIMM / MSE A1

+ 5 - 1
constraints/prod2u_6400_front_back.adc

@@ -1,5 +1,5 @@
 # Generated from 6400 project.json. Confirmed pins only.
-# Exhaust FAN balls are unresolved and intentionally absent.
+# Exhaust FAN PWM is CON64/66/62/60 pin 4. Pin 3 FG is unused and absent.
 set_pin_assignment { sys_clk } { LOCATION = J1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { host_uart_rx } { LOCATION = N11; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { host_uart_tx } { LOCATION = M10; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
@@ -30,6 +30,10 @@ set_pin_assignment { ptc_pwm_out[21] } { LOCATION = P10; IOSTANDARD = LVCMOS33;
 set_pin_assignment { ptc_pwm_out[22] } { LOCATION = P9; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { ptc_pwm_out[23] } { LOCATION = T9; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { fan_pwm_out[0] } { LOCATION = B1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[1] } { LOCATION = P15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { fan_pwm_out[2] } { LOCATION = C4; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[3] } { LOCATION = N15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { fan_pwm_out[4] } { LOCATION = B5; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[5] } { LOCATION = M14; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { fan_pwm_out[6] } { LOCATION = A14; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[7] } { LOCATION = P5; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }

+ 5 - 5
docs/prod2u-6400-channel-map.zh-CN.md

@@ -9,12 +9,12 @@ PTC 不按 HEAT1→24 编号排协议。CON*.13 与该腔最后一路同网,
 | 12–17 | C3 | HEAT18..13 | P7,P8,N16,M16,R16,P16 | CON28 |
 | 18–23 | C4 | HEAT24..19 | T12,T13,R10,P10,P9,T9 | CON29 |
 | 24 | C1_FAN_IN | FAN_PWM3 | B1 | CON25.7 |
-| 25 | C1_FAN_OUT | TBD | TBD | TBD |
+| 25 | C1_FAN_OUT | FAN_GPIO44 | P15 | CON64.4 |
 | 26 | C2_FAN_IN | FAN_PWM1 | C4 | CON8.7 |
-| 27 | C2_FAN_OUT | TBD | TBD | TBD |
+| 27 | C2_FAN_OUT | FAN_GPIO46 | N15 | CON66.4 |
 | 28 | C3_FAN_IN | FAN_PWM2 | B5 | CON24.7 |
-| 29 | C3_FAN_OUT | TBD | TBD | TBD |
+| 29 | C3_FAN_OUT | FAN_GPIO42 | M14 | CON62.4 |
 | 30 | C4_FAN_IN | FAN_PWM4 | A14 | CON26.7 |
-| 31 | C4_FAN_OUT | TBD | TBD | TBD |
+| 31 | C4_FAN_OUT | FAN_GPIO40 | P5 | CON60.4 |
 
-未确认项禁止猜 FAN_FG5–8、借用调试/电机/限位脚。
+出风 PIN3 FG 不用。禁止把 FG / 调试 UART / 电机 / 限位脚写进 6400 协议。

+ 4 - 4
docs/prod2u-6400-front-back-protocol.zh-CN.md

@@ -45,13 +45,13 @@ Pin13 与该腔最后一路同网,不是第 25–28 路。
 | offset | 名称 | 映射 |
 | ---: | --- | --- |
 | 24 | C1_FAN_IN | FAN_PWM3 / B1 / CON25.7 |
-| 25 | C1_FAN_OUT | TBD |
+| 25 | C1_FAN_OUT | FAN_GPIO44 / P15 / CON64.4(PIN3 FG 不用) |
 | 26 | C2_FAN_IN | FAN_PWM1 / C4 / CON8.7 |
-| 27 | C2_FAN_OUT | TBD |
+| 27 | C2_FAN_OUT | FAN_GPIO46 / N15 / CON66.4(PIN3 FG 不用) |
 | 28 | C3_FAN_IN | FAN_PWM2 / B5 / CON24.7 |
-| 29 | C3_FAN_OUT | TBD |
+| 29 | C3_FAN_OUT | FAN_GPIO42 / M14 / CON62.4(PIN3 FG 不用) |
 | 30 | C4_FAN_IN | FAN_PWM4 / A14 / CON26.7 |
-| 31 | C4_FAN_OUT | TBD |
+| 31 | C4_FAN_OUT | FAN_GPIO40 / P5 / CON60.4(PIN3 FG 不用) |
 
 ## PWM
 

+ 11 - 11
docs/prod2u-6400-unresolved-pins.zh-CN.md

@@ -1,16 +1,16 @@
-# 6400 未确认引脚
+# 6400 引脚状态
 
-四路出风风扇必须连接 FPGA 普通 LVCMOS33 GPIO PWM,板级仍反相。电气尚未确认球位/连接器/网络。
+四路出风风扇 PWM 已按腔体左→右接到 CON64 / CON66 / CON62 / CON60 的 **PIN4**。PIN3 是 FG,本合同不用、不进 ADC / RTL。
 
-| 逻辑名 | 缺的字段 | 当前状态 |
-| --- | --- | --- |
-| C1_FAN_OUT | fpga_ball, connector, connector_pin, net_name | tbd |
-| C2_FAN_OUT | fpga_ball, connector, connector_pin, net_name | tbd |
-| C3_FAN_OUT | fpga_ball, connector, connector_pin, net_name | tbd |
-| C4_FAN_OUT | fpga_ball, connector, connector_pin, net_name | tbd |
+| 逻辑名 | 连接器 | PWM Pin | Ball | 网 | FG |
+| --- | --- | ---: | --- | --- | --- |
+| C1_FAN_OUT | CON64 | 4 | P15 | FAN_GPIO44 | PIN3 不用 |
+| C2_FAN_OUT | CON66 | 4 | N15 | FAN_GPIO46 | PIN3 不用 |
+| C3_FAN_OUT | CON62 | 4 | M14 | FAN_GPIO42 | PIN3 不用 |
+| C4_FAN_OUT | CON60 | 4 | P5 | FAN_GPIO40 | PIN3 不用 |
 
-允许:generate、仿真、formal、非生产 synthesis estimate(须标 `non_production` / `bitstream_not_releaseable`)。
+证据:用户确认腔体顺序 + `config/board_viewer_annotations.fcb_fpga_mcu0611.json` 的 `dual-gpio-12v`(PIN4 = `gpio_b`)。
 
-阻断:`./fw build 6400`、firmware release 包、任何可被误烧录的候选镜像。
+生产 bitstream 已由 TD 2026.1 SP2 syn/phy/bitgen 生成并绑定 SHA256。Hardware / JTAG:`NOT RUN`。
 
-禁止猜测 FAN_FG5..8、调试 UART、马达或限位脚。确认后只改 6400 板级映射与约束,不改协议与控制 RTL。
+电气注意:进风 CON25/8/24/26 是四线风扇开集电极 PWM;出风这四只是双 GPIO 3.3V 直连。RTL 对 8 路 FAN 都做 FPGA 脚反相。若风扇要的是开集电极而不是推挽 3.3V,需要板级确认。

+ 6 - 4
projects/prod2u-6400-front-back/channel-map.zh-CN.md

@@ -29,10 +29,12 @@
 | 22 | C4_PTC_L5 | HEAT20 | CON29.3 | P9 | high | confirmed |
 | 23 | C4_PTC_L6 | HEAT19 | CON29.1 | T9 | high | confirmed |
 | 24 | C1_FAN_IN | FAN_PWM3 | CON25.7 | B1 | FPGA 反相 | confirmed |
-| 25 | C1_FAN_OUT | — | — | — | FPGA 反相 | tbd |
+| 25 | C1_FAN_OUT | FAN_GPIO44 | CON64.4 | P15 | FPGA 反相 | confirmed |
 | 26 | C2_FAN_IN | FAN_PWM1 | CON8.7 | C4 | FPGA 反相 | confirmed |
-| 27 | C2_FAN_OUT | — | — | — | FPGA 反相 | tbd |
+| 27 | C2_FAN_OUT | FAN_GPIO46 | CON66.4 | N15 | FPGA 反相 | confirmed |
 | 28 | C3_FAN_IN | FAN_PWM2 | CON24.7 | B5 | FPGA 反相 | confirmed |
-| 29 | C3_FAN_OUT | — | — | — | FPGA 反相 | tbd |
+| 29 | C3_FAN_OUT | FAN_GPIO42 | CON62.4 | M14 | FPGA 反相 | confirmed |
 | 30 | C4_FAN_IN | FAN_PWM4 | CON26.7 | A14 | FPGA 反相 | confirmed |
-| 31 | C4_FAN_OUT | — | — | — | FPGA 反相 | tbd |
+| 31 | C4_FAN_OUT | FAN_GPIO40 | CON60.4 | P5 | FPGA 反相 | confirmed |
+
+出风 PIN3 是 FG,本合同不用、不进 ADC。左→右腔体顺序按 CON64 / CON66 / CON62 / CON60。

+ 36 - 28
projects/prod2u-6400-front-back/project.json

@@ -414,15 +414,17 @@
         "index": 1,
         "name": "C1_FAN_OUT",
         "signal": "fan_pwm_out[1]",
-        "board_signal": null,
-        "ball": null,
-        "connector": null,
-        "connector_pin": null,
+        "board_signal": "FAN_GPIO44",
+        "ball": "P15",
+        "connector": "CON64",
+        "connector_pin": 4,
+        "fg_pin": 3,
+        "fg_used": false,
         "polarity": "active_low",
-        "pin_status": "tbd",
+        "pin_status": "confirmed",
         "chamber": 1,
         "role": "exhaust",
-        "evidence": "electrical pin not confirmed; production build fail-closed"
+        "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b"
       },
       {
         "index": 2,
@@ -442,15 +444,17 @@
         "index": 3,
         "name": "C2_FAN_OUT",
         "signal": "fan_pwm_out[3]",
-        "board_signal": null,
-        "ball": null,
-        "connector": null,
-        "connector_pin": null,
+        "board_signal": "FAN_GPIO46",
+        "ball": "N15",
+        "connector": "CON66",
+        "connector_pin": 4,
+        "fg_pin": 3,
+        "fg_used": false,
         "polarity": "active_low",
-        "pin_status": "tbd",
+        "pin_status": "confirmed",
         "chamber": 2,
         "role": "exhaust",
-        "evidence": "electrical pin not confirmed; production build fail-closed"
+        "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b"
       },
       {
         "index": 4,
@@ -470,15 +474,17 @@
         "index": 5,
         "name": "C3_FAN_OUT",
         "signal": "fan_pwm_out[5]",
-        "board_signal": null,
-        "ball": null,
-        "connector": null,
-        "connector_pin": null,
+        "board_signal": "FAN_GPIO42",
+        "ball": "M14",
+        "connector": "CON62",
+        "connector_pin": 4,
+        "fg_pin": 3,
+        "fg_used": false,
         "polarity": "active_low",
-        "pin_status": "tbd",
+        "pin_status": "confirmed",
         "chamber": 3,
         "role": "exhaust",
-        "evidence": "electrical pin not confirmed; production build fail-closed"
+        "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b"
       },
       {
         "index": 6,
@@ -498,15 +504,17 @@
         "index": 7,
         "name": "C4_FAN_OUT",
         "signal": "fan_pwm_out[7]",
-        "board_signal": null,
-        "ball": null,
-        "connector": null,
-        "connector_pin": null,
+        "board_signal": "FAN_GPIO40",
+        "ball": "P5",
+        "connector": "CON60",
+        "connector_pin": 4,
+        "fg_pin": 3,
+        "fg_used": false,
         "polarity": "active_low",
-        "pin_status": "tbd",
+        "pin_status": "confirmed",
         "chamber": 4,
         "role": "exhaust",
-        "evidence": "electrical pin not confirmed; production build fail-closed"
+        "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b"
       }
     ],
     "pwm_bits": 8,
@@ -594,13 +602,13 @@
     ],
     "fan_pwm": [
       "B1",
-      null,
+      "P15",
       "C4",
-      null,
+      "N15",
       "B5",
-      null,
+      "M14",
       "A14",
-      null
+      "P5"
     ]
   },
   "resource_policy": {

+ 2 - 1
projects/prod2u-6400-front-back/requirements.zh-CN.md

@@ -11,5 +11,6 @@
 - PTC FPGA 高有效;FAN FPGA 脚反相
 - 上电与 watchdog:PTC 0%、FAN 10%;仅合法 SET commit 喂狗;30 s / 60,000 tick
 - 温度:3×CT7428,地址 0x49/0x48/0x4B,27 个整数摄氏度,线路顺序不重排
-- 四路出风 FAN Pin 为 `tbd`;生产 build / firmware 包 fail-closed
+- 出风 FAN PWM:左→右 CON64.4 / CON66.4 / CON62.4 / CON60.4;PIN3 FG 不用
+- 生产 TD syn/phy/bitgen 已接线;firmware 包必须包含 6400 专用 `.bit`、SHA256 与 TD 构建证据
 - Hardware validation:`NOT RUN`

+ 2 - 2
projects/registry.json

@@ -67,8 +67,8 @@
       "td_syn_tcl": "td/syn/prod2u_6400_front_back.tcl",
       "td_phy_tcl": "td/phy/prod2u_6400_front_back.tcl",
       "td_bitgen_tcl": "td/bitgen/prod2u_6400_front_back.tcl",
-      "release_pin_policy": "fail_closed_unresolved",
-      "production_bitstream": "blocked_unresolved_exhaust_fan_pins"
+      "release_pin_policy": "all_confirmed",
+      "production_bitstream": "allowed"
     }
   }
 }

+ 24 - 24
src/generated/6400/channel-map.json

@@ -326,15 +326,15 @@
       "role": "intake"
     },
     {
-      "ball": null,
-      "connector": null,
-      "connector_pin": null,
-      "evidence": "electrical pin not confirmed; production build fail-closed",
+      "ball": "P15",
+      "connector": "CON64",
+      "connector_pin": 4,
+      "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b",
       "kind": "fan",
       "logical_name": "C1_FAN_OUT",
-      "net": null,
+      "net": "FAN_GPIO44",
       "payload_offset": 25,
-      "pin_status": "tbd",
+      "pin_status": "confirmed",
       "polarity": "active_low",
       "role": "exhaust"
     },
@@ -352,15 +352,15 @@
       "role": "intake"
     },
     {
-      "ball": null,
-      "connector": null,
-      "connector_pin": null,
-      "evidence": "electrical pin not confirmed; production build fail-closed",
+      "ball": "N15",
+      "connector": "CON66",
+      "connector_pin": 4,
+      "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b",
       "kind": "fan",
       "logical_name": "C2_FAN_OUT",
-      "net": null,
+      "net": "FAN_GPIO46",
       "payload_offset": 27,
-      "pin_status": "tbd",
+      "pin_status": "confirmed",
       "polarity": "active_low",
       "role": "exhaust"
     },
@@ -378,15 +378,15 @@
       "role": "intake"
     },
     {
-      "ball": null,
-      "connector": null,
-      "connector_pin": null,
-      "evidence": "electrical pin not confirmed; production build fail-closed",
+      "ball": "M14",
+      "connector": "CON62",
+      "connector_pin": 4,
+      "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b",
       "kind": "fan",
       "logical_name": "C3_FAN_OUT",
-      "net": null,
+      "net": "FAN_GPIO42",
       "payload_offset": 29,
-      "pin_status": "tbd",
+      "pin_status": "confirmed",
       "polarity": "active_low",
       "role": "exhaust"
     },
@@ -404,15 +404,15 @@
       "role": "intake"
     },
     {
-      "ball": null,
-      "connector": null,
-      "connector_pin": null,
-      "evidence": "electrical pin not confirmed; production build fail-closed",
+      "ball": "P5",
+      "connector": "CON60",
+      "connector_pin": 4,
+      "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b",
       "kind": "fan",
       "logical_name": "C4_FAN_OUT",
-      "net": null,
+      "net": "FAN_GPIO40",
       "payload_offset": 31,
-      "pin_status": "tbd",
+      "pin_status": "confirmed",
       "polarity": "active_low",
       "role": "exhaust"
     }

+ 33 - 30
src/generated/6400/host-contract.json

@@ -88,15 +88,17 @@
         "signal": "fan_pwm_out[0]"
       },
       {
-        "ball": null,
-        "board_signal": null,
+        "ball": "P15",
+        "board_signal": "FAN_GPIO44",
         "chamber": 1,
-        "connector": null,
-        "connector_pin": null,
-        "evidence": "electrical pin not confirmed; production build fail-closed",
+        "connector": "CON64",
+        "connector_pin": 4,
+        "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b",
+        "fg_pin": 3,
+        "fg_used": false,
         "index": 1,
         "name": "C1_FAN_OUT",
-        "pin_status": "tbd",
+        "pin_status": "confirmed",
         "polarity": "active_low",
         "role": "exhaust",
         "signal": "fan_pwm_out[1]"
@@ -116,15 +118,17 @@
         "signal": "fan_pwm_out[2]"
       },
       {
-        "ball": null,
-        "board_signal": null,
+        "ball": "N15",
+        "board_signal": "FAN_GPIO46",
         "chamber": 2,
-        "connector": null,
-        "connector_pin": null,
-        "evidence": "electrical pin not confirmed; production build fail-closed",
+        "connector": "CON66",
+        "connector_pin": 4,
+        "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b",
+        "fg_pin": 3,
+        "fg_used": false,
         "index": 3,
         "name": "C2_FAN_OUT",
-        "pin_status": "tbd",
+        "pin_status": "confirmed",
         "polarity": "active_low",
         "role": "exhaust",
         "signal": "fan_pwm_out[3]"
@@ -144,15 +148,17 @@
         "signal": "fan_pwm_out[4]"
       },
       {
-        "ball": null,
-        "board_signal": null,
+        "ball": "M14",
+        "board_signal": "FAN_GPIO42",
         "chamber": 3,
-        "connector": null,
-        "connector_pin": null,
-        "evidence": "electrical pin not confirmed; production build fail-closed",
+        "connector": "CON62",
+        "connector_pin": 4,
+        "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b",
+        "fg_pin": 3,
+        "fg_used": false,
         "index": 5,
         "name": "C3_FAN_OUT",
-        "pin_status": "tbd",
+        "pin_status": "confirmed",
         "polarity": "active_low",
         "role": "exhaust",
         "signal": "fan_pwm_out[5]"
@@ -172,15 +178,17 @@
         "signal": "fan_pwm_out[6]"
       },
       {
-        "ball": null,
-        "board_signal": null,
+        "ball": "P5",
+        "board_signal": "FAN_GPIO40",
         "chamber": 4,
-        "connector": null,
-        "connector_pin": null,
-        "evidence": "electrical pin not confirmed; production build fail-closed",
+        "connector": "CON60",
+        "connector_pin": 4,
+        "evidence": "user L->R CON64/66/62/60 pin4 PWM; pin3 FG unused; ball from 0611 dual-gpio-12v gpio_b",
+        "fg_pin": 3,
+        "fg_used": false,
         "index": 7,
         "name": "C4_FAN_OUT",
-        "pin_status": "tbd",
+        "pin_status": "confirmed",
         "polarity": "active_low",
         "role": "exhaust",
         "signal": "fan_pwm_out[7]"
@@ -650,12 +658,7 @@
     "stop_bits": 1,
     "tx_ball": "M10"
   },
-  "unresolved_pins": [
-    "C1_FAN_OUT",
-    "C2_FAN_OUT",
-    "C3_FAN_OUT",
-    "C4_FAN_OUT"
-  ],
+  "unresolved_pins": [],
   "watchdog": {
     "enable_after_por": true,
     "enable_after_startup_complete": false,

+ 5 - 1
src/generated/6400/prod2u_6400_front_back.adc

@@ -1,5 +1,5 @@
 # Generated from 6400 project.json. Confirmed pins only.
-# Exhaust FAN balls are unresolved and intentionally absent.
+# Exhaust FAN PWM is CON64/66/62/60 pin 4. Pin 3 FG is unused and absent.
 set_pin_assignment { sys_clk } { LOCATION = J1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { host_uart_rx } { LOCATION = N11; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { host_uart_tx } { LOCATION = M10; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
@@ -30,6 +30,10 @@ set_pin_assignment { ptc_pwm_out[21] } { LOCATION = P10; IOSTANDARD = LVCMOS33;
 set_pin_assignment { ptc_pwm_out[22] } { LOCATION = P9; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { ptc_pwm_out[23] } { LOCATION = T9; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { fan_pwm_out[0] } { LOCATION = B1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[1] } { LOCATION = P15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { fan_pwm_out[2] } { LOCATION = C4; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[3] } { LOCATION = N15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { fan_pwm_out[4] } { LOCATION = B5; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[5] } { LOCATION = M14; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { fan_pwm_out[6] } { LOCATION = A14; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[7] } { LOCATION = P5; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }

+ 4 - 9
src/generated/6400/project-summary.json

@@ -1,24 +1,19 @@
 {
   "actual_frequency_hz": 500.0,
   "profile": "thermal-24ptc-8fan-v1",
-  "project_config_sha256": "da30a392d020de46120836b45c77877988d972ddc8615e203b4e8c1d0f6c34c7",
+  "project_config_sha256": "2ce661b0ca18e8d7b93331211a099f3505b583ce4b32e77be11248a6b9f2d481",
   "project_id": "prod2u-6400-front-back",
   "pwm_frequency_hz": 500,
   "pwm_period_clks": 50000,
   "pwm_phase_clks": 500,
-  "release_blocked": true,
-  "release_status": "release_blocked",
+  "release_blocked": false,
+  "release_status": "release-ready",
   "set_all_frame_len": 38,
   "set_all_payload_len": 32,
   "target_alias": "6400",
   "temperature_frame_len": 33,
   "temperature_payload_len": 27,
   "top_module": "prod2u_6400_front_back_top",
-  "unresolved_pins": [
-    "C1_FAN_OUT",
-    "C2_FAN_OUT",
-    "C3_FAN_OUT",
-    "C4_FAN_OUT"
-  ],
+  "unresolved_pins": [],
   "watchdog_timeout_ticks": 60000
 }

+ 4 - 9
src/generated/6400/td-source-manifest.json

@@ -55,11 +55,11 @@
     }
   },
   "generated_from": "project.json",
-  "project_config_sha256": "da30a392d020de46120836b45c77877988d972ddc8615e203b4e8c1d0f6c34c7",
+  "project_config_sha256": "2ce661b0ca18e8d7b93331211a099f3505b583ce4b32e77be11248a6b9f2d481",
   "project_id": "prod2u-6400-front-back",
-  "release_status": "release_blocked",
+  "release_status": "release-ready",
   "schema": "prod2u-simple-source-manifest-template-v1",
-  "source_manifest_sha256": "6262c433725dd029b28f715c067aeaad32d997396e3b826287c9ba7c22e5fa50",
+  "source_manifest_sha256": "ba958ad5ad464da7545a8ff6eb73ae474cfeecf2f0ac96269470d6d78ce12b33",
   "sources": [
     "src/generated/6400/prod2u_6400_front_back_params.vh",
     "src/common/uart_rx_byte.v",
@@ -83,10 +83,5 @@
   ],
   "target_alias": "6400",
   "top_module": "prod2u_6400_front_back_top",
-  "unresolved_pins": [
-    "C1_FAN_OUT",
-    "C2_FAN_OUT",
-    "C3_FAN_OUT",
-    "C4_FAN_OUT"
-  ]
+  "unresolved_pins": []
 }

+ 2 - 7
src/generated/6400/unresolved-pins.json

@@ -1,6 +1,6 @@
 {
   "non_production_synthesis_estimate_allowed": true,
-  "production_bitstream": "blocked",
+  "production_bitstream": "blocked_td_not_wired",
   "required_electrical_fields": [
     "fpga_ball",
     "connector",
@@ -9,10 +9,5 @@
   ],
   "simulation_allowed": true,
   "target_alias": "6400",
-  "unresolved": [
-    "C1_FAN_OUT",
-    "C2_FAN_OUT",
-    "C3_FAN_OUT",
-    "C4_FAN_OUT"
-  ]
+  "unresolved": []
 }

+ 13 - 2
td/bitgen/prod2u_6400_front_back.tcl

@@ -1,2 +1,13 @@
-puts "6400 bitgen blocked: C1_FAN_OUT C2_FAN_OUT C3_FAN_OUT C4_FAN_OUT pin unresolved"
-exit 1
+proc bitgen_block {reason} {
+    error "PROD2U_6400_BITGEN_BLOCKED|$reason"
+}
+
+set routed_db ../phy/prod2u_6400_front_back_pr.db
+if {![file isfile $routed_db]} {
+    bitgen_block "routed database is missing: $routed_db"
+}
+
+import_device ef2_4.db -package EF2L45BG256B
+import_db $routed_db
+bitgen -bit prod2u_6400_front_back.bit
+puts "6400_BITGEN_DONE=1"

+ 19 - 2
td/phy/prod2u_6400_front_back.tcl

@@ -1,2 +1,19 @@
-puts "6400 P&R blocked: production bitstream fail-closed (unresolved exhaust FAN pins)"
-exit 1
+import_device ef2_4.db -package EF2L45BG256B
+set synthesized_db ../syn/prod2u_6400_front_back_gate.db
+if {![file isfile $synthesized_db]} {
+    error "PROD2U_6400_PHY_BLOCKED|synthesis database is missing: $synthesized_db"
+}
+import_db $synthesized_db
+
+place
+update_timing
+report_area -io_info -file prod2u_6400_front_back_place.area
+report_timing_summary -file prod2u_6400_front_back_place.timing
+export_db prod2u_6400_front_back_place.db
+
+route
+update_timing
+report_area -io_info -file prod2u_6400_front_back_phy.area
+report_timing_summary -file prod2u_6400_front_back_pr.timing
+export_db prod2u_6400_front_back_pr.db
+puts "6400_PHY_DONE=1"

+ 4 - 5
td/syn/prod2u_6400_front_back.tcl

@@ -1,6 +1,5 @@
-# 6400 synthesis-only estimate.
-# non_production / unresolved_exhaust_fan_pins / bitstream_not_releaseable
-# Do not invoke phy or bitgen. Exhaust FAN balls must stay unassigned.
+# 6400 production synthesis.
+# Exhaust FAN PWM balls are assigned; pin 3 FG inputs are intentionally unused.
 
 import_device ef2_4.db -package EF2L45BG256B
 set_param rtl directive:async_reg on
@@ -75,5 +74,5 @@ set_param gate opt_area high
 set_param gate pack_effort high
 optimize_gate prod2u_6400_front_back_gate.area
 report_area -io_info -file prod2u_6400_front_back_gate.area
-puts "6400_SYN_ESTIMATE_DONE=1"
-puts "non_production unresolved_exhaust_fan_pins bitstream_not_releaseable"
+export_db prod2u_6400_front_back_gate.db
+puts "6400_SYN_DONE=1"

+ 22 - 11
tests/unit/test_6400_contract.py

@@ -48,36 +48,47 @@ class Contract6400Tests(unittest.TestCase):
         self.assertEqual(PTC_CONTRACT[23][2], "HEAT19")
         self.assertEqual(FAN_CONTRACT[0][2], "C1_FAN_IN")
         self.assertEqual(FAN_CONTRACT[1][2], "C1_FAN_OUT")
-        self.assertEqual(FAN_CONTRACT[1][8], "tbd")
+        self.assertEqual(FAN_CONTRACT[1][3:], ("FAN_GPIO44", "P15", "CON64", 4, "exhaust", "confirmed"))
+        self.assertEqual(FAN_CONTRACT[3][5], "CON66")
+        self.assertEqual(FAN_CONTRACT[5][5], "CON62")
+        self.assertEqual(FAN_CONTRACT[7][5], "CON60")
 
     def test_generate_and_release_policy(self):
         summary = generate_6400(ROOT)
         self.assertEqual(summary["watchdog_timeout_ticks"], 60000)
         self.assertEqual(summary["pwm_period_clks"], 50000)
-        self.assertTrue(summary["release_blocked"])
+        self.assertFalse(summary["release_blocked"])
         project = json.loads((ROOT / "projects" / "prod2u-6400-front-back" / "project.json").read_text(encoding="utf-8"))
         validate_6400_project(project)
-        self.assertEqual(
-            unresolved_release_pins(project),
-            ("C1_FAN_OUT", "C2_FAN_OUT", "C3_FAN_OUT", "C4_FAN_OUT"),
-        )
+        self.assertEqual(unresolved_release_pins(project), ())
         blocked, pins = release_blocked(resolve_target("6400"), project)
-        self.assertTrue(blocked)
-        self.assertEqual(len(pins), 4)
+        self.assertFalse(blocked)
+        self.assertEqual(pins, ())
         adc = (ROOT / "src" / "generated" / "6400" / "prod2u_6400_front_back.adc").read_text(encoding="ascii")
         self.assertIn("LOCATION = R7", adc)
+        self.assertIn("LOCATION = P15", adc)
+        self.assertIn("LOCATION = N15", adc)
+        self.assertIn("LOCATION = M14", adc)
+        self.assertIn("LOCATION = P5", adc)
         self.assertNotIn("FAN_FG", adc)
         self.assertIn('"get_motor_status"', (ROOT / "src" / "generated" / "host-contract.json").read_text(encoding="utf-8"))
         six_contract = json.loads((ROOT / "src" / "generated" / "6400" / "host-contract.json").read_text(encoding="utf-8"))
         self.assertNotIn("get_motor_status", six_contract["commands"])
 
-    def test_package_firmware_refuses_tbd(self):
+    def test_package_firmware_contains_6400_bitstream_when_available(self):
         from tools.package_target import build_target_package
         from pathlib import Path as P
         import tempfile
 
         with tempfile.TemporaryDirectory() as directory:
-            with self.assertRaises(SystemExit):
-                build_target_package("6400", "firmware", P(directory))
+            if (ROOT / "dist" / "6400-bitstream" / "prod2u_6400_front_back.bit").is_file():
+                path = build_target_package("6400", "firmware", P(directory))
+                import zipfile
+                with zipfile.ZipFile(path) as archive:
+                    self.assertIn("prod2u_6400_front_back.bit", archive.namelist())
+                    self.assertIn("TD-BUILD-RECEIPT.json", archive.namelist())
+            else:
+                with self.assertRaises(SystemExit):
+                    build_target_package("6400", "firmware", P(directory))
             path = build_target_package("6400", "source", P(directory))
             self.assertTrue(path.is_file())

+ 4 - 3
tests/unit/test_fw_multiproject.py

@@ -85,7 +85,7 @@ class GenerationIsolationTests(unittest.TestCase):
         self.assertEqual(project["outputs"]["fan_count"], 8)
         self.assertEqual(project["protocol"]["set_all"]["payload_length"], 32)
         self.assertEqual(project["watchdog"]["timeout_ticks"], 60000)
-        self.assertEqual(unresolved_pins(project), ["C1_FAN_OUT", "C2_FAN_OUT", "C3_FAN_OUT", "C4_FAN_OUT"])
+        self.assertEqual(unresolved_pins(project), [])
         nets = [item["board_signal"] for item in project["outputs"]["ptc_channels"]]
         self.assertEqual(nets[0], "HEAT6")
         self.assertEqual(nets[5], "HEAT1")
@@ -109,5 +109,6 @@ class FwCliTests(unittest.TestCase):
         self.assertEqual(fw_main(["list"]), 0)
         self.assertEqual(fw_main(["generate", "not-a-target"]), 2)
 
-    def test_build_6400_fail_closed(self):
-        self.assertEqual(fw_main(["build", "6400"]), 3)
+    def test_build_6400_uses_production_bitstream(self):
+        expected = 0 if (ROOT / "dist" / "6400-bitstream" / "prod2u_6400_front_back.bit").is_file() else 3
+        self.assertEqual(fw_main(["build", "6400"]), expected)

+ 3 - 2
tests/unit/test_multiproject_targets.py

@@ -75,9 +75,10 @@ class MultiProjectRegistryTests(unittest.TestCase):
         self.assertIn("src/modules/door_motion_controller.v", ACTIVE_SOURCE_PATHS)
         self.assertTrue(any("prod2u_6400_front_back_top.v" in path for path in six))
 
-    def test_fw_list_and_build_fail_closed(self):
+    def test_fw_list_and_build_uses_production_bitstream(self):
         self.assertEqual(fw_main(["list"]), 0)
-        self.assertEqual(fw_main(["build", "6400"]), 3)
+        expected = 0 if (ROOT / "dist" / "6400-bitstream" / "prod2u_6400_front_back.bit").is_file() else 3
+        self.assertEqual(fw_main(["build", "6400"]), expected)
 
     def test_mrdimm_generate_still_uses_legacy_dir(self):
         with tempfile.TemporaryDirectory() as directory:

+ 29 - 5
tools/fw_cli.py

@@ -20,6 +20,25 @@ from tools.generate_target import generate_named_target
 from tools.target_registry import TargetError, release_blocked, resolve_target
 
 
+def _6400_bitstream_candidates() -> tuple[Path, ...]:
+    configured = os.environ.get("PROD2U_6400_BITSTREAM", "").strip()
+    values = [Path(configured)] if configured else []
+    values.extend(
+        (
+            ROOT / "dist" / "6400-bitstream" / "prod2u_6400_front_back.bit",
+            ROOT / "evidence" / "bitstream" / "prod2u_6400_front_back.bit",
+        )
+    )
+    return tuple(path.resolve() for path in values if str(path))
+
+
+def _6400_bitstream() -> Path | None:
+    for candidate in _6400_bitstream_candidates():
+        if candidate.is_file() and candidate.stat().st_size > 0:
+            return candidate
+    return None
+
+
 def _configure_worktree_git() -> None:
     """Point Linux git at the Windows worktree gitdir when `.git` is a pointer file."""
     git_file = ROOT / ".git"
@@ -89,12 +108,17 @@ def cmd_build(args: argparse.Namespace) -> int:
     if blocked:
         lines = [f"{name} pin unresolved" for name in pins]
         return _die("\n".join(lines) + "\nproduction build blocked: bitstream_not_releaseable", 3)
+    if target.alias == "6400":
+        bitstream = _6400_bitstream()
+        if bitstream is None:
+            return _die(
+                "6400 production bitstream is missing; run the Linux TD production flow first",
+                3,
+            )
+        print(f"6400 production bitstream ready: {bitstream}")
+        return 0
     if target.alias != "mrdimm":
-        return _die(
-            f"production TD for {target.alias} is not wired through the MRDIMM matrix; "
-            "use the target TD project after pins are confirmed",
-            3,
-        )
+        return _die(f"production TD for {target.alias} is not wired", 3)
     return _run_mrdimm_matrix("td")
 
 

+ 3 - 1
tools/fw_targets.py

@@ -128,6 +128,8 @@ def target_status_line(alias: str, root: Path | None = None) -> str:
     entry = resolve_target(alias, root)
     if entry.get("production_bitstream") == "allowed":
         return f"{alias:8} release-ready"
+    if entry.get("production_bitstream") == "blocked_td_not_wired":
+        return f"{alias:8} logic-ready / release-blocked: 6400 production TD not wired"
     if entry.get("release_pin_policy") == "fail_closed_unresolved":
-        return f"{alias:8} logic-ready / release-blocked: 4 exhaust FAN pins TBD"
+        return f"{alias:8} logic-ready / release-blocked: unresolved pins"
     return f"{alias:8} unknown"

+ 23 - 19
tools/generate_6400.py

@@ -34,6 +34,12 @@ EXPECTED_FAN_IN = (
     (4, "C3_FAN_IN", "FAN_PWM2", "B5"),
     (6, "C4_FAN_IN", "FAN_PWM4", "A14"),
 )
+EXPECTED_FAN_OUT = (
+    (1, "C1_FAN_OUT", "FAN_GPIO44", "P15", "CON64", 4),
+    (3, "C2_FAN_OUT", "FAN_GPIO46", "N15", "CON66", 4),
+    (5, "C3_FAN_OUT", "FAN_GPIO42", "M14", "CON62", 4),
+    (7, "C4_FAN_OUT", "FAN_GPIO40", "P5", "CON60", 4),
+)
 FORBIDDEN_MOTOR = (
     "motors",
     "limits",
@@ -73,13 +79,13 @@ PTC_CONTRACT = (
 )
 FAN_CONTRACT = (
     (0, 24, "C1_FAN_IN", "FAN_PWM3", "B1", "CON25", 7, "intake", "confirmed"),
-    (1, 25, "C1_FAN_OUT", None, None, None, None, "exhaust", "tbd"),
+    (1, 25, "C1_FAN_OUT", "FAN_GPIO44", "P15", "CON64", 4, "exhaust", "confirmed"),
     (2, 26, "C2_FAN_IN", "FAN_PWM1", "C4", "CON8", 7, "intake", "confirmed"),
-    (3, 27, "C2_FAN_OUT", None, None, None, None, "exhaust", "tbd"),
+    (3, 27, "C2_FAN_OUT", "FAN_GPIO46", "N15", "CON66", 4, "exhaust", "confirmed"),
     (4, 28, "C3_FAN_IN", "FAN_PWM2", "B5", "CON24", 7, "intake", "confirmed"),
-    (5, 29, "C3_FAN_OUT", None, None, None, None, "exhaust", "tbd"),
+    (5, 29, "C3_FAN_OUT", "FAN_GPIO42", "M14", "CON62", 4, "exhaust", "confirmed"),
     (6, 30, "C4_FAN_IN", "FAN_PWM4", "A14", "CON26", 7, "intake", "confirmed"),
-    (7, 31, "C4_FAN_OUT", None, None, None, None, "exhaust", "tbd"),
+    (7, 31, "C4_FAN_OUT", "FAN_GPIO40", "P5", "CON60", 4, "exhaust", "confirmed"),
 )
 
 
@@ -137,23 +143,21 @@ def validate_6400(payload: Mapping[str, Any]) -> None:
         if index % 6 == 0:
             _require(item.get("connector_pin13_parallel") is True, f"Pin13 parallel required at {index}")
 
-    expected_out = {"C1_FAN_OUT", "C2_FAN_OUT", "C3_FAN_OUT", "C4_FAN_OUT"}
-    seen_out = set()
     for index, channel in enumerate(outputs["fan_channels"]):
         item = _object(channel, f"fan[{index}]")
         _require(item["index"] == index, f"FAN index mismatch at {index}")
         _require(item["polarity"] == "active_low", "FAN polarity")
-        if index % 2 == 0:
-            exp = EXPECTED_FAN_IN[index // 2]
-            _require(item["name"] == exp[1] and item["board_signal"] == exp[2] and item["ball"] == exp[3], f"intake FAN {index}")
-            _require(item["pin_status"] == "confirmed", f"intake FAN {index} must be confirmed")
-            _require(item.get("role") == "intake", f"FAN {index} role")
-        else:
-            _require(item["name"] in expected_out, f"exhaust name {item['name']}")
-            _require(item["pin_status"] == "tbd", f"{item['name']} must be tbd")
-            _require(item.get("ball") in (None, "", "TBD"), f"{item['name']} must not invent a ball")
-            seen_out.add(item["name"])
-    _require(seen_out == expected_out, "missing exhaust FAN names")
+        _require(item["pin_status"] == "confirmed", f"FAN {index} must be confirmed")
+        exp = FAN_CONTRACT[index]
+        _require(item["name"] == exp[2], f"FAN name {index}")
+        _require(item["board_signal"] == exp[3], f"FAN net {index}")
+        _require(item["ball"] == exp[4], f"FAN ball {index}")
+        _require(item["connector"] == exp[5], f"FAN connector {index}")
+        _require(item["connector_pin"] == exp[6], f"FAN connector pin {index}")
+        _require(item.get("role") == exp[7], f"FAN role {index}")
+        if index % 2 == 1:
+            _require(item.get("fg_used") is False, f"{item['name']} FG must stay unused")
+            _require(item.get("fg_pin") == 3, f"{item['name']} FG is pin 3")
 
     temperature = _object(payload["temperature"], "temperature")
     _require(temperature["value_count"] == 27, "temperature count")
@@ -271,7 +275,7 @@ def render_params(project: Mapping[str, Any]) -> str:
 def render_adc_text(project: Mapping[str, Any]) -> str:
     lines = [
         "# Generated from 6400 project.json. Confirmed pins only.",
-        "# Exhaust FAN balls are unresolved and intentionally absent.",
+        "# Exhaust FAN PWM is CON64/66/62/60 pin 4. Pin 3 FG is unused and absent.",
     ]
     pins = project["pins"]
     lines.append(f"set_pin_assignment {{ sys_clk }} {{ LOCATION = {project['device']['clock_ball']}; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }}")
@@ -427,7 +431,7 @@ def generate_6400(
         {
             "target_alias": "6400",
             "unresolved": unresolved,
-            "production_bitstream": "blocked",
+            "production_bitstream": "blocked_td_not_wired" if not unresolved else "blocked",
             "simulation_allowed": True,
             "non_production_synthesis_estimate_allowed": True,
             "required_electrical_fields": ["fpga_ball", "connector", "connector_pin", "net_name"],

+ 67 - 1
tools/package_target.py

@@ -43,6 +43,21 @@ def _add(zipf: zipfile.ZipFile, src: Path, dest: str, sums: dict[str, str]) -> N
     sums[dest] = _sha256(src)
 
 
+def _6400_bitstream() -> Path:
+    configured = os.environ.get("PROD2U_6400_BITSTREAM", "").strip()
+    candidates = [Path(configured)] if configured else []
+    candidates.extend(
+        (
+            ROOT / "dist" / "6400-bitstream" / "prod2u_6400_front_back.bit",
+            ROOT / "evidence" / "bitstream" / "prod2u_6400_front_back.bit",
+        )
+    )
+    for candidate in candidates:
+        if candidate.is_file() and candidate.stat().st_size > 0:
+            return candidate.resolve()
+    raise SystemExit("firmware package blocked: 6400 production bitstream is missing")
+
+
 def build_target_package(
     target_name: str,
     kind: str,
@@ -57,6 +72,8 @@ def build_target_package(
         raise SystemExit(
             "release_blocked\n" + "\n".join(f"{name} pin unresolved" for name in pins)
         )
+    bitstream_path = _6400_bitstream() if kind == "firmware" and target.alias == "6400" else None
+    td_evidence = ROOT / "dist" / "6400-td" if target.alias == "6400" and kind == "firmware" else None
     commit = _git(ROOT, "rev-parse", "HEAD")
     run_id = datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ")
     name = f"prod2u-{target.alias}-{kind}-{commit[:12]}-{run_id}"
@@ -75,7 +92,7 @@ def build_target_package(
         "source_manifest_sha256": hashlib.sha256(target.generated_dir.joinpath("td-source-manifest.json").read_bytes()).hexdigest()
         if (target.generated_dir / "td-source-manifest.json").is_file()
         else None,
-        "bitstream_sha256": None,
+        "bitstream_sha256": _sha256(bitstream_path) if bitstream_path else None,
         "hardware_validation": "NOT RUN",
         "release_blocked": blocked,
         "unresolved_pins": list(pins),
@@ -95,6 +112,51 @@ def build_target_package(
             dest = stage / rel
             dest.parent.mkdir(parents=True, exist_ok=True)
             shutil.copy2(ROOT / rel, dest)
+        if bitstream_path is not None:
+            shutil.copy2(bitstream_path, stage / "prod2u_6400_front_back.bit")
+            (stage / "BITSTREAM-SHA256.txt").write_text(
+                f"{_sha256(bitstream_path)}  prod2u_6400_front_back.bit\n",
+                encoding="ascii",
+            )
+            (stage / "FLASH-INSTRUCTIONS.zh-CN.txt").write_text(
+                "6400 生产固件刷写说明\n"
+                "========================\n"
+                "目标器件:EF2L45BG256B(6400 前后独立温控)\n"
+                "固件文件:prod2u_6400_front_back.bit\n"
+                "\n"
+                "1. 关闭目标板电源,连接板卡厂商支持的 JTAG 下载器。\n"
+                "2. 在 Anlogic TD 2026.1 SP2 中选择 EF2L45BG256B,打开该 .bit 文件。\n"
+                "3. 先执行 Erase/Program,再执行 Verify;确认校验通过后断电重启。\n"
+                "4. 串口使用 115200 8N1,无硬件流控;上位机选择 6400 HEX GUI。\n"
+                "5. 本包只包含 6400 固件,不能用于 MRDIMM 门控板。\n"
+                "\n"
+                "注意:本次交付未执行真实 JTAG/硬件烧录,硬件验证状态为 NOT RUN。\n",
+                encoding="utf-8",
+            )
+            if td_evidence is not None and td_evidence.is_dir():
+                shutil.copytree(td_evidence, stage / "td-evidence", dirs_exist_ok=True)
+            (stage / "TD-BUILD-RECEIPT.json").write_text(
+                json.dumps(
+                    {
+                        "schema": "prod2u-6400-td-build-receipt-v1",
+                        "target_alias": "6400",
+                        "project_id": target.project_id,
+                        "top_module": target.top_module,
+                        "td_version": "TD Release_2026.1_SP2 build 6.2.2.200067",
+                        "source_commit": commit,
+                        "project_config_sha256": manifest["project_config_sha256"],
+                        "source_manifest_sha256": manifest["source_manifest_sha256"],
+                        "bitstream": "prod2u_6400_front_back.bit",
+                        "bitstream_sha256": manifest["bitstream_sha256"],
+                        "stages": ["syn", "phy", "bitgen"],
+                        "hardware_validation": "NOT RUN",
+                    },
+                    indent=2,
+                    sort_keys=True,
+                )
+                + "\n",
+                encoding="utf-8",
+            )
         if include_reference:
             ref = ROOT / "reference"
             if ref.is_dir():
@@ -129,6 +191,10 @@ def _selftest(zip_path: Path) -> None:
             observed = _sha256(dest / name)
             if observed != digest:
                 raise SystemExit(f"hash mismatch {name}")
+        if manifest.get("target_alias") == "6400" and manifest.get("kind") == "firmware":
+            bit = dest / "prod2u_6400_front_back.bit"
+            if not bit.is_file() or _sha256(bit) != manifest.get("bitstream_sha256"):
+                raise SystemExit("package selftest: 6400 bitstream identity mismatch")
 
 
 def main(argv: list[str] | None = None) -> int: