Skip to content

About

Formally verified deep-embedded Lean 4 HDL with Guarded Atomic Rules, first-class Vec/BRAM/Hierarchy, and CIRCT/FIRRTL backend

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

lambda-hdl

A hardware description language embedded in Lean 4, with an executable reference semantics, machine-checked proofs about some of its compiler passes, and backends to SystemVerilog, FIRRTL, C++ simulation and SMT-LIB2.

It is a research prototype. The sections below say what is proved, what is only checked, and what is neither, so you can decide how much to trust a given result.

What it is

  • Deep embedding. Designs are Lean values: HExpr (typed expressions), HRule (guarded atomic rules, Bluespec/Koika style), HModule, HDesign (hierarchy). A builder monad (ModuleM, RuleM) is the usual way to write them. There is no MetaM scraping of Lean terms.
  • Reference semantics. stepModule / runDesign in Core/Module.lean define one clock cycle. Everything else (proofs, the differential tests, the Lean-side regressions) is relative to it.
  • Backends. Direct SystemVerilog, FIRRTL 4 (compiled with CIRCT firtool), a C++17 simulator with arbitrary-width integers, SMT-LIB2 (BMC, k-induction, CHC for Z3 Spacer, trace-equivalence checks), VCD, and SDC/XDC constraints.
  • Library. Skid buffers, guarded FIFOs, a round-robin arbiter, a Manchester serializer, a streaming fold checker, a dual-clock Gray-code FIFO, AXI4 / AXI4-Lite / AXI4-Stream blocks, UART TX, SPI master, a direct-mapped write-through cache, Xilinx UltraScale+ primitive wrappers (URAM288, RAMB36E2, DSP48E2, an HBM AXI port).

Trust model

The emitters are not proved correct. A Lean proof about a design is a proof about the Lean semantics; whether the emitted Verilog behaves the same is established by testing and by equivalence checking between artifacts, not by proof. Concretely:

Claim How it is established Limits
A compiler pass preserves behaviour Lean theorem, kernel-checked Only for the fragment in the theorem's hypotheses (see below)
Emitted SV / FIRRTL / C++ / SMT2 match the Lean semantics make difftest: every backend is simulated cycle by cycle against stepModule on the shipped designs, targeted cases and seeded random designs; make regress pins each fixed backend bug Testing, not proof
Direct SV ≡ firtool SV make lec: unbounded sequential equivalence (Yosys miter → AIGER → ABC dprove/pdr), reset forced in cycle 0 then all inputs free; the dual-clock FIFO with clocks as free inputs All-zero power-up state assumed; one design is checked with equiv_induct instead
Synthesized netlist ≡ RTL make pnr / make bitstream (ECP5) and make asic (sky130): the same unbounded check against the cell models Uses Yosys's cell models (ECP5) or Liberty functions (sky130); sky130 is additionally simulated with the real cell models
A design satisfies its assertions make bmc: Z3 BMC, k-induction, Spacer, a cover per property proof, mutants that must fail, and a check that reports which induction proofs are one-step Properties are only as strong as written; AXI properties assume well-behaved slaves and bounded outstanding counts

The emitted direct SystemVerilog has also been run on an FPGA (AWS F2, VU47P). All 77 single-clock difftest cases matched the Lean trace on every cycle; see scripts/hw/README.md.

Every check is fail-closed: a missing file, a tool error, an unexpected solver answer, or a mutant that is not caught makes the target fail.

What is proved in Lean

For dense multiplexer tables, HExpr.indexedMux sel entry builds a binary tree with one level per selector bit. The entry function receives an address of type BitVec w, where w is the selector width. HExpr.eval_indexedMux proves that the circuit returns the entry at the evaluated address for every environment. HExpr.mux4 uses this construction.

make audit checks every listed theorem depends only on propext, Classical.choice and Quot.sound (no sorry, no native_decide, no bv_decide), and scans all Lean sources for those tactics (scripts/trust_scan.py). The main results and their scope:

  • eval_opt, stepModule_opt_eq, runModule_opt_eq: the expression optimizer preserves semantics of one module (its children are stepped unoptimized).
  • stepModule_opt_hier_eq, runDesign_opt_eq, traceDesign_opt_eq: HDesign.opt (optimize every module) preserves stepDesign, runDesign and traceDesign. No hypotheses.
  • stepModule_dce_eq: dead-wire elimination preserves outputs and next state (registers, memories and latches, child states), submodules included. Assumes TopSorted m.wires; checkModule_topSorted derives that from Check.checkModule m … = .ok () (the checker's first step is the Boolean topSortedB, proved equivalent by topSortedB_iff).
  • stepModule_cseModule_eq: the whole-module cseModule pass (one hoisting table shared by all wires and outputs) preserves outputs and next state, submodules and memories included. Assumes TopSorted m.wires and that no wire name, and no signal read by a wire, output, memory port, submodule input or rule, starts with the reserved _cse_ prefix. stepModule_cseModule_eq_of_safeB takes all of these as one Boolean check cseModuleSafeB m. Also cseExpr_sound, cseWireDecl_sound, cseOutList_sound, stepModule_cseOutputs_eq for expressions, single wires and output lists.
  • stepModule_congr: generic lemma used by the DCE and CSE proofs: a module whose wires and outputs are rewritten steps identically if one wire sweep maps agreeing environments to agreeing environments on the signals memories, submodule inputs and rules read.
  • stepModule_eq_fast, stepModuleDomain_eq_fast: the compiled simulator (stepModuleFast, used for all executable code through @[csimp]) equals stepModule / stepModuleDomain for every module, state and input. No hypotheses. It stops the combinational settling at the first round that changes no value a round writes (combSlots), which is exact because a round leaves every other slot unchanged (combRoundF_agreeOff, settleRounds_eq); it also keeps environments in hash maps (FEnv.view_set, cacheOn_eq). This does not prove that settling reaches the combinational fixpoint within combPortCount m rounds; it only makes the existing fixed-count semantics cheap to run. extractLsb'_eq_fast does the same for bit slices.
  • autoSchedule_conflict_mutex, stepModule_autoSchedule_perm_eq: the scheduler never fires two rules that write the same register, and the order of the rules it keeps does not matter.
  • autoSchedule_fires_iff: the j-th scheduled rule has m's j-th rule's name and updates, and fires iff that rule's guard holds and no earlier scheduled rule that classifyPair marks .C with it fires (a rule is only suppressed by a firing higher-priority conflict).
  • autoSchedule_oraat, stepModule_autoSchedule_oraat: if the rules that fire in a cycle can be listed in an order where no rule reads (by name) a register an earlier one writes, the scheduled module's next registers equal executing exactly those rules one at a time in that order, each reading registers from its predecessor's state and every other signal (wires included) from the cycle's combinational environment, and each enabled at its turn. The module version also assumes that environment agrees with the current registers on register names. Not proved: that such an order exists (it need not), or any stronger maximality.
  • autoPipe*_retiming_sound: AutoPipeline delay chains (free-running and elastic) compute the right values, given hypotheses about how the stage registers shift; those hypotheses are not yet derived from the generated module.
  • stepModule_output_support, stepModule_reg_support, noninterference (Proofs/Support.lean): outputSupport m o and regSupport m r compute the input and register slots an output or a register's next value depends on, and two runs that agree on that set give the same output / next value. isolatedB m outs R I is a Boolean check that outputs outs and registers R read only R and the inputs I; noninterference turns it into "same R registers and outs outputs on every cycle", whatever the other registers and inputs do. Flat modules only (no memories, no submodules); the analysis is per signal, not per bit. Examples/SupportExample.lean proves a two-lane design's lane 0 independent of lane 1 by decide. Check.combOutputSupport, the checker's hierarchical analysis, is not proved; the example cross-checks it against outputSupport.
  • manchesterTx_emits, foldChecker_acc (Protocols/Streaming.lean), for any width: manchesterTx w is a shift-register serializer with a Manchester encoder. After load with word = x, its tx output on the next 2 * w cycles is manchester (bitsLSB x), one half-bit per cycle, LSB first, IEEE 802.3 polarity. foldChecker w aw a0 stepE folds a step circuit over the words presented with valid. After a clear, its accumulator is List.foldl f a0 over those words and ok compares it with expected. The circuit is tied to the Lean function f by a StepImpl hypothesis. Instances (8-bit serializer, 16-bit sum and multiply-XOR hash) are in Examples/StreamingExamples.lean and in the difftest corpus.
  • Smaller facts: Gray-code round trips and one-bit adjacency, AXI ID widening round trips, EHR one-rule-at-a-time soundness, rule commutation for disjoint writes, the round-robin arbiter's grant property, typed-submodule port checks.

What the Lean semantics does not model: the reset input (a run starts from the declared reset values, but asserting reset during a run has no effect in stepModule), blackbox behaviour (outputs read as zero), and multiple clocks in the pass theorems (stepModuleDomain exists, but no pass theorem is stated over it). Proofs about the cache and the dual-clock FIFO are SMT k-induction proofs over the emitted SMT2, not Lean theorems.

Kernel-checked bit-vector tactics

bv_bits, bv_bits_all and bv_cases x (LambdaHDL/Tactics/BitBlast.lean) prove bit-vector goals without bv_decide, so the proofs pass the audit's allowlist: bv_bits splits an equation of literal width into one goal per bit, bv_bits_all also uses equations in the hypotheses, and bv_cases x enumerates a small BitVec n. make audit also lists every use of bv_decide, native_decide, ofReduceBool, sorry and axiom in the sources (currently none). See docs/TACTICS.md for when to use which.

Running it

Everything runs inside the Nix dev shell.

nix develop
make all          # build, audit, generate, firtool, C++ sim, Verilator, Z3, LEC, arcilator,
                  # backend regressions, difftest, Xilinx primitive checks
make pnr          # ECP5 synthesis, gate-level LEC, nextpnr place & route
make bitstream    # ULX3S (ECP5-85F) bitstream for the demo SoC
make ai_loop      # verified PPA sweep: candidates must pass LEC against the Lean reference
make yosys        # Xilinx 7-series synthesis reports
make tt           # Tiny Tapeout project tree in tt/ (cocotb test against the Lean trace)
nix develop .#asic --command make asic   # sky130 hardening with LibreLane: GDS, DRC, LVS, STA
DIFFTEST_N=300 make difftest             # deeper random differential run

Local evidence cockpit

Run lambda-hdl ui from the project checkout to open an offline HTML report. It reads build/asic/signoff.rpt, the LibreLane KLayout render, post-route equivalence logs, and studies under gen/explore/run-*. Select a plotted point to locate its candidate in the table. A routed study links to its layout inspector.

lambda-hdl ui --no-open
lambda-hdl ui --explore-dir path/to/run-directory
lambda-hdl ui --check audit --check bmc --check lec

The default command only reads artifacts and writes build/cockpit/index.html. Each optional --check runs that Make target, records its exit status, timestamp and log, and propagates failure. Use the ASIC shell for --check asic, which runs the existing ASIC build. The ASIC CI artifact includes the cockpit and its physical evidence. Missing records show as unrecorded. An individual zero-violation count establishes only that check's reported result. See the tapeout scorecard.

Explore hardware with the CLI

From a LambdaHDL checkout, enter the Nix dev shell. It puts lambda-hdl, Lean and Yosys on your path. The first run builds the Lean library. In a Python environment with the same hardware tools on your path, python3 -m pip install -e . also installs the CLI.

nix develop
lambda-hdl explore --help
lambda-hdl explore examples/explore/Mux.lean

A study fixes the circuit's input ports and a reference function. You can change the implementation and ask two independent questions. Does it give the same output on every input? What does it cost after synthesis? The included four-way mux starts with a priority chain and compares two balanced trees. Swapping the selector wires changes which data input is selected. Exchanging data inputs 1 and 2 at the same time restores the original function. This is a permutation and its inverse at work on a real circuit.

Discover Boolean rewrites with an e-graph

lambda-hdl explore examples/explore/Select.lean --egraph
lambda-hdl explore examples/explore/Select.lean --egraph --liberty corner.lib

The selector study starts with (sel AND a) OR ((NOT sel) AND b) and an empty alternatives list. LambdaSat stores equivalent gate networks together and extracts a mux. Two extraction policies count nodes with either unit cost or a cost of eight for a mux. They propose distinct trees for the existing Lean proof, SystemVerilog equivalence and synthesis flow. The tradeoffs in report.json use synthesis measurements. Both selector forms can map to the same cell. LambdaClass LambdaSat

This mode accepts a combinational Study .bit using Boolean ports, literals, NOT, AND, OR, XOR and mux, with up to eight referenced inputs. Lean checks an exhaustive Boolean identity for each proposed expression against the study's actual reference. The search stops after six rounds or when LambdaSat reports a fixpoint or size limit. Identical trees from the reference and both policies are counted once. A run with no new tree still measures the reference. See egraph.json for search statistics and Experiment.lean for the replayable proofs. Exploration runs offline after Lake fetches the pinned dependency. The roadmap describes how to extend exploration to implementations with different cycle counts. Architecture discovery

Compare search methods on a control signal

lambda-hdl explore examples/explore/Enqueue.lean --compare-boolean --route-nangate45 "$NANGATE45"

Set NANGATE45 to the OpenROAD-flow-scripts flow/platforms/nangate45 directory. Each method can submit one design for measurement. LambdaSat extracts an equivalent expression. Shannon decomposition tries every variable order (up to six Boolean inputs) and chooses the smallest resulting tree. The study may also supply one frozen proposal. Lean checks each candidate against the reference on every input. Routing includes the reference and each proposal, reusing results for identical emitted RTL. The budget limits physical evaluations. The methods can spend different amounts of time generating candidates.

The example decides whether a FIFO accepts a word. On Nangate45 all three proposals mapped to the same circuit. Cell area fell from 3.990 to 3.458 µm². Synthesis estimated 42.03 ps for the reference and 37.24 ps for the alternative, but extracted delay rose from 68.11 to 76.78 ps after routing. Both circuits belong on the area–delay frontier. The supplied proposal is frozen in the example for replay. Routed results

Try the editable routing demo

Open the routing workbench and swap the selector bits. The displayed witness and repaired wiring come from the recorded Lean study. Compare two implementations at the same scale and highlight their critical signal routes. To edit the contract and run Lean, synthesis and routing again, open the local Jupyter notebook.

Inspect an existing physical layout

The evidence cockpit opens the Sky130 UART/FIFO's routed DEF with the same pin, layer, pan, zoom and cell inspector used for the routed design studies. The surrounding cockpit provides the signoff report, netlist equivalence and gate-simulation evidence. For a standalone layout run:

lambda-hdl ui --layout-def routed.def --cell-lef library.lef --target Sky130A

Supply an OpenROAD-written DEF with a rectangular die. The optional macro LEF supplies cell sizes. DEF-only inspection shows regular signal routes, vias and pins. Importing a layout supplies no Lean proof or timing measurement. In an exploration run, the comparison table records the actual transitive axioms of the exported Lean study when available. Older runs show an unrecorded audit.

Generate a network from a routing contract

lambda-hdl explore examples/explore/Routing.lean --route-nangate45 "$NANGATE45"

Give Routing.discover a two-bit selector, four one-bit source expressions and a function from selector value to source index. The generator enumerates all 256 leaf assignments in each of two selector orders. Each legal wiring yields a balanced mux tree and a one-hot decoder, with a Lean proof for every input environment. For every rejected wiring, proposals.json records a selector, the required pin and the pin it would connect.

For the identity contract, 2 of 512 wirings pass. The four generated circuits and the reference have the same RTL hashes as the hand-written mux study. On the same Nangate45 floorplan the smallest mapped area is 6.118 µm² and the lowest extracted delay is 73.84 ps. This experiment covers one four-input output cone. Whole-crossbar sharing, output enables and wider selectors remain open. Generated layouts and rejection witnesses

Route the finalists

Open the hosted mux comparison.

Compare the reference and every synthesis Pareto finalist on the same physical target. This example enumerates the four-input mux study, then runs OpenROAD detailed routing and OpenRCX parasitic extraction on each distinct finalist RTL. Use a checkout of the OpenROAD-flow-scripts Nangate45 platform. The example was tested at ORFS commit df313b260a95e90803eb8002edb52a28de4ee7b3.

nix develop .#asic
lambda-hdl explore examples/explore/Mux.lean --enumerate \
  --route-nangate45 /path/to/OpenROAD-flow-scripts/flow/platforms/nangate45

Open the printed route/index.html locally to compare the layouts, input RTL, mapped cell area, ABC estimates and extracted input-to-output delays. The run retains the Lean drivers, netlists, DEF, SPEF, timing paths and OpenROAD logs. The machine-readable route/report.json records platform input hashes, tool version and the measured frontier. Identical emitted RTL shares a route. Distinct RTL with the same synthesis costs gets a separate route. The reference is always included. A design dominated before routing could still beat the selected finalists after routing.

The initial backend targets small combinational studies with an input-to-output timing path, a fixed 60 × 60 µm die, metal5 pins, a 10 ns virtual clock, 20 ps input slew and 2 fF output load. The library is selected from the platform for both stages. Routing checks connectivity and detailed-router violations, then times the extracted netlist. ABC and OpenSTA use different timing models. The cell area is the sum of mapped cells. This block-level comparison omits the power grid, GDS and fabrication signoff. The separate Tiny Tapeout and ASIC flows cover physical signoff.

Compare three constant multipliers

lambda-hdl explore examples/explore/ConstantProducts.lean --liberty corner.lib

This study packs the low eight bits of 7x, 19x and 31x into one output. Lean checks all 256 input values and Yosys checks the emitted circuits. The candidates are hand-written baselines for future word-level search. With Yosys 0.71 and the SG13CMOS5L typical library (1.20 V, 25 °C), the pre-layout results were:

Implementation Mapped cell area ABC delay (ps)
Three multiplications 2053.8252 1177.99
Shift, add and subtract 1126.7046 702.98
Share 3x and 7x across outputs 1562.1606 885.38

Run a model-guided search

The CLI can ask a local Ollama model to choose settings, prove each proposed design, and feed verification results and measured costs into its next choice. Start Ollama, use ollama list to find an installed model, and pass its name to the CLI. This example uses qwen3:8b.

lambda-hdl explore examples/explore/Mux.lean --ollama qwen3:8b --trials 5
lambda-hdl explore examples/explore/Mux.lean --ollama qwen3:8b --trials 5 --liberty corner.lib

For the mux, the model chooses the selector order, the data order and whether to use a mux tree or a one-hot decoder. Ollama receives those choices, the design description, previous attempts and costs. Its reply is a JSON configuration. LambdaHDL converts validated choices to integer indices and uses the study author's Lean code to construct the circuit and prove it. Before requesting proposals, the CLI checks the builder’s type and that the proof tactic is available. Each model reply consumes one trial, including invalid choices and failed proofs. A repeated configuration consumes a trial without being evaluated again. A new configuration that emits byte-identical RTL passes the equivalence check and reuses the earlier measurement. Use --ollama-url for a server other than the default http://localhost:11434. The adapter uses Ollama's structured chat responses. Ollama structured outputs

Compare a model with exhaustive search

For small spaces, use the same checks and cost model on every configuration. The mux example has eight possible settings. Four match its reference and four misroute pins.

lambda-hdl explore examples/explore/Mux.lean --enumerate
lambda-hdl explore examples/explore/Mux.lean --enumerate --liberty corner.lib

Enumeration follows the parameter and choice order in the study's JSON file and makes no model calls. Use --trials N to run a prefix of a larger space. settings_tried and space_size in each search report give coverage. Compare the costs on the two Pareto frontiers using the same study, library and tool versions. Full coverage gives the best observed tradeoffs among the candidates that passed verification in this space. A failed proof may also reflect a limitation of the tactic.

Reproduce a search

Run the included two proposals offline, or pass the proposals.jsonl from an earlier run. Any model or external search tool can produce this JSON Lines format.

lambda-hdl explore examples/explore/Mux.lean --replay examples/explore/Mux.proposals.jsonl

The first proposal swaps only the selector wires and fails its proof. The second swaps the corresponding data inputs as well and implements selection with a one-hot decoder. It enters the comparison if Lean checks its proof and Yosys SAT verifies the emitted RTL against the fixed reference for every defined input. The CLI exits successfully when at least one search proposal passes. A failed tool invocation also exits with an error.

Each invocation creates a fresh directory under gen/explore or --out DIR. report.json records the baseline, tool versions and hashes. search.json records attempts, diagnostics, verified costs and the Pareto frontier. Each trial retains its generated Lean driver and the logs from the stages it reached. For live trials it also saves the request context and raw reply. Replaying the proposals with the same tools, study and Liberty file lets you compare results independently of the model.

By default the two costs are generic gate count and logic depth. With --liberty they are library cell area and ABC's estimated delay in picoseconds. The frontier includes each verified design for which no measured alternative matches or beats both costs while improving at least one. Ties stay visible. For a chip decision, rerun promising candidates inside their parent design and compare routed timing at the required corners.

Define a study for your own circuit

  1. Copy the mux study and define study : Study t. Give it one combinational reference expression, common ports and named alternatives with proofs. Ordinary lambda-hdl explore MyStudy.lean uses these definitions alone.
  2. For model search, add a sibling parameter file named MyStudy.search.json. Give each ordered parameter a name and a list of choices. Implement propose : List Nat → HExpr t. It receives the zero-based choice indices in parameter declaration order. It can build a new expression for each combination.
  3. Define a Lean tactic macro named prove_candidate for the goal ∀ env, (propose settings).eval env = study.reference.eval env. The driver specializes the goal to each proposal and audits its transitive axioms. Start with a known-good proposal and a deliberate wiring error to exercise the proof before spending model calls.

The current study boundary is a single combinational output. A timing contract that spans clock cycles needs a sequential proof.

Flows

  • FPGA (Lattice ECP5). make pnr reports post-route Fmax per design; make bitstream produces gen/ULX3SDemoSoC.bit (cache + UART + self-test) for the ULX3S-85F.
  • FPGA (Xilinx). make yosys synthesizes for 7-series; make xilinx checks the UltraScale+ primitive wrappers against Yosys's cell library, maps them with synth_xilinx -family xcup, co-simulates URAM288 against a stub model and lints the generated XDC. The XDC and the HBM port list have not been run through Vivado.
  • ASIC (sky130 / Tiny Tapeout). tt_um_lambdahdl_uart_fifo (FIFO + UART TX) is a 1x1 Tiny Tapeout project. make asic runs synthesis, place and route, DRC, LVS and STA, and checks the post-route netlist against the RTL. The design has not been submitted to a shuttle.
  • AI-driven search. scripts/eval_design.py evaluates a candidate SystemVerilog file: unbounded RTL equivalence against the Lean-emitted reference, synthesis, gate-level equivalence and multi-seed place and route, as JSON. Z3 properties are proved on the reference and carry over to a candidate only through that equivalence. scripts/ppa_search.py runs a sweep and checks that injected mutants (inverted valid, X-driven data, a UART frame one bit short) are rejected.

Layout

  • LambdaHDL/Core/ — types, expressions, modules and semantics, builder DSL, static checker, scheduler, pipeliner, DCE/CSE, refinement.
  • LambdaHDL/Backend/ — Verilog, FIRRTL, C++ simulator, SMT2, XDC emitters.
  • LambdaHDL/Protocols/, LambdaHDL/Examples/ — the IP library and example designs, including backend regressions (Examples/Regressions.lean).
  • LambdaHDL/Proofs/ — soundness proofs and the axiom audit.
  • LambdaHDL/Core/Keywords.lean — SystemVerilog reserved words: rejected by the checker as port, clock/reset, memory, instance and module names; escaped by the SV emitter elsewhere.
  • LambdaHDL/Tactics/, LambdaHDL/Tests/ — kernel-checked bit-vector tactics and their tests.
  • LambdaHDL/DiffTest/ — random and directed design generators for make difftest.
  • scripts/ — lec.py, difftest.py, the AI-loop evaluator, the ASIC flow.
  • tt/ — the Tiny Tapeout project tree.

Known limitations and next steps

See the implementation roadmap and the research guide and experiments.

Related work

Project Connection to LambdaHDL
CktFormalizer Generates circuits from natural language using CktLean, which extends Sparkle. The authors found that designs could compile in Lean and still fail RTL simulation. Their source-level equivalence proofs are a separate evaluation. This motivates testing emitted RTL against an independent specification.
CircuitProver Translates Chisel designs into executable Lean 4 models and uses an agent to build reusable proofs. Its lemma library is a precedent for automating parameterized hardware proofs.
Rtl2lean Translates SystemVerilog into executable Lean transitions and organizes lemmas from combinational behavior through reachability. It informs LambdaHDL's planned RTL importer.
Kami and Kôika These Coq projects developed at MIT address modular hardware verification and compilation of scheduled atomic rules. They provide precedents for LambdaHDL's refinement and scheduling proofs.
egg Equality saturation keeps equivalent expressions together in an e-graph until extraction chooses an implementation. LambdaHDL uses LambdaSat as its Lean e-graph engine.
ROVER Coward, Drane and Constantinides explore mixed-precision datapaths with e-graphs and emit certificates checkable by industrial equivalence tools. LambdaHDL's research goal is to replay rewrite evidence in Lean.
Herbie Rewrites floating-point expressions to improve numerical accuracy. A corresponding LambdaHDL experiment would specify an input domain, rounding mode and maximum error, then require a Lean proof that the candidate meets the bound.

The research guide connects these ideas to proposed experiments.

License

LambdaHDL is open source, dual-licensed under the MIT License or the Apache License 2.0, at your option.

Unless you state otherwise, any contribution you submit for inclusion in LambdaHDL is dual-licensed as above, without any additional terms or conditions.

About

Formally verified deep-embedded Lean 4 HDL with Guarded Atomic Rules, first-class Vec/BRAM/Hierarchy, and CIRCT/FIRRTL backend

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages