Ver Fonte

test(resource): record Host UART baud A B trial

root há 3 meses atrás
pai
commit
b2dda5528a

+ 29 - 0
docs/architecture/6400-v1-resource-trials.md

@@ -0,0 +1,29 @@
+# 6400 V1 resource A/B trials
+
+This ledger records measured candidates. Open-source LUT4 mapping is preliminary; TD 2026.1 SP2 device results remain required at L13.
+
+## Host UART baud generator
+
+Receipt: `receipts/resource/uart-baud-ab.json`, source commit `1f42f18c5e01539b9ce33ee77628f6667d1a106c`.
+
+| Candidate | Bit-level simulation | Verilator | Yosys LUT4 | DFF | Decision |
+| --- | --- | --- | ---: | ---: | --- |
+| Fixed 27 clocks/bit | PASS | PASS | 77 | 53 | Selected |
+| Fractional 27/28 | PASS | PASS | 213 | 98 | Rejected on resource size |
+
+The simulation covered peer periods of 26, 27, and 28 clocks, per-bit alternating 26/28 jitter, an arbitrary asynchronous start phase, 64 back-to-back bytes, and TX loopback. Fixed 27 therefore met the tested timing margin while using 136 fewer mapped LUT4 and 45 fewer DFF. The production source closure continues to instantiate only the fixed-27 modules. Fractional RTL remains a reviewable rejected candidate and is excluded from the production closure.
+
+Hardware UART validation is **NOT RUN**. TD device-specific A/B results are pending the L13 run.
+
+## Remaining required trials
+
+| Trial | Status |
+| --- | --- |
+| Binary FSM vs one-hot FSM | Pending TD/resource harness |
+| Independent BMC TX vs shared TX | Pending |
+| FF arrays vs eRAM | Pending TD inference trial |
+| Positional PI vs incremental PI | Pending resource harness |
+| Parallel safety compare vs sequential scan | Pending resource harness |
+| Element copy vs bank pointer | Bank pointer implemented; rejected-copy measurement pending |
+| Independent CRC vs shared RX/TX CRC | Pending resource harness |
+| Payload copy vs streaming snapshot | Streaming implemented; rejected-copy measurement pending |

+ 69 - 0
receipts/resource/uart-baud-ab.json

@@ -0,0 +1,69 @@
+{
+  "bit_level_simulation": {
+    "coverage": "peer 26/27/28 clocks, +/-1-clock per-bit jitter, arbitrary start phase, 64 continuous bytes, TX loopback",
+    "output": "PASS: uart_baud_candidates_tb fixed=27 fractional=27/28 peer=26..28 jitter=+/-1 long=64",
+    "status": "PASS"
+  },
+  "candidates": {
+    "fixed_27": {
+      "sources": {
+        "src/common/uart_rx_byte.v": "c2bcf2622166faace63f2a16a9dfa21f8f61a0ae3fe72c46bad13d94e4f87b87",
+        "src/common/uart_tx_byte.v": "efd6c8e4d82959ccb3a29e259c0a08edfc20e6fc5034a1d98f037ba0bd999ee0",
+        "tests/resource/uart_fixed_candidate_top.v": "c63f4aaca7dd89160e5c7890f95acb68511ff1d5f7161bbc6d8c3c92964e3878"
+      },
+      "top": "uart_fixed_candidate_top",
+      "verilator_lint": "PASS",
+      "wire_behavior": "27 clocks per bit; 925925.926 baud; +0.469% nominal error",
+      "yosys_lut4_mapping": {
+        "cell_types": {
+          "$_DFFE_PN0P_": 33,
+          "$_DFFE_PN1P_": 10,
+          "$_DFF_PN0_": 7,
+          "$_DFF_PN1_": 3,
+          "$lut": 77
+        },
+        "dff": 53,
+        "lut4": 77,
+        "total_cells": 130
+      },
+      "yosys_script": "read_verilog src/common/uart_rx_byte.v src/common/uart_tx_byte.v tests/resource/uart_fixed_candidate_top.v; hierarchy -check -top uart_fixed_candidate_top; synth -noabc -top uart_fixed_candidate_top; abc -lut 4; stat -json"
+    },
+    "fractional_27_28": {
+      "sources": {
+        "src/common/uart_rx_byte_fractional.v": "35a9cb6ce2b03f4a84d81e6e86a8cbfdf4d0d84b70727d18c9c356d29bd81778",
+        "src/common/uart_tx_byte_fractional.v": "ce3abae0a5a3ba10f7a0b094564507282c94b71fb9e31de5e5152b5f3c42340d",
+        "tests/resource/uart_fractional_candidate_top.v": "90970c6c4a9656537a66f152418cfc80f4fee70eac94642e10e7080619e62bfe"
+      },
+      "top": "uart_fractional_candidate_top",
+      "verilator_lint": "PASS",
+      "wire_behavior": "phase accumulator; 27/28 clocks per bit; zero long-term nominal error",
+      "yosys_lut4_mapping": {
+        "cell_types": {
+          "$_DFFE_PN0P_": 38,
+          "$_DFFE_PN1P_": 10,
+          "$_DFF_PN0_": 47,
+          "$_DFF_PN1_": 3,
+          "$lut": 213
+        },
+        "dff": 98,
+        "lut4": 213,
+        "total_cells": 311
+      },
+      "yosys_script": "read_verilog src/common/uart_rx_byte_fractional.v src/common/uart_tx_byte_fractional.v tests/resource/uart_fractional_candidate_top.v; hierarchy -check -top uart_fractional_candidate_top; synth -noabc -top uart_fractional_candidate_top; abc -lut 4; stat -json"
+    }
+  },
+  "contract_sha256": "06c18dee5c27c4830398c8bc348d7fe868cde72aebe4c3be68b562f00e9b0fc1",
+  "hardware_validation_state": "NOT RUN",
+  "project_sha256": "0856d3863df301131b778221be35e2176a78f687ae08fbeb6a980146e53b4a65",
+  "run_id": "uart-baud-ab-1f42f18c5e01",
+  "schema": "prod2u-6400-uart-resource-ab-v1",
+  "selected": "fixed_27",
+  "selection_reason": "Both candidates passed bit-level simulation and lint; fixed-27 uses fewer mapped LUT4 and DFF resources.",
+  "source_commit": "1f42f18c5e01539b9ce33ee77628f6667d1a106c",
+  "td_resource_comparison": "PENDING_L13_TD_RUN",
+  "tools": {
+    "iverilog": "Icarus Verilog version 11.0 (stable) ()",
+    "verilator": "Verilator 5.006 2023-01-22 rev (Debian 5.006-3)",
+    "yosys": "Yosys 0.23 (git sha1 7ce5011c24b)"
+  }
+}