ソースを参照

feat(prod2u): move X/Y limits from CON140 to CON68

Map x_limit to CON68.3/M6 (FAN_GPIO47) and y_limit to CON68.4/L8
(FAN_GPIO48). Document fan-header assembly caveats for Y (Q109 OC path).
Regenerate ADC/manifest; keep UART and startup limit logic unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
root 3 ヶ月 前
親
コミット
c6416b85bd

+ 2 - 2
ACCEPTANCE_MATRIX.md

@@ -29,8 +29,8 @@
 ## Physical / board remaining uncertainties(不升格为 confirmed pass)
 
 - Intake solenoid:CON141.1/P2 **inferred** LOC;外部驱动/线圈极性未确认。
-- Exhaust X/Y STEP/DIR/EN/limit 在 CON138–140 为 EX_GPIO 产品角色 **inferred**。
-- 历史 A11 与 CON124 装配冲突记录保留;产品 y_limit 已迁离 A11。
+- Exhaust X/Y STEP/DIR/EN 在 CON138–139 为 EX_GPIO 产品角色 **inferred**;限位在 **CON68**(风扇6 复用)。
+- 历史 A11 与 CON124 装配冲突记录保留;产品 y_limit 已迁至 CON68.4/L8。
 - 详见 [`docs/IO_EVIDENCE_MATRIX.zh-CN.md`](docs/IO_EVIDENCE_MATRIX.zh-CN.md)。
 
 ## Frozen protocol numbers

+ 1 - 1
AGENTS.md

@@ -52,7 +52,7 @@ Current authority is limited to the above contract files, this `AGENTS.md`, and
 
 ## Limit one-shot contract
 
-- X limit: CON140 pin1 / FPGA T11. Y limit: CON140 pin2 / FPGA P13. Active high.
+- X limit: CON68 pin3 / FPGA M6 (FAN_GPIO47 tach path). Y limit: CON68 pin4 / FPGA L8 (FAN_GPIO48; requires fan OC transistor Q109 unpopulated or FPGA-side wiring — see project.json). Active high at FPGA. CON68 pin1=GND, pin2=+12V_FAN6 reserved.
   (Legacy 0611/early V1.2 probe points CON30.3→B9 and CON12.3→A11 are retired for this product remap.)
 - Limit is used only once per FPGA power-on, global hardware reset, or reconfiguration.
 - Startup closes both dampers: PTC 0%, FAN 10%, motor EN_n 0, DIR = 1 (close).

+ 2 - 2
FINAL_DELIVERY_REPORT.md

@@ -32,8 +32,8 @@
 ## 合法 blocked / not_run
 
 - `intake_solenoid_out`:CON141.1/P2 **inferred** LOC;外部驱动/线圈极性未确认。
-- X/Y STEP/DIR/EN/limit:CON138–140 EX_GPIO 产品角色 **inferred**。
-- 历史 A11 vs CON124 装配冲突记录保留;产品 y_limit 已迁至 CON140.2/P13。
+- X/Y STEP/DIR/EN:CON138–139 EX_GPIO 产品角色 **inferred**;限位在 **CON68**(风扇6 复用)。
+- 历史 A11 vs CON124 装配冲突记录保留;产品 y_limit 已迁至 CON68.4/L8。
 - COM / JTAG / 烧录未授权 → Hardware **`not_run`**。
 
 ## 明确作废的活动声明

+ 4 - 3
OPEN_QUESTIONS.md

@@ -14,9 +14,10 @@ No user product-contract decision currently blocks the **11-byte SET_ALL + solen
 ## Physical / evidence remaining uncertainties
 
 - `intake_solenoid_out` is **inferred-LOC’d** on **CON141.1 / P2** (EX_GPIO33). Connector→series-R→ball is board-data backed; external driver / coil polarity still **unconfirmed**.
-- Exhaust X/Y STEP/DIR/EN/limit product roles on CON138–CON140 are **inferred** (generic EX_GPIO nets, not silkscreen MOTOR/LIMIT names).
-- Historical **A11 vs CON124** WATER_COOL conflict remains a board-assembly note; product **y_limit** no longer uses A11 (now CON140.2 / P13).
-- Contract prose historically said CON30.3 for X limit; V1.2 product probe is now **CON140.1 / T11** (legacy CON125.3 / B9 retired for this remap).
+- Exhaust X/Y STEP/DIR/EN on CON138–CON139 are **inferred** EX_GPIO roles; limits now on **CON68** (fan-6 header repurposed).
+- Historical **A11 vs CON124** WATER_COOL conflict remains a board-assembly note; product **y_limit** is CON68.4 / L8 (not A11).
+- Contract prose historically said CON30.3(丝印) for X limit; V1.2 product probe is now **CON68.3 / M6**.
+- CON68 pin4 is stock open-collector fan PWM: Y-limit harness needs Q109 unpopulated + 0R to FAN_GPIO48, or a flying lead to R708 FPGA side.
 
 ## Non-goals for docs lane
 

+ 2 - 2
README.zh-CN.md

@@ -25,7 +25,7 @@ PTC/FAN 占空为十进制 0..100。PWM ≈20 Hz。PTC active-high;FAN 在 FPG
 
 ## 启动限位(one-shot)
 
-上电/`startup_done==0`:X/Y 向 close(DIR=1)间歇寻限位,最多 10 burst × 450 步 @ 1000 step/s,burst 间隔 50 ms;限位 active-high(X: CON140.1/T11,Y: CON140.2/P13)。`startup_done` 前主机 UART 被丢弃;完成后限位对普通 jog **惰性**。
+上电/`startup_done==0`:X/Y 向 close(DIR=1)间歇寻限位,最多 10 burst × 450 步 @ 1000 step/s,burst 间隔 50 ms;限位 active-high(X: CON68.3/M6,Y: CON68.4/L8;CON68 为风扇 6 座复用,见 IO 证据)。`startup_done` 前主机 UART 被丢弃;完成后限位对普通 jog **惰性**。
 
 ## 当前基线与验证真相(final closure)
 
@@ -37,7 +37,7 @@ PTC/FAN 占空为十进制 0..100。PWM ≈20 Hz。PTC active-high;FAN 在 FPG
 | TD built commit | `8f28660f176e18e97a015e66bdae0ff747e0fc63`(生产综合输入与 tip 一致,tip 未强制重跑 TD) |
 | Bitstream SHA-256 | `ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d` |
 | Hardware / JTAG / 烧录 | **`not_run`**(未授权) |
-| 物理 uncertainties | 进风电磁铁外部驱动/线圈极性;CON138–140 EX_GPIO 产品角色 inferred;历史 A11 vs CON124(见 `OPEN_QUESTIONS.md` / IO 证据矩阵) |
+| 物理 uncertainties | 进风电磁铁外部驱动/线圈极性;CON138–139 马达 EX_GPIO 角色 inferred;CON68 限位复用风扇座(Y 需 Q109 改线);历史 A11 vs CON124 |
 
 `packager-compact-20260805T042343Z` 已合入 `dev`(integrate tip `445814a…` + 活动文档对齐;review-compact 打包体系);生产综合输入相对 `da7b05a…` **未变**,**不**改写上表软件/TD/bitstream 闭合证据。
 

+ 15 - 15
config/pin_inventory.prod2u_door_temp_v1_2.json

@@ -274,27 +274,27 @@
     },
     {
       "signal": "y_limit_raw",
-      "function_net": "EX_GPIO30",
-      "board_connector": "CON140",
-      "connector_pin": 2,
-      "fpga_ball": "P13",
+      "function_net": "FAN_GPIO48",
+      "board_connector": "CON68",
+      "connector_pin": 4,
+      "fpga_ball": "L8",
       "direction": "input",
       "active_level": "high",
       "product_role": "startup_y_close_limit",
       "physical_path_conclusion": "inferred",
       "product_role_conclusion": "inferred",
       "conclusion": "inferred",
-      "conclusion_notes": "Remapped from CON12.3/A11 to CON140.2/P13 to avoid CON124 WATER_COOL conflict on A11.",
+      "conclusion_notes": "CON68 is stock four-wire fan6. Pin4 is OC PWM via Q109 to L8/FAN_GPIO48. Product Y limit reuses L8 as GPIO input; assemble with Q109 unpopulated and 0R CON68.4↔FAN_GPIO48, or wire to R708 FPGA side. Remapped from CON140.2/P13.",
       "manually_verified": true,
-      "source_confidence": "v1_2_board_data_ex_gpio_product_remap"
+      "source_confidence": "v1_2_board_data_fan_header_repurpose"
     },
     {
       "signal": "x_limit_raw",
-      "function_net": "EX_GPIO29",
-      "board_connector": "CON140",
-      "connector_pin": 1,
-      "legacy_connector_note": "Previously CON125.3/B9 (0611 CON30.3); remapped to CON140.1",
-      "fpga_ball": "T11",
+      "function_net": "FAN_GPIO47",
+      "board_connector": "CON68",
+      "connector_pin": 3,
+      "legacy_connector_note": "Previously CON140.1/T11; before that CON125.3/B9 (0611 CON30.3)",
+      "fpga_ball": "M6",
       "direction": "input",
       "active_level": "high",
       "product_role": "startup_x_close_limit",
@@ -302,9 +302,9 @@
       "v1_2_con30_silkscreen_conclusion": "blocked",
       "product_role_conclusion": "inferred",
       "conclusion": "inferred",
-      "conclusion_notes": "Physical CON140.1→R1261→T11 board-data backed; close-limit role product-contract inferred.",
+      "conclusion_notes": "CON68.3→R707→M6 tach path is a true FPGA digital input (optional R980 pull-up). Close-limit role product-contract inferred. Present active-high at FPGA (remove/disable R980 if using switch-to-GND sense without invert).",
       "manually_verified": true,
-      "source_confidence": "v1_2_board_data_ex_gpio_product_remap"
+      "source_confidence": "v1_2_board_data_fan_header_repurpose"
     },
     {
       "signal": "x_step",
@@ -406,8 +406,8 @@
     }
   ],
   "blocked_summary": [
-    "V1.2 silkscreen CON30.3 for X limit (historical; product now uses CON140.1 / T11)",
-    "CON124 as intake actuator (WATER_COOL -> A11); product y_limit moved off A11",
+    "V1.2 silkscreen CON30.3 for X limit (historical; product now uses CON68.3 / M6)",
+    "CON124 as intake actuator (WATER_COOL -> A11); product y_limit on CON68.4 / L8",
     "CON144-146 as intake actuator (KEYLED)",
     "External solenoid driver / coil polarity on CON141 (inferred LOC only)"
   ]

+ 2 - 2
constraints/prod2u_p4_normal_v3.adc

@@ -22,6 +22,6 @@ set_pin_assignment { x_step } { LOCATION = R6; IOSTANDARD = LVCMOS33; PULLTYPE =
 set_pin_assignment { x_dir } { LOCATION = R8; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { y_step } { LOCATION = T3; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { y_dir } { LOCATION = R4; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
-set_pin_assignment { x_limit_raw } { LOCATION = T11; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
-set_pin_assignment { y_limit_raw } { LOCATION = P13; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { x_limit_raw } { LOCATION = M6; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { y_limit_raw } { LOCATION = L8; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { intake_solenoid_out } { LOCATION = P2; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }

+ 4 - 4
docs/HARDWARE_TEST_ORDER_WAVEFORMS.zh-CN.md

@@ -12,8 +12,8 @@ run_id: `con138-141-20260805T061504Z`
 - FAN:FPGA 球 **active-low** PWM;座端经板级反相后给风扇。
 - PTC:FPGA 球 **active-high**。
 - 限位:期望 **active-high** 表示已到位(合同);用高阻探头,勿强驱。
-- X 限位探点:**CON140.1 / T11**(旧 CON125.3 / B9 已退役)。
-- Y 限位探点:**CON140.2 / P13**(旧 CON12.3 / A11 已退役;CON124 水冷仍可能占用 A11,但不再与产品限位争用)。
+- X 限位探点:**CON68.3 / M6**(FAN_GPIO47;旧 CON140.1/T11、CON125.3/B9 已退役)。
+- Y 限位探点:**CON68.4 / L8**(FAN_GPIO48;装配见 IO 矩阵 CON68 注;旧 CON140.2/P13、CON12.3/A11 已退役)。
 - X 电机:**CON139.1–3** → STEP/DIR/EN_n(R6/R8/T7)。
 - Y 电机:**CON138.1–2** → STEP/DIR(T3/R4)。
 - 进风电磁铁逻辑球:**CON141.1 / P2**(外部功率驱动自备)。
@@ -87,8 +87,8 @@ EN_n  0(保持)
 | UART2 | N11/M10 | CON78.2/1(RS-232 电平!逻辑域在 U23 FPGA 侧) | confirmed |
 | FAN1–4 | C4/B5/B1/A14 | CON8/24/25/26.7 或球侧 | confirmed |
 | PTC 腔1–4 | F16/G16… | CON18/27/28/29 功率针(危险)或 HEAT 控制侧 | confirmed |
-| X limit | T11 | **CON140.1** | inferred(EX_GPIO29) |
-| Y limit | P13 | **CON140.2** | inferred(EX_GPIO30;A11/CON124 历史冲突已避开) |
+| X limit | M6 | **CON68.3** | inferred(FAN_GPIO47 tach 复用) |
+| Y limit | L8 | **CON68.4** | inferred(FAN_GPIO48;需 Q109 改线,见 IO 矩阵) |
 | X STEP/DIR | R6/R8 | **CON139.1/2** | inferred |
 | Y STEP/DIR | T3/R4 | **CON138.1/2** | inferred |
 | EN_n | T7 | **CON139.3** | inferred |

+ 6 - 5
docs/IO_EVIDENCE_MATRIX.zh-CN.md

@@ -64,12 +64,13 @@ Active ADC(`constraints/prod2u_p4_normal_v3.adc`)绑定 PTC/FAN/UART/I2C **c
 | 20 | motor_en_n | CON139.3 | EX_GPIO27 | T7 | 自 CON125.4/A10 迁出;极性仍 active-low |
 | 21 | Y STEP | CON138.1 | EX_GPIO21 | T3 | 同上 |
 | 22 | Y DIR | CON138.2 | EX_GPIO22 | R4 | 同上 |
-| 23 | X limit | CON140.1 | EX_GPIO29 | T11 | 自 CON125.3/B9 迁出;startup-only 角色 inferred |
-| 24 | Y limit | CON140.2 | EX_GPIO30 | P13 | 自 CON12.3/A11 迁出;避开 CON124/A11 冲突 |
+| 23 | X limit | CON68.3 | FAN_GPIO47 | M6 | 复用风扇6 转速脚;startup-only;active-high @ FPGA |
+| 24 | Y limit | CON68.4 | FAN_GPIO48 | L8 | 复用风扇6 PWM 控制球;需 Q109 不贴/0R 改线,见装配注 |
 | 25 | intake_solenoid_out | CON141.1 | EX_GPIO33 | P2 | 无板级 solenoid 网名;外部驱动未确认 |
-| 26–29 | (备用) | CON138.3–4 / CON139.4 / CON140.3–4 / CON141.2–4 | EX_GPIO* | P4/T5/P11/L3/N2/M3/L5/K5 | 未分配产品角色 |
 
-历史路径(已退役产品 LOC,保留证据):C11/B12/D15/H14/A10/B9/A11 仍可在 board-data 中查到,但 **不再** 写入活动 ADC。
+CON68 装配注:pin1=GND;pin2=+12V_FAN6(限位线禁止接入);pin3→M6 为直连数字输入;pin4 原开集电极 PWM,Y 限位需 Q109 不贴并 0R 连通 CON68.4↔FAN_GPIO48,或改接到 R708 FPGA 侧。
+
+历史路径(已退役产品 LOC,保留证据):C11/B12/D15/H14/A10/B9/A11/T11/P13 仍可在 board-data 中查到,但 **不再** 写入活动 ADC。
 
 ---
 
@@ -77,7 +78,7 @@ Active ADC(`constraints/prod2u_p4_normal_v3.adc`)绑定 PTC/FAN/UART/I2C **c
 
 | # | 产品角色 | 候选 | 状态 | 阻断原因 |
 |--:|----------|------|------|----------|
-| 30 | X 限位 = CON30.3(V1.2 丝印) | CON30.3 | **blocked** | V1.2 无 CON30;产品现用 CON140.1 |
+| 30 | X 限位 = CON30.3(V1.2 丝印) | CON30.3 | **blocked** | V1.2 无 CON30;产品现用 CON68.3/M6 |
 | 31 | 进风门座 CON124 | WATER_COOL_V+ → A11 | blocked | 水冷语义;与历史 y_limit 同球冲突 |
 | 32 | 进风门座 CON144–146 | KEYLED → N6/P6/N7 | blocked | 键灯网络 |
 | 33 | CON104/105/106 直接当进出风轴 | PUL/DIR | blocked | 无产品轴角色交叉验证 |

+ 1 - 1
docs/prod2u-door-temp-protocol.zh-CN.md

@@ -67,7 +67,7 @@ PTC 8 路物理 PWM 由 4 个 chamber 逻辑值复制。FAN 4 路独立。PWM ~2
 
 ## 马达、限位和看门狗
 
-出风门 X/Y:450 步 jog,1000 step/s。限位 **仅 startup** 使用(CON140.1/T11、CON140.2/P13;旧 B9/A11 已退役);运行期 limit 不干预 STEP。看门狗 10 s → PTC=0、FAN=20,马达停止,电磁铁去激励。
+出风门 X/Y:450 步 jog,1000 step/s。限位 **仅 startup** 使用(CON68.3/M6、CON68.4/L8;旧 CON140/T11·P13 与 B9/A11 已退役);运行期 limit 不干预 STEP。看门狗 10 s → PTC=0、FAN=20,马达停止,电磁铁去激励。
 
 ## 温度读取
 

+ 4 - 4
projects/prod2u-door-temp/project.json

@@ -118,8 +118,8 @@
       "runtime_limit_use": false
     },
     "channels": [
-      {"name": "x_limit_raw", "ball": "T11"},
-      {"name": "y_limit_raw", "ball": "P13"}
+      {"name": "x_limit_raw", "ball": "M6"},
+      {"name": "y_limit_raw", "ball": "L8"}
     ]
   },
   "temperature": {
@@ -151,8 +151,8 @@
     "x_dir": "R8",
     "y_step": "T3",
     "y_dir": "R4",
-    "x_limit_raw": "T11",
-    "y_limit_raw": "P13"
+    "x_limit_raw": "M6",
+    "y_limit_raw": "L8"
   },
   "resource_policy": {
     "target_ram": "optional",

+ 2 - 2
src/generated/host-contract.json

@@ -44,11 +44,11 @@
     "active_level": "high",
     "channels": [
       {
-        "ball": "T11",
+        "ball": "M6",
         "name": "x_limit_raw"
       },
       {
-        "ball": "P13",
+        "ball": "L8",
         "name": "y_limit_raw"
       }
     ],

+ 2 - 2
src/generated/prod2u_door_temp.adc

@@ -22,6 +22,6 @@ set_pin_assignment { x_step } { LOCATION = R6; IOSTANDARD = LVCMOS33; PULLTYPE =
 set_pin_assignment { x_dir } { LOCATION = R8; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { y_step } { LOCATION = T3; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { y_dir } { LOCATION = R4; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
-set_pin_assignment { x_limit_raw } { LOCATION = T11; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
-set_pin_assignment { y_limit_raw } { LOCATION = P13; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { x_limit_raw } { LOCATION = M6; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { y_limit_raw } { LOCATION = L8; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
 set_pin_assignment { intake_solenoid_out } { LOCATION = P2; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }

+ 2 - 2
src/generated/td-source-manifest.json

@@ -89,11 +89,11 @@
       "signal": "y_dir"
     },
     {
-      "ball": "T11",
+      "ball": "M6",
       "signal": "x_limit_raw"
     },
     {
-      "ball": "P13",
+      "ball": "L8",
       "signal": "y_limit_raw"
     },
     {

+ 2 - 2
tests/unit/test_phase1_contract.py

@@ -35,8 +35,8 @@ EXPECTED_ACTIVE_INTERFACE = (
     ("x_dir", "R8"),
     ("y_step", "T3"),
     ("y_dir", "R4"),
-    ("x_limit_raw", "T11"),
-    ("y_limit_raw", "P13"),
+    ("x_limit_raw", "M6"),
+    ("y_limit_raw", "L8"),
     ("intake_solenoid_out", "P2"),
 )
 

+ 2 - 2
tests/unit/test_prod2u_p4_normal_v3_td_files.py

@@ -48,8 +48,8 @@ class Prod2UP4NormalV3TDFilesTests(unittest.TestCase):
             "x_dir": "R8",
             "y_step": "T3",
             "y_dir": "R4",
-            "x_limit_raw": "T11",
-            "y_limit_raw": "P13",
+            "x_limit_raw": "M6",
+            "y_limit_raw": "L8",
             "intake_solenoid_out": "P2",
         }.items():
             self.assertRegex(adc, rf"set_pin_assignment\s+\{{\s*{signal}\s*\}}.*LOCATION\s*=\s*{ball}")