Skip to main content

Installation

Installation & Setup Guide

The definitive guide to getting RouteRTL running on your machine. Whether you're on Linux, Windows (WSL2), or macOS — this page covers everything from first install to a verified, working environment.

The entire setup takes about 5 minutes. At the end you'll have a working routertl CLI and a verified development environment.


1. Install RouteRTL

python3 -m venv .venv source .venv/bin/activate pip install routertl

That's it. This installs the routertl CLI (and its short alias rr) into your Python environment. You now have access to every SDK command.

Optional service stacks install only when needed:

python3 -m venv .venv source .venv/bin/activate pip install 'routertl[mcp]' # Model Context Protocol server pip install 'routertl[docker]' # Python Docker SDK (optional; rr docker uses the Docker CLI) pip install 'routertl[web]' # self-hosted registry web service + signature-pack crypto

The venv lines are required on modern Linux, not decoration. On Ubuntu 24.04+, Debian 12+, or any distro with an externally-managed system Python (PEP 668), a bare pip install routertl is refused with:

error: externally-managed-environment × This environment is externally managed

Creating and activating a virtualenv first — exactly the two lines above — gives pip a private environment it is allowed to write to, so the install succeeds. Prefer a global CLI over a per-project venv? pipx install routertl installs into an isolated environment for you. Avoid pip install --break-system-packages routertl: it writes into the OS-managed Python and can corrupt system tooling that depends on it.

What just happened? pip downloaded the RouteRTL package from PyPI and installed it into your current Python environment. The package includes the CLI tools, the Cocotb simulation framework, protocol drivers (UART, SPI, I2C, AXI4-Lite), and the project scaffolding system.

If the term "pip" is unfamiliar: it's Python's package manager — the equivalent of apt on Ubuntu or brew on macOS, but for Python libraries and tools.

Reporting bugs / asking questions

The routertl source itself is private (compiled wheels ship via PyPI). Bug reports, feature requests, and incident YAMLs land at github.com/routertl/issues; real-time chat is on Discord.


2. Create Your First Project

mkdir axi_sensor_hub && cd axi_sensor_hub git init python3 -m venv .venv source .venv/bin/activate pip install routertl routertl init

The long-form command above and rr init are equivalent. This guide uses rr from here on because it is quicker to type.

The rr init wizard walks you through project setup interactively. It will ask for your project name, FPGA vendor and part, HDL language, source directory, simulation directory, constraints directory, and CI/CD platform.

For non-interactive setup (e.g. in scripts), use a template: rr init --template edge_counter --name axi_sensor_hub

The source and simulation directory prompts are especially important: they tell RouteRTL where to find your RTL files and testbenches. Whenever you add new files, run rr workspace update --src (or --sim, or --all) and RouteRTL will auto-discover them and update project.yml for you — no manual file-list editing required.

What rr init creates

File / DirectoryPurpose
project.ymlThe true entry point. Every RouteRTL command reads this file. It defines your top module, FPGA target, source paths, simulation config, hooks, and CI/CD settings.
.venv/A Python virtual environment with the RouteRTL CLI and all dependencies pre-installed. Keeps your system Python clean.
requirements.txtPython packages for your project: cocotb>=2.1, cocotb-test, pytest, pandas, PyYAML.
pyproject.tomlPython project metadata with Ruff linter configuration for your testbenches.
project_regbank.ymlStarter register bank definition with system registers (Git hash, version, build date).
VERSIONFirmware version file (system_major=0, system_minor=1), used during synthesis for build tagging.
.gitignorePre-configured to ignore build artifacts, simulation outputs, and the .venv/ directory.
src/RTL source directory with pkg/ (packages) and regbank/ (register bank hex stubs) subdirectories.
sim/cocotb/tests/Where your Cocotb testbenches live.
xdc/Constraint files (XDC for Xilinx, SDC for Intel/Lattice).
verif/Formal verification directory.

Understanding project.yml

This is the file that drives everything. Here's the structure:

# Project identity project: name: axi_sensor_hub top_module: axi_sensor_hub_top top_sim: tb_axi_sensor_hub_top # FPGA target hardware: vendor: xilinx part: "xc7z020clg400-1" language: vhdl # Simulation configuration simulation: test_dir: sim/cocotb/tests # Build tool versions build_options: tool_version: "2024.1" # Source file lists — auto-populated by `rr workspace update` # After adding new RTL or test files, run: # rr workspace update --src (synthesis sources) # rr workspace update --sim (testbenches) # rr workspace update --all (everything at once) sources: syn: [] sim: [] xdc: [] # Pre-commit hooks — gate commits on lint + test passing hooks: pre_commit: enabled: true lint: true check_yaml: true tests: [] cicd: platform: github tests: [] # Custom directory paths (defaults: src, sim, xdc, verif) # paths: # sources: src # simulation: sim # constraints: xdc # verification: verif # Machine-specific environment (injected into .venv/bin/activate) # environment: # LM_LICENSE_FILE: ~/Downloads/LR-291374_License.dat # QUARTUS_ROOTDIR: /opt/altera_std

For the complete field reference with types, defaults, and export mappings, see the project.yml Reference.

EDA tool paths and license files — add an environment: section to project.yml and RouteRTL will automatically inject export lines into .venv/bin/activate. This keeps machine-specific paths tied to the project instead of cluttering your shell profile. rr ws install and rr ws update-config both refresh this block.

Every rr command reads project.yml to know your project structure. When you run rr sim, it knows where your testbenches are. When you run rr bitstream, it knows your FPGA part and source files.

How RouteRTL finds your EDA tools

RouteRTL auto-detects installed EDA tools — you don't need to configure anything in project.yml if the tools are already on your PATH.

The discovery chain (in priority order):

  1. hardware.tool_path in project.yml — explicit path override
  2. System PATH — which vivado, which quartus_sh, etc.
  3. Docker containers — rr docker shell sim provides all tools

Run rr doctor to see what was detected. If Vivado, Quartus, or another vendor tool shows green, you're ready to synthesize.

For multi-version setups (e.g. Vivado 2024.1 and 2024.2 both installed), pin the version in project.yml:

build_options: tool_version: "2024.1" # Default for all tools vivado_version: "2024.2" # Override for Vivado specifically

You do not need vendor tools to simulate, lint, or explore your design. The open-source toolchain (NVC + GHDL) is enough for the full verification workflow. Vendor tools are only needed when you're ready to synthesize a bitstream.


3. Activate and Verify

# Activate the virtual environment source .venv/bin/activate # Verify your setup rr doctor

rr doctor scans your system and reports what's installed:

[✅] Python 3.10.12 [✅] make (GNU Make 4.3) [✅] git 2.34.1 [✅] nvc 1.19.3 [✅] ghdl 6.0.0 [⚠️] vivado — not found (optional) [⚠️] quartus_sh — not found (optional) [✅] project.yml is valid

Green ✅ means ready. Yellow ⚠️ means an optional tool is missing — you can still work, but some features won't be available (see What's Optional below).

If rr doctor reports a required tool as missing (Python, Make, Git, or a simulator), install it using the platform instructions in Section 5 before continuing.


4. Shell Completion

RouteRTL supports tab completion for bash, zsh, and fish. Both routertl and the short alias rr are covered — a single eval activates completion for both names.

Quick activation (current session)

# bash eval "$(rr completion bash)" # zsh eval "$(rr completion zsh)" # fish rr completion fish | source

Persistent setup

Add the eval line to your shell profile so completion survives new terminal sessions:

# bash — add to ~/.bashrc echo 'eval "$(rr completion bash)"' >> ~/.bashrc # zsh — add to ~/.zshrc echo 'eval "$(rr completion zsh)"' >> ~/.zshrc # fish — add to config rr completion fish > ~/.config/fish/completions/rr.fish

If you used rr init or rr ws install to set up your project, completion is already hooked into .venv/bin/activate — it activates automatically when you source .venv/bin/activate. The persistent setup above is only needed for system-wide completion outside a project venv.

What you get

InputResult
rr ⇥All top-level commands (sim, synth, docker, doctor…)
rr synth ⇥Subcommands: all, clear, discover, run, status
rr docker ⇥Subcommands: add-device, install, shell, setup…
rr sim ⇥Discovered testbench names (dynamic completion)

5. Platform-Specific Setup

These instructions cover installing the system-level prerequisites that RouteRTL needs. Run rr doctor after installing to confirm everything is detected.

Linux (Ubuntu 22.04 / 24.04, Debian)

Core tools

sudo apt update sudo apt install -y python3 python3-pip python3-venv git build-essential

RouteRTL provides a built-in EDA toolchain installer. This is the recommended path on Linux (Ubuntu and Debian):

rr eda install nvc rr eda install ghdl

Add ~/.local/bin to PATH. rr eda install places tool symlinks in ~/.local/bin. Add this line to the shell profile (~/.bashrc or ~/.zshrc) if not already present:

export PATH="$HOME/.local/bin:$PATH"
  • Distro GHDL < 6 is refused: Debian 13 ships GHDL 5.0.1, and Ubuntu 24.04 ships GHDL 4.1.0. RouteRTL requires GHDL >= 6.0.0 and refuses distro packages below version 6 (GHDL version ... is too old. RouteRTL requires GHDL >= 6.0.0). rr eda install ghdl builds GHDL from pinned source into ~/.local/opt/ in about 2 minutes and links the binary into ~/.local/bin.
  • NVC packaging: Ubuntu 24.04+ provides nvc via apt, but Debian (including Debian 13) has no nvc apt package, and Ubuntu 22.04 lacks it. rr eda install nvc automatically installs via apt where available or builds from source where absent.

Manual installation alternatives

NVC (VHDL simulator)

NVC is the recommended simulator for Cocotb 2.0+ testbenches.

rr eda install nvc builds NVC r1.19.3 from source. That is the version the NVC backend is measured against. Distribution packages are not used: releases older than 1.19.3 cannot bind a Verilog DUT under VHDL, and releases from 1.20.0 reject a VHDL std_logic_vector connected to a Verilog input logic port.

Manual build (Ubuntu / Debian):

sudo apt install -y automake flex llvm-dev pkg-config zlib1g-dev libdw-dev libffi-dev git clone https://github.com/nickg/nvc.git cd nvc git checkout r1.19.3 ./autogen.sh mkdir build && cd build ../configure make -j$(nproc) sudo make install
GHDL (VHDL analyzer for smart linting)

GHDL 6.0.0+ is required. Distro packages with GHDL < 6 are refused. Build from the development branch:

sudo apt install -y gnat llvm-dev git clone https://github.com/ghdl/ghdl.git cd ghdl mkdir build && cd build ../configure --with-llvm-config make -j$(nproc) sudo make install

Windows (WSL2)

RouteRTL runs natively inside WSL2. If you don't have WSL2 yet:

1. Enable WSL2 (run in PowerShell as Administrator):

wsl --install -d Ubuntu-24.04

Restart your machine, then open the Ubuntu terminal.

2. One-liner bootstrap (installs everything RouteRTL needs):

curl -fsSL https://raw.githubusercontent.com/djmazure/routertl/main/tools/scripts/wsl_bootstrap.sh | bash

Or if you already have the SDK cloned locally:

bash vendor/routertl/tools/scripts/wsl_bootstrap.sh

This installs Git, Git LFS, Python 3, NVC, GHDL, Verilator (24.04+), Icarus Verilog, and the RouteRTL CLI — then runs rr doctor to verify. The script is idempotent and supports --dry-run to preview actions.

If you prefer to install dependencies manually, skip this step and follow the Linux instructions above.

3. Install Docker Desktop (optional, for containerized EDA tools):

4. Follow the Linux instructions above inside your WSL2 terminal.

5. RouteWave GUI on WSL2:

RouteWave is a native Linux GUI application. On WSL2 it works through the built-in WSLg display server (Windows 11) or an X server (Windows 10).

Windows 11 (WSLg):

# Install OpenGL libraries (required on a fresh WSL2 Ubuntu) sudo apt install libopengl0 libgl1 libglx-mesa0 libegl1 # Launch rr routewave

WSLg ships built-in since Windows 11 21H2 and handles display forwarding automatically. If rr routewave opens a window, you're done.

Windows 10 (X server required):

# 1. Install VcXsrv on Windows: # choco install vcxsrv (or download from sourceforge.net/projects/vcxsrv) # 2. Launch XLaunch → "Multiple windows" → "Start no client" → check "Disable access control" # 3. In WSL2, set DISPLAY: export DISPLAY=$(ip route list default | awk '{print $3}'):0 # 4. Launch: rr routewave

Quick test: run xeyes or xclock — if a window appears, RouteWave will work. If not, run wsl --update and verify your distro is WSL2 (wsl -l -v).


macOS (Homebrew)

# Core tools brew install python@3.12 git make # NVC simulator brew install nvc # GHDL (from source — no Homebrew formula) brew install gnat llvm git clone https://github.com/ghdl/ghdl.git cd ghdl && mkdir build && cd build ../configure --with-llvm-config=$(brew --prefix llvm)/bin/llvm-config make -j$(sysctl -n hw.ncpu) sudo make install

macOS ships with an older make (3.81). The Homebrew version installs as gmake. RouteRTL will work with either, but gmake is recommended for parallel builds.


6. What's Optional (and What You Lose)

ToolRequired?What it enablesWithout it
Python 3.10+✅ YesCLI, simulation, all toolingNothing works
Git✅ YesVersion control, submodule management, pre-commit hooksCannot initialize projects
Make✅ YesBuild system orchestrationCannot use make targets
NVC✅ YesVHDL simulation with Cocotb 2.0+Cannot run simulations
GHDL✅ YesSmart linting (hierarchy-aware VHDL analysis)Cannot lint VHDL designs
VivadoOptionalXilinx FPGA synthesis & implementationCan simulate and lint, but cannot synthesize for Xilinx
QuartusOptionalIntel/Altera FPGA synthesis & implementationCan simulate and lint, but cannot synthesize for Intel
RadiantOptionalLattice FPGA synthesis & implementationCan simulate and lint, but cannot synthesize for Lattice
Libero SoCOptionalMicrochip FPGA synthesis & implementationCan simulate and lint, but cannot synthesize for Microchip
VerilatorOptionalVerilog/SystemVerilog simulationUse NVC for VHDL; Verilator adds SV simulation support
Icarus VerilogOptionalVerilog simulationsudo apt install iverilog — zero-cost open-source alternative to Verilator
DockerOptionalDeterministic EDA environments (rr docker shell sim)Must install tools natively
Yosys + netlistsvgOptionalSchematic generation (rr schematic)Cannot generate SVG schematics

7. Troubleshooting

routertl: command not found

Your shell can't find the CLI. Common causes:

  • Virtual environment not activated: Run source .venv/bin/activate
  • pip installed to a different Python: Ensure you're using the same python3 / pip pair. Try python3 -m pip install routertl

No module named 'venv'

On Ubuntu/Debian, the venv module is a separate package:

sudo apt install python3-venv

rr doctor shows NVC/GHDL not found

The tool is installed but not on your PATH. Verify:

which nvc # Should print ~/.local/bin/nvc, /usr/local/bin/nvc or similar which ghdl # Should print ~/.local/bin/ghdl, /usr/local/bin/ghdl or similar

If installed via rr eda install, tool symlinks are in ~/.local/bin/. Add that directory to PATH:

export PATH="$HOME/.local/bin:$PATH"

If installed from source to /usr/local/bin/, ensure that directory is in your PATH:

export PATH="/usr/local/bin:$PATH"

Add this line to your ~/.bashrc or ~/.zshrc to make it permanent.

pip install routertl fails with error: installation refused by PEP 668

Modern distros (Ubuntu 24.04+, Debian 12+, Fedora 38+) ship an externally-managed system Python and, per PEP 668, refuse a bare pip install into it:

error: installation refused by PEP 668 × This environment is externally managed

This is pip protecting the OS package manager — it is not a RouteRTL problem. Install into a virtualenv (recommended) or via pipx:

# Option A — project-local virtualenv (recommended) python3 -m venv .venv source .venv/bin/activate pip install routertl # Option B — isolated global CLI pipx install routertl

Do not work around it with pip install --break-system-packages routertl: that installs into the system Python and can break apt-managed packages that depend on it.

pip install routertl fails with permission errors

Never use sudo pip install. Install into a virtualenv instead — the same remedy as the installation refused by PEP 668 case above (note that pip install --user does not help: on Ubuntu 24.04+/Debian 12+ it is refused by PEP 668 with the identical error: installation refused by PEP 668):

python3 -m venv .venv source .venv/bin/activate pip install routertl # ...or an isolated global CLI: pipx install routertl

Or better, let rr init manage the virtual environment for you.

Docker Quartus: "No device families detected"

After rr docker shell quartus shows Quartus as installed but no device families, devices were likely not installed. Common causes:

  1. No .qdz file in installer path: Place the .qdz device package (from Intel FPGA Download Center) in the same directory as your Quartus installer. Check with: ls $QUARTUS_INSTALLER_PATH/*.qdz

  2. Add devices to an existing installation:

    rr docker add-device quartus # Docker (named volume or bind mount) rr eda add-device quartus # Native (no Docker needed)
  3. Bind mount path precision: When using QUARTUS_INSTALL_DIR in .env, it must point to the exact directory containing the quartus/ subdirectory. For example, if Quartus is at /mnt/d/eda_volumes/quartus_std/quartus/bin/, set QUARTUS_INSTALL_DIR=/mnt/d/eda_volumes/quartus_std — not the parent.

  4. Volume vs bind mount: rr docker status shows both named Docker volumes and bind mount paths. If neither appears, run rr docker setup to configure your storage.


Next Steps

You're set up! Head to the First Steps Tutorial for a hands-on, 20-minute walkthrough that takes you from an empty directory to a passing simulation.