read_verilog - read modules from Verilog file
read_verilog [options] [filename]
Load modules from a Verilog file to the current design. A large subset of
Verilog-2005 is supported.
enable support for SystemVerilog features. (only a small subset
of SystemVerilog is supported)
enable support for SystemVerilog assertions and some Yosys extensions
replace the implicit -D SYNTHESIS with -D FORMAL
ignore restrict() assertions
treat all assert() statements like assume() statements
dump abstract syntax tree (before simplification)
dump abstract syntax tree (after simplification)
dump ast as Verilog code (after simplification)
dump generated RTLIL netlist
enable parser debug output
usually latches are synthesized into logic loops
this option prohibits this and sets the output to 'x'
in what would be the latches hold condition
this behavior can also be achieved by setting the
'nolatches' attribute on the respective module or
under certain conditions memories are converted to registers
early during simplification to ensure correct handling of
complex corner cases. this option disables this behavior.
this can also be achieved by setting the 'nomem2reg'
attribute on the respective module or register.
This is potentially dangerous. Usually the front-end has good
reasons for converting an array to a list of registers.
Prohibiting this step will likely result in incorrect synthesis
always convert memories to registers. this can also be
achieved by setting the 'mem2reg' attribute on the respective
module or register.
do not infer $meminit cells and instead convert initialized
memories to registers directly in the front-end.
dump Verilog code after pre-processor
do not run the pre-processor
disable DPI-C support
only create empty blackbox modules. This implies -DBLACKBOX.
don't perform basic optimizations (such as const folding) in the
interpret cell types starting with '$' as internal cell types
ignore re-definitions of modules. (the default behavior is to
create an error message.)
only read the abstract syntax tree and defer actual compilation
to a later 'hierarchy' command. Useful in cases where the default
parameters of modules yield invalid or not synthesizable code.
make the default of `default_nettype be "none" instead of "wire".
set the specified attribute (to the value 1) on all loaded modules
define the preprocessor symbol 'name' and set its optional value
add 'dir' to the directories which are used when searching include
The command 'verilog_defaults' can be used to register default options for
subsequent calls to 'read_verilog'.
Note that the Verilog frontend does a pretty good job of processing valid
verilog input, but has not very good error reporting. It generally is
recommended to use a simulator (for example Icarus Verilog) for checking
the syntax of the code, rather than to rely on read_verilog for that.
See the Yosys README file for a list of non-standard Verilog features
supported by the Yosys Verilog front-end.