From d5e48ce75a0facbddb4e68a80dcf4c83c1e7d855 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Sat, 14 Jun 2025 14:28:43 +1200 Subject: [PATCH] bugpoint.rst: How to sv-bugpoint --- docs/source/using_yosys/bugpoint.rst | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/source/using_yosys/bugpoint.rst b/docs/source/using_yosys/bugpoint.rst index 5c4bf3ae7..41fc60cdb 100644 --- a/docs/source/using_yosys/bugpoint.rst +++ b/docs/source/using_yosys/bugpoint.rst @@ -287,7 +287,7 @@ the ``-expect error "" 1`` option to perform a similar role to is still valid. .. code-block:: bash - :caption: Example test.sh + :caption: Example test.sh for C-Reduce :name: egtest #!/bin/bash @@ -320,6 +320,25 @@ minimize the design to just the failing code, while still being valid Verilog. end endmodule +sv-bugpoint +~~~~~~~~~~~ + +sv-bugpoint works quite similarly to C-Reduce, except it requires an output +directory to be provided and the check script needs to accept the target file as +an input argument: ``sv-bugpoint outDir/ test.sh test.v`` + +.. code-block:: bash + :caption: Example test.sh for sv-bugpoint + + #!/bin/bash + verilator --lint-only $1 &&/ + yosys -p "logger -expect error \"unsupported\" 1; read_verilog $1" + +Notice that the commands for ``yosys -p`` are now in double quotes (``"``), and +the quotes around the error string are escaped (``\"``). This is necessary for +the ``$1`` argument subsitution to work correctly. + + Doing it manually ~~~~~~~~~~~~~~~~~