Note: this tool will be renamed slang-elab soon and, as an option, will be usable independent of Yosys.
yosys-slang is a Yosys plugin providing a new command (read_slang) for elaborating SystemVerilog designs.
yosys-slang builds on top of the slang library to provide comprehensive SystemVerilog support. The plugin supports an (informally defined) synthesizable subset of SystemVerilog in version IEEE 1800-2017 or IEEE 1800-2023.
Visit the Feature Support wiki page.
The plugin is available prebuilt as part of
OSS CAD Suite from YosysHQ, and
IIC-OSIC-TOOLS from Johannes Kepler University
2025/05: Koopa taped out using yosys-slang.
2024/12: ETH Zürich have used yosys-slang for a chip tapeout. Meet MLEM.
yosys-slang can parse a number of open-source IPs, including:
For details see the compat suite repository which documents sample command lines.
Prerequisities:
Yosys installed: supported versions are 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.60 0.61 0.62 0.63 0.64 0.65
C++ compiler: GCC 11 and clang 17 are minimum supported versions
Usual toolchains, CMake
Check out the repository including the submodule, e.g. with
git clone --recursive https://github.com/povik/yosys-slang
Then build both slang and the build/slang.so plugin for Yosys:
make -j$(nproc)
Use a custom -jN switch to build with N concurrent processes instead of matching the number of cores.
The built plugin is placed at build/slang.so. Copy this file into the Yosys plugin directory, which can be achieved through make install, or use a full path to this file (instead of the slang shorthand) when loading the plugin.
You load the plugin into Yosys on startup by passing the -m argument:
$ yosys -m slang
Or, alternatively, you load the plugin at runtime with the plugin command:
plugin -i slang
After the plugin has been loaded, the frontend is invoked with the read_slang command.
For a full documentation of the command options, see help read_slang. The command understands standard slang options.
Sample usage:
read_slang picorv32.v --top picorv32 -D DEBUG
Contributions are welcome! If you intent to develop a particular feature, feel free to get in touch and consult on the appropriate approach.
Submitting LLM generated content, both code and text, to the project's forums (Issues, Pull Requests, Discussions) is forbidden. This includes code submitted in pull requests.
An exception is made for preparing reproducers, i.e. files which demonstrate a bug and accompany a bug report, provided those have been minimized and stripped of any excess LLM comments.
To clarify, using LLM agents as tools in one's workflow to search, debug, test, or to make mechanical edits in one's code, is accepted. Prohibiting such is unenforceable and not the point of this AI policy. That being the case any code submitted should be written by a human, based on one's understanding of the codebase, and not generated by an LLM.
While the above rules govern the project's public forums, the primary maintainer (@povik) reserves the option to push LLM generated changes to the repository bypassing the pull request process.
The following organizations have supported the project and contributed to yosys-slang development:
yosys-slang is distributed under the ISC license, see LICENSE.
In addition, yosys-slang embeds
third_party/slang/ for license information third_party/fmt/ for license information0.0.02026-06-26 |