Prod2U dual-product operating rules (2026-09-20 recovery round)
This file supersedes every earlier operating rule. The superseded Windows/16-bit/hot-lease
rules are archived at docs/historical/retired-operating-rules/.
docs/architecture/6400-v1-design-lock.md is HISTORICAL, not authority.
Recovery context
- Authoritative input:
cpld-temperature-control-20260908-clean-20260920T074828Z.zip,
sha256 7f039ecc92fe949dc99ea7593aaa2776ed5d244c7741e500f2665875dd55f01b,
2,156,210 bytes, 865 regular files, root cpld-temperature-control-20260908/.
- Recovery restores final functionality and engineering usability. It does not fabricate
lost commit history. Every accepted result needs a current Linux run bound to a full
commit and real artifact hashes.
- Historical receipts are evidence inputs only. A fail, blocked, not-run, placeholder or
historical receipt is never PASS.
Collaboration, Git, execution
- One writer owns each source tree. Never reset, clean, stash, restore, overwrite or delete
unknown changes.
- Implement on
feature/* or fix/*, integrate accepted work to clean dev, leave
master for QA promotion. Do not push without explicit authority.
- Linux development container is the editing, build, test, TD, packaging and GUI authority.
Windows only stores the input ZIP and archives; no Windows/WSL development paths.
- Three active repositories:
cpld-temperature-control (both products' RTL, contracts,
generators, GUI shared source, tooling, packaging), hth-platform (minimal peripheral
abstraction, UART codec, single-connection client, Mock/PTY, install/deploy entry),
engineering-manifests (one default combination pinning CPLD and HTH commits, with simple
sync/restore entry points). A manifest must not reference its own not-yet-created commit.
thermal-control-lab is not rebuilt as a required dependency.
- Keep short
RECOVERY_STATE.md, TASK_PLAN.json, RESULTS.json at repo root. Phase notes
use 改动/现象/根因/修复/验证 so a non-specialist can follow.
Hardware and clocking
- Target
EF2L45BG256B at 25 MHz in one clock domain. No PLL, no derived or gated clock,
no clock used as data. Use enables and counters.
- Two products build and ship separately; no runtime board identification:
- 6400 V1.1: 24 PTC, 4 Front, 4 Rear, no motor.
- MRDIMM V1.2: 4 FAN, 4 logical PTC mapped onto the existing 8 physical PTC, 12 logical
axes, each with independent lower/upper limit semantics.
- FAN and PTC are both 500 Hz, with separate generated parameters.
- After configuration: Reset/Boot/standby default PTC 0 %, FAN 20 % at the connector.
MRDIMM STEP low, queues empty, no automatic limit seek at power-on. Pre-configuration pad
behaviour is asserted only from board-circuit records, never from RTL simulation.
- Do not access COM/JTAG, program hardware, install drivers, or claim physical validation.
HARDWARE, JTAG, COM and real THERMAL PERFORMANCE remain NOT RUN.
Removed functionality (must not reappear in the active closure)
PID/PI, 70 °C target, 76/77 °C and every temperature recovery/protection/admission rule, CT
warm-up, position percent, global snapshot lock, external age/epoch/stale fields, cumulative
position, Tag, sequence numbers, event history, Group/synchronised start, unbounded
SEEK/CONTINUOUS/HOLD, advanced independent motion commands, Host I2C.
Temperature is acquisition only; it never decides FAN/PTC/motor behaviour.
- Keep: the 30-second watchdog, upper/lower limits, and the CRC, parameter validation,
synchronisers, output commit and necessary pulse/direction timing that correct operation
requires. Protocol correctness is not a "safety policy" to delete.
- Host: CON78 RS232 and the external TTL UART, 115200 8N1 default (921600 parameterized).
Active debug telemetry: the production firmware autonomously and periodically (every 500ms)
transmits sync preamble, ASCII status banner
[PROD2U MRDIMM-V1.2 OK]\r\n, and standard
A5 5A 51 00 81 20\r\n beacon frame when idle. RS232/TTL share one UART RX/TX and the
business core; RX uses a minimal source select, TX broadcasts. A reply must not be
truncated by RX idle release; RX may accept new requests during an asynchronous DONE.
Never share one CRC accumulator across RX and TX.
- BMC UART is independent 115200 8N1 and optional; SET is allowed with no BMC.
- Delete the active Host-I2C RTL, ports, constraints, SDK/GUI pages, tests and packaging
dependencies. Keep the CT7428 sensor-only I2C master — it is not Host I2C.
Board mapping
- 6400 TTL (locked): TX = CON30.4 / ball A10, RX = CON30.3 / ball B9, LVCMOS33. Do not
confuse the retired Host I2C CON36 / B12 / C12 with TTL. Check the constraint file for
duplicate balls (circuit correctness, not identity review).
- 6400 Front0..3: CON25.7/B1, CON8.7/C4, CON24.7/B5, CON26.7/A14 — board-inverted.
Rear0..3: CON64.4/P15, CON66.4/N15, CON62.4/M14, CON60.4/P5 — non-inverted.
FAN_BOARD_INVERT_MASK = 8'h0F is the single board inversion point. PTC is active high;
default PTC 0 must never appear as a PTC23-onto-FAN20 misalignment.
- CON78 Host TX/RX = M10/N11; CON77 BMC TX/RX = L10/M9; CT M8/N9.
- MRDIMM uses its own V1.2 ADC/pin inventory; do not copy V1.1 polarity or TTL. X H4/J6,
Y E7/A4, Z B4/A12 direct interfaces and the recorded limits stay as the board evidence
shows. Other axes and TTL/BMC physical mappings come from in-tree board evidence; never
invent a ball. Record logical 12 axes, simulated 12 axes, native-resource 12 axes and how
many are physically brought out as separate facts.
- Known ports are not re-pinned. Unknown physical ports must not be auto-assigned by TD.
Verify the top instantiates all 12 axes; the native-resource baseline must show the
twelve-axis state/queue/execution paths are observable and not optimised down to three.
Production exports only confirmed pads. Unconnected pads must not be passed off as real
outputs, and must not stop the rest of the work.
The single new frame protocol
A5 5A | TYPE:u8 | LENGTH:u8 | PAYLOAD | CRC_LOW | CRC_HIGH; total bytes = LENGTH + 6.
CRC-16/CCITT-FALSE: poly 0x1021, init 0xFFFF, refin/refout false, xorout 0; covers TYPE,
LENGTH and PAYLOAD; not the header. Low byte first. No version, product ID, sequence
number, Tag, historical auto-detection or TLV.
| TYPE |
Meaning |
Payload bytes |
| 01 |
SET_ALL |
6400 = 32, MRDIMM = 68 |
| 02 |
GET_ALL |
0 |
| 81 |
SET_ACK |
0 |
| 82 |
GET_ACK |
0 |
| 42 |
GET_DATA |
6400 = 83, MRDIMM = 63 |
| 50 |
MOTOR_DONE |
4, MRDIMM only |
| C0 |
NACK |
2: original request TYPE, reason |
NACK reason: 01 UNSUPPORTED, 02 BAD_LENGTH, 03 BAD_VALUE, 04 QUEUE_FULL, 05 BUSY. No detail
strings, field indices or extra fault states.
A CRC-correct but unsupported / wrong-length / wrong-value / queue-full request is NACKed,
takes no effect, and does not feed the watchdog. A bad-CRC, half or bad-stop-bit frame is
discarded and recoverable and does not change execution state. Every valid SET/GET is
independently ACKed; GET is an 82 ACK followed by 42 DATA — DATA is not an ACK.
On a wrong LENGTH the declared length is still consumed in full, including CRC; payload
bytes beyond the request RAM go to a sink, never out-of-bounds writes. A5 5A inside a
payload never starts a new frame. A half frame is abandoned only after an inter-byte
timeout and the parser returns to hunting. Adjacent legal frames, fragmentation and
coalescing all work.
SET_ALL 6400
Payload 0..23 = PTC0..23, 24..27 = Front0..3, 28..31 = Rear0..3, all 0..100. 0x14 is 20 %,
0x64 is 100 %. FAN percent is the requested connector duty, not RPM or airflow.
SET_ALL MRDIMM
Payload 0..3 = FAN, 4..7 = logical PTC; 8..67 are twelve 5-byte axis slots, axis i at
8 + 5*i: action:u8, steps:u16LE, half_period_us:u16LE.
action 00 NOTHING, 01 PUSH_DOWN, 02 PUSH_UP, FF STOP_CLEAR. After NOTHING/STOP the four
remaining bytes take no part in the action; the SDK writes 0. PUSH steps 1..65535; half
period non-zero; the CPLD times whole microseconds and never divides.
speed_hz = 500000 / half_period_us; 65535 us is about 7.63 Hz. No negative or slower
encoding is required and the field is not widened. Every axis is variable-speed; fixed
XY/Z speeds are not restored. Being able to express 1..65535 us does not prove the plant
supports the whole range: the implementation must produce twelve-axis real service-budget
and drive-timing evidence and reach the executable range it actually has. If a higher
minimum half period is real, it is stated in the same generating contract and SDK and
rejected with BAD_VALUE — never silently slowed down, never a missed edge, and never an
evidence-free speed cap traded for fit.
GET_DATA 6400: 83 bytes
0..23 PTC; 24..27 Front; 28..31 Rear; 32..55 BMC24 integer temperature; 56..82 CT27 integer
temperature.
GET_DATA MRDIMM: 63 bytes
0..3 FAN; 4..7 logical PTC; 8..31 BMC24; 32..58 CT27; 59..60 lower-limit mask u16LE;
61..62 upper-limit mask u16LE. Low 12 bits of a mask = Axis0..11; high 4 bits are zero.
GET percent is the currently effective output; after a timeout it must return the default
and never a stale bank. Requested/Applied double semantics are deleted. Motor running /
remaining / queue depth, position, tag, age, epoch and watchdog remaining are not output.
MOTOR_DONE
Payload axis:u8, reason:u8, steps_done:u16LE. reason 00 steps complete, 01 lower limit,
02 upper limit, 03 both limits active. steps_done counts final output STEP rising edges, not
planned steps and not cumulative position. 65535 steps reported as FF FF must not be
mistaken for an invalid temperature.
Self-contained golden entry points
GET request A5 5A 02 00 6D 7B; SET_ACK A5 5A 81 00 A6 35; GET_ACK A5 5A 82 00 F5 60;
SET queue-full NACK A5 5A C0 02 01 04 B1 2A; Axis4 upper-limit complete 4387 steps
A5 5A 50 04 04 02 23 11 B6 02; Axis4 both-limits 0 steps A5 5A 50 04 04 03 00 00 23 64.
Generate every SET/GET/STOP vector; cross-check with an independent CRC implementation.
An encoder decoding its own output is not end-to-end evidence.
UART reliability, transaction order, CRC
Before first implementation, run five short independent review perspectives:
requirements/old rules, protocol/transactions, board/storage, execution/recovery,
tooling/packaging. Fix findings directly; do not build a manual approval gate.
Host: at most one outstanding ordinary transaction — SET waits for ACK/NACK, GET waits
for ACK + a complete DATA. An asynchronous DONE is not a second host-initiated request.
The SDK must not flush the input buffer before every send, or it will drop DONEs.
Announce, issue, reserve and retire semantics: only one DONE slot per axis may be waiting
to be sent; releases of the queue head happen only after the final stop bit of that axis's
DONE. Unified TX rotates normal reply groups and DONEs; GET_ACK + GET_DATA is one
contiguous group with no DONE inserted and no started frame truncated. GET must not
starve DONE forever. A legal SET's SET_ACK must reach the wire before that new segment's
DONE; an older segment's DONE may finish first. Achieve this with the existing
transaction publication/send scheduling, not an on-wire sequence number.
RX parses a byte stream: one read may be a half frame, several frames, or arbitrary
fragments. Keep one receiver and dispatch by TYPE; RX and TX may overlap. Default 512 B RX
FIFO and 128 B request staging, preferring BRAM, reusing existing entry points; the depth
may shrink only with evidence and without weakening the agreed load. No unbounded command
queue. Physical overflow or a bad frame never executes a partial request and keeps a
bounded recovery path.
Every valid/data holds until a real ready handshake. Address, CRC context, frame completion
and the UART final stop bit are separate definitions; "handed to the UART" is not "on the
wire". RX and TX CRC state are independent; a shared lookup/combinational datapath is
allowed, but a single accumulator switched by UART single-byte busy is not. Verify the real
production top's composition rather than applying a named patch.
Atomic SET, STOP_CLEAR, watchdog
SET_ACCEPT is the instant at which all validation and queue reservation are complete and
the transaction is irrevocably admitted — not the frame header, not merely a correct CRC.
It reloads the watchdog and starts implementing that SET. It must not later return a
NACK for an ordinary BUSY or capacity reason. STOP executes immediately at that instant
without waiting for the motion queue tail or a PWM boundary; thermal output applies at the
next complete 500 Hz period at the latest; SET_ACK waits until the thermal output and queue
publication have actually completed. This defines immediate STOP and all-or-nothing SET
together.
- A new SET may still be accepted after the previous watchdog already expired. Feeding at
admission must never re-expose the old configuration; default-output validity is cleared
only when that new output bank is genuinely applied. If the watchdog and SET_ACCEPT or a
legal GET_ACCEPT coincide, the valid admission wins.
- Final thermal A/B banks may stay. Prefer deleting the duplicated manual intermediate bank
and preparing the final inactive output directly from the single RX RAM after validation.
Never modify output while a packet is being received. The Bitmap source is fixed for a
whole PWM period and must not change midway through a scan. The ACK must correspond to
settings already in use.
- STOP_CLEAR on selected axes: STEP low immediately, cancel the current segment, clear that
axis's queue metadata, cancel that axis's not-yet-transmitted DONE. Other axes are
untouched. If an old DONE for that axis is already partially sent, finish it, then send this
SET_ACK; after that ACK the cancelled old DONE must not be sent. A stale TX completion
callback must not advance a cleared queue or consume new capacity. No RAM erase needed;
clearing metadata is enough. An SDK stop frame contains only STOP/NOTHING, no new PUSH, and
preserves current thermal settings so a queue-full other axis cannot reject the stop.
GET_ACCEPT: a complete legal GET with a reply position is admitted and reloads the
watchdog. It does not restore old output or queues, does not clear the default-output
valid flag, and is not a prerequisite for unlocking SET. ACK means admitted, not that 51
channels were sampled synchronously.
- Power-on output is default. The watchdog may start counting at the first successful
SET/GET and times a full 30 seconds. Bad requests, NACKs and DONEs do not feed it. Use the
existing timebase; do not add multiple leases.
- Watchdog expiry: stop every axis immediately, invalidate all current segments, queues and
unsent DONEs, and return thermal output to PTC 0 / FAN 20 within the next complete PWM
period at the latest. Do not reset the UART, frame parser, receive FIFO or TX to "unlock".
An already-started reply frame finishes and the link returns to an acceptable state; an old
DONE's completion callback must not restart work. Pre-expiry thermal settings are
permanently invalid; only a genuinely applied new SET clears the default.
GET continues to feed the watchdog while the default value stays.
- After expiry, the first SET with the same values and a SET with different values both
recover directly — no prior GET, reset, serial reopen or special command.
Twelve-axis minimal actuator and RAM organisation
- Each axis has exactly 32 outstanding slots, including the segment currently running and
the finished head segment waiting for its DONE to finish transmitting. "32 waiting + a
separate running slot" is not this contract. Storage: 12 axes x 32 slots x 8 naturally
aligned bytes = 3072 bytes. Use 8-byte natural alignment internally rather than widening
shifts/MUXes to save a few bits.
- Physical RAM is shared; each axis has independent head/tail/count. Clearing an axis edits
pointers/valid only and does not erase entries. A whole SET publishes atomically; the
executor cannot read unpublished records.
- Only finite-step segments: one direction + u16 steps + u16 half period. Delete the old
event ring, global snapshot copy, cumulative position/total/hit counts, Tag, urgent queue,
independent queue read/write external commands and the complex calibration/percent
planner. The Host composes finite segments for opening/curves/total travel; the unbounded
"run to the limit" mode is not restored in this round.
- Limits are two-stage synchronised and normalised to the V1.2 active level. While moving
down only the lower limit blocks new STEP rising edges; while moving up only the upper.
Both active gives reason 03. A reversed direction may leave a single triggered limit. Do
not lock the whole board and do not auto-clear other segments. After a segment ends, wait
for its DONE to be sent before taking the next; a further segment in the same blocked
direction returns the limit with 0 pulses, a reversed one runs.
- A segment that already ended on a limit must not restart because the switch released or
chattered. With no task, limits only show up in GET and produce no DONE without a matching
task.
- Count final STEP pin logic rising edges. A normally completed segment must hold its last
high level for the rest of the normal half period before ending; limit, STOP and watchdog
may drive low immediately — that is an explicit abort and counting still follows edges
actually emitted. DIR setup/hold timing follows real drive evidence and the reliable
existing implementation; it is not a thermal protection to delete.
- One shared scan/add-compare/synchronous-RAM update is allowed, but the service budget must
be computed including read latency, write-back, pointers, segment load, simultaneous
expiry and TX contention. Fast STEP/DIR hold, limit cut-off and a little live state may use
DFFs. Use non-LUT resources rather than forcing a complex arbitration on shared RAM. New
read ports use a valid/data handshake; do not require the old rotating wide-register
every-clock-available semantics.
- No cross-axis synchronised start and no seamless speed-profile promise; waiting for DONE
between segments on one axis is a deliberate simplification. Twelve axes may be active
during the same interval; do not collapse to one axis at a time to save LUT.
Temperature: the CPLD converts to a single integer °C byte
- Both products: BMC24 and CT27, one uint8 per channel, 00..FE = 0..254 °C, FF = invalid.
Fractions are discarded, not rounded. Negative, >=255 °C, failed sampling, never-sampled
and untrusted sources return FF. Test the negative/invalid case before taking the integer,
so -0.x never becomes a valid 0 and truncating low 8 bits never turns 256 into 0. This
encoding never affects any output.
- The CPLD does the simple source-to-integer-°C arithmetic; the Host no longer shifts or
scales raw sensor registers, and the SDK only does
None if b == 0xFF else b. Do not take
the low 8 bits of a 16-bit raw value, do not emit two temperature bytes, and do not treat
FF00 as invalid.
- BMC sends exactly the ASCII command
ipmitool raw 0x36 0x6c 0xdf 0xdd 0x00 0x03 plus the
existing line terminator; no terminal prompt; the arguments are not CPLD binary commands.
BMC UART is 115200. The current poll handshake can drop characters: check the 43-byte
command byte by byte against the real UART TX, holding valid/data until accepted and
waiting properly for the final stop bit.
- A reply has 48 hex tokens total, 24 temperature pairs, usually three lines of 16 tokens.
Accumulate across lines for one query; recognise and skip a complete echo and the prompt;
do not extract hex characters arbitrarily from the string. A truncated round must not be
concatenated with the next one, a timeout must end the round boundedly, and a failed result
finally writes FF instead of holding the old successful value indefinitely.
- In the current user sample each pair's first byte is integer °C and the second is a
fractional percentage: 28 32 -> 28, 2A 4B -> 2A, 2B 19 -> 2B, FF FF -> FF. The second byte
must still be fully consumed to keep alignment.
- CT7428 keeps the sensor I2C only. Reuse the existing 27-channel scan, address map and
master; a failure writes FF and the scan continues; a request counts as committed only
when really valid && ready, and a late response must never land on the next channel.
contracts/ct7428-format.json keeps the historical algorithm raw >> 3 then 1/16 °C per
unit; if the register packing read out matches that basis, the positive-integer candidate
is raw >> 7. This is a testable engineering starting point, not a verified hardware fact.
Check the in-tree format/driver/public vendor material with 0/25/40/70/100 °C plus
fractional, negative and fault vectors; wrong 0.625/0.0625 or local/remote channel formats
must not be used blindly. Software tests must verify the real acquired raw combination
through to the final byte, not just a function that receives "already Celsius". State
plainly that real hardware tests were not executed.
- Temperature results prefer 8-bit addressed RAM. GET reads the most recent values in order
and allows different channels at different instants; no age/epoch/global snapshot lock.
Each complete temperature byte is held until TX accepts it; same-address write/read uses a
verified old/new-value semantic or a one-cycle delay and never produces X or a mixed
channel. Internal transaction timeouts/validity do not resurrect the deleted external
stale fields.
LUT first, but never an old low-fit report masquerading as a pass
- LUT strictly below the real device limit; if TD reports a capacity of 4480, LUT < 4480.
No 90 %/80 % margin is required and a fitting 4479 is not optimised forever. Registers,
each Slice subtype, BRAM/ERAM type, DSP and IO must not exceed physical capacity; margin
percentage is unconstrained. Native synthesis + place + route + 25 MHz setup/hold +
successful bitgen producing a real new BIT is required.
- Keep the agreed twelve-axis logic, 32 slots per axis, dual UART access, CT acquisition and
BMC logic; do not disable nine axes, shrink the queue or close bound interfaces to fake an
area pass. Distinguish genuinely unconnected board ports from parameters that delete
functionality to steal fit. 6400 and MRDIMM each have their own source, parameter,
constraint, tool and resource identity.
- Delete responsibilities first: old events/position/64-bit statistics/temperature
protection/Host I2C/wide snapshot, then consider arithmetic reuse. Prefer synchronous ERAM,
naturally aligned queues, 8-bit temperature, slow read ports with valid, and a little
real-time DFF. Probe the existing 32K/128K/256K templates natively at small scale first;
report real primitives and port latency, not just a changed
ram_style.
- Do not force all modules to share one RAM, do not add AXI/APB/crossbar or a soft CPU, and do
not restore a general compute service. Test each candidate locally for behaviour first,
then measure native area, and keep only correct and area-beneficial options. Compare a few
well-founded candidates, not hundreds of synthesis option permutations.
- Record LUT, carry/other logic and packed-slice measures per hierarchy level and keep the
original report wording; do not select a smaller field as the only total. The historical
5204 belongs to the old complex design and is not a fact about this rebuild. If it still
exceeds the limit, keep optimising the data path with the same functionality and report the
real gap and hotspots; do not present "source complete, no BIT" as final delivery.
Software verification
Design the tests from independent expected values driving real production modules; never
generate the expected value by reading the DUT's own output.
Fast functional and native candidates
- Both product generators: with
generated/ deleted the raw contracts rebuild it;
repeated generation is byte-identical; the new 83/63-byte layouts and every OFFSET are
verified item by item independently.
- UART full-frame and real bit-level: GET/SET/ACK/NACK, RX and TX overlapping, RS232 and TTL
run separately, fixed bit-period error/jitter, bad CRC/stop bit/half frame/wrong length
including an embedded A5 5A, recovery to a later legal frame; no phantom characters and no
duplicate ACKs.
- 6400 main regression A: Reset -> SET A -> complete ACK -> 30 s expiry -> the identical
SET A recovers directly. B: after expiry a directly different SET B. C: after expiry GET
still returns defaults, then SET B. D: many GETs plus repeated expiry/SET for 100 rounds.
No prior Reset, special unlock or forced internal state.
- Each round verifies request admission, the final bank, the full-period duty of all 24 PTC
and 8 FAN at the connector, the complete ACK and the next transaction; PTC23/Front0,
phase 99/0, bank boundaries, GET/SET adjacent to and in the same cycle as timeout.
Accelerated timing for long regressions, plus a real-time check of the 30 s boundary.
- GET with different legal percentages and temperature sentinels per channel, real
synchronous RAM latency, concurrent acquisition around GET, absent BMC / FF failures,
valid 0 °C = 00, correct data CRC, and a usable SET afterwards.
- BMC real poll + UART sending the whole command, receiving three lines of 48 tokens,
echo/prompt/truncation/garbage/timeout and recovery on the next round; CT full 27
channels, ready already high, NACK, timeout, late response, adjacent channel, integer
conversion.
- MRDIMM 12-axis shared operation: the 32nd/33rd queue entry, pointer wrap, whole-frame
atomic rejection, 00 with no side effect, 65535 steps, every speed boundary; real final
STEP count, the last normal high level, direction setup, limits taking effect immediately,
separate reasons for the two limits, reversed departure, and no revival of a segment that
ended on a limit.
- STOP at idle / queued / running / DONE pending / from the DONE's first start bit to its
last stop bit; unstarted results cancelled, a started one finished, no old result after
STOP_ACK; race between a new SET on the same axis and the old TX completion callback;
other axes continue.
- The watchdog clears all 12 axes and unsent DONEs, does not truncate an already-started
frame, does not restart old segments; GET feeds it but does not revive old thermal values;
thermal output and motors active together behave correctly.
- SDK single RX per board, PTY connected to production RTL or the real codec, concurrent
user calls serialised, an unknown PUSH not retried, stop cancellation, temperature as
int/None, Linux GUI real launch/keypress/hex parsing.
When a product passes the affected short tests, immediately run a fresh TD and build its GUI,
exporting the absolute paths of the quick BIT, GUI and package. State clearly that the quick
BIT awaits full software verification and keep working; do not stop at the quick stage.
Full software verification
- Every applicable Unit, Lint, real-top Icarus/Verilator/Cocotb, Host PTY, install and restart
test for the new targets; a shared change is regressed on whichever product it affects.
Retired legacy is no longer a current gate.
- Formal proves the queue / atomic admission / counting / STOP cut-off / limits / timeout
recovery / CRC handshake / synchronous RAM source, not merely its own reference model.
Use cover to confirm reachability and keep scopes small around fixed functionality.
- UART fragmentation/coalescing/noise fuzz, model versus production cross-check, random
motor/limit/timeout/GET soak, and deliberately injected defects (CRC routing, old-value
revival, 23/24 misalignment, temperature FF, wrong address) to prove the tests detect them.
- Real functional Linux tool smoke, not just
--version: clean HTH install, GUI, container
checkpoint restore, remote job surviving disconnect with idempotent result retrieval, and
a fresh package replay.
- A production RTL change reruns the affected tests and TD; a documentation/packaging
metadata change reruns only its impact scope. Do not discard the same production content's
evidence because a commit string changed; mark content-matched reuse explicitly.
Real programming/JTAG/real motor thermal output is not a completion prerequisite, but a
missing software module, a TD run with no BIT, a GUI that cannot start, or a package that
cannot be restored is not "hardware NOT_RUN".
Tool recovery and loop avoidance
- Probe the actual Linux container, running/stopped containers, images, mounts and caches
first. Install missing iverilog/verilator/yosys/cocotb or restore them from an existing
offline cache. For TD, check
tools/td2026, tools/tool_env.py, /data/anlogic, existing
install trees, licenses and images. A failed which does not mean a tool is absent.
- Commercial licenses cannot be invented and must not be bypassed. If an original install,
medium or credential is genuinely lost after every path is exhausted, list exactly the
missing commercial input, keep doing all executable implementation/tests/source recovery,
and neither claim completion nor retry downloads forever.
- Reuse
remote_job.py and remote_transfer.py, fixing path/ROOT/Git assumptions. A job is
de-duplicated by source tree, parameters, tools and command; run it in the background with
systemd-run/tmux/nohup; after an SSH drop check the original job instead of starting a
second TD. Pull logs back to the Linux development container.
- Network: at most five retries with 2/5/10/20/30 s backoff, chunked SHA,
.partial then an
atomic rename, resume instead of restarting. Two identical failures with no new evidence
require a minimal reproduction or a different method; if a third evidence-backed method
also fails, record the local missing input and continue independent work. Never skip core
acceptance and claim a pass.
- Formal reconnaissance is limited to 90–120 s; a formal run is 600 s per target by default,
the whole process group is killed on timeout, and counterexamples/UNKNOWN are kept. A busy
CPU is not progress. TD stages get bounded deadlines based on their reasonable historical
duration; a single short timeout must not kill place/route, and polling for hours with no
output is also wrong. Stop area exploration once function, capacity and timing pass; do not
chase an arbitrary margin.
Packaging
Maintain only the existing tools/package_prod2u.py core plus a thin wrapper; do not create
another packager with the same purpose. Clean out its old mandatory GUI EXE, old
schema/legacy fallback, first-bitstream search and hard dependency on a sibling HTH
directory. Every artifact is specified by the actual target, sources, contract, constraints
and tool receipt; never pick a BIT by globbing a directory.
- Base ZIP: genuinely low-frequency common tools, vendor adaptation, stable raw contracts and
dependencies.
base_id is determined by stable content and does not change with a product
commit for no reason; the same ID with different content must not be overwritten.
- Current ZIP: both products' complete current source plus generated input/output, ADC/SDC/TD
PRJ/Tcl, test runners, fully installable HTH/GUI source, the manifest combination, and the
necessary current resource/timing/pin originals. Only necessary current reports; no
meaningless large caches. The user uploads only the ZIP itself. If the Base is absent, give
the exact ID and search existing libraries/archives automatically; do not conclude the
source is permanently lost.
- Delivery ZIP: each product separately with its BIT, Linux GUI, SDK wheel/install
instructions, frame protocol, golden vectors, and real TD/pin/resource/timing receipts. A
firmware without a BIT or with failing timing must not be labelled successful; Quick and
Final must never be conflated.
recovery output (private, not a fourth analysis layer):
Prod2U-Workspace-Recovery-<content_id>.zip. It must contain the three repositories'
complete readable source, a self-contained non-incremental git bundle --all per repo,
real commit/tree/refs listings, the list of uncommitted-but-preserved work plus new files,
the complete original input or its in-package copy, original vendor/board
non-regenerable material actually held locally, the exact state/offline backup path of
large private dependencies such as tool images/licenses, and Linux restore and test
scripts. Business source and board-essential material may not be an external pointer while
the package is called self-contained.
- The recovery package must not depend on a past Base, the old Git server, sibling
directories or external scattered JSON. Legally obtained vendor install material is backed
up separately in private offline storage and verified; if it is not embedded, state
clearly "source independently recoverable, vendor tools packaged separately" and never
confuse source self-containment with a fully offline build.
- Normal Base/Current exclude credentials and large vendor binaries for analysis; the
recovery private credential backup is listed explicitly per the user's intent and is not
mixed into public analysis packages. Do not block engineering on a new security scan; the
real checks are recovery file coverage, hashes and readability.
- Deterministic ZIP: POSIX paths, sorted, fixed timestamps, no duplicates or escaping paths,
complete SHA; README, self-check, deletion/overwrite lists are also verified. The hash
dependency must be acyclic; the ZIP does not need to contain its own final SHA. Base/Current
overwrite must be explicit and deletions must be applied, so an overlay cannot resurrect
the old Host I2C or temperature protection.
- Produce a reviewable Current and Recovery checkpoint at every quick stage, phase completion,
final and forced partial failure. A checkpoint never overwrites the only usable backup.
- Run a disaster-recovery drill: in a fresh empty directory, unpack only one Recovery ZIP
without touching the old Git or workspace, restore the three repos, verify
git bundle
verify, HEAD/tree correspondence and the state manifest, run both product generators and
short tests, install HTH and start the GUI. If a dirty checkpoint is preserved, restore its
differences from the manifest without mislabelling it clean. A failed drill is fixed in the
packager, not by asking the user to supply missing files.
- Keep at least two genuinely independent persistent backup locations: an archive location
outside the development host's mapped directories, plus an independent LAN host or a
Windows read/write-only archive. Two paths on the same disk or container layer are not
independent copies. Verify the remote real size and SHA receipt through the existing
SSH/SFTP or shared export; if unreachable, keep local old and new backups and report the
copy as not made rather than claiming two exist. Windows only stores ZIPs and runs no tests
or analysis. Keep the newest two verified-recoverable versions and milestone versions; do
not casually delete the old unique input.
Phase plan
- A: preserve the ZIP, create the new Git/directories, archive the old active rules,
restore the development tools. Rebuild HTH/manifest minimally if missing. Produce a first
recoverable checkpoint soon.
- B: freeze the single 8-bit contract, temperature and mapping; update the
generator/registry/closure and synchronise every old enumeration test; do not stay
compatible with the old wire protocol. Old protocol files are kept only in a historical
directory; active checks are scoped to the production closure and must not misread the
words "PID" etc. appearing in documentary review.
- C: shared UART, dual CRC context, simplified output / 30-second watchdog / 83-byte GET;
6400 finishes the A–D recovery regression, TTL, the temperature chain and a fresh TD, then
a Quick delivery.
- D: MRDIMM twelve-axis finite segments / 32 slots / 4-byte DONE / 63-byte GET; delete the
old large state/event machinery, complete memory and scheduling measurements, fit and a new
BIT, independent Quick delivery.
- E: synchronise the HTH peripheral interface, Linux GUI, deployment and functional
smoke; keep packaging continuous rather than leaving it to the end.
- F: all applicable software verification, Final for both products, the full recovery
drill and the off-host write verification.
Final report requirements
The final report must separate: recovery input, final requirements, implemented software,
actual builds, and deployment/hardware. Give a path and evidence for every item; "recovered"
alone is not a result. Include at least:
- the three repositories' real new HEAD/tree alongside the original ZIP SHA, stating clearly
that the old history was not fabricated; the recovered capability matrix.
- 6400 direct same-value/different-value SET after watchdog expiry, GET not reviving old
values, production top / connector PWM / complete ACK results; the real TTL ADC mapping.
- MRDIMM twelve-axis 32-slot functionality, real LUT/per-resource usage and capacity,
place/route/setup/hold, BIT SHA; resources below target are not "complete".
- GUI run package, SDK wheel, deployment paths, Mock/PTY/available read-only BMC evidence;
real CPLD control and programming remain NOT RUN.
- Base/Current/two Delivery/self-contained Recovery Linux absolute paths, sizes and SHA, plus
the actual archive copy receipt; the user must not need to upload scattered files.
- This round's commit/release description: what changed, why, how it was verified, and the
exact items not executed.