DDL is a compiler that translates high-level dataflow specifications into synthesizable Verilog-2005.
DDL came from dissatisfaction with existing methods of creating designs for FPGAs. You can read more details here.
- Language Overview & Reference Manual: Comprehensive reference covering core declarations (
sequence,process,fun,graph,extern,wire), channels (buffer), Show-Ahead FIFOs, type system, memories, and scoping rules.
- Guide 1: Writing Your First Pipelined Accelerator: Dataflow stage cuts (
|||), shift-register spanning, compiling, and visualizing. - Guide 2: Control State Machines, Packet Parsers, and Register Interfaces: Memory-mapped CSRs, tagged union dispatchers, zero-cycle branch dispatch, and lossless relays.
- Guide 3: Interfacing DDL with Existing Verilog, AXI-Stream, and FPGA Pins: Connecting to physical chip pins via
wire,externIP integration over the FIFO boundary, and AXI4-Stream master/slave wrappers. - Guide 4: Memory Patterns: ROMs, Block RAMs, and Multi-Port Register Files:
lutramvs.bram, zero-cost BRAM stage alignment, and multi-write register files with--lvt-bram. - Guide 5: Simulation, Verification, and Build Workflows: Edge-triggered simulation assertions, SystemVerilog testbench templates, Verilator
-Walllinting, and Makefiles. - Guide 6: Crossing a Clock Domain:
--async-exportand--async-extern— naming a boundary that runs on another clock, the ports it adds, the constraint it needs, and what the reset handshake does for you.
- FIFO Boundary Adapters & Export Architecture: Standard Show-Ahead (zero read latency) FIFO interfaces at module boundaries, compiler-generated adapters (
ir_adapt.rs), use-graph root discovery, dead-code pruning, and wrapper generation (ir_export.rs). - Clock Domains: every face a compiled design presents is synchronous to its
clk; what a crossing does to your data (measured on hardware),lib/ddl_cdc_fifo.v, and--async-export/--async-extern, which make the compiler emit and wire one for a boundary you name. - The Gray-Code Salt Protocol: 2-bit Gray-code pointer mathematics, cycle-by-cycle waveform traces, skid buffer proofs, and AXI-Stream adapters.
- Pipeline Lowering & Memory Forwarding:
sequencestage cuts (|||), shift-register spanning, backpressure, and zero-cost BRAM alignment. - Finite State Machine Synthesis & Scoping:
processcontrol-flow graph construction, zero-cycle branch dispatch, lexical register allocation, and resource sharing. - Multi-Write BRAM via Live Value Tables: Synthesizing multi-write memories on FPGAs using single-write BRAM banks and distributed LVTs (
--lvt-bram). - Zero-Latency Hardware Combinators: Pure datapath implementation of
@merge(rotating priority) and@split(lossless broadcast). - Verilog Backend & Synthesizer Portability: Restrictive Verilog-2005 subset, avoiding GowinSynthesis toolchain crashes, and Verilator
-Walllinting. - GitHub CI/CD & Multi-Platform Release Pipeline: Automated multi-platform builds (Linux, Windows, macOS), nightly cron releases, and publishing runbook.
DDL requires a nightly Rust toolchain, pinned via rust-toolchain.toml:
cargo build --releaseCompiled standalone binaries for Linux (x86_64, ARM64), Windows (x64), and macOS (Apple Silicon) are automatically built by GitHub Actions.
You can also download versioned releases and nightly packages directly from the Releases page.
Alternatively, you can download the artifact directly using the GitHub CLI:
# Download and extract the artifact for your operating system
gh run download --name x86_64-pc-windows-msvcddl build examples/mul3.ddl -o examples/mul3.vUse the --check flag to verify that an existing output file matches what the compiler would emit without modifying it:
ddl build examples/mul3.ddl -o examples/mul3.v --checkSyntax highlighting for Visual Studio Code is available in editors/vscode/:
cp -r editors/vscode ~/.vscode/extensions/ddlExport Graphviz DOT graphs to visualize module connectivity and stage partitions:
ddl build examples/pipeline_graph.ddl --emit=dot | dot -Tsvg > pipeline.svgsrc/
├── main.rs CLI entry point and command-line parsing
├── lib.rs Compiler library interface
├── driver.rs Pipeline driver coordinating compiler passes
├── source.rs Source file manager and import resolution
├── lex.rs Lexer and token definitions
├── parse.rs Recursive-descent parser and AST representation
├── symbols.rs Symbol table and lexical scope resolution
├── ty.rs Type inference, validation, and width checking
├── ir.rs Typed Static Single Assignment (SSA) intermediate representation
├── ir_pipe.rs Lowers sequence declarations into pipeline stages
├── ir_fsm.rs Lowers process declarations into finite state machines
├── ir_graph.rs Lowers graph declarations into structural instance netlists
├── ir_adapt.rs Generates Show-Ahead FIFO boundary adapter modules
├── ir_export.rs Discovers export targets, resolves use graphs, and builds wrappers
├── ir_comb.rs Generates hardware for @merge and @split combinators
├── ir_match.rs Lowers match expressions into case statements
├── verilog.rs Synthesizable Verilog-2005 code generator
└── diag.rs Source diagnostics and caret rendering
Licensed under the Apache License, Version 2.0.