3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-02-07 17:48:00 +00:00
yosys/tests/unit/kernel
Natalia fb864e91ee Add Design::run_pass() API for programmatic pass execution
This commit adds a new run_pass() method to the RTLIL::Design class,
providing a convenient API for executing Yosys passes programmatically.

This is particularly useful for PyYosys users who want to run passes
on a design object without needing to manually construct Pass::call()
invocations. The method wraps Pass::call() with appropriate logging
to maintain consistency with command-line pass execution.

Example usage (from Python):
    design = ys.Design()
    # ... build or load design ...
    design.run_pass("hierarchy")
    design.run_pass("proc")
    design.run_pass("opt")

Changes:
- kernel/rtlil.h: Add run_pass() method declaration
- kernel/rtlil.cc: Implement run_pass() method
- tests/unit/kernel/test_design_run_pass.cc: Add unit tests
2026-01-14 17:35:45 -08:00
..
bitpatternTest.cc bitpattern: unit test 2025-08-18 19:57:45 +02:00
hashTest.cc hashlib: extend unit test with subset collisions, shorten runtime 2025-08-20 00:08:23 +02:00
ioTest.cc Support IdString parameters in stringf 2025-09-01 23:34:42 +00:00
logTest.cc Added required structure to implement unit tests 2016-12-04 11:34:27 -02:00
rtlilStringTest.cc Add rtlil string getters 2026-01-14 15:37:18 +01:00
rtlilTest.cc Optimize IdString operations to avoid calling c_str() 2025-11-12 11:52:04 +01:00
test_design_run_pass.cc Add Design::run_pass() API for programmatic pass execution 2026-01-14 17:35:45 -08:00