run_drc
- luceda.drc.run_drc(gds_file, rule_file, top_cell_name, threads=None, db_output_file=None, show_engine_output=False, include_groups=None)
Executes a Design Rule Check (DRC) on a specified GDSII file. The results are written to .lyrdb report file in the same directory as the GDSII file.
If the rule file specifies density_group, any density checks will be reported to a separate .lyrdb file in the same destination directory. It has the same name as the first results file, but with a _density suffix. If TECH.DUMMY_FILLING is defined, dummy filling is performed on the layout before running the density checks.
- Parameters:
- gds_file: str | Path
Path to the input GDSII layout file.
- rule_file: str | Path
Path to the main DRC rule deck file.
- top_cell_name: str
The name of the cell in the GDS to be checked.
- threads: int, optional
Number of threads for the DRC engine to use. By default, it uses as many threads as possible.
- db_output_file: str | Path, optional
Path to the output .lyrdb file. If not provided, the file is created in the same directory as the GDSII file.
- show_engine_output: bool, optional
Whether to display DRC engine output in the terminal. False by default.
- include_groups: list[str], optional
Groups of rules defined in the DRC deck to be selected for checks. If not provided, the rules defined in all_group are checked. You can retrieve them using the deck parser, see
parse_rule_file.
- Returns:
- bool:
True if the DRC passes (no violations found), False if violations exist.
Notes
This requires the rule deck to follow a particular structure.
A group all_group should be defined that groups all rules that will be run by default. If include_groups argument is not specified, the rules in all_group will be run.
Density checks should be grouped in a group density_group. If the all_group or any group selected by include_groups contains a density check, dummy filling will be applied if defined in TECH.DUMMY_FILLING, and density checks will be run separately.