yosys-slang 0.0.0Latest published 5h ago
MODULE.bazel
bazel_dep(name = "yosys-slang", version = "0.0.0")
README

yosys-slang: SystemVerilog frontend

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

News

2025/05: Koopa taped out using yosys-slang.

2024/12: ETH Zürich have used yosys-slang for a chip tapeout. Meet MLEM.

Compatibility

yosys-slang can parse a number of open-source IPs, including:

For details see the compat suite repository which documents sample command lines.

Building

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.

Usage

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

Contributing

Contributions are welcome! If you intent to develop a particular feature, feel free to get in touch and consult on the appropriate approach.

AI policy

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.

Supporters

The following organizations have supported the project and contributed to yosys-slang development:

License

yosys-slang is distributed under the ISC license, see LICENSE.

In addition, yosys-slang embeds

  • slang, Copyright (c) Michael Popoloski, see third_party/slang/ for license information
  • {fmt}, Copyright (c) Victor Zverovich and {fmt} contributors, see third_party/fmt/ for license information

About

SystemVerilog frontend for Yosys

@povik/yosys-slang@povik
Homepage
231stars
9:12 PM (5 hours ago)
@hzeller#9349 Initial addition of yosys-sla...

Languages

C++80.5%
SystemVerilog15.6%
CMake2.3%
Starlark0.8%
Shell0.3%
Makefile0.2%
Tcl0.2%
C0%
Verilog0%

Maintainers

@povik
@hzeller

Compatibility

Versions

0.0.02026-06-26