Skip to content

Commit d47724e

Browse files
authored
Merge pull request #7 from BYUCamachoLab/skandan
Add dbr component
2 parents a90b399 + 45aad99 commit d47724e

File tree

5 files changed

+105
-210
lines changed

5 files changed

+105
-210
lines changed

README.md

+21-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
Skywater photonics PDK for the SKY130 process node.
44

5-
## Usage
6-
75
## Installation
6+
7+
As of now, this PDK is not on PyPI.
8+
9+
So, to install it, you would need to:
10+
11+
1. Clone the repo
12+
2. cd into the repo
13+
3. Run `pip install -e .`
14+
15+
## TODO
16+
17+
- Add component library
18+
- Add tests
19+
- Test components
20+
21+
## Authors
22+
23+
- Skandan Chandrasekar
24+
- Sequoia Ploeg
25+
- Elise Bangerter
26+
- Joel Kartchner

sky130ph/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@
77
__author__ = "SkandanC <[email protected]>"
88
from typing import List
99

10-
1110
__all__: List[str] = []

sky130ph/components.py

+84
Original file line numberDiff line numberDiff line change
@@ -1 +1,85 @@
11
"""Photonic component library."""
2+
3+
4+
import gdsfactory as gf
5+
from gdsfactory import cell, get_component
6+
7+
8+
@cell
9+
def _dbr_cell(
10+
w1: float = 0.5,
11+
w2: float = 0.65,
12+
l1: float = 0.288,
13+
l2: float = 0.288,
14+
straight: gf.types.ComponentSpec = gf.components.straight,
15+
) -> gf.Component:
16+
"""Distributed Bragg Reflector unit cell.
17+
18+
Args:
19+
w1: thin width in um.
20+
l1: thin length in um.
21+
w2: thick width in um.
22+
l2: thick length in um.
23+
n: number of periods.
24+
straight: spec in um.
25+
26+
.. code::
27+
28+
l1 l2
29+
<-----><-------->
30+
_________
31+
_______|
32+
33+
w1 w2
34+
_______
35+
|_________
36+
"""
37+
l1 = gf.snap.snap_to_grid(l1)
38+
l2 = gf.snap.snap_to_grid(l2)
39+
w1 = gf.snap.snap_to_grid(w1, 2)
40+
w2 = gf.snap.snap_to_grid(w2, 2)
41+
c = gf.Component()
42+
c1 = c << get_component(straight, length=l1, width=w1, cross_section="nitride")
43+
c2 = c << get_component(straight, length=l2, width=w2, cross_section="strip")
44+
c2.connect(port="o1", destination=c1.ports["o2"])
45+
c.add_port("o1", port=c1.ports["o1"])
46+
c.add_port("o2", port=c2.ports["o2"])
47+
return c
48+
49+
50+
@gf.cell
51+
def dbr() -> gf.Component:
52+
"""Distributed Bragg Reflector.
53+
54+
.. code::
55+
56+
0.288um 0.288um
57+
<-------><------>
58+
________ _______
59+
| |_______|
60+
| | |
61+
| 0.5um | 0.65um| ... 10 times
62+
| |_______|
63+
|_______| |_______
64+
"""
65+
c = gf.Component()
66+
l1 = gf.snap.snap_to_grid(0.288)
67+
l2 = gf.snap.snap_to_grid(0.288)
68+
cell = _dbr_cell()
69+
c.add_array(cell, columns=10, rows=1, spacing=(l1 + l2, 100))
70+
starting_rect = c << gf.get_component(
71+
"straight", length=l2, width=0.65, cross_section="strip"
72+
)
73+
starting_rect.move(starting_rect.center, (-0.144, 0))
74+
c.add_port("o1", port=starting_rect.ports["o1"])
75+
p1 = c.add_port("o2", port=cell.ports["o2"])
76+
p1.center = [(l1 + l2) * 10, 0]
77+
return c
78+
79+
80+
if __name__ == "__main__":
81+
import gdsfactory as gf
82+
83+
c = dbr()
84+
c.show()
85+
print(c.to_yaml())

sky130ph/layers.py

-194
This file was deleted.

sky130ph/tech.py

-13
This file was deleted.

0 commit comments

Comments
 (0)