The motor event layer now owns the persistent last-limit record used by both status and pending events. The axis core emits its pre-zero position, total, tag, event and low timestamp together with the high timestamp word. The engine captures them on the next clock. status_changing includes the limit pulse so that capture also advances the snapshot epoch.
Clearing the pending event bit or clearing/overwriting the 64-entry host event ring does not clear retained history. Diagnostic builds keep an independent axis-core history and a parallel engine view for comparison. Those parallel reads are excluded from the production storage module.
The current motor_limit_history is a rotating register bank. Its head starts one axis behind the core scanner, matching the core's registered event pulse. Each active clock rotates the head to the tail, replacing it with incoming history when a limit pulse is present. This eliminates the wide dynamic memory selector. Validity is still reset in the owner; physical register contents are never exposed before their axis has a valid record.
Status observes the rotating head without event arbitration stalls. Both limit and completion dispatch retain the existing priority and wait until the selected axis reaches the head. Completion records now use the same rotating storage module; see mrdimm-dsp-state-storage.md for that later change. Overwriting a record while its dispatch is waiting counts as a pending loss. Under continuing higher-priority traffic this does not promise bounded service for every pending event; after traffic stops the pending set drains. Snapshot reads see any requested history axis within AXIS_COUNT clocks. With the current16-bit header copy, a conservative complete-copy bound is 240 + 32*AXIS_COUNT*AXIS_COUNT + 2 clocks:530 for three axes and4850 for twelve, below the16-bit epoch modulus. These structural bounds are not a Full snapshot formal proof.
The tests follow the snapshot consumer through every word and every axis, compare production and diagnostic values, verify the pre-zero signed position and a64-bit timestamp rollover, and retain X history after counter clear, event clear and70 Y events overwriting the ring. They now also assert producer/head alignment, drive180 all-axis updates with fixed seed713c9a25 at three-clock intervals, bound backlog drain after traffic stops, and reset after populated history. All checks run for three and twelve axes.
Native history-rotate-td-a6f47f0 reports5290 LUT,4339 registers,8 BRAM and1 DSP. This saves50 LUT against the5340/3892 baseline, at a cost of447 registers. LUT still exceeds4480 by810, and only141 registers remain free. The design still fails fit and has no qualified MR BIT or timing result. The history hierarchy is150 LUT/449 registers; hierarchy attribution alone is not total savings.
history-rotate-quick-a6f47f0 passed31 RTL compile/behavior checks. The stronger all-axis/reset tests are in sourceeaf7a81, with Icarus and Verilator results under history-cross-eaf7a81. The production RTL is unchanged by those test additions.
tools/verify_motor_arithmetic.py --history-rotation --run-root EXTERNAL extracts the actual storage module and adds observation ports only in the proof copy. A reference addressed array and the checked producer scan form establish the phase and valid-record invariant. Data and event enables are arbitrary, with an initial reset and later resets unrestricted. Covers require every axis to hold a valid record; phase and dropped-write mutations must fail. This proves storage/scan form, not the complete motor or event system.
The first monolithic12-axis160-bit proof in history-proof-7fb138a reached over one million SAT variables and timed out at90 seconds; it remains UNKNOWN_TIMEOUT. Three-axis proof, both covers, mutation detections and8 event-loss proof checks passed. The revised proof partitions the12-axis record into ten disjoint16-bit goals, covering all160 bits with the actual storage logic in every goal. It does not drop fields or weaken reset/validity requirements.
Final history-final-16639d3/native/rotation/RESULT.json passes all17 storage/phase proof, cover and mutation checks with unreset storage contents left arbitrary. native/loss/RESULT.json passes all8 event-loss checks. The earlier initialized-storage split run also passed, but the final run supplies the stronger initial-state evidence. All production inputs still match native sourcea6f47f0.
Icarus and Verilator both drain the fixed-seed burst in35 clocks for3 axes and128 clocks for12 axes. Their complete tests cover265.36us and284.92us of simulated time respectively; these short component regressions are not long-duration soak acceptance. history-doc-1870164 additionally passes both generation checks and21 current-target/source-closure tests, including the repaired6400 protocol documentation's command and199-byte layout contract.
All measurements are native Linux TD runs. None fit the device or produced a qualified MRDIMM bitstream.
| Source / run | LUT | Registers | Result |
|---|---|---|---|
c48af6f / shared-load-td |
7105 | 4305 | Fit failure |
054d383 / shared-history-td |
7061 | 4784 | Fit failure; array not inferred as RAM |
18e687f / history-port-td |
6856 | 4786 | Fit failure; single address alone insufficient |
0278c6d / history-declaration-td |
6856 | 4786 | Declaration-order hypothesis rejected |
8c0b507 / history-isolated-td |
6946 | 4339 | RAM inference restored; LUT still exceeds4480 |
TD reports the isolated history bank as230 LUT and0 registers; the design uses8 BRAM and1 DSP. A separate memory-index-probe showed that both wide and narrow write-address inputs can infer RAM, ruling out address width alone. Isolating production storage from diagnostic array reads restored inference in the actual design.
Exact source: 8c0b50728b4aa50e46cfc020c20554637a8a4bfd.
Resource receipt: /data/prod2u/runs/history-isolated-td/td-receipt.json.
Regression receipt: /data/prod2u/runs/history-isolated-test/RESULT.json:113 Python tests and27 RTL compilation/behavior checks passed, with no skipped Python tests. motor_history_shared_tb and motor_history_shared_12_tb are included. This is current regression coverage, not Full acceptance. Physical hardware is NOT_RUN.
Commands, from the exact Linux snapshot:
python3 tools/fw_cli.py test mrdimm --run-root /data/prod2u/runs/history-isolated-test
flock /data/prod2u/cache/heavy.lock python3 tools/fw_cli.py build mrdimm --run-root /data/prod2u/runs/history-isolated-td