Skip to content

Commit d5e48ce

Browse files
bugpoint.rst: How to sv-bugpoint
1 parent f8cc37d commit d5e48ce

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docs/source/using_yosys/bugpoint.rst

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ the ``-expect error "<string>" 1`` option to perform a similar role to
287287
is still valid.
288288

289289
.. code-block:: bash
290-
:caption: Example test.sh
290+
:caption: Example test.sh for C-Reduce
291291
:name: egtest
292292
293293
#!/bin/bash
@@ -320,6 +320,25 @@ minimize the design to just the failing code, while still being valid Verilog.
320320
end endmodule
321321
322322
323+
sv-bugpoint
324+
~~~~~~~~~~~
325+
326+
sv-bugpoint works quite similarly to C-Reduce, except it requires an output
327+
directory to be provided and the check script needs to accept the target file as
328+
an input argument: ``sv-bugpoint outDir/ test.sh test.v``
329+
330+
.. code-block:: bash
331+
:caption: Example test.sh for sv-bugpoint
332+
333+
#!/bin/bash
334+
verilator --lint-only $1 &&/
335+
yosys -p "logger -expect error \"unsupported\" 1; read_verilog $1"
336+
337+
Notice that the commands for ``yosys -p`` are now in double quotes (``"``), and
338+
the quotes around the error string are escaped (``\"``). This is necessary for
339+
the ``$1`` argument subsitution to work correctly.
340+
341+
323342
Doing it manually
324343
~~~~~~~~~~~~~~~~~
325344

0 commit comments

Comments
 (0)