Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding dualgate table rules #3

Merged
merged 73 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
17f5f07
- Adding klayout dualgate table.
atorkmabrains Jan 27, 2023
de58f88
Clean up linting issues. Change in the regression for CI to run one t…
atorkmabrains Jan 27, 2023
ce978a6
Adding yaml package required for running regression.
atorkmabrains Jan 27, 2023
88da3d8
Clean up run regression to make it cleaner and work as expected.
atorkmabrains Jan 27, 2023
7983f16
Complete regression script update to make sure it would generate error.
atorkmabrains Jan 27, 2023
9c1d098
Update makefile.
atorkmabrains Jan 27, 2023
91ff358
Make code flake8 clean.
atorkmabrains Jan 27, 2023
87f7d87
Dealing with results case.
atorkmabrains Jan 27, 2023
60589c7
Make sure that CI fail in case of failure
atorkmabrains Jan 27, 2023
9caedda
Clean flake8 issue.
atorkmabrains Jan 27, 2023
141ccb6
Remove echo to force issue.
atorkmabrains Jan 27, 2023
9090986
Allow all CI to run for regression in case of one failed.
atorkmabrains Jan 27, 2023
03eb74b
Update regression to make sure to do proper filtering.
atorkmabrains Jan 29, 2023
d4808c7
Moving switches parsing to make sure that the yaml file at the same l…
atorkmabrains Jan 29, 2023
90ed803
Update README.md
atorkmabrains Jan 30, 2023
2e50bd5
Update README.md
atorkmabrains Jan 30, 2023
91a8cf4
Update README.md
atorkmabrains Jan 30, 2023
279d74f
Update README.md
atorkmabrains Jan 30, 2023
cd7a98f
Update README.md
atorkmabrains Jan 30, 2023
e7b5b39
Modify the deepnwell derived layers definitions based on findings fro…
atorkmabrains Jan 30, 2023
c80ddb0
Clean up the flake8.
atorkmabrains Jan 30, 2023
74edb5b
Considering the case if the rule is not implemented.
atorkmabrains Jan 30, 2023
e318be6
Adding dualgate svg.
atorkmabrains Jan 30, 2023
ce8dfdb
Remove the comment of the switches.
atorkmabrains Jan 31, 2023
18b0b49
Add exit status 1 for bad variant.
atorkmabrains Jan 31, 2023
38947c3
Add klayout version string in error message.
atorkmabrains Jan 31, 2023
ea1012e
Moving verison message at the buttom.
atorkmabrains Jan 31, 2023
2eb8999
Merging the klayout version conditions
atorkmabrains Jan 31, 2023
4cad41e
Change the version check to error.
atorkmabrains Jan 31, 2023
dcc0e32
Providing gds file path with error.
atorkmabrains Jan 31, 2023
5f14c44
Multiple fixes in one commit.
atorkmabrains Jan 31, 2023
d76f45a
Remove unused procedure.
atorkmabrains Jan 31, 2023
a3e0124
Clean up logging.
atorkmabrains Jan 31, 2023
6659ae2
Update the selection of the file.
atorkmabrains Jan 31, 2023
e826996
Fix the fix path issue.
atorkmabrains Jan 31, 2023
8c1ce87
Adding intentional pass condition for reporting.
atorkmabrains Jan 31, 2023
6e0718c
Update README.md
atorkmabrains Jan 31, 2023
eddd7d4
Clean up version checking.
atorkmabrains Jan 31, 2023
a5f9900
Clean up run regression and run drc to make them work properly for ou…
atorkmabrains Jan 31, 2023
167ed09
Clean up code with black.
atorkmabrains Jan 31, 2023
4c502f8
Cover the case if there is only fail patterns for the rule.
atorkmabrains Jan 31, 2023
35b40da
Make sure to check if the counts of pass or fail patterns is incorrect.
atorkmabrains Jan 31, 2023
50f671b
Make sure to raise an exception even if partial database exist.
atorkmabrains Jan 31, 2023
48fe5ed
Change back the regression.
atorkmabrains Jan 31, 2023
22f9d3a
Add more rules for case where the run fails.
atorkmabrains Jan 31, 2023
75cc940
Add more rules for case where the run fails.
atorkmabrains Jan 31, 2023
f5a84b5
Consider rule syntax exception.
atorkmabrains Jan 31, 2023
3600070
Consider rule syntax exception.
atorkmabrains Jan 31, 2023
325ec22
Fix typo.
atorkmabrains Jan 31, 2023
6d7eca6
Adding hint to --topcell switch.
atorkmabrains Jan 31, 2023
08f92a4
Removed the commented line about list_res_db_files.
atorkmabrains Jan 31, 2023
fffbc35
Update README.rst
atorkmabrains Feb 1, 2023
ee005a3
Update README.rst
atorkmabrains Feb 1, 2023
9b84836
Update README.rst
atorkmabrains Feb 1, 2023
2448465
Update README.rst
atorkmabrains Feb 1, 2023
f18b431
Adding DV.7 pass pattern , Fixing natcomp def, Adding new svg for dua…
FaragElsayed2 Feb 1, 2023
773e5d3
Fix logging of verbose mode.
atorkmabrains Feb 1, 2023
75c95c8
Cleaning up the get_polygon function.
atorkmabrains Feb 1, 2023
fc02994
Fix the metal2 dummy addition.
atorkmabrains Feb 1, 2023
7fa2159
Update to get the number of processors from inside ruby.
atorkmabrains Feb 1, 2023
53bdede
Updating actions to run drc regression
FaragElsayed2 Feb 1, 2023
d6fbdba
Merge pull request #27 from efabless/git_actions
atorkmabrains Feb 1, 2023
6a694f7
Adding link to documentation to refer to the rule that is not impleme…
atorkmabrains Feb 1, 2023
32bad21
Updating regression to catch extremely short error edges
FaragElsayed2 Feb 1, 2023
dfda317
Cleaning regression script
FaragElsayed2 Feb 1, 2023
f5d7fb6
Changing the check for 6LM
atorkmabrains Feb 2, 2023
d6fd778
Add logger error for the connectivity check.
atorkmabrains Feb 2, 2023
8aab0c1
Fix the report location string.
atorkmabrains Feb 2, 2023
9ca4c20
Remove klayout direct run command.
atorkmabrains Feb 2, 2023
9677658
Updating path resolution in the main drc.
atorkmabrains Feb 2, 2023
9693bc9
Updating regression to catch extremely short error edges
FaragElsayed2 Feb 2, 2023
637ed18
Merge branch 'main' of https://github.com/efabless/globalfoundries-pd…
FaragElsayed2 Feb 2, 2023
2894444
Fixing an issue in catching extremely short error edges
FaragElsayed2 Feb 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ jobs:
regression:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
fail-fast: false
matrix:
include:
- { tool: klayout, part: drc, test: main }
proppy marked this conversation as resolved.
Show resolved Hide resolved
proppy marked this conversation as resolved.
Show resolved Hide resolved
- { tool: klayout, part: drc, test: dualgate }
- { tool: klayout, part: drc, test: switch }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't that already coverred by drc_regression?

- { tool: klayout, part: lvs, test: main }
- { tool: klayout, part: lvs, test: switch }
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ __pycache__/
*.py[cod]
*$py.class

klayout/drc/testing/unit_tests_*

# C extensions
*.so

Expand Down
28 changes: 21 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ REQUIREMENTS_FILE := requirements.txt
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
ENVIRONMENT_FILE := pdk_regression.yml

# Path to regression
KLAYOUT_TESTS := klayout/drc/testing/

include third_party/make-env/conda.mk

# Lint python code
Expand All @@ -31,21 +34,32 @@ lint: | $(CONDA_ENV_PYTHON)
################################################################################
## DRC Regression section
################################################################################
# DRC main testing
test-DRC-main: | $(CONDA_ENV_PYTHON)
@$(IN_CONDA_ENV) klayout -v
#=================================
# ----- test-DRC_regression ------
#=================================
.ONESHELL:
test-DRC-main : | $(CONDA_ENV_PYTHON)
@$(IN_CONDA_ENV) python3 $(KLAYOUT_TESTS)/run_regression.py

# DRC main testing
.ONESHELL:
test-DRC-% : | $(CONDA_ENV_PYTHON)
@which python3
@$(IN_CONDA_ENV) python3 $(KLAYOUT_TESTS)/run_regression.py --table=$*

#=================================
# -------- test-DRC-switch -------
#=================================
# LVS main testing
test-DRC-switch: | $(CONDA_ENV_PYTHON)
@$(IN_CONDA_ENV) klayout -v

################################################################################
## DRC Regression section
## LVS Regression section
################################################################################
# DRC main testing
# LVS main testing
test-LVS-main: | $(CONDA_ENV_PYTHON)
@$(IN_CONDA_ENV) klayout -v

# DRC main testing
# LVS main testing
test-LVS-switch: | $(CONDA_ENV_PYTHON)
@$(IN_CONDA_ENV) klayout -v
82 changes: 82 additions & 0 deletions klayout/drc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# DRC Documentation

Explains how to use the runset.

## Folder Structure

```text
📁drc
┣ 📁testing
┣ 📁rule_decks
┣ 📜README.md
┗ 📜run_drc.py
```

## Rule Deck Usage
The `run_drc.py` script takes a gds file to run DRC rule decks of GF180 technology with switches to select subsets of all checks.

### Requirements
Please make sure to use the latest Klayout setup at your side. To install klayout, please refer to documentation at [klayout build](https://www.klayout.de/build.html).

Also, please make sure to install the required python packages at `requirements.txt` by using
proppy marked this conversation as resolved.
Show resolved Hide resolved
```bash
pip install -r requirements.txt
```

### Metal Stack Options
We have a list of metal stack options which corresponds to the following:
- **Option A** : combined options of metal_level=3, mim_option=A, metal_top=30K, poly_res=1K, and mim_cap=2
- **Option B** : combined options of metal_level=4, mim_option=B, metal_top=11K, poly_res=1K, and mim_cap=2
- **Option C** : combined options of metal_level=5, mim_option=B, metal_top=9K, poly_res=1K, and mim_cap=2

### Usage

```bash
run_drc.py (--help| -h)
run_drc.py (--path=<file_path>) (--gf180mcu=<combined_options>) [--topcell=<topcell_name>] [--thr=<thr>] [--run_mode=<run_mode>] [--no_feol] [--no_beol] [--connectivity] [--density] [--density_only] [--antenna] [--antenna_only] [--no_offgrid]
```

Example:

```bash
python3 run_drc.py --path=testing/switch_checking/simple_por.gds.gz --thr=16 --run_mode=flat --gf180mcu=A --antenna --no_offgrid
```

### Options

- `--help -h` Print this help message.

- `--path=<file_path>` The input GDS file path.

- `--gf180mcu=<combined_options>` Select combined options of metal_top, mim_option, and metal_level. Allowed values (A, B, C).
- gf180mcu=A: Select metal_top=30K mim_option=A metal_level=3LM
- gf180mcu=B: Select metal_top=11K mim_option=B metal_level=4LM
- gf180mcu=C: Select metal_top=9K mim_option=B metal_level=5LM

- `--topcell=<topcell_name>` Topcell name to use.

- `--thr=<thr>` The number of threads used in run.

- `--run_mode=<run_mode>` Select klayout mode Allowed modes (flat , deep, tiling). [default: flat]

- `--no_feol` Turn off FEOL rules from running.

- `--no_beol` Turn off BEOL rules from running.

- `--connectivity` Turn on connectivity rules.

- `--density` Turn on Density rules.

- `--density_only` Turn on Density rules only.

- `--antenna` Turn on Antenna checks.

- `--antenna_only` Turn on Antenna checks only.

- `--no_offgrid` Turn off OFFGRID checking rules.

### **DRC Outputs**

Results will appear at the end of the run logs.

The result is a database file (`<your_design_name>.lyrdb`) of all violations in the same directoy of your design. you could view it on your file using klayout.
87 changes: 87 additions & 0 deletions klayout/drc/rule_decks/dualgate.drc
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
################################################################################################
proppy marked this conversation as resolved.
Show resolved Hide resolved
# Copyright 2022 GlobalFoundries PDK Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################################

if FEOL
#================================================
#--------------------DUALGATE--------------------
#================================================

# Rule DV.1: Min. Dualgate enclose DNWELL. is 0.5µm
logger.info("Executing rule DV.1")
dv1_l1 = dualgate.enclosing(dnwell, 0.5.um, euclidian).polygons(0.001)
dv1_l2 = dnwell.not_outside(dualgate).not(dualgate)
dv1_l = dv1_l1.or(dv1_l2)
dv1_l.output("DV.1", "DV.1 : Min. Dualgate enclose DNWELL. : 0.5µm")
dv1_l1.forget
dv1_l2.forget
dv1_l.forget

# Rule DV.2: Min. Dualgate Space. Merge if Space is less than this design rule. is 0.44µm
logger.info("Executing rule DV.2")
dv2_l1 = dualgate.space(0.44.um, euclidian).polygons(0.001)
dv2_l1.output("DV.2", "DV.2 : Min. Dualgate Space. Merge if Space is less than this design rule. : 0.44µm")
dv2_l1.forget

# Rule DV.3: Min. Dualgate to COMP space [unrelated]. is 0.24µm
logger.info("Executing rule DV.3")
dv3_l1 = dualgate.separation(comp.outside(dualgate), 0.24.um, euclidian).polygons(0.001)
dv3_l1.output("DV.3", "DV.3 : Min. Dualgate to COMP space [unrelated]. : 0.24µm")
dv3_l1.forget

# rule DV.4 is not a DRC check
proppy marked this conversation as resolved.
Show resolved Hide resolved

# Rule DV.5: Min. Dualgate width. is 0.7µm
logger.info("Executing rule DV.5")
dv5_l1 = dualgate.width(0.7.um, euclidian).polygons(0.001)
dv5_l1.output("DV.5", "DV.5 : Min. Dualgate width. : 0.7µm")
dv5_l1.forget

comp_dv = comp.not(pcomp.outside(nwell))
# Rule DV.6: Min. Dualgate enclose COMP (except substrate tap). is 0.24µm
logger.info("Executing rule DV.6")
dv6_l1 = dualgate.enclosing(comp_dv, 0.24.um, euclidian).polygons(0.001)
dv6_l2 = comp_dv.not_outside(dualgate).not(dualgate)
dv6_l = dv6_l1.or(dv6_l2)
dv6_l.output("DV.6", "DV.6 : Min. Dualgate enclose COMP (except substrate tap). : 0.24µm")
dv6_l1.forget
dv6_l2.forget
dv6_l.forget

# Rule DV.7: COMP (except substrate tap) can not be partially overlapped by Dualgate.
logger.info("Executing rule DV.7")
dv7_l1 = dualgate.not_outside(comp_dv).not(dualgate.covering(comp_dv))
dv7_l1.output("DV.7", "DV.7 : COMP (except substrate tap) can not be partially overlapped by Dualgate.")
dv7_l1.forget

comp_dv.forget

# Rule DV.8: Min Dualgate enclose Poly2. is 0.4µm
proppy marked this conversation as resolved.
Show resolved Hide resolved
logger.info("Executing rule DV.8")
dv8_l1 = dualgate.enclosing(poly2, 0.4.um, euclidian).polygons(0.001)
dv8_l2 = poly2.not_outside(dualgate).not(dualgate)
dv8_l = dv8_l1.or(dv8_l2)
dv8_l.output("DV.8", "DV.8 : Min Dualgate enclose Poly2. : 0.4µm")
dv8_l1.forget
dv8_l2.forget
dv8_l.forget

# Rule DV.9: 3.3V and 5V/6V PMOS cannot be sitting inside same NWELL.
proppy marked this conversation as resolved.
Show resolved Hide resolved
logger.info("Executing rule DV.9")
dv9_l1 = nwell.covering(pgate.and(dualgate)).covering(pgate.not_inside(v5_xtor).not_inside(dualgate))
dv9_l1.output("DV.9", "DV.9 : 3.3V and 5V/6V PMOS cannot be sitting inside same NWELL.")
dv9_l1.forget
end #FEOL

Loading