Document the FPGA/Verilog backend design (RustHDL/RHDL emission) - #597
Merged
Conversation
Adds fpga-hdl-backend-decision.md: an exploratory design for emitting hardware from the same wired-graph front-end as the software generator (wired-graph-codegen-decision.md) — generate RHDL, which generates Verilog, so a graph's hot path runs on an FPGA while the same wiring backtests in software. Records: - the survey of the two target crates (rust-hdl, frozen at 0.46; rhdl, the active pre-release rewrite whose #[kernel] subset forbids closures) and why rhdl is the prototyping vehicle with emitted Verilog as the portable shipped interface; - the concept mapping (tick -> valid strobe, Op::State -> registers, active edge -> valid gating, feedback -> registered loop, historical mode -> simulation testbench) and why func! quotation is exactly the bridge rhdl's no-closure kernels need; - a worked example end to end: wiring -> generated RHDL sketch -> idealized Verilog -> simulation parity test, showing the filter closure arriving single-sourced while delta needs a hand-written RTL twin; - the three walls (fixed-width dialect, per-op twins reintroducing simulation-held drift, dependency maturity) and the hand-written de-risk spike that gates any emitter work. Cross-links both ways with wired-graph-codegen-decision.md; sequenced strictly behind the software generator's gates. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SunAG7Q5ErqhaZBVtK5qv8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
next/docs/fpga-hdl-backend-decision.md— an exploratory design for a third backend behind the wired-graph front-end ofwired-graph-codegen-decision.md(#596): traverse the wired graph, emit RHDL, which emits Verilog, so a graph's hot path (feed handler, signal pipeline) runs on an FPGA while the same wiring backtests in software. Cross-links the two docs both ways.Docs-only; no code changes. Status recorded in the doc: exploratory, not scheduled — gated strictly behind the software generator's gates plus a hand-written de-risk spike.
What the doc records
rust-hdl(frozen at 0.46.0, July 2023) vsrhdl(the active pre-release rewrite whose#[kernel]functions compile a Rust subset via its RHIF IR to Verilog — no closures/references). Verdict: prototype on rhdl, ship the emitted Verilog as the toolchain-portable interface.Op::State→ registers, active edge → valid gating,feedback→ registered loop, historical mode → simulation testbench), andfunc!quotation is exactly the bridge rhdl's no-closure kernels need — quoted bodies splice through as#[kernel]fns with captures as literals, and rhdl's frontend becomes the eligibility checker.deltaneeds a hand-written RTL twin.🤖 Generated with Claude Code
https://claude.ai/code/session_01SunAG7Q5ErqhaZBVtK5qv8
Generated by Claude Code