Installation

In-browser playground

You can try Amaranth out without installing anything by visiting the Amaranth Playground. The playground webpage contains a fully functional Python interpreter and an Amaranth toolchain that can simulate a design, display waveforms, and generate Verilog code. It works on all modern browsers that support WebAssembly, including Firefox, Chrome, and Edge.

System requirements

Amaranth HDL requires Python 3.8; it works on CPython 3.8 (or newer), and works faster on PyPy3.8 7.3.7 (or newer). Installation requires pip 23.0 (or newer).

For most workflows, Amaranth requires Yosys 0.40 (or newer). A compatible version of Yosys is distributed via PyPI for most popular platforms, so it is usually not necessary to install Yosys separately.

Simulating Amaranth code requires no additional software. However, a waveform viewer like GTKWave is invaluable for debugging. As an alternative to GTKWave, the Amaranth Playground can be used to display waveforms for simple designs.

Synthesizing, placing and routing an Amaranth design for an FPGA requires the FPGA family specific toolchain. The open source iCE40, ECP5, MachXO2/3, Nexus, and Gowin toolchains are distributed via PyPI for most popular platforms by the YoWASP project.

Installing prerequisites

  • Windows
  • macOS
  • Debian
  • Arch Linux
  • Other Linux

Install Python, either from Windows Store or using the full installer. If using the full installer, make sure to install a 64-bit version of Python.

Download GTKWave, either win32 or win64 binaries. GTKWave does not need to be installed; it can be unpacked to any convenient location and run from there.

Before continuing, make sure you have the latest version of pip installed by running:

> pip install --upgrade pip

Installing Amaranth

The latest release of Amaranth should work well for most applications. A development snapshot—any commit from the main branch of Amaranth—should be similarly reliable, but is likely to include experimental API changes that will be in flux until the next release. With that in mind, development snapshots can be used to try out new functionality or to avoid bugs fixed since the last release.

Latest release

  • Windows
  • macOS
  • Linux
  • Arch Linux

To install the latest release of Amaranth, run:

> pip install --upgrade amaranth[builtin-yosys]

Development snapshot

  • Windows
  • macOS
  • Linux

To install the latest development snapshot of Amaranth, run:

> pip install "amaranth[builtin-yosys] @ git+https://github.com/amaranth-lang/amaranth.git"

Editable development snapshot

  • Windows
  • macOS
  • Linux

To install an editable development snapshot of Amaranth for the first time, run:

> git clone https://github.com/amaranth-lang/amaranth
> cd amaranth
> pip install --editable .[builtin-yosys]

Any changes made to the amaranth directory will immediately affect any code that uses Amaranth. To update the snapshot, run:

> cd amaranth
> git pull --ff-only origin main
> pip install --editable .[builtin-yosys]

Run the pip install --editable .[builtin-yosys] command any time package dependencies may have been added or changed (notably after updating the snapshot with git). Otherwise, code using Amaranth may crash because of a dependency version mismatch.

Installing board definitions