Yosys kernel commands¶
echo - turning echoing back of commands on and off¶
help - display help messages¶
- yosys> help help¶
- help ................ list all commands¶
- help <command> ...... print help message for given command¶
- help -all ........... print complete command reference¶
help -cells .......... list all cell types help <celltype> ..... print help message for given cell type help <celltype>+ .... print verilog code for given cell typeNote
Help text automatically generated from
kernel/register.cc:725
history - show last interactive commands¶
license - print license terms¶
- yosys> help license¶
- license¶
This command produces the following notice. /----------------------------------------------------------------------------\ | | | yosys -- Yosys Open SYnthesis Suite | | | | Copyright (C) 2012 - 2025 Claire Xenia Wolf <claire@yosyshq.com> | | | | Permission to use, copy, modify, and/or distribute this software for any | | purpose with or without fee is hereby granted, provided that the above | | copyright notice and this permission notice appear in all copies. | | | | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | | | \----------------------------------------------------------------------------/
Note
Help text automatically generated from
kernel/register.cc:1166
script - execute commands from file or wire¶
- yosys> help script¶
- script <filename> [<from_label>:<to_label>]¶
- script -scriptwire [selection]¶
This command executes the yosys commands in the specified file (default behaviour), or commands embedded in the constant text value connected to the selected wires. In the default (file) case, the 2nd argument can be used to only execute the section of the file between the specified labels. An empty from label is synonymous with the beginning of the file and an empty to label is synonymous with the end of the file. If only one label is specified (without ':') then only the block marked with that label (until the next label) is executed. In "-scriptwire" mode, the commands on the selected wire(s) will be executed in the scope of (and thus, relative to) the wires' owning module(s). This '-module' mode can be exited by using the 'cd' command.
Note
Help text automatically generated from
kernel/yosys.cc:1076
shell - enter interactive command mode¶
- yosys> help shell¶
- shell¶
This command enters the interactive command mode. This can be useful in a script to interrupt the script at a certain point and allow for interactive inspection or manual synthesis of the design at this point. The command prompt of the interactive shell indicates the current selection (see 'help select'): yosys> the entire design is selected yosys*> only part of the design is selected yosys [modname]> the entire module 'modname' is selected using 'select -module modname' yosys [modname]*> only part of current module 'modname' is selected When in interactive shell, some errors (e.g. invalid command arguments) do not terminate yosys but return to the command prompt. This command is the default action if nothing else has been specified on the command line. Press Ctrl-D or type 'exit' to leave the interactive shell.Note
Help text automatically generated from
kernel/yosys.cc:1011
tcl - execute a TCL script file¶
- yosys> help tcl¶
- tcl <filename> [args]¶
This command executes the tcl commands in the specified file. Use 'yosys cmd' to run the yosys command 'cmd' from tcl. The tcl command 'yosys -import' can be used to import all yosys commands directly as tcl commands to the tcl shell. Yosys commands 'proc' and 'rename' are wrapped to tcl commands 'procs' and 'renames' in order to avoid a name collision with the built in commands. If any arguments are specified, these arguments are provided to the script via the standard $argc and $argv variables. Note, tcl will not receive the output of any yosys command. If the output of the tcl commands are needed, use the yosys command 'tee -s result.string' to redirect yosys's output to the 'result.string' scratchpad value. The 'result.string' value is then used as the tcl output value of the command.
Note
Help text automatically generated from
kernel/yosys.cc:385