run_drc

irys.drc.run_drc(gds_file, rule_file, top_cell_name, threads=None, db_output_file=None, show_engine_output=False, include_groups=None, include_rules=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.

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, only the rules defined in the ‘include_rules’ are checked. If both ‘include_groups’ and ‘include_rules’ are not provided, the rules defined in all_group are checked. You can retrieve them using the deck parser, see parse_rule_file.

include_rules: list[str], optional

List of rules defined in the DRC deck to be selected for checks. If not provided, only the rules defined in the ‘include_groups’ are checked. If both ‘include_rules’ and ‘include_groups’are not provided, the rules defined in ‘all_groups’ are checked.

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.