Skip to content

Commit

Permalink
update to latest kfactory
Browse files Browse the repository at this point in the history
  • Loading branch information
joamatab committed Oct 9, 2023
1 parent 11011cc commit 20adba2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions gplugins/klayout/dataprep/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class RegionCollection:
"""

def __init__(self, gdspath, cell_name: str | None = None) -> None:
lib = kf.kcell.KCLayout()
lib = kf.kcell.KCLayout(str(gdspath))
lib.read(filename=str(gdspath))
self.layout = lib.cell_by_name(cell_name) if cell_name else lib.top_cell()
self.lib = lib
Expand Down Expand Up @@ -189,7 +189,7 @@ def get_fill(
fill_cell = kf.KCell(fill_cellname)
for layer in fill_layers:
layer = kf.kcl.layer(*layer)
fill_cell << kf.cells.straight.straight(
_ = fill_cell << kf.cells.straight.straight(
width=size[0], length=size[1], layer=layer
)

Expand Down Expand Up @@ -220,7 +220,7 @@ def get_fill(

d = RegionCollection(gdspath)
d[LAYER.N] = d[LAYER.WG].copy()
d[LAYER.WG].clear()
# d[LAYER.WG].clear()

# d[LAYER.SLAB90] += 2 # grow slab by 2um
# d[LAYER.SLAB90] -= 2 # shrink slab by 2um
Expand All @@ -237,8 +237,8 @@ def get_fill(
d[LAYER.FLOORPLAN] - d[LAYER.WG],
size=(0.1, 0.1),
spacing=(0.1, 0.1),
fill_layers=(d[LAYER.WG],),
fill_layers=(LAYER.WG,),
)
c = d.get_kcell()
_ = c << fill_cell
fill_cell.write("fill.gds")
c.write("fill.gds")
2 changes: 1 addition & 1 deletion gplugins/klayout/get_netlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def get_l2n(gdspath, klayout_tech_path: PathType | None = None) -> kdb.LayoutToN
klayout_tech_path: Path to the klayout technology file.
"""
lib = kf.kcell.KCLayout()
lib = kf.kcell.KCLayout(str(gdspath))
lib.read(filename=str(gdspath))
c = lib[0]

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ gmsh = [
"meshwell>=1.0.0,<1.1.0"
]
klayout = [
"kfactory[git,ipy]>=0.8.4,<0.9"
"kfactory[git,ipy]>=0.9.3,<0.10"
]
meow = [
"jaxlib",
Expand Down

0 comments on commit 20adba2

Please sign in to comment.