Merge pull request #4705 from YosysHQ/docs-preview-lintonly

Emphasise that read_verilog doesn't lint
This commit is contained in:
KrystalDelusion 2024-11-19 03:57:01 +13:00 committed by GitHub
commit 22e214ec6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 26 additions and 3 deletions

View File

@ -266,6 +266,16 @@ The command ``prep`` provides a good default word-level synthesis script, as
used in SMT-based formal verification. used in SMT-based formal verification.
Additional information
======================
The ``read_verilog`` command, used by default when calling ``read`` with Verilog
source input, does not perform syntax checking. You should instead lint your
source with another tool such as
[Verilator](https://www.veripool.org/verilator/) first, e.g. by calling
``verilator --lint-only``.
Unsupported Verilog-2005 Features Unsupported Verilog-2005 Features
================================= =================================

View File

@ -5,7 +5,7 @@ module addr_gen
) ( input en, clk, rst, ) ( input en, clk, rst,
output reg [AWIDTH-1:0] addr output reg [AWIDTH-1:0] addr
); );
initial addr <= 0; initial addr = 0;
// async reset // async reset
// increment address when enabled // increment address when enabled
@ -13,7 +13,7 @@ module addr_gen
if (rst) if (rst)
addr <= 0; addr <= 0;
else if (en) begin else if (en) begin
if (addr == MAX_DATA-1) if ({'0, addr} == MAX_DATA-1)
addr <= 0; addr <= 0;
else else
addr <= addr + 1; addr <= addr + 1;
@ -57,7 +57,7 @@ module fifo
); );
// status signals // status signals
initial count <= 0; initial count = 0;
always @(posedge clk or posedge rst) begin always @(posedge clk or posedge rst) begin
if (rst) if (rst)

View File

@ -30,6 +30,14 @@ First, let's quickly look at the design we'll be synthesizing:
.. todo:: fifo.v description .. todo:: fifo.v description
While the open source `read_verilog` frontend generally does a pretty good job
at processing valid Verilog input, it does not provide very good error handling
or reporting. Using an external tool such as `verilator`_ before running Yosys
is highly recommended. We can quickly check the Verilog syntax of our design by
calling ``verilator --lint-only fifo.v``.
.. _verilator: https://www.veripool.org/verilator/
Loading the design Loading the design
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~

View File

@ -69,9 +69,14 @@ Things you can't do
- Check out `nextpnr`_ for that - Check out `nextpnr`_ for that
- Rely on built-in syntax checking
- Use an external tool like `verilator`_ instead
.. todo:: nextpnr for FPGAs, consider mentioning openlane, vpr, coriolis .. todo:: nextpnr for FPGAs, consider mentioning openlane, vpr, coriolis
.. _nextpnr: https://github.com/YosysHQ/nextpnr .. _nextpnr: https://github.com/YosysHQ/nextpnr
.. _verilator: https://www.veripool.org/verilator/
The Yosys family The Yosys family
---------------- ----------------