Skip to content

Commit

Permalink
remove the temp generated gds
Browse files Browse the repository at this point in the history
  • Loading branch information
RehabSayed-G committed Aug 2, 2023
1 parent 422836a commit f18e6fc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cells/klayout/pymacros/cells/draw_cap_mim.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from .via_generator import via_generator, via_stack
from .layers_def import layer
import os


def draw_cap_mim(
Expand Down Expand Up @@ -139,5 +140,6 @@ def draw_cap_mim(
c.write_gds("mim_cap_temp.gds")
layout.read("mim_cap_temp.gds")
cell_name = "mim_cap_dev"
os.remove("mim_cap_temp.gds")

return layout.cell(cell_name)
2 changes: 2 additions & 0 deletions cells/klayout/pymacros/cells/draw_cap_mos.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from .layers_def import layer

import numpy as np
import os


@gf.cell
Expand Down Expand Up @@ -538,5 +539,6 @@ def draw_cap_mos(
c.write_gds("cap_mos_temp.gds")
layout.read("cap_mos_temp.gds")
cell_name = "cap_mos_dev"
os.remove("cap_mos_temp.gds")

return layout.cell(cell_name)
7 changes: 7 additions & 0 deletions cells/klayout/pymacros/cells/draw_diode.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from .via_generator import via_generator, via_stack

import numpy as np
import os


def draw_diode_nd2ps(
Expand Down Expand Up @@ -363,6 +364,7 @@ def draw_diode_nd2ps(
c.write_gds("diode_nd2ps_temp.gds")
layout.read("diode_nd2ps_temp.gds")
cell_name = "diode_nd2ps_dev"
os.remove("diode_nd2ps_temp.gds")

return layout.cell(cell_name)

Expand Down Expand Up @@ -696,6 +698,7 @@ def draw_diode_pd2nw(
c.write_gds("diode_pd2nw_temp.gds")
layout.read("diode_pd2nw_temp.gds")
cell_name = "diode_pd2nw_dev"
os.remove("diode_pd2nw_temp.gds")

return layout.cell(cell_name)

Expand Down Expand Up @@ -836,6 +839,7 @@ def draw_diode_nw2ps(
c.write_gds("diode_nw2ps_temp.gds")
layout.read("diode_nw2ps_temp.gds")
cell_name = "diode_nw2ps_dev"
os.remove("diode_nw2ps_temp.gds")

return layout.cell(cell_name)

Expand Down Expand Up @@ -1272,6 +1276,7 @@ def draw_diode_pw2dw(
c.write_gds("diode_pw2dw_temp.gds")
layout.read("diode_pw2dw_temp.gds")
cell_name = "diode_pw2dw_dev"
os.remove("diode_pw2dw_temp.gds")

return layout.cell(cell_name)

Expand Down Expand Up @@ -1673,6 +1678,7 @@ def draw_diode_dw2ps(
c.write_gds("diode_dw2ps_temp.gds")
layout.read("diode_dw2ps_temp.gds")
cell_name = "diode_dw2ps_dev"
os.remove("diode_dw2ps_temp.gds")

return layout.cell(cell_name)

Expand Down Expand Up @@ -2068,5 +2074,6 @@ def sc_anode_strap(size: Float2 = (0.1, 0.1)) -> gf.Component:
c.write_gds("sc_diode_temp.gds")
layout.read("sc_diode_temp.gds")
cell_name = "sc_diode_dev"
os.remove("sc_diode_temp.gds")

return layout.cell(cell_name)
8 changes: 8 additions & 0 deletions cells/klayout/pymacros/cells/draw_res.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from gdsfactory.types import LayerSpec, Float2
from .layers_def import layer
from .via_generator import via_generator, via_stack
import os


def draw_metal_res(
Expand Down Expand Up @@ -107,6 +108,7 @@ def draw_metal_res(
c.write_gds("res_temp.gds")
layout.read("res_temp.gds")
cell_name = "res_dev"
os.remove("res_temp.gds")

return layout.cell(cell_name)

Expand Down Expand Up @@ -475,6 +477,7 @@ def draw_nplus_res(
c.write_gds("res_temp.gds")
layout.read("res_temp.gds")
cell_name = "res_dev"
os.remove("res_temp.gds")

return layout.cell(cell_name)

Expand Down Expand Up @@ -559,6 +562,7 @@ def draw_pplus_res(
c.write_gds("res_temp.gds")
layout.read("res_temp.gds")
cell_name = "res_dev"
os.remove("res_temp.gds")

return layout.cell(cell_name)

Expand Down Expand Up @@ -767,6 +771,7 @@ def draw_npolyf_res(
c.write_gds("res_temp.gds")
layout.read("res_temp.gds")
cell_name = "res_dev"
os.remove("res_temp.gds")

return layout.cell(cell_name)

Expand Down Expand Up @@ -842,6 +847,7 @@ def draw_ppolyf_res(
c.write_gds("res_temp.gds")
layout.read("res_temp.gds")
cell_name = "res_dev"
os.remove("res_temp.gds")

return layout.cell(cell_name)

Expand Down Expand Up @@ -1055,6 +1061,7 @@ def draw_ppolyf_u_high_Rs_res(
c.write_gds("res_temp.gds")
layout.read("res_temp.gds")
cell_name = "res_dev"
os.remove("res_temp.gds")

return layout.cell(cell_name)

Expand Down Expand Up @@ -1231,5 +1238,6 @@ def comp_related_gen(size: Float2 = (0.42, 0.42)) -> gf.Component:
c.write_gds("res_temp.gds")
layout.read("res_temp.gds")
cell_name = "res_dev"
os.remove("res_temp.gds")

return layout.cell(cell_name)

0 comments on commit f18e6fc

Please sign in to comment.