LinuxCommandLibrary

yosys

TLDR

Run synthesis on Verilog file

$ yosys -p "synth -top [module]" [design.v]
copy
Start interactive shell
$ yosys
copy
Execute script file
$ yosys -s [script.ys]
copy
Synthesize and output to file
$ yosys -p "synth -top [module]" -o [output.json] [design.v]
copy
Quick synthesis shortcut
$ yosys -S [design.v]
copy
Run TCL script
$ yosys -c [script.tcl]
copy
List available commands
$ yosys -H
copy
Get help for command
$ yosys -h [synth]
copy

SYNOPSIS

yosys [options] [infile...]

DESCRIPTION

yosys is an open source framework for RTL synthesis. It reads Verilog hardware description language and synthesizes it to gate-level netlists for various target technologies.
The tool provides an interactive shell with numerous commands for reading designs, elaboration, optimization, technology mapping, and writing outputs. Synthesis flows are defined through script files or command-line arguments.
Supported input formats include Verilog, RTLIL, and Liberty. Output formats include BLIF, EDIF, JSON, Verilog, and various FPGA-specific formats. The tool supports plugins for extending functionality.
Yosys is widely used in open-source FPGA toolchains including Lattice iCE40 and ECP5 flows with nextpnr.

PARAMETERS

-s scriptfile

Execute commands from script file.
-c tclfile
Execute TCL script file.
-p command
Execute command(s).
-o outfile
Write design to file on exit.
-f frontend
Frontend for input files.
-b backend
Backend for output file.
-m module
Load plugin module.
-l logfile
Write log to file.
-q
Quiet operation (errors only).
-v level
Log verbosity level.
-t
Add timestamps to log.
-S
Shortcut for synth command.
-H
Print command list.
-h command
Help for specific command.
-Q
Suppress banner.
-T
Suppress footer.

CAVEATS

SystemVerilog support is limited. Complex designs may require multiple synthesis passes. Some features need external plugin modules. Memory and timing optimization may need manual tuning.

HISTORY

yosys was created by Clifford Wolf (now Claire Wolf) and released in 2012. It became the foundation of open-source FPGA toolchains, enabling fully open synthesis flows. The project is now maintained by YosysHQ and remains central to the open FPGA ecosystem.

SEE ALSO

Copied to clipboard