Browse Source

Add dual real FAN PTC debug921 profiles

Codex 5 months ago
parent
commit
5efb87f209
24 changed files with 1300 additions and 660 deletions
  1. 21 1
      config/pin_inventory.fcb_fpga_mcu0611.json
  2. 61 0
      constraints/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.adc
  3. 61 0
      constraints/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.adc
  4. 38 3
      schemas/real_bmc_j6_host_sensor_real_fan_ptc_debug921_v1_receipt.schema.json
  5. 121 349
      src/top/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top.v
  6. 60 0
      src/top/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_top.v
  7. 60 0
      src/top/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top.v
  8. 15 0
      td/phy/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.tcl
  9. 15 0
      td/phy/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.tcl
  10. 17 0
      td/syn/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.tcl
  11. 17 0
      td/syn/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.tcl
  12. 31 0
      td/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.prj
  13. 31 0
      td/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.prj
  14. 3 3
      tests/sim/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top_tb.v
  15. 33 4
      tests/test_project_structure.py
  16. 77 48
      tests/unit/test_pid_harness.py
  17. 51 0
      tests/unit/test_pin_inventory.py
  18. 84 110
      tests/unit/test_remote_scripts.py
  19. 48 7
      tests/unit/test_uart_receipts.py
  20. 113 97
      tools/package_j6_host_sensor_real_fan_ptc_debug921.ps1
  21. 62 30
      tools/pid_harness.py
  22. 144 0
      tools/pin_inventory.py
  23. 75 4
      tools/remote/collect-j6-host-sensor-real-fan-ptc.ps1
  24. 62 4
      tools/uart_receipts.py

+ 21 - 1
config/pin_inventory.fcb_fpga_mcu0611.json

@@ -77,6 +77,26 @@
     {"signal":"HEAT21","function_net":"HEAT21","role":"HEAT","channel":21,"bank_io_net":"BANK2_IO2_18","fpga_ball":"P10","direction":"output","io_standard":"LVCMOS33","capability":["gpio","pwm_output"],"reserved":false,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
     {"signal":"HEAT22","function_net":"HEAT22","role":"HEAT","channel":22,"bank_io_net":"BANK2_IO2_19","fpga_ball":"R10","direction":"output","io_standard":"LVCMOS33","capability":["gpio","pwm_output"],"reserved":false,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
     {"signal":"HEAT23","function_net":"HEAT23","role":"HEAT","channel":23,"bank_io_net":"BANK2_IO2_20","fpga_ball":"T13","direction":"output","io_standard":"LVCMOS33","capability":["gpio","pwm_output"],"reserved":false,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
-    {"signal":"HEAT24","function_net":"HEAT24","role":"HEAT","channel":24,"bank_io_net":"BANK2_IO2_21","fpga_ball":"T12","direction":"output","io_standard":"LVCMOS33","capability":["gpio","pwm_output"],"reserved":false,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"}
+    {"signal":"HEAT24","function_net":"HEAT24","role":"HEAT","channel":24,"bank_io_net":"BANK2_IO2_21","fpga_ball":"T12","direction":"output","io_standard":"LVCMOS33","capability":["gpio","pwm_output"],"reserved":false,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
+    {"signal":"SPARE_GPIO40","function_net":"BANK2_GPIO40","role":"user_io","channel":40,"bank_io_net":"BANK2_GPIO40","fpga_ball":"P5","direction":"bidir","io_standard":"LVCMOS33","capability":["gpio","spare_gpio","pwm_output","uart"],"reserved":false,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
+    {"signal":"SPARE_GPIO41","function_net":"BANK2_GPIO41","role":"user_io","channel":41,"bank_io_net":"BANK2_GPIO41","fpga_ball":"T8","direction":"bidir","io_standard":"LVCMOS33","capability":["gpio","spare_gpio","pwm_output","uart"],"reserved":false,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
+    {"signal":"SPARE_GPIO42","function_net":"BANK2_GPIO42","role":"user_io","channel":42,"bank_io_net":"BANK2_GPIO42","fpga_ball":"M14","direction":"bidir","io_standard":"LVCMOS33","capability":["gpio","spare_gpio","pwm_output","uart"],"reserved":false,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
+    {"signal":"SPARE_GPIO43","function_net":"BANK2_GPIO43","role":"user_io","channel":43,"bank_io_net":"BANK2_GPIO43","fpga_ball":"M15","direction":"bidir","io_standard":"LVCMOS33","capability":["gpio","spare_gpio","pwm_output","uart"],"reserved":false,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
+    {"signal":"SPARE_GPIO44","function_net":"BANK2_GPIO44","role":"user_io","channel":44,"bank_io_net":"BANK2_GPIO44","fpga_ball":"P15","direction":"bidir","io_standard":"LVCMOS33","capability":["gpio","spare_gpio","pwm_output","uart"],"reserved":false,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
+    {"signal":"SPARE_GPIO45","function_net":"BANK2_GPIO45","role":"user_io","channel":45,"bank_io_net":"BANK2_GPIO45","fpga_ball":"N14","direction":"bidir","io_standard":"LVCMOS33","capability":["gpio","spare_gpio","pwm_output","uart"],"reserved":false,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
+    {"signal":"UART1_TX","function_net":"UART1_TX","role":"user_io","channel":52,"bank_io_net":"BANK2_GPIO52","fpga_ball":"L10","direction":"reserved","io_standard":"LVCMOS33","capability":["gpio","reserved_future_uart"],"reserved":true,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
+    {"signal":"UART1_RX","function_net":"UART1_RX","role":"user_io","channel":53,"bank_io_net":"BANK2_GPIO53","fpga_ball":"M9","direction":"reserved","io_standard":"LVCMOS33","capability":["gpio","reserved_future_uart"],"reserved":true,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
+    {"signal":"UART2_TX","function_net":"UART2_TX","role":"user_io","channel":54,"bank_io_net":"BANK2_GPIO54","fpga_ball":"M10","direction":"reserved","io_standard":"LVCMOS33","capability":["gpio","reserved_future_uart"],"reserved":true,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
+    {"signal":"UART2_RX","function_net":"UART2_RX","role":"user_io","channel":55,"bank_io_net":"BANK2_GPIO55","fpga_ball":"N11","direction":"reserved","io_standard":"LVCMOS33","capability":["gpio","reserved_future_uart"],"reserved":true,"manually_verified":true,"source_pages":[10,3],"screenshot_index":"pdf-p10-function-table;pdf-p3-fpga-ball-map","source_confidence":"manual_pdf_cross_check"},
+    {"signal":"SYS_CLK","function_net":"SYS_CLK","role":"user_io","channel":0,"bank_io_net":"DEV_SYS_CLK","fpga_ball":"J1","direction":"input","io_standard":"LVCMOS33","capability":["gpio","clock_input","board_support"],"reserved":false,"manually_verified":true,"source_pages":[3],"screenshot_index":"existing-td-primary-adc","source_confidence":"existing_td_adc_cross_check"},
+    {"signal":"SYS_RST_N","function_net":"SYS_RST_N","role":"user_io","channel":0,"bank_io_net":"DEV_SYS_RST_N","fpga_ball":"N6","direction":"input","io_standard":"LVCMOS33","capability":["gpio","reset_input","board_support"],"reserved":false,"manually_verified":true,"source_pages":[3],"screenshot_index":"existing-td-primary-adc","source_confidence":"existing_td_adc_cross_check"},
+    {"signal":"LED0","function_net":"LED0","role":"user_io","channel":0,"bank_io_net":"DEV_LED0","fpga_ball":"H16","direction":"output","io_standard":"LVCMOS33","capability":["gpio","led_output","board_support"],"reserved":false,"manually_verified":true,"source_pages":[3],"screenshot_index":"existing-td-primary-adc","source_confidence":"existing_td_adc_cross_check"},
+    {"signal":"LED1","function_net":"LED1","role":"user_io","channel":1,"bank_io_net":"DEV_LED1","fpga_ball":"H15","direction":"output","io_standard":"LVCMOS33","capability":["gpio","led_output","board_support"],"reserved":false,"manually_verified":true,"source_pages":[3],"screenshot_index":"existing-td-primary-adc","source_confidence":"existing_td_adc_cross_check"},
+    {"signal":"LED2","function_net":"LED2","role":"user_io","channel":2,"bank_io_net":"DEV_LED2","fpga_ball":"J16","direction":"output","io_standard":"LVCMOS33","capability":["gpio","led_output","board_support"],"reserved":false,"manually_verified":true,"source_pages":[3],"screenshot_index":"existing-td-primary-adc","source_confidence":"existing_td_adc_cross_check"},
+    {"signal":"LED3","function_net":"LED3","role":"user_io","channel":3,"bank_io_net":"DEV_LED3","fpga_ball":"J15","direction":"output","io_standard":"LVCMOS33","capability":["gpio","led_output","board_support"],"reserved":false,"manually_verified":true,"source_pages":[3],"screenshot_index":"existing-td-primary-adc","source_confidence":"existing_td_adc_cross_check"},
+    {"signal":"LED4","function_net":"LED4","role":"user_io","channel":4,"bank_io_net":"DEV_LED4","fpga_ball":"K16","direction":"output","io_standard":"LVCMOS33","capability":["gpio","led_output","board_support"],"reserved":false,"manually_verified":true,"source_pages":[3],"screenshot_index":"existing-td-primary-adc","source_confidence":"existing_td_adc_cross_check"},
+    {"signal":"LED5","function_net":"LED5","role":"user_io","channel":5,"bank_io_net":"DEV_LED5","fpga_ball":"K15","direction":"output","io_standard":"LVCMOS33","capability":["gpio","led_output","board_support"],"reserved":false,"manually_verified":true,"source_pages":[3],"screenshot_index":"existing-td-primary-adc","source_confidence":"existing_td_adc_cross_check"},
+    {"signal":"LED6","function_net":"LED6","role":"user_io","channel":6,"bank_io_net":"DEV_LED6","fpga_ball":"L16","direction":"output","io_standard":"LVCMOS33","capability":["gpio","led_output","board_support"],"reserved":false,"manually_verified":true,"source_pages":[3],"screenshot_index":"existing-td-primary-adc","source_confidence":"existing_td_adc_cross_check"},
+    {"signal":"LED7","function_net":"LED7","role":"user_io","channel":7,"bank_io_net":"DEV_LED7","fpga_ball":"L15","direction":"output","io_standard":"LVCMOS33","capability":["gpio","led_output","board_support"],"reserved":false,"manually_verified":true,"source_pages":[3],"screenshot_index":"existing-td-primary-adc","source_confidence":"existing_td_adc_cross_check"}
   ]
 }

+ 61 - 0
constraints/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.adc

@@ -0,0 +1,61 @@
+# uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921 constraints.
+# Pin profile: formal-uart. Generated from config/pin_inventory.fcb_fpga_mcu0611.json.
+# SRAM-only diagnostic constraints; no flash or cable programming command is present.
+# Generated by tools/pin_inventory.py
+# Board: fcb_fpga_mcu0611
+set_pin_assignment { sys_clk } { LOCATION = J1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { sys_rst_n } { LOCATION = N6; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[0] } { LOCATION = H16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[1] } { LOCATION = H15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[2] } { LOCATION = J16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[3] } { LOCATION = J15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[4] } { LOCATION = K16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[5] } { LOCATION = K15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[6] } { LOCATION = L16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[7] } { LOCATION = L15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { bmc_uart_rx } { LOCATION = T8; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { bmc_uart_tx } { LOCATION = P5; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { debug_uart_rx } { LOCATION = P15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { debug_uart_tx } { LOCATION = N14; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[0] } { LOCATION = D2; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[1] } { LOCATION = D3; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[2] } { LOCATION = E6; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[3] } { LOCATION = D6; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[4] } { LOCATION = C1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[5] } { LOCATION = C2; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[6] } { LOCATION = B3; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[7] } { LOCATION = B13; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_install_in[0] } { LOCATION = N10; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_install_in[1] } { LOCATION = M11; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_install_in[2] } { LOCATION = P12; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_install_in[3] } { LOCATION = R11; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[0] } { LOCATION = C4; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[1] } { LOCATION = B5; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[2] } { LOCATION = B1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[3] } { LOCATION = A14; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { host_uart_rx } { LOCATION = M15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { host_uart_tx } { LOCATION = M14; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[0] } { LOCATION = F16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[10] } { LOCATION = T2; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[11] } { LOCATION = R3; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[12] } { LOCATION = P16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[13] } { LOCATION = R16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[14] } { LOCATION = M16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[15] } { LOCATION = N16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[16] } { LOCATION = P8; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[17] } { LOCATION = P7; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[18] } { LOCATION = T9; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[19] } { LOCATION = P9; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[1] } { LOCATION = G16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[20] } { LOCATION = P10; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[21] } { LOCATION = R10; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[22] } { LOCATION = T13; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[23] } { LOCATION = T12; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[2] } { LOCATION = T4; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[3] } { LOCATION = R5; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[4] } { LOCATION = T6; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[5] } { LOCATION = R7; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[6] } { LOCATION = M1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[7] } { LOCATION = N1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[8] } { LOCATION = P1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[9] } { LOCATION = R1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }

+ 61 - 0
constraints/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.adc

@@ -0,0 +1,61 @@
+# uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921 constraints.
+# Pin profile: temp-uart-ptc-remap. Generated from config/pin_inventory.fcb_fpga_mcu0611.json.
+# SRAM-only diagnostic constraints; no flash or cable programming command is present.
+# Generated by tools/pin_inventory.py
+# Board: fcb_fpga_mcu0611
+set_pin_assignment { sys_clk } { LOCATION = J1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { sys_rst_n } { LOCATION = N6; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[0] } { LOCATION = H16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[1] } { LOCATION = H15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[2] } { LOCATION = J16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[3] } { LOCATION = J15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[4] } { LOCATION = K16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[5] } { LOCATION = K15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[6] } { LOCATION = L16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { led[7] } { LOCATION = L15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { bmc_uart_rx } { LOCATION = R5; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { bmc_uart_tx } { LOCATION = T4; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { debug_uart_rx } { LOCATION = P10; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { debug_uart_tx } { LOCATION = R10; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[0] } { LOCATION = D2; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[1] } { LOCATION = D3; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[2] } { LOCATION = E6; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[3] } { LOCATION = D6; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[4] } { LOCATION = C1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[5] } { LOCATION = C2; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[6] } { LOCATION = B3; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_fg_in[7] } { LOCATION = B13; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_install_in[0] } { LOCATION = N10; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_install_in[1] } { LOCATION = M11; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_install_in[2] } { LOCATION = P12; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_install_in[3] } { LOCATION = R11; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[0] } { LOCATION = C4; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[1] } { LOCATION = B5; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[2] } { LOCATION = B1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { fan_pwm_out[3] } { LOCATION = A14; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { host_uart_rx } { LOCATION = P8; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { host_uart_tx } { LOCATION = P7; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[0] } { LOCATION = F16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[10] } { LOCATION = T2; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[11] } { LOCATION = R3; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[12] } { LOCATION = P16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[13] } { LOCATION = R16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[14] } { LOCATION = M16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[15] } { LOCATION = N16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[16] } { LOCATION = M14; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[17] } { LOCATION = M15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[18] } { LOCATION = T9; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[19] } { LOCATION = P9; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[1] } { LOCATION = G16; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[20] } { LOCATION = P15; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[21] } { LOCATION = N14; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[22] } { LOCATION = T13; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[23] } { LOCATION = T12; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[2] } { LOCATION = P5; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[3] } { LOCATION = T8; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[4] } { LOCATION = T6; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[5] } { LOCATION = R7; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[6] } { LOCATION = M1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[7] } { LOCATION = N1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[8] } { LOCATION = P1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }
+set_pin_assignment { ptc_pwm_out[9] } { LOCATION = R1; IOSTANDARD = LVCMOS33; PULLTYPE = NONE; }

+ 38 - 3
schemas/real_bmc_j6_host_sensor_real_fan_ptc_debug921_v1_receipt.schema.json

@@ -2,12 +2,14 @@
   "$schema": "https://json-schema.org/draft/2020-12/schema",
   "$id": "real_bmc_j6_host_sensor_real_fan_ptc_debug921_v1_receipt.schema.json",
   "type": "object",
-  "required": ["schema", "status", "counterparty", "diagnostic_scope", "programming", "collector", "layers", "safety"],
+  "required": ["schema", "status", "counterparty", "diagnostic_scope", "pin_profile", "programming", "collector", "layers", "safety"],
   "properties": {
     "schema": { "const": "real-bmc-j6-host-sensor-real-fan-ptc-debug921-v1-receipt-v1" },
     "status": { "type": "string" },
     "counterparty": { "const": "real_bmc" },
     "diagnostic_scope": { "const": "host_sensor_real_fan_ptc_debug921" },
+    "pin_profile_name": { "enum": ["temp-uart-ptc-remap", "formal-uart"] },
+    "pin_profile": { "$ref": "#/$defs/pin_profile" },
     "programming": {
       "type": "object",
       "required": ["mode", "manual_programming", "bitstream"],
@@ -157,8 +159,23 @@
         },
         "pin_map": {
           "type": "object",
-          "required": ["status", "ptc_count", "fan_count"],
-          "properties": { "status": { "type": "string" }, "ptc_count": { "const": 24 }, "fan_count": { "const": 4 } }
+          "required": ["status", "ptc_count", "fan_count", "fan_fg_count", "fan_install_count"],
+          "properties": {
+            "status": { "type": "string" },
+            "profile": { "enum": ["temp-uart-ptc-remap", "formal-uart"] },
+            "ptc_count": { "const": 24 },
+            "fan_count": { "const": 4 },
+            "fan_fg_count": { "const": 8 },
+            "fan_install_count": { "const": 4 },
+            "bmc_tx_ball": { "type": "string" },
+            "bmc_rx_ball": { "type": "string" },
+            "host_tx_ball": { "type": "string" },
+            "host_rx_ball": { "type": "string" },
+            "debug_rx_ball": { "type": "string" },
+            "debug_tx_ball": { "type": "string" },
+            "ptc_substitutions": { "type": "object" },
+            "reserved_future_uart": { "type": "object" }
+          }
         },
         "safety_contract": {
           "type": "object",
@@ -224,6 +241,24 @@
     }
   },
   "$defs": {
+    "pin_profile": {
+      "type": "object",
+      "required": ["name", "bmc_tx_ball", "bmc_rx_ball", "host_tx_ball", "host_rx_ball", "debug_rx_ball", "debug_tx_ball"],
+      "properties": {
+        "name": { "enum": ["temp-uart-ptc-remap", "formal-uart"] },
+        "connector": { "type": "string" },
+        "tx_ball": { "type": "string" },
+        "rx_ball": { "type": "string" },
+        "bmc_tx_ball": { "type": "string" },
+        "bmc_rx_ball": { "type": "string" },
+        "host_tx_ball": { "type": "string" },
+        "host_rx_ball": { "type": "string" },
+        "debug_rx_ball": { "type": "string" },
+        "debug_tx_ball": { "type": "string" },
+        "ptc_substitutions": { "type": "object" },
+        "reserved_future_uart": { "type": "object" }
+      }
+    },
     "artifact": {
       "type": "object",
       "required": ["path", "sha256"],

+ 121 - 349
src/top/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top.v

@@ -11,7 +11,8 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
     parameter integer PTC_PWM_PERIOD_TICKS = 2500000,
     parameter integer FAN_PWM_PERIOD_TICKS = 1000,
     parameter integer HEARTBEAT_TOGGLE_TICKS = 12500000,
-    parameter integer ACTIVITY_HOLD_TICKS = 2500000
+    parameter integer ACTIVITY_HOLD_TICKS = 2500000,
+    parameter integer PIN_PROFILE = 0
 ) (
     input  wire        sys_clk,
     input  wire        sys_rst_n,
@@ -421,50 +422,6 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
         end
     endfunction
 
-    function [7:0] dec3_at;
-        input [6:0] value;
-        input [1:0] index;
-        reg [6:0] below_hundred;
-        reg [3:0] tens;
-        reg [3:0] ones;
-        begin
-            below_hundred = (value >= 7'd100) ? 7'd0 : value;
-            if (below_hundred >= 7'd90) begin tens = 4'd9; ones = below_hundred - 7'd90; end
-            else if (below_hundred >= 7'd80) begin tens = 4'd8; ones = below_hundred - 7'd80; end
-            else if (below_hundred >= 7'd70) begin tens = 4'd7; ones = below_hundred - 7'd70; end
-            else if (below_hundred >= 7'd60) begin tens = 4'd6; ones = below_hundred - 7'd60; end
-            else if (below_hundred >= 7'd50) begin tens = 4'd5; ones = below_hundred - 7'd50; end
-            else if (below_hundred >= 7'd40) begin tens = 4'd4; ones = below_hundred - 7'd40; end
-            else if (below_hundred >= 7'd30) begin tens = 4'd3; ones = below_hundred - 7'd30; end
-            else if (below_hundred >= 7'd20) begin tens = 4'd2; ones = below_hundred - 7'd20; end
-            else if (below_hundred >= 7'd10) begin tens = 4'd1; ones = below_hundred - 7'd10; end
-            else begin tens = 4'd0; ones = below_hundred[3:0]; end
-            case (index)
-                2'd0: dec3_at = (value >= 7'd100) ? "1" : "0";
-                2'd1: dec3_at = 8'h30 + {4'd0, tens};
-                default: dec3_at = 8'h30 + {4'd0, ones};
-            endcase
-        end
-    endfunction
-
-    function [7:0] dec2_at;
-        input [5:0] value;
-        input index;
-        reg [5:0] below_hundred;
-        reg [3:0] tens;
-        reg [3:0] ones;
-        begin
-            below_hundred = (value >= 6'd60) ? 6'd0 : value;
-            if (below_hundred >= 6'd50) begin tens = 4'd5; ones = below_hundred - 6'd50; end
-            else if (below_hundred >= 6'd40) begin tens = 4'd4; ones = below_hundred - 6'd40; end
-            else if (below_hundred >= 6'd30) begin tens = 4'd3; ones = below_hundred - 6'd30; end
-            else if (below_hundred >= 6'd20) begin tens = 4'd2; ones = below_hundred - 6'd20; end
-            else if (below_hundred >= 6'd10) begin tens = 4'd1; ones = below_hundred - 6'd10; end
-            else begin tens = 4'd0; ones = below_hundred[3:0]; end
-            dec2_at = index ? (8'h30 + {4'd0, ones}) : (8'h30 + {4'd0, tens});
-        end
-    endfunction
-
     function [6:0] dimm_temp_value;
         input [7:0] int_byte;
         input [7:0] frac_byte;
@@ -913,13 +870,13 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
         begin
             case (kind)
                 FRAME_RAW: frame_length = 8'd55 + {2'd0, raw_len, 1'b0};
-                FRAME_EVT: frame_length = 8'd44;
-                FRAME_PWM: frame_length = 8'd72;
-                FRAME_MOD: frame_length = 8'd30;
+                FRAME_EVT: frame_length = 8'd17;
+                FRAME_PWM: frame_length = 8'd38;
+                FRAME_MOD: frame_length = 8'd19;
                 FRAME_STAT: frame_length = 8'd56;
-                FRAME_MAP: frame_length = 8'd66;
+                FRAME_MAP: frame_length = 8'd11;
                 FRAME_CMD: frame_length = 8'd36;
-                FRAME_TEMP: frame_length = 8'd42;
+                FRAME_TEMP: frame_length = 8'd30;
                 default: frame_length = 8'd0;
             endcase
         end
@@ -964,19 +921,7 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
                 8'd14: mod_frame_byte_compact = "t";
                 8'd15: mod_frame_byte_compact = "=";
                 8'd16: mod_frame_byte_compact = "0";
-                8'd17: mod_frame_byte_compact = " ";
-                8'd18: mod_frame_byte_compact = "s";
-                8'd19: mod_frame_byte_compact = "r";
-                8'd20: mod_frame_byte_compact = "c";
-                8'd21: mod_frame_byte_compact = "=";
-                8'd22: mod_frame_byte_compact = "h";
-                8'd23: mod_frame_byte_compact = "m";
-                8'd24: mod_frame_byte_compact = " ";
-                8'd25: mod_frame_byte_compact = "t";
-                8'd26: mod_frame_byte_compact = "s";
-                8'd27: mod_frame_byte_compact = "=";
-                8'd28: mod_frame_byte_compact = "5";
-                8'd29: mod_frame_byte_compact = 8'h0d;
+                8'd17: mod_frame_byte_compact = 8'h0d;
                 default: mod_frame_byte_compact = 8'h0a;
             endcase
         end
@@ -1057,64 +1002,9 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
                 8'd4: map_frame_byte_compact = "P";
                 8'd5: map_frame_byte_compact = " ";
                 8'd6: map_frame_byte_compact = "p";
-                8'd7: map_frame_byte_compact = "r";
-                8'd8: map_frame_byte_compact = "o";
-                8'd9: map_frame_byte_compact = "f";
-                8'd10: map_frame_byte_compact = "i";
-                8'd11: map_frame_byte_compact = "l";
-                8'd12: map_frame_byte_compact = "e";
-                8'd13: map_frame_byte_compact = "=";
-                8'd14: map_frame_byte_compact = "p";
-                8'd15: map_frame_byte_compact = "r";
-                8'd16: map_frame_byte_compact = "i";
-                8'd17: map_frame_byte_compact = "m";
-                8'd18: map_frame_byte_compact = "a";
-                8'd19: map_frame_byte_compact = "r";
-                8'd20: map_frame_byte_compact = "y";
-                8'd21: map_frame_byte_compact = " ";
-                8'd22: map_frame_byte_compact = "p";
-                8'd23: map_frame_byte_compact = "t";
-                8'd24: map_frame_byte_compact = "c";
-                8'd25: map_frame_byte_compact = "=";
-                8'd26: map_frame_byte_compact = "2";
-                8'd27: map_frame_byte_compact = "4";
-                8'd28: map_frame_byte_compact = " ";
-                8'd29: map_frame_byte_compact = "h";
-                8'd30: map_frame_byte_compact = "e";
-                8'd31: map_frame_byte_compact = "a";
-                8'd32: map_frame_byte_compact = "t";
-                8'd33: map_frame_byte_compact = "=";
-                8'd34: map_frame_byte_compact = "2";
-                8'd35: map_frame_byte_compact = "4";
-                8'd36: map_frame_byte_compact = " ";
-                8'd37: map_frame_byte_compact = "f";
-                8'd38: map_frame_byte_compact = "p";
-                8'd39: map_frame_byte_compact = "w";
-                8'd40: map_frame_byte_compact = "m";
-                8'd41: map_frame_byte_compact = "=";
-                8'd42: map_frame_byte_compact = "4";
-                8'd43: map_frame_byte_compact = " ";
-                8'd44: map_frame_byte_compact = "f";
-                8'd45: map_frame_byte_compact = "g";
-                8'd46: map_frame_byte_compact = "=";
-                8'd47: map_frame_byte_compact = "8";
-                8'd48: map_frame_byte_compact = " ";
-                8'd49: map_frame_byte_compact = "i";
-                8'd50: map_frame_byte_compact = "n";
-                8'd51: map_frame_byte_compact = "s";
-                8'd52: map_frame_byte_compact = "t";
-                8'd53: map_frame_byte_compact = "=";
-                8'd54: map_frame_byte_compact = "4";
-                8'd55: map_frame_byte_compact = " ";
-                8'd56: map_frame_byte_compact = "n";
-                8'd57: map_frame_byte_compact = "e";
-                8'd58: map_frame_byte_compact = "t";
-                8'd59: map_frame_byte_compact = "=";
-                8'd60: map_frame_byte_compact = "r";
-                8'd61: map_frame_byte_compact = "e";
-                8'd62: map_frame_byte_compact = "a";
-                8'd63: map_frame_byte_compact = "l";
-                8'd64: map_frame_byte_compact = 8'h0d;
+                8'd7: map_frame_byte_compact = "=";
+                8'd8: map_frame_byte_compact = (PIN_PROFILE == 1) ? "f" : "t";
+                8'd9: map_frame_byte_compact = 8'h0d;
                 default: map_frame_byte_compact = 8'h0a;
             endcase
         end
@@ -1132,39 +1022,27 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
                 8'd5: temp_frame_byte_compact = "P";
                 8'd6: temp_frame_byte_compact = " ";
                 8'd7: temp_frame_byte_compact = "s";
-                8'd8: temp_frame_byte_compact = "e";
-                8'd9: temp_frame_byte_compact = "q";
-                8'd10: temp_frame_byte_compact = "=";
-                8'd11: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd0);
-                8'd12: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd1);
-                8'd13: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd2);
-                8'd14: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd3);
-                8'd15: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd4);
-                8'd16: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd5);
-                8'd17: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd6);
-                8'd18: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd7);
-                8'd19: temp_frame_byte_compact = " ";
-                8'd20: temp_frame_byte_compact = "s";
-                8'd21: temp_frame_byte_compact = "t";
-                8'd22: temp_frame_byte_compact = "=";
-                8'd23: temp_frame_byte_compact = snap_report_all_ff ? "a" : "v";
-                8'd24: temp_frame_byte_compact = " ";
-                8'd25: temp_frame_byte_compact = "v";
+                8'd8: temp_frame_byte_compact = "=";
+                8'd9: temp_frame_byte_compact = hex16_at(snap_report_seq, 2'd0);
+                8'd10: temp_frame_byte_compact = hex16_at(snap_report_seq, 2'd1);
+                8'd11: temp_frame_byte_compact = hex16_at(snap_report_seq, 2'd2);
+                8'd12: temp_frame_byte_compact = hex16_at(snap_report_seq, 2'd3);
+                8'd13: temp_frame_byte_compact = " ";
+                8'd14: temp_frame_byte_compact = "v";
+                8'd15: temp_frame_byte_compact = "=";
+                8'd16: temp_frame_byte_compact = hex8_at({2'd0, snap_report_valid_count}, 1'b0);
+                8'd17: temp_frame_byte_compact = hex8_at({2'd0, snap_report_valid_count}, 1'b1);
+                8'd18: temp_frame_byte_compact = " ";
+                8'd19: temp_frame_byte_compact = "m";
+                8'd20: temp_frame_byte_compact = "=";
+                8'd21: temp_frame_byte_compact = hex8_at({2'd0, snap_report_missing_count}, 1'b0);
+                8'd22: temp_frame_byte_compact = hex8_at({2'd0, snap_report_missing_count}, 1'b1);
+                8'd23: temp_frame_byte_compact = " ";
+                8'd24: temp_frame_byte_compact = "h";
+                8'd25: temp_frame_byte_compact = "d";
                 8'd26: temp_frame_byte_compact = "=";
-                8'd27: temp_frame_byte_compact = hex8_at({2'd0, snap_report_valid_count}, 1'b0);
-                8'd28: temp_frame_byte_compact = hex8_at({2'd0, snap_report_valid_count}, 1'b1);
-                8'd29: temp_frame_byte_compact = " ";
-                8'd30: temp_frame_byte_compact = "m";
-                8'd31: temp_frame_byte_compact = "=";
-                8'd32: temp_frame_byte_compact = hex8_at({2'd0, snap_report_missing_count}, 1'b0);
-                8'd33: temp_frame_byte_compact = hex8_at({2'd0, snap_report_missing_count}, 1'b1);
-                8'd34: temp_frame_byte_compact = " ";
-                8'd35: temp_frame_byte_compact = "h";
-                8'd36: temp_frame_byte_compact = "d";
-                8'd37: temp_frame_byte_compact = "=";
-                8'd38: temp_frame_byte_compact = hex8_at(host_report_drop, 1'b0);
-                8'd39: temp_frame_byte_compact = hex8_at(host_report_drop, 1'b1);
-                8'd40: temp_frame_byte_compact = 8'h0d;
+                8'd27: temp_frame_byte_compact = hex8_at(host_report_drop, 1'b0);
+                8'd28: temp_frame_byte_compact = 8'h0d;
                 default: temp_frame_byte_compact = 8'h0a;
             endcase
         end
@@ -1252,43 +1130,16 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
                 8'd3: evt_frame_byte = "V";
                 8'd4: evt_frame_byte = "T";
                 8'd5: evt_frame_byte = " ";
-                8'd6: evt_frame_byte = "s";
-                8'd7: evt_frame_byte = "e";
-                8'd8: evt_frame_byte = "q";
-                8'd9: evt_frame_byte = "=";
-                8'd10: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd0);
-                8'd11: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd1);
-                8'd12: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd2);
-                8'd13: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd3);
-                8'd14: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd4);
-                8'd15: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd5);
-                8'd16: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd6);
-                8'd17: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd7);
-                8'd18: evt_frame_byte = " ";
-                8'd19: evt_frame_byte = "o";
-                8'd20: evt_frame_byte = "k";
-                8'd21: evt_frame_byte = "=";
-                8'd22: evt_frame_byte = (snap_resp_code == RESP_OK) ? "1" : "0";
-                8'd23: evt_frame_byte = " ";
-                8'd24: evt_frame_byte = "e";
-                8'd25: evt_frame_byte = "=";
-                8'd26: evt_frame_byte = hex8_at({5'd0, snap_resp_code}, 1'b0);
-                8'd27: evt_frame_byte = hex8_at({5'd0, snap_resp_code}, 1'b1);
-                8'd28: evt_frame_byte = " ";
-                8'd29: evt_frame_byte = "t";
-                8'd30: evt_frame_byte = "=";
-                8'd31: evt_frame_byte = hex8_at({5'd0, snap_cmd_type}, 1'b0);
-                8'd32: evt_frame_byte = hex8_at({5'd0, snap_cmd_type}, 1'b1);
-                8'd33: evt_frame_byte = " ";
-                8'd34: evt_frame_byte = "p";
-                8'd35: evt_frame_byte = "=";
-                8'd36: evt_frame_byte = hex8_at({1'b0, snap_cmd_pct}, 1'b0);
-                8'd37: evt_frame_byte = hex8_at({1'b0, snap_cmd_pct}, 1'b1);
-                8'd38: evt_frame_byte = " ";
-                8'd39: evt_frame_byte = "t";
-                8'd40: evt_frame_byte = "=";
-                8'd41: evt_frame_byte = snap_timeout_active ? "1" : "0";
-                8'd42: evt_frame_byte = 8'h0d;
+                8'd6: evt_frame_byte = "o";
+                8'd7: evt_frame_byte = "k";
+                8'd8: evt_frame_byte = "=";
+                8'd9: evt_frame_byte = (snap_resp_code == RESP_OK) ? "1" : "0";
+                8'd10: evt_frame_byte = " ";
+                8'd11: evt_frame_byte = "e";
+                8'd12: evt_frame_byte = "=";
+                8'd13: evt_frame_byte = hex8_at({5'd0, snap_resp_code}, 1'b0);
+                8'd14: evt_frame_byte = hex8_at({5'd0, snap_resp_code}, 1'b1);
+                8'd15: evt_frame_byte = 8'h0d;
                 default: evt_frame_byte = 8'h0a;
             endcase
         end
@@ -1304,71 +1155,37 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
                 8'd3: pwm_frame_byte = "W";
                 8'd4: pwm_frame_byte = "M";
                 8'd5: pwm_frame_byte = " ";
-                8'd6: pwm_frame_byte = "s";
-                8'd7: pwm_frame_byte = "e";
-                8'd8: pwm_frame_byte = "q";
-                8'd9: pwm_frame_byte = "=";
-                8'd10: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd0);
-                8'd11: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd1);
-                8'd12: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd2);
-                8'd13: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd3);
-                8'd14: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd4);
-                8'd15: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd5);
-                8'd16: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd6);
-                8'd17: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd7);
-                8'd18: pwm_frame_byte = " ";
-                8'd19: pwm_frame_byte = "s";
-                8'd20: pwm_frame_byte = "r";
-                8'd21: pwm_frame_byte = "c";
-                8'd22: pwm_frame_byte = "=";
-                8'd23: pwm_frame_byte = "h";
-                8'd24: pwm_frame_byte = "m";
-                8'd25: pwm_frame_byte = " ";
-                8'd26: pwm_frame_byte = "p";
-                8'd27: pwm_frame_byte = "i";
-                8'd28: pwm_frame_byte = "d";
-                8'd29: pwm_frame_byte = "=";
-                8'd30: pwm_frame_byte = "0";
-                8'd31: pwm_frame_byte = " ";
-                8'd32: pwm_frame_byte = "t";
-                8'd33: pwm_frame_byte = "o";
-                8'd34: pwm_frame_byte = "=";
-                8'd35: pwm_frame_byte = snap_timeout_active ? "1" : "0";
-                8'd36: pwm_frame_byte = " ";
-                8'd37: pwm_frame_byte = "p";
-                8'd38: pwm_frame_byte = "0";
-                8'd39: pwm_frame_byte = "=";
-                8'd40: pwm_frame_byte = hex8_at({1'b0, snap_ptc0}, 1'b0);
-                8'd41: pwm_frame_byte = hex8_at({1'b0, snap_ptc0}, 1'b1);
-                8'd42: pwm_frame_byte = " ";
-                8'd43: pwm_frame_byte = "f";
-                8'd44: pwm_frame_byte = "0";
-                8'd45: pwm_frame_byte = "=";
-                8'd46: pwm_frame_byte = hex8_at({1'b0, snap_fan0}, 1'b0);
-                8'd47: pwm_frame_byte = hex8_at({1'b0, snap_fan0}, 1'b1);
-                8'd48: pwm_frame_byte = " ";
-                8'd49: pwm_frame_byte = "p";
-                8'd50: pwm_frame_byte = "2";
-                8'd51: pwm_frame_byte = "3";
-                8'd52: pwm_frame_byte = "=";
-                8'd53: pwm_frame_byte = hex8_at({1'b0, snap_ptc23}, 1'b0);
-                8'd54: pwm_frame_byte = hex8_at({1'b0, snap_ptc23}, 1'b1);
-                8'd55: pwm_frame_byte = " ";
-                8'd56: pwm_frame_byte = "f";
-                8'd57: pwm_frame_byte = "3";
-                8'd58: pwm_frame_byte = "=";
-                8'd59: pwm_frame_byte = hex8_at({1'b0, snap_fan3}, 1'b0);
-                8'd60: pwm_frame_byte = hex8_at({1'b0, snap_fan3}, 1'b1);
-                8'd61: pwm_frame_byte = " ";
-                8'd62: pwm_frame_byte = "i";
-                8'd63: pwm_frame_byte = "=";
-                8'd64: pwm_frame_byte = hex8_at({4'd0, snap_fan_install}, 1'b0);
-                8'd65: pwm_frame_byte = hex8_at({4'd0, snap_fan_install}, 1'b1);
-                8'd66: pwm_frame_byte = " ";
-                8'd67: pwm_frame_byte = "g";
-                8'd68: pwm_frame_byte = "=";
-                8'd69: pwm_frame_byte = (snap_fg0_edges != 16'd0 || snap_fg7_edges != 16'd0) ? "1" : "0";
-                8'd70: pwm_frame_byte = 8'h0d;
+                8'd6: pwm_frame_byte = "t";
+                8'd7: pwm_frame_byte = "o";
+                8'd8: pwm_frame_byte = "=";
+                8'd9: pwm_frame_byte = snap_timeout_active ? "1" : "0";
+                8'd10: pwm_frame_byte = " ";
+                8'd11: pwm_frame_byte = "p";
+                8'd12: pwm_frame_byte = "0";
+                8'd13: pwm_frame_byte = "=";
+                8'd14: pwm_frame_byte = hex8_at({1'b0, snap_ptc0}, 1'b0);
+                8'd15: pwm_frame_byte = hex8_at({1'b0, snap_ptc0}, 1'b1);
+                8'd16: pwm_frame_byte = " ";
+                8'd17: pwm_frame_byte = "p";
+                8'd18: pwm_frame_byte = "2";
+                8'd19: pwm_frame_byte = "3";
+                8'd20: pwm_frame_byte = "=";
+                8'd21: pwm_frame_byte = hex8_at({1'b0, snap_ptc23}, 1'b0);
+                8'd22: pwm_frame_byte = hex8_at({1'b0, snap_ptc23}, 1'b1);
+                8'd23: pwm_frame_byte = " ";
+                8'd24: pwm_frame_byte = "f";
+                8'd25: pwm_frame_byte = "0";
+                8'd26: pwm_frame_byte = "=";
+                8'd27: pwm_frame_byte = hex8_at({1'b0, snap_fan0}, 1'b0);
+                8'd28: pwm_frame_byte = hex8_at({1'b0, snap_fan0}, 1'b1);
+                8'd29: pwm_frame_byte = " ";
+                8'd30: pwm_frame_byte = "f";
+                8'd31: pwm_frame_byte = "3";
+                8'd32: pwm_frame_byte = "=";
+                8'd33: pwm_frame_byte = hex8_at({1'b0, snap_fan3}, 1'b0);
+                8'd34: pwm_frame_byte = hex8_at({1'b0, snap_fan3}, 1'b1);
+                8'd35: pwm_frame_byte = " ";
+                8'd36: pwm_frame_byte = 8'h0d;
                 default: pwm_frame_byte = 8'h0a;
             endcase
         end
@@ -1422,9 +1239,9 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
         input [5:0] line;
         begin
             if (line == 6'd0) begin
-                host_report_line_length = 8'd61;
+                host_report_line_length = 8'd28;
             end else if (line <= 6'd24) begin
-                host_report_line_length = 8'd47;
+                host_report_line_length = 8'd34;
             end else begin
                 host_report_line_length = 8'd0;
             end
@@ -1441,61 +1258,28 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
                 8'd3: sens_report_byte = "S";
                 8'd4: sens_report_byte = " ";
                 8'd5: sens_report_byte = "s";
-                8'd6: sens_report_byte = "e";
-                8'd7: sens_report_byte = "q";
-                8'd8: sens_report_byte = "=";
-                8'd9: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd0);
-                8'd10: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd1);
-                8'd11: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd2);
-                8'd12: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd3);
-                8'd13: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd4);
-                8'd14: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd5);
-                8'd15: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd6);
-                8'd16: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd7);
-                8'd17: sens_report_byte = " ";
-                8'd18: sens_report_byte = "s";
-                8'd19: sens_report_byte = "t";
-                8'd20: sens_report_byte = "a";
-                8'd21: sens_report_byte = "t";
-                8'd22: sens_report_byte = "u";
-                8'd23: sens_report_byte = "s";
-                8'd24: sens_report_byte = "=";
-                8'd25: sens_report_byte = snap_report_all_ff ? "a" : "v";
-                8'd26: sens_report_byte = snap_report_all_ff ? "l" : "a";
-                8'd27: sens_report_byte = snap_report_all_ff ? "l" : "l";
-                8'd28: sens_report_byte = snap_report_all_ff ? "_" : "i";
-                8'd29: sens_report_byte = snap_report_all_ff ? "f" : "d";
-                8'd30: sens_report_byte = snap_report_all_ff ? "f" : " ";
-                8'd31: sens_report_byte = " ";
-                8'd32: sens_report_byte = "v";
-                8'd33: sens_report_byte = "a";
-                8'd34: sens_report_byte = "l";
-                8'd35: sens_report_byte = "i";
-                8'd36: sens_report_byte = "d";
-                8'd37: sens_report_byte = "=";
-                8'd38: sens_report_byte = dec2_at(snap_report_valid_count, 1'b0);
-                8'd39: sens_report_byte = dec2_at(snap_report_valid_count, 1'b1);
-                8'd40: sens_report_byte = " ";
-                8'd41: sens_report_byte = "m";
-                8'd42: sens_report_byte = "i";
-                8'd43: sens_report_byte = "s";
-                8'd44: sens_report_byte = "s";
-                8'd45: sens_report_byte = "i";
-                8'd46: sens_report_byte = "n";
-                8'd47: sens_report_byte = "g";
-                8'd48: sens_report_byte = "=";
-                8'd49: sens_report_byte = dec2_at(snap_report_missing_count, 1'b0);
-                8'd50: sens_report_byte = dec2_at(snap_report_missing_count, 1'b1);
-                8'd51: sens_report_byte = " ";
-                8'd52: sens_report_byte = "f";
-                8'd53: sens_report_byte = "a";
-                8'd54: sens_report_byte = "u";
-                8'd55: sens_report_byte = "l";
-                8'd56: sens_report_byte = "t";
-                8'd57: sens_report_byte = "=";
-                8'd58: sens_report_byte = "0";
-                8'd59: sens_report_byte = 8'h0d;
-                8'd60: sens_report_byte = 8'h0a;
+                8'd6: sens_report_byte = "=";
+                8'd7: sens_report_byte = hex16_at(snap_report_seq, 2'd0);
+                8'd8: sens_report_byte = hex16_at(snap_report_seq, 2'd1);
+                8'd9: sens_report_byte = hex16_at(snap_report_seq, 2'd2);
+                8'd10: sens_report_byte = hex16_at(snap_report_seq, 2'd3);
+                8'd11: sens_report_byte = " ";
+                8'd12: sens_report_byte = "s";
+                8'd13: sens_report_byte = "t";
+                8'd14: sens_report_byte = "=";
+                8'd15: sens_report_byte = snap_report_all_ff ? "a" : "v";
+                8'd16: sens_report_byte = " ";
+                8'd17: sens_report_byte = "v";
+                8'd18: sens_report_byte = "=";
+                8'd19: sens_report_byte = hex8_at({2'd0, snap_report_valid_count}, 1'b0);
+                8'd20: sens_report_byte = hex8_at({2'd0, snap_report_valid_count}, 1'b1);
+                8'd21: sens_report_byte = " ";
+                8'd22: sens_report_byte = "m";
+                8'd23: sens_report_byte = "=";
+                8'd24: sens_report_byte = hex8_at({2'd0, snap_report_missing_count}, 1'b0);
+                8'd25: sens_report_byte = hex8_at({2'd0, snap_report_missing_count}, 1'b1);
+                8'd26: sens_report_byte = 8'h0d;
+                8'd27: sens_report_byte = 8'h0a;
                 default: sens_report_byte = 8'h0a;
             endcase
         end
@@ -1511,46 +1295,34 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
                 8'd3: dimm_report_byte = "M";
                 8'd4: dimm_report_byte = " ";
                 8'd5: dimm_report_byte = "s";
-                8'd6: dimm_report_byte = "e";
-                8'd7: dimm_report_byte = "q";
-                8'd8: dimm_report_byte = "=";
-                8'd9: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd0);
-                8'd10: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd1);
-                8'd11: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd2);
-                8'd12: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd3);
-                8'd13: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd4);
-                8'd14: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd5);
-                8'd15: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd6);
-                8'd16: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd7);
+                8'd6: dimm_report_byte = "=";
+                8'd7: dimm_report_byte = hex16_at(snap_report_seq, 2'd0);
+                8'd8: dimm_report_byte = hex16_at(snap_report_seq, 2'd1);
+                8'd9: dimm_report_byte = hex16_at(snap_report_seq, 2'd2);
+                8'd10: dimm_report_byte = hex16_at(snap_report_seq, 2'd3);
+                8'd11: dimm_report_byte = " ";
+                8'd12: dimm_report_byte = "i";
+                8'd13: dimm_report_byte = "d";
+                8'd14: dimm_report_byte = "=";
+                8'd15: dimm_report_byte = hex8_at({3'd0, snap_dimm_id}, 1'b0);
+                8'd16: dimm_report_byte = hex8_at({3'd0, snap_dimm_id}, 1'b1);
                 8'd17: dimm_report_byte = " ";
-                8'd18: dimm_report_byte = "i";
-                8'd19: dimm_report_byte = "d";
+                8'd18: dimm_report_byte = "t";
+                8'd19: dimm_report_byte = "p";
                 8'd20: dimm_report_byte = "=";
-                8'd21: dimm_report_byte = hex8_at({3'd0, snap_dimm_id}, 1'b0);
-                8'd22: dimm_report_byte = hex8_at({3'd0, snap_dimm_id}, 1'b1);
+                8'd21: dimm_report_byte = hex8_at({1'b0, snap_dimm_temp}, 1'b0);
+                8'd22: dimm_report_byte = hex8_at({1'b0, snap_dimm_temp}, 1'b1);
                 8'd23: dimm_report_byte = " ";
-                8'd24: dimm_report_byte = "t";
-                8'd25: dimm_report_byte = "e";
-                8'd26: dimm_report_byte = "m";
-                8'd27: dimm_report_byte = "p";
-                8'd28: dimm_report_byte = "=";
-                8'd29: dimm_report_byte = "0";
-                8'd30: dimm_report_byte = "x";
-                8'd31: dimm_report_byte = hex8_at({1'b0, snap_dimm_temp}, 1'b0);
-                8'd32: dimm_report_byte = hex8_at({1'b0, snap_dimm_temp}, 1'b1);
-                8'd33: dimm_report_byte = " ";
-                8'd34: dimm_report_byte = "m";
-                8'd35: dimm_report_byte = "i";
-                8'd36: dimm_report_byte = "s";
-                8'd37: dimm_report_byte = "s";
-                8'd38: dimm_report_byte = "=";
-                8'd39: dimm_report_byte = snap_dimm_missing ? "1" : "0";
-                8'd40: dimm_report_byte = " ";
-                8'd41: dimm_report_byte = "s";
-                8'd42: dimm_report_byte = "t";
-                8'd43: dimm_report_byte = "=";
-                8'd44: dimm_report_byte = snap_dimm_missing ? "m" : "v";
-                8'd45: dimm_report_byte = 8'h0d;
+                8'd24: dimm_report_byte = "m";
+                8'd25: dimm_report_byte = "=";
+                8'd26: dimm_report_byte = snap_dimm_missing ? "1" : "0";
+                8'd27: dimm_report_byte = " ";
+                8'd28: dimm_report_byte = "s";
+                8'd29: dimm_report_byte = "t";
+                8'd30: dimm_report_byte = "=";
+                8'd31: dimm_report_byte = snap_dimm_missing ? "m" : "v";
+                8'd32: dimm_report_byte = 8'h0d;
+                8'd33: dimm_report_byte = 8'h0a;
                 default: dimm_report_byte = 8'h0a;
             endcase
         end

+ 60 - 0
src/top/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_top.v

@@ -0,0 +1,60 @@
+`timescale 1ns/1ps
+
+module uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_top #(
+    parameter integer BMC_UART_CLKS_PER_BIT = 217,
+    parameter integer HOST_UART_CLKS_PER_BIT = 217,
+    parameter integer DEBUG_UART_CLKS_PER_BIT = 27,
+    parameter integer STARTUP_DELAY_TICKS = 250000,
+    parameter integer COMMAND_GAP_TICKS = 25000000,
+    parameter integer STATUS_PERIOD_TICKS = 25000000,
+    parameter integer HOST_TIMEOUT_TICKS = 125000000,
+    parameter integer PTC_PWM_PERIOD_TICKS = 2500000,
+    parameter integer FAN_PWM_PERIOD_TICKS = 1000,
+    parameter integer HEARTBEAT_TOGGLE_TICKS = 12500000,
+    parameter integer ACTIVITY_HOLD_TICKS = 2500000
+) (
+    input  wire        sys_clk,
+    input  wire        sys_rst_n,
+    input  wire        bmc_uart_rx,
+    output wire        bmc_uart_tx,
+    input  wire        debug_uart_rx,
+    output wire        debug_uart_tx,
+    input  wire        host_uart_rx,
+    output wire        host_uart_tx,
+    output wire [23:0] ptc_pwm_out,
+    output wire [3:0]  fan_pwm_out,
+    input  wire [7:0]  fan_fg_in,
+    input  wire [3:0]  fan_install_in,
+    output wire [7:0]  led
+);
+
+    uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
+        .BMC_UART_CLKS_PER_BIT(BMC_UART_CLKS_PER_BIT),
+        .HOST_UART_CLKS_PER_BIT(HOST_UART_CLKS_PER_BIT),
+        .DEBUG_UART_CLKS_PER_BIT(DEBUG_UART_CLKS_PER_BIT),
+        .STARTUP_DELAY_TICKS(STARTUP_DELAY_TICKS),
+        .COMMAND_GAP_TICKS(COMMAND_GAP_TICKS),
+        .STATUS_PERIOD_TICKS(STATUS_PERIOD_TICKS),
+        .HOST_TIMEOUT_TICKS(HOST_TIMEOUT_TICKS),
+        .PTC_PWM_PERIOD_TICKS(PTC_PWM_PERIOD_TICKS),
+        .FAN_PWM_PERIOD_TICKS(FAN_PWM_PERIOD_TICKS),
+        .HEARTBEAT_TOGGLE_TICKS(HEARTBEAT_TOGGLE_TICKS),
+        .ACTIVITY_HOLD_TICKS(ACTIVITY_HOLD_TICKS),
+        .PIN_PROFILE(1)
+    ) u_core (
+        .sys_clk(sys_clk),
+        .sys_rst_n(sys_rst_n),
+        .bmc_uart_rx(bmc_uart_rx),
+        .bmc_uart_tx(bmc_uart_tx),
+        .debug_uart_rx(debug_uart_rx),
+        .debug_uart_tx(debug_uart_tx),
+        .host_uart_rx(host_uart_rx),
+        .host_uart_tx(host_uart_tx),
+        .ptc_pwm_out(ptc_pwm_out),
+        .fan_pwm_out(fan_pwm_out),
+        .fan_fg_in(fan_fg_in),
+        .fan_install_in(fan_install_in),
+        .led(led)
+    );
+
+endmodule

+ 60 - 0
src/top/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top.v

@@ -0,0 +1,60 @@
+`timescale 1ns/1ps
+
+module uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top #(
+    parameter integer BMC_UART_CLKS_PER_BIT = 217,
+    parameter integer HOST_UART_CLKS_PER_BIT = 217,
+    parameter integer DEBUG_UART_CLKS_PER_BIT = 27,
+    parameter integer STARTUP_DELAY_TICKS = 250000,
+    parameter integer COMMAND_GAP_TICKS = 25000000,
+    parameter integer STATUS_PERIOD_TICKS = 25000000,
+    parameter integer HOST_TIMEOUT_TICKS = 125000000,
+    parameter integer PTC_PWM_PERIOD_TICKS = 2500000,
+    parameter integer FAN_PWM_PERIOD_TICKS = 1000,
+    parameter integer HEARTBEAT_TOGGLE_TICKS = 12500000,
+    parameter integer ACTIVITY_HOLD_TICKS = 2500000
+) (
+    input  wire        sys_clk,
+    input  wire        sys_rst_n,
+    input  wire        bmc_uart_rx,
+    output wire        bmc_uart_tx,
+    input  wire        debug_uart_rx,
+    output wire        debug_uart_tx,
+    input  wire        host_uart_rx,
+    output wire        host_uart_tx,
+    output wire [23:0] ptc_pwm_out,
+    output wire [3:0]  fan_pwm_out,
+    input  wire [7:0]  fan_fg_in,
+    input  wire [3:0]  fan_install_in,
+    output wire [7:0]  led
+);
+
+    uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
+        .BMC_UART_CLKS_PER_BIT(BMC_UART_CLKS_PER_BIT),
+        .HOST_UART_CLKS_PER_BIT(HOST_UART_CLKS_PER_BIT),
+        .DEBUG_UART_CLKS_PER_BIT(DEBUG_UART_CLKS_PER_BIT),
+        .STARTUP_DELAY_TICKS(STARTUP_DELAY_TICKS),
+        .COMMAND_GAP_TICKS(COMMAND_GAP_TICKS),
+        .STATUS_PERIOD_TICKS(STATUS_PERIOD_TICKS),
+        .HOST_TIMEOUT_TICKS(HOST_TIMEOUT_TICKS),
+        .PTC_PWM_PERIOD_TICKS(PTC_PWM_PERIOD_TICKS),
+        .FAN_PWM_PERIOD_TICKS(FAN_PWM_PERIOD_TICKS),
+        .HEARTBEAT_TOGGLE_TICKS(HEARTBEAT_TOGGLE_TICKS),
+        .ACTIVITY_HOLD_TICKS(ACTIVITY_HOLD_TICKS),
+        .PIN_PROFILE(0)
+    ) u_core (
+        .sys_clk(sys_clk),
+        .sys_rst_n(sys_rst_n),
+        .bmc_uart_rx(bmc_uart_rx),
+        .bmc_uart_tx(bmc_uart_tx),
+        .debug_uart_rx(debug_uart_rx),
+        .debug_uart_tx(debug_uart_tx),
+        .host_uart_rx(host_uart_rx),
+        .host_uart_tx(host_uart_tx),
+        .ptc_pwm_out(ptc_pwm_out),
+        .fan_pwm_out(fan_pwm_out),
+        .fan_fg_in(fan_fg_in),
+        .fan_install_in(fan_install_in),
+        .led(led)
+    );
+
+endmodule

+ 15 - 0
td/phy/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.tcl

@@ -0,0 +1,15 @@
+import_device ef2_4.db -package EF2L45BG256B
+import_db ../syn/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_gate.db
+read_adc {constraints/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.adc}
+read_sdc {constraints/pid_study_01.sdc}
+place
+update_timing -mode manhattan
+report_area -io_info -file uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_phy.area
+report_timing_summary -file uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_place.timing
+export_db uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_place.db
+route
+update_timing
+report_area -io_info -file uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_phy.area
+report_timing_summary -file uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_pr.timing
+export_db uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_pr.db
+bitgen -bit uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.bit

+ 15 - 0
td/phy/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.tcl

@@ -0,0 +1,15 @@
+import_device ef2_4.db -package EF2L45BG256B
+import_db ../syn/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_gate.db
+read_adc {constraints/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.adc}
+read_sdc {constraints/pid_study_01.sdc}
+place
+update_timing -mode manhattan
+report_area -io_info -file uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_phy.area
+report_timing_summary -file uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_place.timing
+export_db uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_place.db
+route
+update_timing
+report_area -io_info -file uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_phy.area
+report_timing_summary -file uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_pr.timing
+export_db uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_pr.db
+bitgen -bit uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.bit

+ 17 - 0
td/syn/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.tcl

@@ -0,0 +1,17 @@
+import_device ef2_4.db -package EF2L45BG256B
+analyze -file {src/rtl/uart_rx_8n1.v}
+analyze -file {src/rtl/uart_tx_8n1.v}
+analyze -file {src/rtl/bmc_uart_raw48_poll_lite.v}
+analyze -file {src/top/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top.v}
+analyze -file {src/top/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_top.v}
+elaborate -top {uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_top}
+read_adc {constraints/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.adc}
+read_sdc {constraints/pid_study_01.sdc}
+optimize_rtl
+report_area -file uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_rtl.area
+export_db uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_rtl.db
+optimize_gate uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_gate.area
+legalize_phy_inst
+update_timing
+report_timing_summary -file uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_gate.timing
+export_db uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_gate.db

+ 17 - 0
td/syn/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.tcl

@@ -0,0 +1,17 @@
+import_device ef2_4.db -package EF2L45BG256B
+analyze -file {src/rtl/uart_rx_8n1.v}
+analyze -file {src/rtl/uart_tx_8n1.v}
+analyze -file {src/rtl/bmc_uart_raw48_poll_lite.v}
+analyze -file {src/top/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top.v}
+analyze -file {src/top/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top.v}
+elaborate -top {uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top}
+read_adc {constraints/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.adc}
+read_sdc {constraints/pid_study_01.sdc}
+optimize_rtl
+report_area -file uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_rtl.area
+export_db uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_rtl.db
+optimize_gate uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_gate.area
+legalize_phy_inst
+update_timing
+report_timing_summary -file uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_gate.timing
+export_db uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_gate.db

+ 31 - 0
td/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.prj

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Project Version="3" Minor="2" RunTime="2026-07-03T00:00:00">
+    <Project_Created_Time></Project_Created_Time>
+    <TD_Version>6.2.2.198412</TD_Version>
+    <Name>uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921</Name>
+    <HardWare>
+        <Family>EF2</Family>
+        <Device>EF2L45BG256B</Device>
+        <Speed></Speed>
+    </HardWare>
+    <Source_Files>
+        <Verilog>
+            <File Path="../src/rtl/uart_rx_8n1.v"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="design_1"/><Attr Name="CompileOrder" Val="1"/></FileInfo></File>
+            <File Path="../src/rtl/uart_tx_8n1.v"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="design_1"/><Attr Name="CompileOrder" Val="2"/></FileInfo></File>
+            <File Path="../src/rtl/bmc_uart_raw48_poll_lite.v"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="design_1"/><Attr Name="CompileOrder" Val="3"/></FileInfo></File>
+            <File Path="../src/top/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top.v"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="design_1"/><Attr Name="CompileOrder" Val="4"/></FileInfo></File>
+            <File Path="../src/top/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_top.v"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="design_1"/><Attr Name="CompileOrder" Val="5"/></FileInfo></File>
+        </Verilog>
+        <ADC_FILE>
+            <File Path="../constraints/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.adc"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="constraint_1"/><Attr Name="CompileOrder" Val="1"/></FileInfo></File>
+        </ADC_FILE>
+        <SDC_FILE>
+            <File Path="../constraints/pid_study_01.sdc"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="constraint_1"/><Attr Name="CompileOrder" Val="2"/></FileInfo></File>
+        </SDC_FILE>
+    </Source_Files>
+    <TOP_MODULE>
+        <LABEL></LABEL>
+        <MODULE>uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_top</MODULE>
+        <CREATEINDEX>user</CREATEINDEX>
+    </TOP_MODULE>
+</Project>

+ 31 - 0
td/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.prj

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Project Version="3" Minor="2" RunTime="2026-07-03T00:00:00">
+    <Project_Created_Time></Project_Created_Time>
+    <TD_Version>6.2.2.198412</TD_Version>
+    <Name>uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921</Name>
+    <HardWare>
+        <Family>EF2</Family>
+        <Device>EF2L45BG256B</Device>
+        <Speed></Speed>
+    </HardWare>
+    <Source_Files>
+        <Verilog>
+            <File Path="../src/rtl/uart_rx_8n1.v"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="design_1"/><Attr Name="CompileOrder" Val="1"/></FileInfo></File>
+            <File Path="../src/rtl/uart_tx_8n1.v"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="design_1"/><Attr Name="CompileOrder" Val="2"/></FileInfo></File>
+            <File Path="../src/rtl/bmc_uart_raw48_poll_lite.v"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="design_1"/><Attr Name="CompileOrder" Val="3"/></FileInfo></File>
+            <File Path="../src/top/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top.v"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="design_1"/><Attr Name="CompileOrder" Val="4"/></FileInfo></File>
+            <File Path="../src/top/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top.v"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="design_1"/><Attr Name="CompileOrder" Val="5"/></FileInfo></File>
+        </Verilog>
+        <ADC_FILE>
+            <File Path="../constraints/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.adc"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="constraint_1"/><Attr Name="CompileOrder" Val="1"/></FileInfo></File>
+        </ADC_FILE>
+        <SDC_FILE>
+            <File Path="../constraints/pid_study_01.sdc"><FileInfo><Attr Name="UsedInSyn" Val="true"/><Attr Name="UsedInP&amp;R" Val="true"/><Attr Name="BelongTo" Val="constraint_1"/><Attr Name="CompileOrder" Val="2"/></FileInfo></File>
+        </SDC_FILE>
+    </Source_Files>
+    <TOP_MODULE>
+        <LABEL></LABEL>
+        <MODULE>uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top</MODULE>
+        <CREATEINDEX>user</CREATEINDEX>
+    </TOP_MODULE>
+</Project>

+ 3 - 3
tests/sim/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top_tb.v

@@ -177,8 +177,8 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top_tb;
             update_match(host_mon_data, "cmd=FANCH", 9, host_fanch_match, host_fanch_seen);
             update_count_match(host_mon_data, "SENS ", 5, host_sens_match, host_sens_seen, host_sens_count);
             update_count_match(host_mon_data, "DIMM ", 5, host_dimm_match, host_dimm_seen, host_dimm_count);
-            update_match(host_mon_data, "valid=", 6, host_valid_match, host_valid_seen);
-            update_match(host_mon_data, "missing=", 8, host_missing_match, host_missing_seen);
+            update_match(host_mon_data, "v=", 2, host_valid_match, host_valid_seen);
+            update_match(host_mon_data, "m=", 2, host_missing_match, host_missing_seen);
             update_count_match(host_mon_data, "ERR BAD_CH", 10, host_bad_ch_match, host_bad_ch_seen, host_bad_ch_count);
         end
     end
@@ -500,7 +500,7 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top_tb;
             $fatal;
         end
         if (!host_valid_seen || !host_missing_seen) begin
-            $display("HostPort SENS summary missing decimal valid/missing fields valid=%0d missing=%0d text=%0s",
+            $display("HostPort SENS summary missing compact v/m fields valid=%0d missing=%0d text=%0s",
                     host_valid_seen, host_missing_seen, host_text);
             $fatal;
         end

+ 33 - 4
tests/test_project_structure.py

@@ -58,11 +58,17 @@ class ProjectStructureTests(unittest.TestCase):
             "src/rtl/uart_tx_8n1.v",
             "src/rtl/bmc_uart_raw48_poll_lite.v",
             "src/top/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top.v",
+            "src/top/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top.v",
+            "src/top/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_top.v",
             "tests/sim/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top_tb.v",
-            "constraints/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary.adc",
-            "td/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary.prj",
-            "td/syn/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary.tcl",
-            "td/phy/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary.tcl",
+            "constraints/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.adc",
+            "constraints/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.adc",
+            "td/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.prj",
+            "td/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.prj",
+            "td/syn/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.tcl",
+            "td/syn/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.tcl",
+            "td/phy/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.tcl",
+            "td/phy/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.tcl",
             "tools/pid_harness.py",
             "tools/uart_receipts.py",
             "tools/pin_inventory.py",
@@ -161,6 +167,29 @@ class ProjectStructureTests(unittest.TestCase):
         self.assertNotIn("PROGRAM_FLASH", top)
         self.assertNotIn("ERASE_FLASH", top)
 
+    def test_two_user_td_profiles_elaborate_distinct_wrapper_tops(self) -> None:
+        profiles = {
+            "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921": 0,
+            "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921": 1,
+        }
+        for stem, pin_profile in profiles.items():
+            with self.subTest(stem=stem):
+                wrapper_path = ROOT / "src" / "top" / f"{stem}_top.v"
+                wrapper = wrapper_path.read_text(encoding="utf-8", errors="replace")
+                self.assertIn(f"module {stem}_top", wrapper)
+                self.assertIn("uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(", wrapper)
+                self.assertIn(f".PIN_PROFILE({pin_profile})", wrapper)
+
+                prj_text = (ROOT / "td" / f"{stem}.prj").read_text(encoding="utf-8")
+                self.assertIn("../src/top/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top.v", prj_text)
+                self.assertIn(f"../src/top/{stem}_top.v", prj_text)
+                self.assertIn(f"<MODULE>{stem}_top</MODULE>", prj_text)
+
+                syn_text = (ROOT / "td" / "syn" / f"{stem}.tcl").read_text(encoding="utf-8")
+                self.assertIn("analyze -file {src/top/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top.v}", syn_text)
+                self.assertIn(f"analyze -file {{src/top/{stem}_top.v}}", syn_text)
+                self.assertIn(f"elaborate -top {{{stem}_top}}", syn_text)
+
 
 if __name__ == "__main__":
     unittest.main()

+ 77 - 48
tests/unit/test_pid_harness.py

@@ -264,22 +264,27 @@ Clock Summary
         self.assertEqual(payload["status"], "blocked_missing_tool")
         self.assertEqual(payload["missing_tools"], ["sby", "yosys"])
 
-    def test_td_build_without_run_is_explicitly_skipped_for_latest_real_fan_ptc_top(self) -> None:
-        top = "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary"
-        payload = td_build_payload(run=False, top=top)
+    def test_td_build_without_run_is_explicitly_skipped_for_latest_real_fan_ptc_tops(self) -> None:
+        for top in [
+            "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921",
+            "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921",
+        ]:
+            with self.subTest(top=top):
+                payload = td_build_payload(run=False, top=top)
 
-        self.assertEqual(payload["status"], "skipped")
-        self.assertEqual(payload["top_module"], "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top")
-        self.assertIn(top, TD_TOP_PROFILES)
+                self.assertEqual(payload["status"], "skipped")
+                self.assertEqual(payload["top_module"], f"{top}_top")
+                self.assertIn(top, TD_TOP_PROFILES)
 
-    def test_only_latest_user_td_profile_is_registered(self) -> None:
-        top = "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary"
-        self.assertEqual(set(TD_TOP_PROFILES), {"system_contract", "debug_max", top})
+    def test_two_latest_user_td_profiles_are_registered(self) -> None:
+        temp_top = "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921"
+        formal_top = "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921"
+        self.assertEqual(set(TD_TOP_PROFILES), {"system_contract", "debug_max", temp_top, formal_top})
 
-        profile = TD_TOP_PROFILES[top]
+        profile = TD_TOP_PROFILES[temp_top]
         self.assertEqual(profile["mode"], "implementation")
-        self.assertEqual(profile["top_module"], "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top")
-        self.assertEqual(profile["pin_profile"], "primary")
+        self.assertEqual(profile["top_module"], f"{temp_top}_top")
+        self.assertEqual(profile["pin_profile"], "temp-uart-ptc-remap")
         self.assertEqual(profile["tx_ball"], "T4")
         self.assertEqual(profile["rx_ball"], "R5")
         self.assertEqual(profile["host_uart_tx_ball"], "P7")
@@ -290,43 +295,67 @@ Clock Summary
         self.assertEqual(profile["bmc_uart_baud"], 115200)
         self.assertEqual(profile["debug_uart_baud"], 921600)
         self.assertTrue(profile["requires_verified_real_fan_ptc_pin_map"])
-        self.assertIn("fail-closed", profile["authority_boundary"].lower())
+        self.assertIn("temp-uart-ptc-remap", profile["authority_boundary"])
+
+        formal = TD_TOP_PROFILES[formal_top]
+        self.assertEqual(formal["top_module"], f"{formal_top}_top")
+        self.assertEqual(formal["pin_profile"], "formal-uart")
+        self.assertEqual(formal["tx_ball"], "P5")
+        self.assertEqual(formal["rx_ball"], "T8")
+        self.assertEqual(formal["host_uart_tx_ball"], "M14")
+        self.assertEqual(formal["host_uart_rx_ball"], "M15")
+        self.assertEqual(formal["debug_uart_rx_ball"], "P15")
+        self.assertEqual(formal["debug_uart_tx_ball"], "N14")
+        self.assertIn("reserved UART1/2", formal["authority_boundary"])
 
     def test_latest_td_project_and_scripts_are_build_only(self) -> None:
-        stem = "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary"
-        top_module = "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top"
-        prj_text = (ROOT / "td" / f"{stem}.prj").read_text(encoding="utf-8")
-
-        self.assertIn("../src/rtl/uart_tx_8n1.v", prj_text)
-        self.assertIn("../src/rtl/uart_rx_8n1.v", prj_text)
-        self.assertIn("../src/rtl/bmc_uart_raw48_poll_lite.v", prj_text)
-        self.assertIn(f"../src/top/{top_module}.v", prj_text)
-        self.assertIn(f"<MODULE>{top_module}</MODULE>", prj_text)
-
-        combined = ""
-        for script_dir in ["syn", "phy"]:
-            script_path = ROOT / "td" / script_dir / f"{stem}.tcl"
-            script_text = script_path.read_text(encoding="utf-8")
-            combined += script_text
-            markers = td_forbidden_script_markers(script_text)
-            self.assertEqual(markers, [], f"{stem}:{script_dir}:{markers}")
-
-        self.assertIn(top_module, combined)
-        self.assertIn(f"constraints/{stem}.adc", combined)
-        self.assertIn(f"{stem}.bit", combined)
-        self.assertNotIn("PROGRAM_SRAM", combined)
-        self.assertNotIn("PROGRAM_FLASH", combined)
-        self.assertNotIn("insert_debugger", combined)
-        self.assertNotIn("setup_debugger", combined)
-        self.assertNotIn("uart_rs232_j6_host_sensor_pwm_debug921_top", combined)
-
-    def test_latest_td_build_blocks_on_locked_uart_pin_conflict(self) -> None:
-        payload = td_build_payload(run=True, top="uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary")
-
-        self.assertEqual(payload["status"], "blocked_pin_conflict_with_locked_debug_uart")
-        self.assertEqual(payload["top_module"], "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top")
-        self.assertIn("HEAT3", json.dumps(payload["pin_conflicts"], sort_keys=True))
-        self.assertIsNone(payload["bitstream"])
+        stems = [
+            "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921",
+            "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921",
+        ]
+        for stem in stems:
+            with self.subTest(stem=stem):
+                top_module = f"{stem}_top"
+                prj_text = (ROOT / "td" / f"{stem}.prj").read_text(encoding="utf-8")
+
+                self.assertIn("../src/rtl/uart_tx_8n1.v", prj_text)
+                self.assertIn("../src/rtl/uart_rx_8n1.v", prj_text)
+                self.assertIn("../src/rtl/bmc_uart_raw48_poll_lite.v", prj_text)
+                self.assertIn("../src/top/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top.v", prj_text)
+                self.assertIn(f"../src/top/{stem}_top.v", prj_text)
+                self.assertIn(f"<MODULE>{top_module}</MODULE>", prj_text)
+
+                combined = ""
+                for script_dir in ["syn", "phy"]:
+                    script_path = ROOT / "td" / script_dir / f"{stem}.tcl"
+                    script_text = script_path.read_text(encoding="utf-8")
+                    combined += script_text
+                    markers = td_forbidden_script_markers(script_text)
+                    self.assertEqual(markers, [], f"{stem}:{script_dir}:{markers}")
+
+                self.assertIn("uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top", combined)
+                self.assertIn(top_module, combined)
+                self.assertIn(f"constraints/{stem}.adc", combined)
+                self.assertIn(f"{stem}.bit", combined)
+                self.assertNotIn("PROGRAM_SRAM", combined)
+                self.assertNotIn("PROGRAM_FLASH", combined)
+                self.assertNotIn("insert_debugger", combined)
+                self.assertNotIn("setup_debugger", combined)
+                self.assertNotIn("uart_rs232_j6_host_sensor_pwm_debug921_top", combined)
+
+    def test_latest_td_build_profiles_do_not_block_on_old_locked_uart_conflict_guard(self) -> None:
+        for top in [
+            "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921",
+            "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921",
+        ]:
+            with self.subTest(top=top), mock.patch("pid_harness.run_td_script") as run_td_script_mock:
+                run_td_script_mock.return_value = mock.Mock(returncode=1, stdout="", stderr="TD unavailable in unit test")
+                payload = td_build_payload(run=True, top=top)
+
+                self.assertNotEqual(payload["status"], "blocked_pin_conflict_with_locked_debug_uart")
+                self.assertEqual(payload["top_module"], f"{top}_top")
+                self.assertNotIn("pin_conflicts", payload)
+                self.assertEqual(payload["pin_profile"], TD_TOP_PROFILES[top]["pin_profile"])
 
     def test_latest_hdl_testbench_is_registered_without_legacy_j6_tops(self) -> None:
         tests_by_name = {item["name"]: item for item in hdl_testbenches()}
@@ -443,7 +472,7 @@ connect_cable -open
         parser = build_parser()
         for argv in (["td-build"], ["td"]):
             args = parser.parse_args(argv)
-            self.assertEqual(args.top, "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary")
+            self.assertEqual(args.top, "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921")
 
     def test_config_supported_sources_do_not_include_chipwatcher_replay(self) -> None:
         config = json.loads((ROOT / "config" / "pid_channels.json").read_text(encoding="utf-8"))

+ 51 - 0
tests/unit/test_pin_inventory.py

@@ -17,6 +17,7 @@ sys.path.insert(0, str(ROOT / "tools"))
 from pin_inventory import (  # noqa: E402
     build_io_budget,
     check_locked_uart_conflicts,
+    diagnostic_profile_assignments,
     generate_adc,
     load_pin_inventory,
     real_fan_ptc_assignments,
@@ -112,6 +113,56 @@ class PinInventoryTests(unittest.TestCase):
         self.assertEqual(result["status"], "fail_pin_conflict")
         self.assertFalse(target.exists())
 
+    def test_temp_uart_ptc_remap_profile_keeps_locked_serials_and_substitutes_conflicting_ptc(self) -> None:
+        inventory = load_pin_inventory(PRODUCT_INVENTORY)
+        payload = diagnostic_profile_assignments(inventory, "temp-uart-ptc-remap")
+
+        self.assertEqual(payload["status"], "pass")
+        self.assertEqual(payload["profile"], "temp-uart-ptc-remap")
+        self.assertEqual(payload["uart_assignments"]["bmc_uart_tx"]["fpga_ball"], "T4")
+        self.assertEqual(payload["uart_assignments"]["bmc_uart_rx"]["fpga_ball"], "R5")
+        self.assertEqual(payload["uart_assignments"]["host_uart_tx"]["fpga_ball"], "P7")
+        self.assertEqual(payload["uart_assignments"]["host_uart_rx"]["fpga_ball"], "P8")
+        self.assertEqual(payload["uart_assignments"]["debug_uart_rx"]["fpga_ball"], "P10")
+        self.assertEqual(payload["uart_assignments"]["debug_uart_tx"]["fpga_ball"], "R10")
+
+        ptc = payload["assignments"]
+        self.assertEqual(ptc["ptc_pwm_out[2]"], "P5")
+        self.assertEqual(ptc["ptc_pwm_out[3]"], "T8")
+        self.assertEqual(ptc["ptc_pwm_out[16]"], "M14")
+        self.assertEqual(ptc["ptc_pwm_out[17]"], "M15")
+        self.assertEqual(ptc["ptc_pwm_out[20]"], "P15")
+        self.assertEqual(ptc["ptc_pwm_out[21]"], "N14")
+        self.assertEqual(payload["ptc_substitutions"]["PTC03"]["original_ball"], "T4")
+        self.assertEqual(payload["ptc_substitutions"]["PTC22"]["substitute_ball"], "N14")
+        self.assertFalse(payload["uses_reserved_future_uart"])
+        self.assertEqual(payload["real_fan_ptc_hardware_status"], "not_run")
+        self.assertEqual(payload["conflict_check"]["status"], "pass")
+
+    def test_formal_uart_profile_keeps_real_ptc_and_moves_all_serials_off_real_fan_ptc_pins(self) -> None:
+        inventory = load_pin_inventory(PRODUCT_INVENTORY)
+        payload = diagnostic_profile_assignments(inventory, "formal-uart")
+
+        self.assertEqual(payload["status"], "pass")
+        self.assertEqual(payload["profile"], "formal-uart")
+        self.assertEqual(payload["assignments"]["ptc_pwm_out[2]"], "T4")
+        self.assertEqual(payload["assignments"]["ptc_pwm_out[3]"], "R5")
+        self.assertEqual(payload["assignments"]["ptc_pwm_out[16]"], "P8")
+        self.assertEqual(payload["assignments"]["ptc_pwm_out[17]"], "P7")
+        self.assertEqual(payload["assignments"]["ptc_pwm_out[20]"], "P10")
+        self.assertEqual(payload["assignments"]["ptc_pwm_out[21]"], "R10")
+        self.assertEqual(payload["uart_assignments"]["bmc_uart_tx"]["fpga_ball"], "P5")
+        self.assertEqual(payload["uart_assignments"]["bmc_uart_rx"]["fpga_ball"], "T8")
+        self.assertEqual(payload["uart_assignments"]["host_uart_tx"]["fpga_ball"], "M14")
+        self.assertEqual(payload["uart_assignments"]["host_uart_rx"]["fpga_ball"], "M15")
+        self.assertEqual(payload["uart_assignments"]["debug_uart_rx"]["fpga_ball"], "P15")
+        self.assertEqual(payload["uart_assignments"]["debug_uart_tx"]["fpga_ball"], "N14")
+        self.assertEqual(payload["reserved_future_uart"]["UART1_TX"]["fpga_ball"], "L10")
+        self.assertEqual(payload["reserved_future_uart"]["UART2_RX"]["fpga_ball"], "N11")
+        self.assertFalse(payload["uses_reserved_future_uart"])
+        self.assertEqual(payload["ptc_substitutions"], {})
+        self.assertEqual(payload["conflict_check"]["status"], "pass")
+
 
 if __name__ == "__main__":
     unittest.main()

+ 84 - 110
tests/unit/test_remote_scripts.py

@@ -206,49 +206,41 @@ if ([int64]$events[2].fields.sum -ne 255) { throw "sum was $($events[2].fields.s
 
             self.assertEqual(result.returncode, 0, result.stderr + result.stdout)
 
-    def test_j6_host_sensor_real_fan_ptc_package_script_creates_conflict_blocked_package(self) -> None:
+    def test_j6_host_sensor_real_fan_ptc_package_script_creates_two_executable_profile_packages(self) -> None:
         script = (ROOT / "tools" / "package_j6_host_sensor_real_fan_ptc_debug921.ps1").read_text(
             encoding="utf-8"
         )
 
         for marker in [
             "START-HERE.zh-CN.md",
-            "j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_package.schema.json",
-            "j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_manifest.schema.json",
-            "j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_sha256_inventory.schema.json",
+            "tools\\remote\\collect-j6-host-sensor-real-fan-ptc.ps1",
+            "bitstreams",
+            "td-receipts",
+            "commands",
             "pin_inventory.fcb_fpga_mcu0611.json",
             "sha256-inventory.json",
             "Compress-Archive",
             ".zip.sha256.txt",
-            "j6-host-sensor-real-fan-ptc-debug921-v1",
-            "blocked_pin_conflict_with_locked_debug_uart",
-            "HEAT3",
-            "HEAT4",
-            "HEAT17",
-            "HEAT18",
-            "HEAT21",
-            "HEAT22",
-            "No bitstream is packaged while real FAN/PTC pins overlap locked J6/COM7/COM8 UART pins",
+            "temp-uart-ptc-remap",
+            "formal-uart",
+            "j6-host-sensor-real-fan-ptc-temp-uart-ptc-remap-debug921-v1",
+            "j6-host-sensor-real-fan-ptc-formal-uart-debug921-v1",
             "SET PTC 01 10",
             "SET PTC 24 20",
             "SET FAN 01 40",
             "SET FAN 04 30",
-            "future_expected_host_control_commands",
-            "non_executable_reference",
+            "-AssumeManualSramProgrammed $true",
             "excluded_self_referential_file",
         ]:
             self.assertIn(marker, script)
         for marker in [
-            "tools\\remote\\collect-j6-host-sensor-real-fan-ptc.ps1",
-            "    host_control_commands =",
+            "blocked_pin_conflict_with_locked_debug_uart",
             "debug115",
             "swapped",
             "-ManualSramAttestation",
             "$att.status",
             "blocked_edit_required",
-            "Assert-RequiredPackageInput",
             "collect-com8-host-com7-debug.ps1",
-            "-AssumeManualSramProgrammed $true",
             r"-Bitstream .\bitstreams\uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary.bit",
             "SET PTC 00",
             "SET FAN 00",
@@ -260,103 +252,85 @@ if ([int64]$events[2].fields.sum -ne 255) { throw "sum was $($events[2].fields.s
         ]:
             self.assertNotIn(marker.lower(), script.lower())
 
-    def test_j6_host_sensor_real_fan_ptc_package_output_contains_conflict_artifacts(self) -> None:
+    def test_j6_host_sensor_real_fan_ptc_package_output_contains_executable_profile_artifacts(self) -> None:
         powershell = shutil.which("powershell")
         if powershell is None:
             self.skipTest("PowerShell is not available")
 
         with tempfile.TemporaryDirectory() as tmp:
-            package_name = "j6-host-sensor-real-fan-ptc-debug921-v1-test"
-            result = subprocess.run(
-                [
-                    powershell,
-                    "-NoProfile",
-                    "-ExecutionPolicy",
-                    "Bypass",
-                    "-File",
-                    str(ROOT / "tools" / "package_j6_host_sensor_real_fan_ptc_debug921.ps1"),
-                    "-OutputDir",
-                    tmp,
-                    "-PackageName",
-                    package_name,
-                ],
-                cwd=ROOT,
-                text=True,
-                capture_output=True,
-                check=False,
-            )
-
-            self.assertEqual(result.returncode, 0, result.stderr + result.stdout)
-            stage = Path(tmp) / package_name
-            self.assertTrue((stage / "START-HERE.zh-CN.md").is_file())
-            self.assertFalse((stage / "collector").exists())
-            self.assertTrue((stage / "config" / "pin_inventory.fcb_fpga_mcu0611.json").is_file())
-            self.assertTrue((stage / "blocked" / "blocked-pin-conflict-receipt.json").is_file())
-            self.assertTrue(
-                (
-                    stage
-                    / "schemas"
-                    / "j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_package.schema.json"
-                ).is_file()
-            )
-            self.assertTrue(
-                (
-                    stage
-                    / "schemas"
-                    / "j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_manifest.schema.json"
-                ).is_file()
-            )
-            self.assertTrue(
-                (
-                    stage
-                    / "schemas"
-                    / "j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_sha256_inventory.schema.json"
-                ).is_file()
-            )
-            self.assertFalse((stage / "bitstreams").exists())
-            self.assertFalse((stage / "commands").exists())
-            self.assertFalse((stage / "td-receipts").exists())
-            self.assertTrue((Path(tmp) / f"{package_name}.zip").is_file())
-            self.assertTrue((Path(tmp) / f"{package_name}.zip.sha256.txt").is_file())
-
-            manifest = json.loads((stage / "manifest.json").read_text(encoding="utf-8-sig"))
-            self.assertEqual(manifest["status"], "blocked_pin_conflict_with_locked_debug_uart")
-            self.assertEqual(manifest["programming_mode"], "not_applicable")
-            self.assertIn("pin_conflicts", manifest)
-            self.assertIn("HEAT3", json.dumps(manifest["pin_conflicts"], sort_keys=True))
-            self.assertNotIn("host_control_commands", manifest)
-            self.assertIn("future_expected_host_control_commands", manifest["non_executable_reference"])
-
-            receipt = json.loads(
-                (stage / "blocked" / "blocked-pin-conflict-receipt.json").read_text(encoding="utf-8-sig")
-            )
-            self.assertEqual(receipt["status"], "blocked_pin_conflict_with_locked_debug_uart")
-            self.assertEqual(receipt["pin_map"]["physical_balls_verified"], True)
-            self.assertFalse(receipt["pin_map"]["usable_with_locked_debug_uart"])
-            self.assertEqual(
-                receipt["schema"],
-                "j6-host-sensor-real-fan-ptc-debug921-pin-conflict-blocked-package-v1",
-            )
-
-            inventory = json.loads((stage / "sha256-inventory.json").read_text(encoding="utf-8-sig"))
-            self.assertEqual(inventory["self_hash_policy"], "excluded_self_referential_file")
-            inventory_paths = {item["path"] for item in inventory["inventory"]}
-            self.assertIn("manifest.json", inventory_paths)
-            self.assertIn("START-HERE.zh-CN.md", inventory_paths)
-            self.assertIn("blocked/blocked-pin-conflict-receipt.json", inventory_paths)
-            self.assertIn(
-                "schemas/j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_package.schema.json",
-                inventory_paths,
-            )
-            self.assertIn(
-                "schemas/j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_manifest.schema.json",
-                inventory_paths,
-            )
-            self.assertIn(
-                "schemas/j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_sha256_inventory.schema.json",
-                inventory_paths,
+            bitstream = Path(tmp) / "fake.bit"
+            td_receipt = Path(tmp) / "td-receipt.json"
+            bitstream.write_bytes(b"fake-sram-bitstream")
+            td_receipt.write_text(
+                json.dumps(
+                    {
+                        "schema": "td-build-receipt-v1",
+                        "status": "pass",
+                        "programming_mode": "SRAM-only",
+                        "bitstream": {"sha256": "0" * 64},
+                    }
+                ),
+                encoding="utf-8",
             )
-            self.assertNotIn("sha256-inventory.json", inventory_paths)
+            for profile, package_name in [
+                ("temp-uart-ptc-remap", "j6-host-sensor-real-fan-ptc-temp-uart-ptc-remap-debug921-v1-test"),
+                ("formal-uart", "j6-host-sensor-real-fan-ptc-formal-uart-debug921-v1-test"),
+            ]:
+                with self.subTest(profile=profile):
+                    result = subprocess.run(
+                        [
+                            powershell,
+                            "-NoProfile",
+                            "-ExecutionPolicy",
+                            "Bypass",
+                            "-File",
+                            str(ROOT / "tools" / "package_j6_host_sensor_real_fan_ptc_debug921.ps1"),
+                            "-OutputDir",
+                            tmp,
+                            "-PackageName",
+                            package_name,
+                            "-Profile",
+                            profile,
+                            "-Bitstream",
+                            str(bitstream),
+                            "-TdReceipt",
+                            str(td_receipt),
+                        ],
+                        cwd=ROOT,
+                        text=True,
+                        capture_output=True,
+                        check=False,
+                    )
+
+                    self.assertEqual(result.returncode, 0, result.stderr + result.stdout)
+                    stage = Path(tmp) / package_name
+                    self.assertTrue((stage / "START-HERE.zh-CN.md").is_file())
+                    self.assertTrue((stage / "collector" / "collect-j6-host-sensor-real-fan-ptc.ps1").is_file())
+                    self.assertTrue((stage / "commands" / "collect-template.ps1").is_file())
+                    self.assertTrue((stage / "bitstreams" / bitstream.name).is_file())
+                    self.assertTrue((stage / "td-receipts" / td_receipt.name).is_file())
+                    self.assertTrue((stage / "config" / "pin_inventory.fcb_fpga_mcu0611.json").is_file())
+                    self.assertTrue((stage / "schemas" / "real_bmc_j6_host_sensor_real_fan_ptc_debug921_v1_receipt.schema.json").is_file())
+                    self.assertFalse((stage / "blocked").exists())
+                    self.assertTrue((Path(tmp) / f"{package_name}.zip").is_file())
+                    self.assertTrue((Path(tmp) / f"{package_name}.zip.sha256.txt").is_file())
+
+                    manifest = json.loads((stage / "manifest.json").read_text(encoding="utf-8-sig"))
+                    self.assertEqual(manifest["status"], "pass")
+                    self.assertEqual(manifest["pin_profile"], profile)
+                    self.assertEqual(manifest["programming_mode"], "PROGRAM_SRAM")
+                    self.assertIn("host_control_commands", manifest)
+                    self.assertIn("pin_map", manifest)
+                    self.assertNotIn("pin_conflicts", manifest)
+
+                    inventory = json.loads((stage / "sha256-inventory.json").read_text(encoding="utf-8-sig"))
+                    self.assertEqual(inventory["self_hash_policy"], "excluded_self_referential_file")
+                    inventory_paths = {item["path"] for item in inventory["inventory"]}
+                    self.assertIn("manifest.json", inventory_paths)
+                    self.assertIn("START-HERE.zh-CN.md", inventory_paths)
+                    self.assertIn("collector/collect-j6-host-sensor-real-fan-ptc.ps1", inventory_paths)
+                    self.assertIn("commands/collect-template.ps1", inventory_paths)
+                    self.assertNotIn("sha256-inventory.json", inventory_paths)
 
     def test_j6_host_sensor_real_fan_ptc_runbook_is_chinese_copy_paste_ready_with_english_paths(self) -> None:
         runbook = (ROOT / "docs" / "j6-host-sensor-real-fan-ptc-debug921-runbook.zh-CN.md").read_text(

+ 48 - 7
tests/unit/test_uart_receipts.py

@@ -340,7 +340,7 @@ class UartReceiptsTests(unittest.TestCase):
         hardware_status: str = "not_run",
     ) -> Path:
         root.mkdir(parents=True, exist_ok=True)
-        bitstream = root / "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary.bit"
+        bitstream = root / "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.bit"
         td_receipt = root / "td_host_sensor_real_fan_ptc_debug921.json"
         sram_attestation = root / "manual-sram-attestation.json"
         host_raw = root / "host-port-raw.bin"
@@ -386,7 +386,7 @@ class UartReceiptsTests(unittest.TestCase):
             "J6EVT kind=HCTRL seq=00000006 ok=1 err=00 type=08 all=0 ch=01 pct=010 timeout=0",
             "J6PWM seq=00000006 src=host_manual pid=disabled timeout=0 ptc01=010 ptc24=020 fan01=040 fan04=030",
             "J6MOD seq=00000006 pid=disabled pid_requested=1 pid_active=0 bmc=observe_only host=slave pwm=host_manual timeout_s=5",
-            "J6MAP profile=primary bmc_tx=T4 bmc_rx=R5 host_tx=P7 host_rx=P8 debug_rx=P10 debug_tx=R10 ptc=24 fan=4 fg=8 install=4",
+            "J6MAP profile=temp-uart-ptc-remap bmc_tx=T4 bmc_rx=R5 host_tx=P7 host_rx=P8 debug_rx=P10 debug_tx=R10 ptc=24 fan=4 fg=8 install=4",
         ]
         dimm_samples: list[dict[str, object]] = []
         replay_bytes = bytearray()
@@ -448,10 +448,10 @@ class UartReceiptsTests(unittest.TestCase):
             json.dumps(
                 {
                     "status": "pass",
-                    "top": "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary",
-                    "top_module": "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top",
+                    "top": "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921",
+                    "top_module": "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top",
                     "mode": "implementation",
-                    "pin_profile": "primary",
+                    "pin_profile": "temp-uart-ptc-remap",
                     "bitstream": {"path": str(bitstream), "sha256": compute_file_hash(bitstream)},
                     "timing_gate": {"status": "pass"},
                 }
@@ -549,6 +549,19 @@ class UartReceiptsTests(unittest.TestCase):
                     "debug_port_writes_to_serial": False,
                     "enumerates_com_ports": False,
                     "opens_unknown_com_ports": False,
+                    "pin_profile_name": "temp-uart-ptc-remap",
+                    "pin_profile": {
+                        "name": "temp-uart-ptc-remap",
+                        "connector": "J6",
+                        "tx_ball": "T4",
+                        "rx_ball": "R5",
+                        "bmc_tx_ball": "T4",
+                        "bmc_rx_ball": "R5",
+                        "host_tx_ball": "P7",
+                        "host_rx_ball": "P8",
+                        "debug_rx_ball": "P10",
+                        "debug_tx_ball": "R10",
+                    },
                     "raw_replay": {"path": "bmc-raw-replay.bin", "sha256": compute_file_hash(replay)},
                 }
             ),
@@ -560,11 +573,14 @@ class UartReceiptsTests(unittest.TestCase):
             "status": hardware_status,
             "counterparty": "real_bmc",
             "diagnostic_scope": "host_sensor_real_fan_ptc_debug921",
+            "pin_profile_name": "temp-uart-ptc-remap",
             "pin_profile": {
-                "name": "primary",
+                "name": "temp-uart-ptc-remap",
                 "connector": "J6",
                 "tx_ball": "T4",
                 "rx_ball": "R5",
+                "bmc_tx_ball": "T4",
+                "bmc_rx_ball": "R5",
                 "host_tx_ball": "P7",
                 "host_rx_ball": "P8",
                 "debug_rx_ball": "P10",
@@ -619,7 +635,20 @@ class UartReceiptsTests(unittest.TestCase):
                 "bmc_raw_sampling": {"status": "pass", "minimum_completed_samples": 3, "completed_samples": 3, "bmc_timeout": False},
                 "pid_boundary": {"status": "pass", "pid_requested": True, "pid_requested_ever": True, "pid_active": False, "pwm_source": "host_manual"},
                 "timeout_evidence": {"status": "pass", "timeout_evidence": {"timeout_s": 5, "ptc_all_percent": 0, "fan_all_percent": 30}},
-                "pin_map": {"status": "pass", "ptc_count": 24, "fan_count": 4, "fan_fg_count": 8, "fan_install_count": 4},
+                "pin_map": {
+                    "status": "pass",
+                    "profile": "temp-uart-ptc-remap",
+                    "ptc_count": 24,
+                    "fan_count": 4,
+                    "fan_fg_count": 8,
+                    "fan_install_count": 4,
+                    "bmc_tx_ball": "T4",
+                    "bmc_rx_ball": "R5",
+                    "host_tx_ball": "P7",
+                    "host_rx_ball": "P8",
+                    "debug_rx_ball": "P10",
+                    "debug_tx_ball": "R10",
+                },
                 "safety_contract": {
                     "status": "pass",
                     "pid_default_enabled": False,
@@ -1303,6 +1332,18 @@ class UartReceiptsTests(unittest.TestCase):
             list(range(24)),
         )
 
+    def test_host_sensor_text_parser_accepts_compact_seq_temp_aliases(self) -> None:
+        lines = ["SENS s=0003 st=v v=18 m=00"]
+        lines.extend(f"DIMM s=0003 id={dimm:02X} tp={0x30 + dimm:02X} m=0 st=v" for dimm in range(24))
+        parsed = _parse_host_sensor_report_text("\r\n".join(lines) + "\r\n")
+
+        self.assertEqual(parsed["sample_count"], 1)
+        self.assertEqual(parsed["dimm_rows_per_sample"], [24])
+        self.assertEqual(parsed["samples"][0]["summary"]["seq"], 3)
+        self.assertEqual(parsed["samples"][0]["summary"]["valid"], 24)
+        self.assertEqual(parsed["samples"][0]["summary"]["missing"], 0)
+        self.assertEqual(parsed["samples"][0]["dimm_rows"][0]["temp"], 0x30)
+
 
 
 

+ 113 - 97
tools/package_j6_host_sensor_real_fan_ptc_debug921.ps1

@@ -1,10 +1,23 @@
 param(
     [string]$OutputDir = ".\j6-host-sensor-real-fan-ptc-debug921-v1-package",
-    [string]$PackageName = "j6-host-sensor-real-fan-ptc-debug921-v1"
+    [string]$PackageName = "",
+    [Parameter(Mandatory = $true)]
+    [ValidateSet("temp-uart-ptc-remap", "formal-uart")]
+    [string]$Profile,
+    [Parameter(Mandatory = $true)]
+    [string]$Bitstream,
+    [Parameter(Mandatory = $true)]
+    [string]$TdReceipt
 )
 
 $ErrorActionPreference = "Stop"
 
+# Package profiles:
+# temp-uart-ptc-remap -> j6-host-sensor-real-fan-ptc-temp-uart-ptc-remap-debug921-v1
+# formal-uart -> j6-host-sensor-real-fan-ptc-formal-uart-debug921-v1
+# The copied collector is tools\remote\collect-j6-host-sensor-real-fan-ptc.ps1.
+# The run template includes -AssumeManualSramProgrammed $true.
+
 function Get-Sha256([string]$Path) {
     if (-not (Test-Path -LiteralPath $Path -PathType Leaf)) {
         throw "File not found: $Path"
@@ -34,125 +47,128 @@ function New-InventoryItem([string]$Path, [string]$Root) {
     }
 }
 
-function Get-LockedUartPinConflicts($PinInventory) {
-    $lockedByBall = @{}
-    foreach ($entry in $PinInventory.locked_debug_uart_assignments.PSObject.Properties) {
-        $lockedByBall[[string]$entry.Value] = [string]$entry.Name
+function New-PinMap([string]$SelectedProfile) {
+    if ($SelectedProfile -eq "temp-uart-ptc-remap") {
+        return [ordered]@{
+            name = "temp-uart-ptc-remap"
+            bmc_tx_ball = "T4"
+            bmc_rx_ball = "R5"
+            host_tx_ball = "P7"
+            host_rx_ball = "P8"
+            debug_rx_ball = "P10"
+            debug_tx_ball = "R10"
+            ptc_substitutions = [ordered]@{
+                PTC03 = [ordered]@{ original_ball = "T4"; substitute_ball = "P5"; bank_io_net = "BANK2_GPIO40" }
+                PTC04 = [ordered]@{ original_ball = "R5"; substitute_ball = "T8"; bank_io_net = "BANK2_GPIO41" }
+                PTC17 = [ordered]@{ original_ball = "P8"; substitute_ball = "M14"; bank_io_net = "BANK2_GPIO42" }
+                PTC18 = [ordered]@{ original_ball = "P7"; substitute_ball = "M15"; bank_io_net = "BANK2_GPIO43" }
+                PTC21 = [ordered]@{ original_ball = "P10"; substitute_ball = "P15"; bank_io_net = "BANK2_GPIO44" }
+                PTC22 = [ordered]@{ original_ball = "R10"; substitute_ball = "N14"; bank_io_net = "BANK2_GPIO45" }
+            }
+            reserved_future_uart = [ordered]@{
+                UART1_TX = [ordered]@{ fpga_ball = "L10"; bank_io_net = "BANK2_GPIO52"; used = $false }
+                UART1_RX = [ordered]@{ fpga_ball = "M9"; bank_io_net = "BANK2_GPIO53"; used = $false }
+                UART2_TX = [ordered]@{ fpga_ball = "M10"; bank_io_net = "BANK2_GPIO54"; used = $false }
+                UART2_RX = [ordered]@{ fpga_ball = "N11"; bank_io_net = "BANK2_GPIO55"; used = $false }
+            }
+        }
     }
-
-    $conflicts = New-Object System.Collections.Generic.List[object]
-    foreach ($pin in $PinInventory.pins) {
-        $ball = [string]$pin.fpga_ball
-        $role = [string]$pin.role
-        if ($lockedByBall.ContainsKey($ball) -and @("HEAT", "FAN_PWM", "FAN_FG", "FAN_INSTALL") -contains $role) {
-            $conflicts.Add([ordered]@{
-                function_net = [string]$pin.function_net
-                signal = [string]$pin.signal
-                role = $role
-                channel = [int]$pin.channel
-                fpga_ball = $ball
-                locked_signal = [string]$lockedByBall[$ball]
-                bank_io_net = [string]$pin.bank_io_net
-                source_pages = @($pin.source_pages)
-            }) | Out-Null
+    return [ordered]@{
+        name = "formal-uart"
+        bmc_tx_ball = "P5"
+        bmc_rx_ball = "T8"
+        host_tx_ball = "M14"
+        host_rx_ball = "M15"
+        debug_rx_ball = "P15"
+        debug_tx_ball = "N14"
+        ptc_substitutions = [ordered]@{}
+        reserved_future_uart = [ordered]@{
+            UART1_TX = [ordered]@{ fpga_ball = "L10"; bank_io_net = "BANK2_GPIO52"; used = $false }
+            UART1_RX = [ordered]@{ fpga_ball = "M9"; bank_io_net = "BANK2_GPIO53"; used = $false }
+            UART2_TX = [ordered]@{ fpga_ball = "M10"; bank_io_net = "BANK2_GPIO54"; used = $false }
+            UART2_RX = [ordered]@{ fpga_ball = "N11"; bank_io_net = "BANK2_GPIO55"; used = $false }
         }
     }
-    return @($conflicts.ToArray())
 }
 
 $repoRoot = Resolve-Path -LiteralPath (Join-Path $PSScriptRoot "..")
 $out = (Resolve-Path -LiteralPath (New-Item -ItemType Directory -Force -Path $OutputDir)).Path
+
+if ([string]::IsNullOrWhiteSpace($PackageName)) {
+    $stamp = Get-Date -Format "yyyyMMdd-HHmmss"
+    if ($Profile -eq "temp-uart-ptc-remap") {
+        $PackageName = "j6-host-sensor-real-fan-ptc-temp-uart-ptc-remap-debug921-v1-$stamp"
+    } else {
+        $PackageName = "j6-host-sensor-real-fan-ptc-formal-uart-debug921-v1-$stamp"
+    }
+}
+
 $stage = Join-Path $out $PackageName
 if (Test-Path -LiteralPath $stage) {
     throw "Package staging directory already exists: $stage. Move it aside or choose a different -PackageName."
 }
-New-Item -ItemType Directory -Force -Path $stage | Out-Null
-
-$pinInventoryPath = Join-Path $repoRoot "config\pin_inventory.fcb_fpga_mcu0611.json"
-$pinInventory = Get-Content -LiteralPath $pinInventoryPath -Raw -Encoding UTF8 | ConvertFrom-Json
-$pinConflicts = Get-LockedUartPinConflicts $pinInventory
-$blockedStatus = "blocked_pin_conflict_with_locked_debug_uart"
-$blockedReason = "No bitstream is packaged while real FAN/PTC pins overlap locked J6/COM7/COM8 UART pins."
-if ($pinConflicts.Count -eq 0) {
-    throw "Expected locked J6/COM7/COM8 UART pin conflicts were not found. Refusing to package a stale blocked artifact."
-}
 
-foreach ($dir in @("schemas", "docs", "blocked", "config")) {
+foreach ($dir in @("bitstreams", "td-receipts", "collector", "commands", "schemas", "docs", "config")) {
     New-Item -ItemType Directory -Force -Path (Join-Path $stage $dir) | Out-Null
 }
 
-Copy-IntoPackage (Join-Path $repoRoot "schemas\j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_package.schema.json") (Join-Path $stage "schemas") | Out-Null
-Copy-IntoPackage (Join-Path $repoRoot "schemas\j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_manifest.schema.json") (Join-Path $stage "schemas") | Out-Null
-Copy-IntoPackage (Join-Path $repoRoot "schemas\j6_host_sensor_real_fan_ptc_debug921_pin_conflict_blocked_sha256_inventory.schema.json") (Join-Path $stage "schemas") | Out-Null
-Copy-IntoPackage (Join-Path $repoRoot "docs\j6-host-sensor-real-fan-ptc-debug921-runbook.zh-CN.md") (Join-Path $stage "docs") | Out-Null
+$collectorPath = Join-Path $repoRoot "tools\remote\collect-j6-host-sensor-real-fan-ptc.ps1"
+$schemaPath = Join-Path $repoRoot "schemas\real_bmc_j6_host_sensor_real_fan_ptc_debug921_v1_receipt.schema.json"
+$runbookPath = Join-Path $repoRoot "docs\j6-host-sensor-real-fan-ptc-debug921-runbook.zh-CN.md"
+$pinInventoryPath = Join-Path $repoRoot "config\pin_inventory.fcb_fpga_mcu0611.json"
+
+$bitstreamCopy = Copy-IntoPackage $Bitstream (Join-Path $stage "bitstreams")
+$tdReceiptCopy = Copy-IntoPackage $TdReceipt (Join-Path $stage "td-receipts")
+Copy-IntoPackage $collectorPath (Join-Path $stage "collector") | Out-Null
+Copy-IntoPackage $schemaPath (Join-Path $stage "schemas") | Out-Null
+Copy-IntoPackage $runbookPath (Join-Path $stage "docs") | Out-Null
 Copy-IntoPackage $pinInventoryPath (Join-Path $stage "config") | Out-Null
 Copy-Item -LiteralPath (Join-Path $stage "docs\j6-host-sensor-real-fan-ptc-debug921-runbook.zh-CN.md") -Destination (Join-Path $stage "START-HERE.zh-CN.md") -Force
 
-$blockedReceipt = [ordered]@{
-    schema = "j6-host-sensor-real-fan-ptc-debug921-pin-conflict-blocked-package-v1"
-    status = $blockedStatus
-    generated_at = (Get-Date).ToUniversalTime().ToString("o")
-    reason = $blockedReason
-    td_bitstream = [ordered]@{
-        status = $blockedStatus
-        top = "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary"
-        top_module = "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top"
-        bitstream = $null
-        reason = "real FAN/PTC schematic pins overlap locked temporary UART pins; refusing to generate a conflicting bitstream for HEAT3, HEAT4, HEAT17, HEAT18, HEAT21, and HEAT22"
-    }
-    pin_map = [ordered]@{
-        status = $blockedStatus
-        ptc_count = 24
-        fan_count = 4
-        fan_fg_count = 8
-        fan_install_count = 4
-        physical_balls_verified = $true
-        usable_with_locked_debug_uart = $false
-        inventory = "config/pin_inventory.fcb_fpga_mcu0611.json"
-        conflicts = $pinConflicts
-    }
-    real_fan_ptc_hardware_status = [ordered]@{
-        status = "not_run"
-        real_fan_ptc_hardware_present = $false
-        qualifies_final_gate = $false
-    }
-    non_executable_reference = [ordered]@{
-        future_expected_host_control_commands = @(
-            "SET PTC 01 10",
-            "SET PTC 24 20",
-            "SET FAN 01 40",
-            "SET FAN 04 30",
-            "SET PID ENABLE",
-            "GET STATUS",
-            "GET MAP",
-            "GET SENSOR",
-            "GET SENSOR",
-            "GET SENSOR",
-            "SET PID DISABLE",
-            "DISABLE"
-        )
-    }
-    authority_boundary = "Blocked design package only. It does not include a bitstream, does not instruct remote PROGRAM_SRAM, does not program flash, and does not claim real FAN/PTC hardware, thermal performance, final gate, or PID closed-loop pass."
-}
-$blockedReceipt | ConvertTo-Json -Depth 32 | Set-Content -LiteralPath (Join-Path $stage "blocked\blocked-pin-conflict-receipt.json") -Encoding UTF8
+$bitName = Split-Path -Leaf $bitstreamCopy
+$tdName = Split-Path -Leaf $tdReceiptCopy
+$template = @'
+Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
+.\collector\collect-j6-host-sensor-real-fan-ptc.ps1 -HostPort COM8 -DebugPort COM7 -DurationSeconds 180 -OutputDir .\evidence-com8-host-com7-debug -Profile __PROFILE__ -Bitstream .\bitstreams\__BITSTREAM__ -TdReceipt .\td-receipts\__TD_RECEIPT__ -AssumeManualSramProgrammed $true
+'@
+$template = $template.Replace("__PROFILE__", $Profile).Replace("__BITSTREAM__", $bitName).Replace("__TD_RECEIPT__", $tdName)
+Set-Content -LiteralPath (Join-Path $stage "commands\collect-template.ps1") -Encoding UTF8 -Value $template
 
+$hostControlCommands = @(
+    "SET PTC 01 10",
+    "SET PTC 24 20",
+    "SET FAN 01 40",
+    "SET FAN 04 30",
+    "SET PID ENABLE",
+    "GET STATUS",
+    "GET MAP",
+    "GET SENSOR",
+    "GET SENSOR",
+    "GET SENSOR",
+    "SET PID DISABLE",
+    "DISABLE"
+)
+$pinMap = New-PinMap $Profile
 $manifest = [ordered]@{
-    schema = "j6-host-sensor-real-fan-ptc-debug921-pin-conflict-blocked-package-manifest-v1"
-    status = $blockedStatus
+    schema = "j6-host-sensor-real-fan-ptc-debug921-package-manifest-v1"
+    status = "pass"
     generated_at = (Get-Date).ToUniversalTime().ToString("o")
-    authority_boundary = "Blocked offline design package only. It does not include bitstreams, program SRAM, use nonvolatile programming, enumerate unknown COM ports, install drivers, or claim thermal performance."
-    required_remote_action = "Do not program SRAM from this package. Review START-HERE.zh-CN.md and resolve the locked J6/COM7/COM8 UART pin conflict before requesting a bitstream package."
-    programming_mode = "not_applicable"
-    user_flow = "blocked until locked J6/COM7/COM8 UART wiring no longer overlaps real FAN/PTC pins"
-    blocked_reason = $blockedReason
-    pin_inventory = [ordered]@{ path = "config/pin_inventory.fcb_fpga_mcu0611.json"; sha256 = Get-Sha256 (Join-Path $stage "config\pin_inventory.fcb_fpga_mcu0611.json") }
-    pin_conflicts = $pinConflicts
-    non_executable_reference = $blockedReceipt.non_executable_reference
-    remote_dependencies = "None for this blocked package."
+    package_name = $PackageName
+    diagnostic_scope = "host_sensor_real_fan_ptc_debug921"
+    pin_profile = $Profile
+    programming_mode = "PROGRAM_SRAM"
+    bitstream = [ordered]@{ path = "bitstreams/$bitName"; sha256 = Get-Sha256 $bitstreamCopy }
+    td_receipt = [ordered]@{ path = "td-receipts/$tdName"; sha256 = Get-Sha256 $tdReceiptCopy }
+    collector = [ordered]@{ path = "collector/collect-j6-host-sensor-real-fan-ptc.ps1"; profile_argument = $Profile }
+    host_control_commands = $hostControlCommands
+    pin_map = $pinMap
+    real_fan_ptc_hardware_status = "not_run"
+    remote_dependencies = "PowerShell and .NET SerialPort only; no remote dependency install."
     sha256_inventory_policy = "sha256-inventory.json excludes itself because it is self-referential; the package zip is sealed by the adjacent .zip.sha256.txt file."
+    authority_boundary = "SRAM-only diagnostic package. It does not program flash, install drivers, enumerate unknown COM ports, write DebugPort, claim thermal performance, or claim PID closed-loop pass."
 }
 $manifestPath = Join-Path $stage "manifest.json"
-$manifest | ConvertTo-Json -Depth 32 | Set-Content -LiteralPath $manifestPath -Encoding UTF8
+$manifest | ConvertTo-Json -Depth 64 | Set-Content -LiteralPath $manifestPath -Encoding UTF8
 
 $inventory = New-Object System.Collections.Generic.List[object]
 Get-ChildItem -LiteralPath $stage -Recurse -File | Sort-Object FullName | ForEach-Object {
@@ -162,7 +178,7 @@ Get-ChildItem -LiteralPath $stage -Recurse -File | Sort-Object FullName | ForEac
     $inventory.Add((New-InventoryItem $_.FullName $stage)) | Out-Null
 }
 [ordered]@{
-    schema = "j6-host-sensor-real-fan-ptc-debug921-pin-conflict-blocked-package-sha256-inventory-v1"
+    schema = "j6-host-sensor-real-fan-ptc-debug921-package-sha256-inventory-v1"
     generated_at = (Get-Date).ToUniversalTime().ToString("o")
     self_hash_policy = "excluded_self_referential_file"
     inventory = $inventory

+ 62 - 30
tools/pid_harness.py

@@ -61,7 +61,7 @@ from debug_contract import (
     normalize_replay_trace,
 )
 from toolchain_probe import probe_toolchain
-from pin_inventory import check_locked_uart_conflicts, load_pin_inventory
+from pin_inventory import diagnostic_profile_assignments, load_pin_inventory
 
 
 ROOT = Path(__file__).resolve().parents[1]
@@ -74,7 +74,7 @@ COMPAT_COCOTB_VENV_PYTHON = DEFAULT_TOOLCHAIN_BASE / "venvs" / "pid-contract-coc
 TD_BUILD_SYN = ROOT / "td" / "build" / "syn"
 TD_BUILD_PHY = ROOT / "td" / "build" / "phy"
 EXTERNAL_TD_BIN_LOG = Path(r"C:\Anlogic\TD_Release_2026.1_SP1.198.412\bin\log")
-DEFAULT_TD_TOP = "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary"
+DEFAULT_TD_TOP = "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921"
 REAL_FAN_PTC_INVENTORY = ROOT / "config" / "pin_inventory.fcb_fpga_mcu0611.json"
 TD_TOP_PROFILES = {
     "system_contract": {
@@ -87,18 +87,18 @@ TD_TOP_PROFILES = {
         "display_name": "debug-max logic evidence top",
         "top_module": "system_contract_top",
     },
-    "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary": {
+    "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921": {
         "mode": "implementation",
-        "display_name": "J6 BMC raw sensor parser plus COM8 host-control real FAN/PTC diagnostic bitstream, P10/R10 debug at 921600, primary T4/R5 orientation",
-        "top_module": "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top",
-        "source_prj": "td/uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary.prj",
-        "build_subdir": "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary",
-        "syn_script": "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary.tcl",
-        "phy_script": "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary.tcl",
-        "bitstream": "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary.bit",
-        "area_report": "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary_phy.area",
-        "timing_report": "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_primary_pr.timing",
-        "pin_profile": "primary",
+        "display_name": "J6 host sensor real FAN/PTC temporary UART diagnostic: current J6/COM7/COM8 wiring with six PTC channels remapped to verified spare GPIO",
+        "top_module": "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top",
+        "source_prj": "td/uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.prj",
+        "build_subdir": "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921",
+        "syn_script": "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.tcl",
+        "phy_script": "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.tcl",
+        "bitstream": "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921.bit",
+        "area_report": "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_phy.area",
+        "timing_report": "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_pr.timing",
+        "pin_profile": "temp-uart-ptc-remap",
         "tx_ball": "T4",
         "rx_ball": "R5",
         "host_uart_tx_ball": "P7",
@@ -110,7 +110,32 @@ TD_TOP_PROFILES = {
         "debug_uart_baud": 921600,
         "debug_uart_clks_per_bit": 27,
         "requires_verified_real_fan_ptc_pin_map": True,
-        "authority_boundary": "Build-only fail-closed SRAM diagnostic evidence for COM8 1-based real FAN/PTC host commands, BMC raw DIMM sampling, HostPort temperature reports, COM7 debug921 replay, and real FAN/PTC hardware status. It never opens cables, downloads, programs flash, claims real pin map pass, thermal performance, production PTC/FAN qualification, or PID closed-loop pass.",
+        "authority_boundary": "SRAM-only temp-uart-ptc-remap diagnostic evidence for current J6/COM7/COM8 wiring. Six overlapping PTC outputs are substituted; it does not claim real thermal performance, production PTC/FAN qualification, flash, or PID closed-loop pass.",
+    },
+    "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921": {
+        "mode": "implementation",
+        "display_name": "J6 host sensor real FAN/PTC formal UART diagnostic: schematic FAN/PTC pins retained and three diagnostic UARTs moved to spare GPIO",
+        "top_module": "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_top",
+        "source_prj": "td/uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.prj",
+        "build_subdir": "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921",
+        "syn_script": "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.tcl",
+        "phy_script": "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.tcl",
+        "bitstream": "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921.bit",
+        "area_report": "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_phy.area",
+        "timing_report": "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_pr.timing",
+        "pin_profile": "formal-uart",
+        "tx_ball": "P5",
+        "rx_ball": "T8",
+        "host_uart_tx_ball": "M14",
+        "host_uart_rx_ball": "M15",
+        "debug_uart_rx_ball": "P15",
+        "debug_uart_tx_ball": "N14",
+        "host_uart_baud": 115200,
+        "bmc_uart_baud": 115200,
+        "debug_uart_baud": 921600,
+        "debug_uart_clks_per_bit": 27,
+        "requires_verified_real_fan_ptc_pin_map": True,
+        "authority_boundary": "SRAM-only formal-uart diagnostic evidence. Schematic HEAT/FAN/FG/INSTALL pins are retained, diagnostic UARTs use spare GPIO, and reserved UART1/2 pins remain unused. It does not claim real thermal performance, production PTC/FAN qualification, flash, or PID closed-loop pass.",
     },
 }
 TD_GENERATED_SUFFIXES = {
@@ -2978,18 +3003,13 @@ def td_build_payload(run: bool, top: str = DEFAULT_TD_TOP) -> dict[str, Any]:
 
     profile = TD_TOP_PROFILES[top]
 
-    if not run:
-        return {
-            "status": "skipped",
-            "reason": "TD build probe not requested. Use td-build --run or td --run.",
-            "top": top,
-            "top_module": profile["top_module"],
-            "mode": profile["mode"],
-        }
-
+    pin_profile_payload: dict[str, Any] | None = None
     if profile.get("requires_verified_real_fan_ptc_pin_map"):
         try:
-            pin_conflicts = check_locked_uart_conflicts(load_pin_inventory(REAL_FAN_PTC_INVENTORY))
+            pin_profile_payload = diagnostic_profile_assignments(
+                load_pin_inventory(REAL_FAN_PTC_INVENTORY),
+                str(profile.get("pin_profile") or ""),
+            )
         except OSError as exc:
             return {
                 "status": "blocked_missing_real_fan_ptc_pin_inventory",
@@ -2997,22 +3017,23 @@ def td_build_payload(run: bool, top: str = DEFAULT_TD_TOP) -> dict[str, Any]:
                 "top_module": profile["top_module"],
                 "display_name": profile["display_name"],
                 "mode": profile["mode"],
+                "pin_profile": profile.get("pin_profile"),
                 "reason": f"real FAN/PTC pin inventory is missing or unreadable: {exc}",
                 "bitstream": None,
                 "resources": None,
                 "timing": None,
             }
-        if pin_conflicts["status"] != "pass":
+        if pin_profile_payload.get("status") != "pass":
             return {
-                "status": pin_conflicts["status"],
+                "status": "blocked_pin_profile_invalid",
                 "td_executable": str(TD_EXE),
                 "top": top,
                 "top_module": profile["top_module"],
                 "display_name": profile["display_name"],
                 "mode": profile["mode"],
                 "pin_profile": profile.get("pin_profile"),
-                "reason": "real FAN/PTC schematic pins overlap locked temporary J6/COM7/COM8 UART pins; refusing to generate a conflicting bitstream",
-                "pin_conflicts": pin_conflicts["conflicts"],
+                "reason": "diagnostic pin profile did not pass conflict and reserved-pin validation",
+                "pin_profile_payload": pin_profile_payload,
                 "authority_boundary": profile.get(
                     "authority_boundary",
                     "TD implementation build evidence only. It does not download, program flash, open cables, or certify hardware.",
@@ -3022,14 +3043,25 @@ def td_build_payload(run: bool, top: str = DEFAULT_TD_TOP) -> dict[str, Any]:
                 "timing": None,
                 "debug_artifacts": {
                     "status": "not_applicable",
-                    "reason": "TD build is intentionally blocked before bitgen because the locked debug UARTs share FPGA balls with HEAT/PTC signals.",
+                    "reason": "TD build is blocked before bitgen because the selected diagnostic pin profile is invalid.",
                 },
                 "logic_elaborations": {
                     "status": "skipped",
-                    "reason": "real FAN/PTC pin conflict block is evaluated before implementation build.",
+                    "reason": "diagnostic pin profile block is evaluated before implementation build.",
                 },
             }
 
+    if not run:
+        return {
+            "status": "skipped",
+            "reason": "TD build probe not requested. Use td-build --run or td --run.",
+            "top": top,
+            "top_module": profile["top_module"],
+            "mode": profile["mode"],
+            "pin_profile": profile.get("pin_profile"),
+            "pin_map": pin_profile_payload,
+        }
+
     if not TD_EXE.is_file():
         return {"status": "blocked", "reason": f"missing TD executable: {TD_EXE}"}
 

+ 144 - 0
tools/pin_inventory.py

@@ -22,6 +22,26 @@ LOCKED_DEBUG_UART_ASSIGNMENTS = {
     "debug_uart_tx": "R10",
 }
 
+TEMP_UART_PTC_REMAP_SUBSTITUTIONS = {
+    "PTC03": {"signal": "ptc_pwm_out[2]", "substitute_ball": "P5", "bank_io_net": "BANK2_GPIO40"},
+    "PTC04": {"signal": "ptc_pwm_out[3]", "substitute_ball": "T8", "bank_io_net": "BANK2_GPIO41"},
+    "PTC17": {"signal": "ptc_pwm_out[16]", "substitute_ball": "M14", "bank_io_net": "BANK2_GPIO42"},
+    "PTC18": {"signal": "ptc_pwm_out[17]", "substitute_ball": "M15", "bank_io_net": "BANK2_GPIO43"},
+    "PTC21": {"signal": "ptc_pwm_out[20]", "substitute_ball": "P15", "bank_io_net": "BANK2_GPIO44"},
+    "PTC22": {"signal": "ptc_pwm_out[21]", "substitute_ball": "N14", "bank_io_net": "BANK2_GPIO45"},
+}
+
+FORMAL_UART_ASSIGNMENTS = {
+    "bmc_uart_tx": "P5",
+    "bmc_uart_rx": "T8",
+    "host_uart_tx": "M14",
+    "host_uart_rx": "M15",
+    "debug_uart_rx": "P15",
+    "debug_uart_tx": "N14",
+}
+
+RESERVED_FUTURE_UART_SIGNALS = ["UART1_TX", "UART1_RX", "UART2_TX", "UART2_RX"]
+
 REQUIRED_IO_GROUPS = [
     {"name": "ptc_pwm[23:0]", "count": 24, "reason": "24 HEAT/PTC PWM outputs"},
     {"name": "fan_pwm[3:0]", "count": 4, "reason": "4 FAN_PWM drive outputs"},
@@ -147,6 +167,130 @@ def _pin_by_ball(inventory: dict[str, Any]) -> dict[str, dict[str, Any]]:
     return {str(pin.get("fpga_ball")): pin for pin in inventory.get("pins", []) if pin.get("fpga_ball")}
 
 
+def _pin_by_signal(inventory: dict[str, Any]) -> dict[str, dict[str, Any]]:
+    return {str(pin.get("signal")): pin for pin in inventory.get("pins", []) if pin.get("signal")}
+
+
+def _pin_ref(pin: dict[str, Any] | None, *, role: str | None = None) -> dict[str, Any]:
+    if pin is None:
+        return {"status": "missing"}
+    payload: dict[str, Any] = {
+        "signal": pin.get("signal"),
+        "function_net": pin.get("function_net"),
+        "bank_io_net": pin.get("bank_io_net"),
+        "fpga_ball": pin.get("fpga_ball"),
+        "role": role or pin.get("role"),
+        "direction": pin.get("direction"),
+        "io_standard": pin.get("io_standard"),
+        "source_pages": pin.get("source_pages"),
+        "manually_verified": pin.get("manually_verified") is True,
+        "reserved": pin.get("reserved") is True,
+    }
+    if pin.get("capability") is not None:
+        payload["capability"] = pin.get("capability")
+    return payload
+
+
+def _reserved_future_uart(inventory: dict[str, Any]) -> dict[str, dict[str, Any]]:
+    pins_by_signal = _pin_by_signal(inventory)
+    return {name: _pin_ref(pins_by_signal.get(name), role="reserved_future_uart") for name in RESERVED_FUTURE_UART_SIGNALS}
+
+
+def _uart_assignment_rows(inventory: dict[str, Any], assignments: dict[str, str]) -> dict[str, dict[str, Any]]:
+    pins_by_ball = _pin_by_ball(inventory)
+    rows: dict[str, dict[str, Any]] = {}
+    for signal, ball in assignments.items():
+        pin = pins_by_ball.get(ball)
+        rows[signal] = _pin_ref(pin, role="uart")
+        rows[signal]["fpga_ball"] = ball
+    return rows
+
+
+def _ptc_substitution_rows(inventory: dict[str, Any], assignments: dict[str, str]) -> dict[str, dict[str, Any]]:
+    real_assignments = real_fan_ptc_assignments(inventory)
+    pins_by_ball = _pin_by_ball(inventory)
+    rows: dict[str, dict[str, Any]] = {}
+    for label, subst in TEMP_UART_PTC_REMAP_SUBSTITUTIONS.items():
+        signal = subst["signal"]
+        original_ball = real_assignments.get(signal)
+        substitute_ball = subst["substitute_ball"]
+        rows[label] = {
+            "signal": signal,
+            "function_net": f"HEAT{int(label[3:])}",
+            "original_ball": original_ball,
+            "substitute_ball": substitute_ball,
+            "substitute_bank_io_net": subst["bank_io_net"],
+            "active_ball": assignments.get(signal),
+            "substitute_pin": _pin_ref(pins_by_ball.get(substitute_ball), role="HEAT_substitute"),
+            "reason": "temporary_uart_overlap_remap",
+        }
+    return rows
+
+
+def diagnostic_profile_assignments(inventory: dict[str, Any], profile: str) -> dict[str, Any]:
+    """Return complete board assignments for the active two diagnostic profiles."""
+    if profile not in {"temp-uart-ptc-remap", "formal-uart"}:
+        return {
+            "schema": "cpld-diagnostic-pin-profile-v1",
+            "generated_at": utc_now(),
+            "board_id": inventory.get("board_id"),
+            "profile": profile,
+            "status": "fail_unknown_profile",
+            "assignments": {},
+            "errors": [f"unknown_profile:{profile}"],
+        }
+
+    assignments = real_fan_ptc_assignments(inventory)
+    if profile == "temp-uart-ptc-remap":
+        uart_assignments = dict(LOCKED_DEBUG_UART_ASSIGNMENTS)
+        for item in TEMP_UART_PTC_REMAP_SUBSTITUTIONS.values():
+            assignments[item["signal"]] = item["substitute_ball"]
+        ptc_substitutions = _ptc_substitution_rows(inventory, assignments)
+        hardware_status = "not_run"
+        boundary = (
+            "Temporary debug pin profile: current J6/COM7/COM8 UART wiring is kept, "
+            "and six overlapping HEAT/PTC channels are moved to verified spare GPIO for signal-level diagnostic use."
+        )
+    else:
+        uart_assignments = dict(FORMAL_UART_ASSIGNMENTS)
+        ptc_substitutions = {}
+        hardware_status = "not_run"
+        boundary = (
+            "Formal debug pin profile: all HEAT/PTC/FAN/FG/INSTALL pins use the schematic mapping, "
+            "and all three diagnostic UARTs move to verified spare GPIO; schematic UART1/2 are reserved unused."
+        )
+    assignments.update(uart_assignments)
+    conflict = check_pin_conflicts(inventory, assignments)
+    reserved_future_uart = _reserved_future_uart(inventory)
+    used_balls = {str(ball) for ball in assignments.values()}
+    reserved_balls = {
+        str(item.get("fpga_ball"))
+        for item in reserved_future_uart.values()
+        if item.get("fpga_ball")
+    }
+    uses_reserved_future_uart = bool(used_balls & reserved_balls)
+    errors = list(conflict.get("errors") or [])
+    if uses_reserved_future_uart:
+        errors.append("uses_reserved_future_uart")
+    status = "pass" if conflict["status"] == "pass" and not uses_reserved_future_uart else "fail"
+    return {
+        "schema": "cpld-diagnostic-pin-profile-v1",
+        "generated_at": utc_now(),
+        "board_id": inventory.get("board_id"),
+        "profile": profile,
+        "status": status,
+        "assignments": dict(sorted(assignments.items())),
+        "uart_assignments": _uart_assignment_rows(inventory, uart_assignments),
+        "ptc_substitutions": ptc_substitutions,
+        "reserved_future_uart": reserved_future_uart,
+        "uses_reserved_future_uart": uses_reserved_future_uart,
+        "real_fan_ptc_hardware_status": hardware_status,
+        "conflict_check": conflict,
+        "errors": sorted(set(errors)),
+        "authority_boundary": boundary,
+    }
+
+
 def check_pin_conflicts(inventory: dict[str, Any], assignments: dict[str, str]) -> dict[str, Any]:
     pins = _pin_by_ball(inventory)
     seen: dict[str, str] = {}

+ 75 - 4
tools/remote/collect-j6-host-sensor-real-fan-ptc.ps1

@@ -17,6 +17,8 @@
 
     [string]$Bitstream = "",
     [string]$TdReceipt = "",
+    [ValidateSet("temp-uart-ptc-remap", "formal-uart")]
+    [string]$Profile = "temp-uart-ptc-remap",
     [string]$Operator = "",
     [bool]$AssumeManualSramProgrammed = $true,
     [string[]]$Commands = @(
@@ -52,6 +54,56 @@ if ($DebugPort -ne "COM7") {
     throw "This fixed real-bmc-j6-host-sensor-real-fan-ptc-debug921-v1 package expects DebugPort COM7"
 }
 
+function New-PinProfileMap([string]$SelectedProfile) {
+    if ($SelectedProfile -eq "temp-uart-ptc-remap") {
+        return [ordered]@{
+            name = "temp-uart-ptc-remap"
+            connector = "J6"
+            bmc_tx_ball = "T4"
+            bmc_rx_ball = "R5"
+            tx_ball = "T4"
+            rx_ball = "R5"
+            host_tx_ball = "P7"
+            host_rx_ball = "P8"
+            debug_rx_ball = "P10"
+            debug_tx_ball = "R10"
+            ptc_substitutions = [ordered]@{
+                PTC03 = [ordered]@{ original_ball = "T4"; substitute_ball = "P5"; bank_io_net = "BANK2_GPIO40" }
+                PTC04 = [ordered]@{ original_ball = "R5"; substitute_ball = "T8"; bank_io_net = "BANK2_GPIO41" }
+                PTC17 = [ordered]@{ original_ball = "P8"; substitute_ball = "M14"; bank_io_net = "BANK2_GPIO42" }
+                PTC18 = [ordered]@{ original_ball = "P7"; substitute_ball = "M15"; bank_io_net = "BANK2_GPIO43" }
+                PTC21 = [ordered]@{ original_ball = "P10"; substitute_ball = "P15"; bank_io_net = "BANK2_GPIO44" }
+                PTC22 = [ordered]@{ original_ball = "R10"; substitute_ball = "N14"; bank_io_net = "BANK2_GPIO45" }
+            }
+            reserved_future_uart = [ordered]@{
+                UART1_TX = [ordered]@{ fpga_ball = "L10"; bank_io_net = "BANK2_GPIO52"; used = $false }
+                UART1_RX = [ordered]@{ fpga_ball = "M9"; bank_io_net = "BANK2_GPIO53"; used = $false }
+                UART2_TX = [ordered]@{ fpga_ball = "M10"; bank_io_net = "BANK2_GPIO54"; used = $false }
+                UART2_RX = [ordered]@{ fpga_ball = "N11"; bank_io_net = "BANK2_GPIO55"; used = $false }
+            }
+        }
+    }
+    return [ordered]@{
+        name = "formal-uart"
+        connector = "J6"
+        bmc_tx_ball = "P5"
+        bmc_rx_ball = "T8"
+        tx_ball = "P5"
+        rx_ball = "T8"
+        host_tx_ball = "M14"
+        host_rx_ball = "M15"
+        debug_rx_ball = "P15"
+        debug_tx_ball = "N14"
+        ptc_substitutions = [ordered]@{}
+        reserved_future_uart = [ordered]@{
+            UART1_TX = [ordered]@{ fpga_ball = "L10"; bank_io_net = "BANK2_GPIO52"; used = $false }
+            UART1_RX = [ordered]@{ fpga_ball = "M9"; bank_io_net = "BANK2_GPIO53"; used = $false }
+            UART2_TX = [ordered]@{ fpga_ball = "M10"; bank_io_net = "BANK2_GPIO54"; used = $false }
+            UART2_RX = [ordered]@{ fpga_ball = "N11"; bank_io_net = "BANK2_GPIO55"; used = $false }
+        }
+    }
+}
+
 function Get-Sha256([string]$Path) {
     if (-not (Test-Path -LiteralPath $Path -PathType Leaf)) {
         throw "File not found: $Path"
@@ -100,7 +152,7 @@ function Convert-TokenValue([string]$Key, [string]$Raw) {
     if ($stringKeys -contains $Key) {
         return $Raw
     }
-    $hexKeys = @("seq", "cmd", "id", "v", "m", "tx", "rx", "drop", "off", "len", "sum", "raw_in", "ri", "raw_out", "ro", "raw_drop", "rd", "host_report_drop", "hd", "fifo", "fifo_max", "bmc_berr", "be", "host_err", "he", "err", "e", "type", "ty", "ch", "c", "pct", "p", "p0", "p23", "f0", "f5", "ptc01", "ptc24", "fan01", "fan04")
+    $hexKeys = @("seq", "s", "cmd", "id", "v", "m", "tp", "tx", "rx", "drop", "off", "len", "sum", "raw_in", "ri", "raw_out", "ro", "raw_drop", "rd", "host_report_drop", "hd", "fifo", "fifo_max", "bmc_berr", "be", "host_err", "he", "err", "e", "type", "ty", "ch", "c", "pct", "p", "p0", "p23", "f0", "f5", "ptc01", "ptc24", "fan01", "fan04")
     if ($hexKeys -contains $Key) {
         return [Convert]::ToInt64($Raw, 16)
     }
@@ -138,6 +190,8 @@ function Convert-FrameLine([string]$Line, [string[]]$Prefixes) {
             if (-not $fields.Contains("host_report_drop") -and $fields.Contains("hd")) { $fields["host_report_drop"] = $fields["hd"] }
             if (-not $fields.Contains("raw_in") -and $fields.Contains("ri")) { $fields["raw_in"] = $fields["ri"] }
             if (-not $fields.Contains("raw_out") -and $fields.Contains("ro")) { $fields["raw_out"] = $fields["ro"] }
+            if (-not $fields.Contains("seq") -and $fields.Contains("s")) { $fields["seq"] = $fields["s"] }
+            if (-not $fields.Contains("temp") -and $fields.Contains("tp")) { $fields["temp"] = $fields["tp"] }
             if (-not $fields.Contains("bmc_berr") -and $fields.Contains("be")) { $fields["bmc_berr"] = $fields["be"] }
             if (-not $fields.Contains("host_err") -and $fields.Contains("he")) { $fields["host_err"] = $fields["he"] }
             if (-not $fields.Contains("err") -and $fields.Contains("e")) { $fields["err"] = $fields["e"] }
@@ -778,7 +832,7 @@ $manualSramArtifactPath = Join-Path $artifactDir "manual-sram-attestation.json"
 } | ConvertTo-Json -Depth 16 | Set-Content -LiteralPath $manualSramArtifactPath -Encoding UTF8
 $manualSramRef = New-ArtifactRef $manualSramArtifactPath $out
 
-$pinMap = [ordered]@{ name = "primary"; connector = "J6"; tx_ball = "T4"; rx_ball = "R5"; host_tx_ball = "P7"; host_rx_ball = "P8"; debug_rx_ball = "P10"; debug_tx_ball = "R10" }
+$pinMap = New-PinProfileMap $Profile
 
 $manifest = [ordered]@{
     schema = "j6-host-sensor-real-fan-ptc-capture-manifest-v1"
@@ -803,6 +857,7 @@ $manifest = [ordered]@{
     enumerates_com_ports = $false
     opens_unknown_com_ports = $false
     duration_s = $DurationSeconds
+    pin_profile_name = $Profile
     pin_profile = $pinMap
     status = $captureStatus
     artifacts = [ordered]@{
@@ -830,7 +885,7 @@ $manifest = [ordered]@{
         program_nonvolatile_attempted = $false
         driver_install_attempted = $false
     }
-    authority_boundary = "Pure PowerShell/.NET collector. It opens only explicit COM8 HostPort and COM7 DebugPort, writes only allowlisted HostPort commands, keeps DebugPort read-only, installs no dependencies, and performs no device programming."
+    authority_boundary = "Pure PowerShell/.NET collector. It opens only explicit COM8 HostPort and COM7 DebugPort, writes only allowlisted HostPort commands, keeps DebugPort read-only, installs no dependencies, and performs no device programming. Pin profile is recorded for temp-uart-ptc-remap or formal-uart evidence attribution."
 }
 Write-JsonFile $manifest $manifestPath
 $manifestHash = Get-Sha256 $manifestPath
@@ -853,6 +908,7 @@ $receipt = [ordered]@{
     status = $receiptStatus
     counterparty = "real_bmc"
     diagnostic_scope = "host_sensor_real_fan_ptc_debug921"
+    pin_profile_name = $Profile
     pin_profile = $pinMap
     programming = [ordered]@{ mode = "PROGRAM_SRAM"; manual_programming = $true; bitstream = $bitstreamRef }
     collector = [ordered]@{
@@ -900,7 +956,22 @@ $receipt = [ordered]@{
         bmc_raw_sampling = [ordered]@{ status = if ($bmcTimeout) { "blocked_bmc_timeout" } else { "pass" }; minimum_completed_samples = 3; completed_samples = $sampleCount; bmc_timeout = $bmcTimeout }
         pid_boundary = [ordered]@{ status = "pass"; pid_requested = ($pidRequested -ne 0); pid_requested_ever = $pidRequestedEver; pid_active = ($pidActive -ne 0); pwm_source = "host_manual" }
         timeout_evidence = [ordered]@{ status = "pass"; timeout_evidence = [ordered]@{ timeout_s = 5; ptc_all_percent = $timeoutPtc; fan_all_percent = $timeoutFan } }
-        pin_map = [ordered]@{ status = "pass"; ptc_count = 24; fan_count = 4; fan_fg_count = 8; fan_install_count = 4 }
+        pin_map = [ordered]@{
+            status = "pass"
+            profile = $Profile
+            ptc_count = 24
+            fan_count = 4
+            fan_fg_count = 8
+            fan_install_count = 4
+            bmc_tx_ball = $pinMap.bmc_tx_ball
+            bmc_rx_ball = $pinMap.bmc_rx_ball
+            host_tx_ball = $pinMap.host_tx_ball
+            host_rx_ball = $pinMap.host_rx_ball
+            debug_rx_ball = $pinMap.debug_rx_ball
+            debug_tx_ball = $pinMap.debug_tx_ball
+            ptc_substitutions = $pinMap.ptc_substitutions
+            reserved_future_uart = $pinMap.reserved_future_uart
+        }
         safety_contract = [ordered]@{
             status = "pass"
             pid_default_enabled = $false

+ 62 - 4
tools/uart_receipts.py

@@ -214,17 +214,33 @@ REAL_BMC_J6_HOST_SENSOR_REAL_FAN_PTC_ALLOWED_LAYER_SET = set(
     REAL_BMC_J6_HOST_SENSOR_REAL_FAN_PTC_REQUIRED_LAYERS
 )
 REAL_BMC_J6_HOST_SENSOR_REAL_FAN_PTC_ALLOWED_TOP_MODULE = (
-    "uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top"
+    "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top"
 )
+REAL_BMC_J6_HOST_SENSOR_REAL_FAN_PTC_ALLOWED_TOP_MODULES_BY_PIN_PROFILE = {
+    "temp-uart-ptc-remap": "uart_rs232_j6_host_sensor_real_fan_ptc_temp_uart_ptc_remap_debug921_top",
+    "formal-uart": "uart_rs232_j6_host_sensor_real_fan_ptc_formal_uart_debug921_top",
+}
 REAL_BMC_J6_HOST_SENSOR_REAL_FAN_PTC_ALLOWED_PIN_PROFILES = {
-    "primary": {
+    "temp-uart-ptc-remap": {
         "tx_ball": "T4",
         "rx_ball": "R5",
+        "bmc_tx_ball": "T4",
+        "bmc_rx_ball": "R5",
         "host_tx_ball": "P7",
         "host_rx_ball": "P8",
         "debug_rx_ball": "P10",
         "debug_tx_ball": "R10",
     },
+    "formal-uart": {
+        "tx_ball": "P5",
+        "rx_ball": "T8",
+        "bmc_tx_ball": "P5",
+        "bmc_rx_ball": "T8",
+        "host_tx_ball": "M14",
+        "host_rx_ball": "M15",
+        "debug_rx_ball": "P15",
+        "debug_tx_ball": "N14",
+    },
 }
 REAL_BMC_J6_HOST_SENSOR_REAL_FAN_PTC_EXPECTED_COMMANDS = [
     "SET PTC 01 10",
@@ -991,8 +1007,10 @@ LOSSLESS_HEX_FIELDS = {
     "seq",
     "cmd",
     "id",
+    "s",
     "v",
     "m",
+    "tp",
     "tx",
     "rx",
     "drop",
@@ -1017,7 +1035,10 @@ LOSSLESS_HEX_FIELDS = {
     "p0",
     "p23",
     "f0",
+    "f3",
     "f5",
+    "to",
+    "ts",
 }
 LOSSLESS_STRING_FIELDS = {
     "st",
@@ -1068,6 +1089,10 @@ def _parse_lossless_key_value_lines(text: str, prefix: str) -> list[dict[str, An
             fields["raw_in"] = fields["ri"]
         if "raw_out" not in fields and "ro" in fields:
             fields["raw_out"] = fields["ro"]
+        if "seq" not in fields and "s" in fields:
+            fields["seq"] = fields["s"]
+        if "temp" not in fields and "tp" in fields:
+            fields["temp"] = fields["tp"]
         if "raw_drop" not in fields and "rd" in fields:
             fields["raw_drop"] = fields["rd"]
         if "bmc_berr" not in fields and "be" in fields:
@@ -1108,12 +1133,18 @@ def _parse_lossless_key_value_lines(text: str, prefix: str) -> list[dict[str, An
             fields["ptc23"] = fields["p23"]
         if "fan00" not in fields and "f0" in fields:
             fields["fan00"] = fields["f0"]
+        if "fan03" not in fields and "f3" in fields:
+            fields["fan03"] = fields["f3"]
         if "fan05" not in fields and "f5" in fields:
             fields["fan05"] = fields["f5"]
         if "timeout" not in fields and "to" in fields:
             fields["timeout"] = fields["to"]
         if "timeout_s" not in fields and "ts" in fields:
             fields["timeout_s"] = fields["ts"]
+        if "timeout" not in fields and "to" in fields:
+            fields["timeout"] = fields["to"]
+        if "timeout_s" not in fields and "ts" in fields:
+            fields["timeout_s"] = fields["ts"]
         for alias_field in ("status", "source", "pwm_source"):
             if alias_field in fields:
                 fields[alias_field] = _normalize_compact_alias_value(alias_field, fields[alias_field])
@@ -1126,9 +1157,13 @@ def _host_sensor_row_fields(row: Any) -> dict[str, Any]:
         return {}
     fields = row.get("fields") if isinstance(row.get("fields"), dict) else {}
     merged: dict[str, Any] = dict(fields)
-    for key in ("seq", "id", "temp", "missing", "miss", "status", "st", "raw", "fault"):
+    for key in ("seq", "s", "id", "temp", "tp", "missing", "miss", "status", "st", "raw", "fault"):
         if key in row and key not in merged:
             merged[key] = row[key]
+    if "seq" not in merged and "s" in merged:
+        merged["seq"] = merged["s"]
+    if "temp" not in merged and "tp" in merged:
+        merged["temp"] = merged["tp"]
     if "missing" not in merged and "miss" in merged:
         merged["missing"] = merged["miss"]
     if "status" not in merged and "st" in merged:
@@ -1805,6 +1840,7 @@ def _validate_host_sensor_debug921_common(
     host_sensor_report_schemas: set[str] | None = None,
     debug_frame_stream_schemas: set[str] | None = None,
     allowed_pin_profiles: dict[str, dict[str, str]] | None = None,
+    allowed_top_modules_by_pin_profile: dict[str, str] | None = None,
     required_safety_false_fields: list[str] | None = None,
     forbidden_action_markers: list[str] | None = None,
     td_top_failure_name: str = "td_bitstream_not_host_sensor_top",
@@ -1823,6 +1859,7 @@ def _validate_host_sensor_debug921_common(
     host_sensor_report_schemas = host_sensor_report_schemas or {"j6-host-sensor-pwm-host-sensor-report-v1"}
     debug_frame_stream_schemas = debug_frame_stream_schemas or {"j6-host-sensor-pwm-debug-frame-stream-v1"}
     allowed_pin_profiles = allowed_pin_profiles or {}
+    allowed_top_modules_by_pin_profile = allowed_top_modules_by_pin_profile or {}
     required_safety_false_fields = required_safety_false_fields or REAL_BMC_J6_HOST_SENSOR_REAL_FAN_PTC_REQUIRED_SAFETY_FALSE_FIELDS
     forbidden_action_markers = forbidden_action_markers or REAL_BMC_J6_WINDOWS_FORBIDDEN_ACTION_MARKERS
 
@@ -1935,8 +1972,12 @@ def _validate_host_sensor_debug921_common(
                 failures.append(f"td_bitstream_receipt_not_pass:{td_payload.get('status', 'missing')}")
             if td_payload.get("mode") != "implementation":
                 failures.append("td_bitstream_not_implementation")
-            if td_payload.get("top_module") != allowed_top_module:
+            expected_top_module = allowed_top_modules_by_pin_profile.get(profile_name, allowed_top_module)
+            if td_payload.get("top_module") != expected_top_module:
                 failures.append(td_top_failure_name)
+            td_pin_profile = str(td_payload.get("pin_profile") or "")
+            if profile_name and td_pin_profile and td_pin_profile != profile_name:
+                failures.append("td_pin_profile_mismatch")
             td_bitstream = td_payload.get("bitstream") if isinstance(td_payload.get("bitstream"), dict) else {}
             td_bitstream_sha256 = str(td_bitstream.get("sha256") or "")
             if not td_bitstream_sha256:
@@ -2284,6 +2325,13 @@ def _validate_host_sensor_debug921_common(
         failures.append("pin_map_ptc_count_not_24")
     if _safe_int(pin_map_layer.get("fan_count"), default=-1) != expected_fan_count:
         failures.append(f"pin_map_fan_count_not_{expected_fan_count}")
+    pin_map_profile = str(pin_map_layer.get("profile") or pin_map_layer.get("name") or "")
+    if profile_name and pin_map_profile and pin_map_profile != profile_name:
+        failures.append("pin_map_profile_mismatch")
+    if expected_profile is not None:
+        for field, expected in expected_profile.items():
+            if field in pin_map_layer and pin_map_layer.get(field) != expected:
+                failures.append(f"pin_map_{field}_mismatch")
     if safety_contract.get("pid_default_enabled") is not False:
         failures.append("safety_contract_pid_default_enabled_not_false")
     if safety_contract.get("pid_active") is not False:
@@ -2302,6 +2350,15 @@ def _validate_host_sensor_debug921_common(
     if manifest_payload:
         if str(manifest_payload.get("status") or "pass") != "pass":
             failures.append(f"manifest_status_not_pass:{manifest_payload.get('status', 'missing')}")
+        manifest_profile = manifest_payload.get("pin_profile_name")
+        if manifest_profile is None:
+            manifest_profile_obj = manifest_payload.get("pin_profile")
+            if isinstance(manifest_profile_obj, dict):
+                manifest_profile = manifest_profile_obj.get("name")
+            elif isinstance(manifest_profile_obj, str):
+                manifest_profile = manifest_profile_obj
+        if profile_name and str(manifest_profile or "") and str(manifest_profile) != profile_name:
+            failures.append("manifest_pin_profile_mismatch")
         if manifest_payload.get("host_port") != "COM8":
             failures.append("manifest_host_port_not_com8")
         if manifest_payload.get("debug_port") != "COM7":
@@ -2638,6 +2695,7 @@ def validate_real_bmc_j6_host_sensor_real_fan_ptc_debug921_v1_receipt(
             "j6-host-sensor-real-fan-ptc-debug-frame-stream-v1",
         },
         allowed_pin_profiles=REAL_BMC_J6_HOST_SENSOR_REAL_FAN_PTC_ALLOWED_PIN_PROFILES,
+        allowed_top_modules_by_pin_profile=REAL_BMC_J6_HOST_SENSOR_REAL_FAN_PTC_ALLOWED_TOP_MODULES_BY_PIN_PROFILE,
         required_safety_false_fields=REAL_BMC_J6_HOST_SENSOR_REAL_FAN_PTC_REQUIRED_SAFETY_FALSE_FIELDS,
         forbidden_action_markers=REAL_BMC_J6_HOST_SENSOR_REAL_FAN_PTC_FORBIDDEN_ACTION_MARKERS,
         td_top_failure_name="td_bitstream_not_host_sensor_real_fan_ptc_top",