bugpoint - minimize testcases¶
yosys> help bugpoint¶
bugpoint [options] [-script <filename> | -command "<command>"]
This command minimizes the current design that is known to crash Yosys with the given script into a smaller testcase. It does this by removing an arbitrary part of the design and recursively invokes a new Yosys process with this modified design and the same script, repeating these steps while it can find a smaller design that still causes a crash. Once this command finishes, it replaces the current design with the smallest testcase it was able to produce. In order to save the reduced testcase you must write this out to a file with another command after `bugpoint` like `write_rtlil` or `write_verilog`.
-script <filename> | -command "<command>"
use this script file or command to crash Yosys. required.
use this Yosys binary. if not specified, `yosys` is used.
only consider crashes that place this string in the log file.
run `proc_clean; clean -purge` after each minimization step. converges faster, but produces larger testcases, and may fail to produce any testcase at all if the crash is related to dangling wires.
run `proc_clean; clean -purge` before checking testcase and after finishing. produces smaller and more useful testcases, but may fail to produce any testcase at all if the crash is related to dangling wires.
It is possible to constrain which parts of the design will be considered for removal. Unless one or more of the following options are specified, all parts will be considered.
try to remove modules. modules with a (* bugpoint_keep *) attribute will be skipped.
try to remove module ports. ports with a (* bugpoint_keep *) attribute will be skipped (useful for clocks, resets, etc.)
try to remove cells. cells with a (* bugpoint_keep *) attribute will be skipped.
try to reconnect ports to 'x.
try to remove processes. processes with a (* bugpoint_keep *) attribute will be skipped.
try to remove process assigns from cases.
try to remove process updates from syncs.
child process wrapping command, e.g., "timeout 30", or valgrind.