mrdimm-shared-core-review.md 6.5 KB

MRDIMM shared execution candidate review

This is a source/candidate review, not Full or hardware acceptance.

Requirements and migration

The production engine now instantiates one multi-axis motor_axis_core bank. Wide arithmetic is selected by one scanner; only STEP clamp, pending bits, small edge accumulators and metadata copies remain per axis. Startup is lower-only. No door-percent planner/calibration/PID is instantiated. The existing6400 candidate is preserved; common PWM changed afterward and requires a later fresh6400 build before final delivery.

Protocol and atomic commands

Whole-batch validation precedes RAM writes/publication. Preempt prefixes new segments before preserved waiting slots; clear frees slots before capacity validation. Round-robin loading avoids repeatedly selecting the lowest axis. START prefetches paused heads into armed slots before the common release. Out-of-range MOTOR_CONTROL operations are rejected before3-bit truncation. UART and I2C paths exercise this rejection.

Electrical logic, timing and resources

Direct12-axis bank test observes12 clocks per scan with zero active-state RAM stalls,25000 clocks per1000Hz period and12500 clocks high. A full12-axis engine test with real queue RAM initially observed54 clocks START preparation; after the byte-wide staging change it observes58 clocks, with common edges. Yosys structural results at0c607a0 showed20 wide arithmetic operators for both 3 and12 axes; generic cell counts are not device LUT/fit predictions. Physical lower/upper edges are counted independently of motion; held HOME produces completion without forging another physical hit. Reset gets one global event. Event loss during pending saturation is counted. V1.2 CT M8/N9 were already evidenced but missing from the wrapper; ports now match ADC. Limit constraints now name actual vector ports. Unproven Host-I2C, TTL and BMC pads remain unexported; disabled Host-I2C input logic is constant.

Host and GUI

Full352-byte status and64-byte axis records remain schema-derived. SDK/GUI decode and installed-wheel/RTL replay evidence exists. HTH97ada75 travel measurement uses per-operation tags and explicit timeout/cancellation, with 19 targeted tests; it does not silently clear the event ring. Final shared GUI source, layout matrix and BIT-bound EXE remain pending.

Environment and replay

Current TD runner supports the explicit mrdimm-chamber profile, uses its own constraints/closure and emits profile-specific evidence. Tcl source lists come from the closure. Stage deadlines and fail-closed receipt status remain. New package closure/Full/formal/lifecycle tests remain pending. Hardware, COM/JTAG and real actuator tests are NOT_RUN.

Latest short run: /data/prod2u/runs/mrdimm-quick-preflight, commit ab98c243c1,36 compile/behavior entries passed. This historical short run is superseded for changed inputs.

Resource recovery and current verification

TD2f933a9 exposed the complete effective netlist after correcting implicit forward nets and the undriven byte-staging write. Its11739 LUT cells and9206 registers did not fit. The earlier smaller netlist omitted functionality and is not usable area evidence.

The event ring now stores eight16-bit words per record in one BRAM. Count/head publish after the eighth write. Freeze waits for an in-flight overwrite to finish; eight records copy in129 request clocks,135 when overlapping a write in the tested phase. The frozen response remains readable while ring writes resume. Tests cover full-ring overwrite, clear and reset during a write.

Scheduling deadlines use34-bit modulo differences. A u32 duration plus the integer direction setup is less than2^33, so the comparison remains valid across wrap; public event clocks stay64-bit. Tests cover values above2^31, FFFFFFFF plus setup, modulo2^34 wrap, and twelve limit timestamps straddling a low32-bit clock wrap. Pending events are serviced within the measured sub-microsecond scan; one parity bit reconstructs current/previous us, and all axes share the STEP tick timestamp. The loader retains each descriptor until its next load to that axis, avoiding a second descriptor bank.

Status capture copies live axis words into RAM and validates an epoch before publication. Conservative write-intent/busy protection covers STEP, limits, position/counter/control updates and queue changes. A changed epoch causes a complete retry with source locks released. Header/sensor bytes retain the required synchronous read latency; axis words copy at one word per clock. The twelve-axis copy takes864 clocks. An adversarial status producer changing all axes every1000 clocks passes eight capture phases; maximum request6054 clocks. This is simulation evidence, not a formal proof of all input schedules.

Production25MHz integration with RS232/TTL/I2C/BMC traffic now runs X continuously: 15 actual STEP rises were observed and matched status counts. Diagnostic snapshot-aligned-sim at eea4404 passed21 checks. Its TD remains FAIL at8591 LUT cells,7080 registers,11 BRAM. Later pending-state reductions need their own exact-commit result. No MRDIMM BIT/fit/timing or Full acceptance is claimed.

Compact queue and pending records

The queue now stores85 useful execution bits as five18-bit words. The96 waiting slots and3 reserved urgent slots occupy495 words in one512x18 BRAM. Axis is implicit in its address; preempt/clear and reserved fields are consumed during full-batch validation. The external16-byte format is unchanged. Five write clocks finish before atomic queue publication; the loader waits for the ten-clock read response. All99 slots,85 individual bits and concurrent read/write ports are tested. Host urgent descriptors are in the reserved RAM slots; internal HOME/SEEK still use compact constant-field descriptors.

The real12-axis queued START now measures178 preparation clocks and retains common STEP edges. Pending physical-limit and completion records each have one addressed write port; a monitor checks the shared service's one-write cardinality. Diagnostic event-pending-memory-sim at9bded15 passed23 checks. TD at that source still fails: LUT8376, registers5610, BRAM7, DSP1. This frees storage capacity but does not establish a device fit.

An attempted validity-masked limit-history RAM retained all parallel read ports in the netlist and increased LUT without reducing registers. That production change was removed; its reset/stale-history regression remains. An explicit one-hot snapshot word decoder also increased TD area (77 LUT cells in that comparison); the bounded aligned part-select was restored.