DRC

DRC#

For running this DRC examples you will require to open Klayout and make sure you have klive extension installed.

image.png

as well as gdsfactoryPlus

pip install gdsfactoryplus --upgrade

Then you need to configure your PDK, URLs and Keys to point to the correct deployment.

To do this, ensure you create a config file in ~/.gdsfactory/gdsfactoryplus.toml with the default gdsfactoryplus settings. For example:

[tool.gdsfactoryplus.api]
key = "<your-api-key>"

NOTE: You can also use this as a template for your own global gdsfactoryplus config or your per-project pyproject.toml file.

Now you have 2 options:

  1. Create a GDS file with errors using GDSFactory PDK.

  2. Upload an existing GDS

Let’s create a GDS with some DRC errors, run DRC on the remote server and review the results locally in your computer.

option = 1

if option == 1:
    from cspdk.si220.samples.drc_errors import errors

    c = errors()
    gdspath = c.write_gds()
    c.plot()
elif option == 2:
    from tkinter import filedialog

    gdspath = filedialog.askopenfilename()
_images/240b4de76bad2faebee81549ee8449f76e777105a517678e3c027b55d092a640.png
?gfp.check_drc
Object `gfp.check_drc` not found.
import pathlib

lyrdb = gfp.check_drc(gdspath)
lyrdb_path = pathlib.Path("errors.lyrdb")
lyrdb_path.write_text(lyrdb)
gf.show(gdspath, lyrdb=lyrdb_path)

If you have a valid API key you can now browse through the errors in klayout.