Linux · Programming
Yosys
Open-source synthesis tool for FPGA and ASIC design that compiles Verilog and VHDL to generic gate-level netlists.
- License
- ISC
- Latest version
- 0.71
What is Yosys?
Yosys is a well-established open-source framework for logic synthesis, primarily used in FPGA and ASIC development. It has been maintained for many years and is a core component of the modern open-source hardware toolchain. While it lacks the polished GUI of commercial suites, its command-line interface and Tcl scripting capabilities make it highly flexible for complex design flows. It is widely used in academic research and professional projects where vendor lock-in is a concern.
This tool is best suited for digital designers, FPGA engineers, and hardware engineers who need a transparent, scriptable synthesis backend. It serves as a direct replacement for the synthesis engines found in proprietary tools like Vivado or Quartus. If you are comfortable with command-line workflows and Tcl scripting, Yosys offers a powerful environment for optimizing logic depth, area, and timing. It is particularly valuable for those working with open-source FPGAs like Lattice iCE40 or Gowin.
Compared to Xilinx Vivado, Yosys feels more raw and less hand-holding. Vivado provides a comprehensive GUI for constraint management, timing analysis, and bitstream generation, whereas Yosys focuses strictly on synthesis. You will not find a drag-and-drop interface for pin assignments or interactive timing reports. Instead, you interact with Yosys via a Tcl shell or Python scripts, which requires more upfront setup but offers greater reproducibility and integration with other open-source tools like OpenROAD or nextpnr.
Best for: Engineers seeking a vendor-neutral, scriptable synthesis engine for FPGA or ASIC design flows.
Key features of Yosys
- Supports Verilog, SystemVerilog, VHDL, and other HDLs
- Generates generic gate-level netlists (JSON, BLIF, Edif)
- Extensible via Tcl scripting and C++ plugins
- Includes optimization passes for area and timing
- Integrates with open-source place-and-route tools
- Supports technology mapping for various FPGA families
- Provides detailed synthesis reports and statistics
- Cross-platform and highly portable
Pros
- Fully open-source with no licensing costs
- Highly scriptable for automated design flows
- Vendor-agnostic, supporting multiple FPGA targets
- Active community and regular updates
Cons
- No built-in GUI for constraint editing or timing analysis
- Learning curve for Tcl scripting and command-line usage
- Lacks integrated place-and-route and bitstream generation
- Documentation can be sparse for advanced features
Windows programs Yosys replaces
How to install Yosys on Linux
sudo apt install yosyssudo apt install yosyssudo dnf install yosyssudo pacman -S yosysTips for Windows users
Coming from Vivado, you will need to replace the GUI-based constraint editor with SDC files processed by external tools or Yosys scripts. Vivado’s single-project workflow must be split into distinct steps: synthesis with Yosys, place-and-route with a tool like nextpnr, and bitstream generation with a vendor-specific tool. File formats like .xdc for constraints are not directly supported by Yosys; you will need to convert them or manage constraints via Tcl. Expect to write more scripts to automate the flow, as there is no 'Run Synthesis' button. Familiarize yourself with the Yosys Tcl shell, as most operations are performed via commands rather than menu selections.
Yosys: frequently asked questions
Can Yosys generate a bitstream directly?
No, Yosys only performs synthesis. You need a separate place-and-route tool (like nextpnr) and a bitstream generator (like icepack for Lattice) to create the final bitstream.
Does Yosys support VHDL?
Yes, Yosys has built-in support for VHDL through its VHDL frontend, though Verilog and SystemVerilog support is generally more mature.
How do I install Yosys on Ubuntu?
You can install it via the package manager using 'sudo apt install yosys' or build it from source for the latest features.
Is Yosys suitable for Xilinx FPGAs?
Yes, but you will need to use a place-and-route tool that supports Xilinx devices, such as nextpnr with the xilinx architecture, or use Yosys as a frontend for a commercial tool.
Updated