mirror of
https://github.com/YosysHQ/yosys
synced 2026-02-07 17:48:00 +00:00
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
|
||
|---|---|---|
| .. | ||
| bitpatternTest.cc | ||
| hashTest.cc | ||
| ioTest.cc | ||
| logTest.cc | ||
| rtlilStringTest.cc | ||
| rtlilTest.cc | ||
| test_design_run_pass.cc | ||