From 507e316d92243b5afda45cb833eee962da2685c0 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Fri, 21 Mar 2025 11:32:46 +1300 Subject: [PATCH] docs: Some extra bugpoint bullets --- docs/source/using_yosys/bugpoint.rst | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/source/using_yosys/bugpoint.rst b/docs/source/using_yosys/bugpoint.rst index 9b402858e..d292c2d32 100644 --- a/docs/source/using_yosys/bugpoint.rst +++ b/docs/source/using_yosys/bugpoint.rst @@ -67,8 +67,11 @@ Minimizing RTLIL designs with bugpoint + output design after `bugpoint` with `write_rtlil` + use ``-grep ""`` to only accept a minimized design that crashes with the ```` in the log file + + * only checks log file, will not match runtime errors + + ``-modules``, ``-ports``, ``-cells``, and ``-processes`` will enable those - parts of the design to be removed + parts of the design to be removed (default is allow removing all) * use the ``bugpoint_keep`` attribute on objects you don't want to be removed, usually because you already know they are related to the failure @@ -89,6 +92,23 @@ Minimizing RTLIL designs with bugpoint others such as ``YOSYS_NOVERIFIC`` and ``HOME`` are evaluated each time they are used. +- check minimized design still fails, especially if not using `write_rtlil` + + + e.g. if you ran :ref:`bugpoint_script` below, then calling ``yosys -s + min.v`` should still fail in the same way + + `write_rtlil` is more reliable since `bugpoint` will have run that exact + code through the failing script; other ``write_*`` commands convert from the + RTLIL and then back again during the ``read_*`` which can result in + differences which mean the design no longer fails + +.. code-block:: yoscrypt + :caption: example `bugpoint` minimizer + :name: bugpoint_script + + read_verilog design.v + bugpoint -script + write_verilog min.v + .. _minimize your script: