Skip to content

Commit

Permalink
Merge pull request #29 from gdsfactory/multi_pdk
Browse files Browse the repository at this point in the history
make CORNERSTONE package support all the different pdks
  • Loading branch information
joamatab authored May 4, 2024
2 parents 1d208f9 + 71d35ad commit 0a73a37
Show file tree
Hide file tree
Showing 426 changed files with 2,889 additions and 1,999 deletions.
15 changes: 6 additions & 9 deletions .github/write_components_plot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import inspect

from cspdk import _cells as cells
from cspdk.config import PATH
from cspdk.si220 import _cells as cells
from cspdk.si220.config import PATH

filepath = PATH.repo / "docs" / "cells.rst"

Expand All @@ -15,10 +15,7 @@
f.write(
"""
Here are the components available in the PDK
Cells
Cells Si220
=============================
"""
)
Expand All @@ -43,7 +40,7 @@
{name}
----------------------------------------------------
.. autofunction:: cspdk.cells.{name}
.. autofunction:: cspdk.si220.cells.{name}
"""
)
Expand All @@ -54,14 +51,14 @@
{name}
----------------------------------------------------
.. autofunction:: cspdk.cells.{name}
.. autofunction:: cspdk.si220.cells.{name}
.. plot::
:include-source:
import cspdk
c = cspdk.cells.{name}({kwargs})
c = cspdk.si220.cells.{name}({kwargs})
c.plot()
"""
Expand Down
41 changes: 0 additions & 41 deletions cspdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,42 +1 @@
from gdsfactory.cross_section import get_cross_sections
from gdsfactory.get_factories import get_cells
from gdsfactory.pdk import Pdk

from cspdk import cells, config, tech
from cspdk.cells import _bend, _straight, _taper
from cspdk.config import PATH
from cspdk.models import get_models
from cspdk.tech import LAYER, LAYER_STACK, LAYER_VIEWS, routing_strategies

_models = get_models()
_cells = get_cells(cells)
_cells.update(
{
"_straight": _straight,
"_bend": _bend,
"_taper": _taper,
}
)
_cross_sections = get_cross_sections(tech)
PDK = Pdk(
name="cornerstone",
cells=_cells,
cross_sections=_cross_sections,
layers=dict(LAYER),
layer_stack=LAYER_STACK,
layer_views=LAYER_VIEWS,
models=_models,
routing_strategies=routing_strategies,
)
PDK.activate()

__all__ = [
"LAYER",
"LAYER_STACK",
"LAYER_VIEWS",
"PATH",
"cells",
"config",
"tech",
]
__version__ = "0.7.0"
41 changes: 41 additions & 0 deletions cspdk/si220/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
from gdsfactory.cross_section import get_cross_sections
from gdsfactory.get_factories import get_cells
from gdsfactory.pdk import Pdk

from cspdk.si220 import cells, config, tech
from cspdk.si220.cells import _bend, _straight, _taper
from cspdk.si220.config import PATH
from cspdk.si220.models import get_models
from cspdk.si220.tech import LAYER, LAYER_STACK, LAYER_VIEWS, routing_strategies

_models = get_models()
_cells = get_cells(cells)
_cells.update(
{
"_straight": _straight,
"_bend": _bend,
"_taper": _taper,
}
)
_cross_sections = get_cross_sections(tech)
PDK = Pdk(
name="cornerstone_si220",
cells=_cells,
cross_sections=_cross_sections,
layers=dict(LAYER),
layer_stack=LAYER_STACK,
layer_views=LAYER_VIEWS,
models=_models,
routing_strategies=routing_strategies,
)
PDK.activate()

__all__ = [
"LAYER",
"LAYER_STACK",
"LAYER_VIEWS",
"PATH",
"cells",
"config",
"tech",
]
Loading

0 comments on commit 0a73a37

Please sign in to comment.