Skip to content

Commit

Permalink
update to gdsfactory8
Browse files Browse the repository at this point in the history
  • Loading branch information
joamatab committed Aug 23, 2024
1 parent 1c9b34b commit 9f89a37
Show file tree
Hide file tree
Showing 29 changed files with 1,826 additions and 1,797 deletions.
46 changes: 0 additions & 46 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,49 +25,3 @@ repos:
rev: 953faa6870f6663ac0121ab4a800f1ce76bca31f
hooks:
- id: shellcheck

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: "v1.0.1"
# hooks:
# - id: mypy
# exclude: ^(docs/|example-plugin/|tests/fixtures)
# additional_dependencies:
# - "pydantic"

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: d2425a62376c2197448cce2f825d5a0c3926b862
hooks:
- id: pretty-format-toml
args: [--autofix]

# - repo: https://github.com/aristanetworks/j2lint.git
# rev: 742a25ef5da996b9762f167ebae9bc8223e8382e
# hooks:
# - id: j2lint
# types: [file]
# files: \.(j2|yml|yaml)$
# args: [--extensions, "j2,yml,yaml", --ignore, jinja-statements-delimiter, jinja-statements-indentation, --]
# exclude: .github/.*
- repo: https://github.com/codespell-project/codespell
rev: 38bc4a97f6e22827e86526148efa38f1044a97f8
hooks:
- id: codespell
additional_dependencies:
- tomli

# - repo: https://github.com/kynan/nbstripout
# rev: e4c5b4dcbab4afa0b88b7a9243db42b1a8d95dde
# hooks:
# - id: nbstripout
# files: ".ipynb"
# - repo: https://github.com/pre-commit/pygrep-hooks
# rev: 7b4409161486c6956bb3206ce96db5d56731b1b9 # Use the ref you want to point at
# hooks:
# - id: python-use-type-annotations
# - repo: https://github.com/PyCQA/bandit
# rev: fe1361fdcc274850d4099885a802f2c9f28aca08
# hooks:
# - id: bandit
# args: [--exit-zero]
# # ignore all tests, not just tests data
# exclude: ^tests/
2 changes: 1 addition & 1 deletion gf180/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
PDK = Pdk(
name="gf180",
cells=cells,
layers=dict(LAYER),
layers=LAYER,
layer_views=LAYER_VIEWS,
# layer_stack=LAYER_STACK,
)
Expand Down
26 changes: 13 additions & 13 deletions gf180/cap_mim.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,53 +83,53 @@ def cap_mim(
size=(m_up.size[0], m_up.size[1]), layer=layer["fusetop"]
)
)
fusetop.xmin = m_up.xmin
fusetop.ymin = m_up.ymin
fusetop.dxmin = m_up.dxmin
fusetop.dymin = m_up.dymin

mim_l_mk = c.add_ref(
gf.components.rectangle(size=(fusetop.size[0], l_mk_w), layer=layer["mim_l_mk"])
)
mim_l_mk.xmin = fusetop.xmin
mim_l_mk.ymin = fusetop.ymin
mim_l_mk.dxmin = fusetop.dxmin
mim_l_mk.dymin = fusetop.dymin

m_dn = c.add_ref(
gf.components.rectangle(
size=(m_up.size[0] + (2 * bot_enc_top), m_up.size[1] + (2 * bot_enc_top)),
layer=bottom_layer,
)
)
m_dn.xmin = m_up.xmin - bot_enc_top
m_dn.ymin = m_up.ymin - bot_enc_top
m_dn.dxmin = m_up.dxmin - bot_enc_top
m_dn.dymin = m_up.dymin - bot_enc_top

cap_mk = c.add_ref(
gf.components.rectangle(
size=(m_dn.size[0], m_dn.size[1]), layer=layer["cap_mk"]
)
)
cap_mk.xmin = m_dn.xmin
cap_mk.ymin = m_dn.ymin
cap_mk.dxmin = m_dn.dxmin
cap_mk.dymin = m_dn.dymin

# generating labels
if label == 1:
c.add_label(
top_label,
position=(m_up.xmin + (m_up.size[0] / 2), m_dn.xmin + (m_dn.size[1] / 2)),
position=(m_up.dxmin + (m_up.size[0] / 2), m_dn.dxmin + (m_dn.size[1] / 2)),
layer=up_label_layer,
)

c.add_label(
bot_label,
position=(
m_dn.xmin + (m_dn.size[0] / 2),
m_dn.ymin + (m_up.ymin - m_dn.ymin) / 2,
m_dn.dxmin + (m_dn.size[0] / 2),
m_dn.dymin + (m_up.dymin - m_dn.dymin) / 2,
),
layer=bot_label_layer,
)

# generating vias
via = via_generator(
x_range=(m_up.xmin, m_up.xmax),
y_range=(m_up.ymin, m_up.ymax),
x_range=(m_up.dxmin, m_up.dxmax),
y_range=(m_up.dymin, m_up.dymax),
via_enclosure=via_enc,
via_layer=via_layer,
via_size=via_size,
Expand Down
Loading

0 comments on commit 9f89a37

Please sign in to comment.