Skip to content

build(difftest): pin periodic and fork-fault REF checkpoints - #288

Draft
good-circle wants to merge 4 commits into
masterfrom
draft/fpga-auto-checkpoint
Draft

good-circle wants to merge 4 commits into
masterfrom
draft/fpga-auto-checkpoint

Conversation

@good-circle

@good-circle good-circle commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Update the DiffTest gitlink from 29e80f852 to 1349e6038 for two independent single-core REF checkpoint policies:

  • --take-cpt-interval=N: periodic checkpoints in normal emu and FPGA host, measured in retired instructions; supports K/M/B. Default -1 explicitly disables scheduling.
  • --take-cpt-on-fault: explicit emu-only opt-in; also requires --enable-fork and a DiffTest failure. The awakened child writes one REF checkpoint from the saved pre-fault state before replay.

Remove the old auto-checkpoint options, including the directory override. Output is created automatically under $NOOP_HOME/build/-ref-cpt/ on the first request. The shared comparison hook uses the slow REF path; NEMU retains M-mode skipping and serialization policy.

Dependencies:

Update the gitlink to the final merged DiffTest commit before merging.

Validation on 103: normal Verilator emu and XDMA host builds pass; CLI/default/-1/interval and source-derived scheduling checks pass. Periodic smoke writes valid 10K/15K/20K U-mode checkpoints, skips M-mode at 5K, and reaches GOOD TRAP at the same 22,017 instructions / 78,627 cycles as the disabled control. A separate test-only DUT x10 mismatch reproduces during fork replay; only enabled fault+fork writes one pre-fault checkpoint. No injection code is included. The saved fault checkpoint restores to GOOD TRAP with the final production emulator using only -i, without an external restorer. DiffTest format CI passes on the pinned revision.

Full Linux checkpoint/restore and current-revision real FPGA acceptance remain pending. A Linux regression attempt with the new FPGA firmware stopped at its UART address 0x310b0004, which normal SimMMIO does not map (UART there is 0x40600000); this RTL assertion does not request a fault checkpoint.

Pin DiffTest b548dc0e0 plus periodic REF checkpoint support for the NutShell FPGA host. Use --ref-mode=slow with FAST/FORK-enabled hosts.
@good-circle good-circle changed the title build(fpga): pin DiffTest with periodic REF checkpoint support build(difftest): pin periodic REF checkpoint support Oct 27, 2026
@good-circle good-circle changed the title build(difftest): pin periodic REF checkpoint support build(difftest): pin periodic and fork-fault REF checkpoints Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant