Loading a design ---------------- .. _input files: Input files on the command line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - guesses frontend based on file extension + ``.v`` -> ``read -vlog2k`` + ``.sv`` -> ``read -sv`` + ``.vhd`` and ``.vhdl`` -> ``read -vhdl`` + ``.blif`` and ``.eblif`` -> `read_blif` + ``.json`` -> `read_json` + ``.il`` -> `read_rtlil` (direct textual representation of Yosys internal state) - command line also supports + ``.ys`` -> `script` + ``.tcl`` -> `tcl` + ``-`` -> reads stdin and treats it as a script The `read` command ~~~~~~~~~~~~~~~~~~ - standard method of loading designs - also for defining macros and include directories - uses `verific` command if available + ``-verific`` and ``-noverific`` options to enforce with/without Verific + check ``help read`` for more about the options available and the filetypes supported + elaborate designs with ``verific -import [options] `` (or use `hierarchy`) - fallback to `read_verilog` with ``-defer`` option + does not compile design until `hierarchy` command as discussed in :doc:`/getting_started/example_synth` + more similar to `verific` behaviour - ``read -define`` et al mapped to `verific` or `verilog_defines` - similarly, ``read -incdir`` et al mapped to `verific` or `verilog_defaults` .. note:: The Verific frontend for Yosys, which provides the :cmd:ref:`verific` command, requires Yosys to be built with Verific. For full functionality, custom modifications to the Verific source code from YosysHQ are required, but limited useability can be achieved with some stock Verific builds. Check :doc:`/yosys_internals/extending_yosys/build_verific` for more. .. _Frontend: Yosys frontends ~~~~~~~~~~~~~~~ - :doc:`/cmd/index_frontends` - typically start with ``read_`` - built-in support for heredocs + in-line code with ``<