Skip to content

Commit e69b3c5

Browse files
Add component thumbnails
Signed-off-by: Lucas Heitzmann Gabrielli <[email protected]>
1 parent f1aa504 commit e69b3c5

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "1.1.1"
44
authors = [{name = "Flexcompute Inc.", email = "[email protected]"}]
55
description = "SiEPIC PDK implementation for PhotonForge"
66
readme = "README.md"
7-
dependencies = ["photonforge >= 1.1.4"]
7+
dependencies = ["photonforge >= 1.1.7"]
88

99
[project.optional-dependencies]
1010
test = ["pytest >= 7.2"]

siepic_forge/component.py

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
((12.88, 0.975), 180, "SiN_TE_1550_750"),
6363
],
6464
None,
65+
"mmi",
6566
),
6667
"GC_SiN_TE_1310_8degOxide_BB": (
6768
"EBeam_SiN",
@@ -71,6 +72,7 @@
7172
((-29.7, 0.0), (_vx8, 0, _vy8), _waist, 90),
7273
],
7374
None,
75+
"grating-coupler",
7476
),
7577
"GC_SiN_TE_1550_8degOxide_BB": (
7678
"EBeam_SiN",
@@ -80,6 +82,7 @@
8082
((-29.7, 0.0), (_vx8, 0, _vy8), _waist, 90),
8183
],
8284
None,
85+
"grating-coupler",
8386
),
8487
"ebeam_MMI_2x2_5050_te1310": (
8588
"EBeam_SiN",
@@ -91,6 +94,7 @@
9194
((16.72, 1.2), 180, "SiN_TE_1550_800"),
9295
],
9396
{"port_symmetries": _symmetries_mmi22},
97+
"mmi",
9498
),
9599
"ebeam_YBranch_te1310": (
96100
"EBeam_SiN",
@@ -101,6 +105,7 @@
101105
((15.5, 1.0), 180, "SiN_TE_1310_800"),
102106
],
103107
{"port_symmetries": _symmetries_3port},
108+
"y-splitter",
104109
),
105110
"crossing_horizontal": (
106111
"EBeam_SiN",
@@ -112,6 +117,7 @@
112117
((37.83, 17.12), 180, "SiN_TE_1550_750"),
113118
],
114119
{"port_symmetries": _symmetries_directional_coupler},
120+
"crossing",
115121
),
116122
"crossing_manhattan": (
117123
"EBeam_SiN",
@@ -123,12 +129,14 @@
123129
((0.0, 3.5), 270, "SiN_TE_1550_750"),
124130
],
125131
{"port_symmetries": _symmetries_crossing2},
132+
"crossing",
126133
),
127134
"ebeam_BondPad": (
128135
"EBeam_SiN",
129136
"ebeam_BondPad",
130137
[((0, 0), (100, 100), "M2_router")],
131138
None,
139+
"bondpad",
132140
),
133141
"ebeam_DC_2-1_te895": (
134142
"EBeam_SiN",
@@ -140,6 +148,7 @@
140148
((14.56, 2.285), 180, "SiN_TE_895_450"),
141149
],
142150
{"port_symmetries": _symmetries_directional_coupler},
151+
"dc",
143152
),
144153
"ebeam_DC_te895": (
145154
"EBeam_SiN",
@@ -151,12 +160,14 @@
151160
((14.137, 2.285), 180, "SiN_TE_895_450"),
152161
],
153162
{"port_symmetries": _symmetries_directional_coupler},
163+
"dc",
154164
),
155165
"ebeam_Polarizer_TM_1550_UQAM": (
156166
"EBeam_SiN",
157167
"ebeam_Polarizer_TM_1550_UQAM",
158168
[((-6.0, 0.0), 0, "SiN_TE-TM_1550_1000"), ((6.0, 0.0), 180, "SiN_TE-TM_1550_1000")],
159169
{},
170+
None,
160171
),
161172
"ebeam_YBranch_895": (
162173
"EBeam_SiN",
@@ -167,6 +178,7 @@
167178
((15.0, 2.75), 180, "SiN_TE_895_450"),
168179
],
169180
{"port_symmetries": _symmetries_3port},
181+
"y-splitter",
170182
),
171183
"ebeam_gc_te895": (
172184
"EBeam_SiN",
@@ -176,18 +188,21 @@
176188
((-29.0, 0), (_te895_vx, 0, _te895_vy), _waist, 90),
177189
],
178190
{"symmetry": (0, -1, 0), "bounds": ((None, -10, None), (25, 10, None))},
191+
"grating-coupler",
179192
),
180193
"ebeam_terminator_SiN_1550": (
181194
"EBeam_SiN",
182195
"ebeam_terminator_SiN_1550",
183196
[((0.0, 0.0), 180, "SiN_TE_1550_750")],
184197
{},
198+
"termination",
185199
),
186200
"ebeam_terminator_SiN_te895": (
187201
"EBeam_SiN",
188202
"ebeam_terminator_SiN_te895",
189203
[((0.0, 0.0), 180, "SiN_TE_895_450")],
190204
{},
205+
"termination",
191206
),
192207
"taper_SiN_750_3000": (
193208
"EBeam_SiN",
@@ -197,6 +212,7 @@
197212
((50.0, 0.0), 180, "MM_SiN_TE_1550_3000"),
198213
],
199214
{},
215+
"taper",
200216
),
201217
"GC_TE_1310_8degOxide_BB": (
202218
"EBeam",
@@ -206,6 +222,7 @@
206222
((-20.4, 0.0), (_vx8, 0, _vy8), _waist, 90),
207223
],
208224
None,
225+
"grating-coupler",
209226
),
210227
"GC_TE_1550_8degOxide_BB": (
211228
"EBeam",
@@ -215,6 +232,7 @@
215232
((-20.4, 0.0), (_vx8, 0, _vy8), _waist, 90),
216233
],
217234
None,
235+
"grating-coupler",
218236
),
219237
"GC_TM_1310_8degOxide_BB": (
220238
"EBeam",
@@ -224,6 +242,7 @@
224242
((-20.4, 0.0), (_vx8, 0, _vy8), _waist, 0),
225243
],
226244
None,
245+
"grating-coupler",
227246
),
228247
"GC_TM_1550_8degOxide_BB": (
229248
"EBeam",
@@ -233,6 +252,7 @@
233252
((-20.4, 0.0), (_vx8, 0, _vy8), _waist, 0),
234253
],
235254
None,
255+
"grating-coupler",
236256
),
237257
"ebeam_adiabatic_te1550": (
238258
"EBeam",
@@ -244,6 +264,7 @@
244264
((195.9, 1.5), 180, "TE_1550_500"),
245265
],
246266
{},
267+
"dc",
247268
),
248269
"ebeam_adiabatic_tm1550": (
249270
"EBeam",
@@ -255,6 +276,7 @@
255276
((217.9, 1.5), 180, "TM_1550_500"),
256277
],
257278
{},
279+
"dc",
258280
),
259281
"ebeam_bdc_te1550": (
260282
"EBeam",
@@ -266,6 +288,7 @@
266288
((35.3, 2.35), 180, "TE_1550_500"),
267289
],
268290
{},
291+
"dc",
269292
),
270293
"ebeam_crossing4": (
271294
"EBeam",
@@ -277,6 +300,7 @@
277300
((0.0, 4.8), 270, "TE_1550_500"),
278301
],
279302
{"port_symmetries": _symmetries_crossing},
303+
"crossing",
280304
),
281305
"ebeam_gc_te1550": (
282306
"EBeam",
@@ -286,6 +310,7 @@
286310
((-20.4, 0.0), (_te1550_vx, 0, _te1550_vy), _waist, 90),
287311
],
288312
{"symmetry": (0, -1, 0), "bounds": ((-33, -11, None), (None, 11, None))},
313+
"grating-coupler",
289314
),
290315
"ebeam_gc_tm1550": (
291316
"EBeam",
@@ -295,6 +320,7 @@
295320
((-24.4, 0.0), (_tm1550_vx, 0, _tm1550_vy), _waist, 0),
296321
],
297322
{"symmetry": (0, 1, 0), "bounds": ((None, -11, None), (None, 11, None))},
323+
"grating-coupler",
298324
),
299325
"ebeam_routing_taper_te1550_w=500nm_to_w=3000nm_L=20um": (
300326
"EBeam",
@@ -304,6 +330,7 @@
304330
((20.0, 0.0), 180, "MM_TE_1550_3000"),
305331
],
306332
{},
333+
"taper",
307334
),
308335
"ebeam_routing_taper_te1550_w=500nm_to_w=3000nm_L=40um": (
309336
"EBeam",
@@ -313,6 +340,7 @@
313340
((40.0, 0.0), 180, "MM_TE_1550_3000"),
314341
],
315342
{},
343+
"taper",
316344
),
317345
"ebeam_splitter_swg_assist_te1310": (
318346
"EBeam",
@@ -324,6 +352,7 @@
324352
((63.001, 2.0), 180, "TE_1310_350"),
325353
],
326354
{},
355+
"dc",
327356
),
328357
"ebeam_splitter_swg_assist_te1550": (
329358
"EBeam",
@@ -335,24 +364,28 @@
335364
((63.001, 1.975), 180, "TE_1550_500"),
336365
],
337366
{},
367+
"dc",
338368
),
339369
"ebeam_terminator_te1310": (
340370
"EBeam",
341371
"ebeam_terminator_te1310",
342372
[((0.0, 0.0), 180, "TE_1310_350")],
343373
{},
374+
"termination",
344375
),
345376
"ebeam_terminator_te1550": (
346377
"EBeam",
347378
"ebeam_terminator_te1550",
348379
[((0.0, 0.0), 180, "TE_1550_500")],
349380
{},
381+
"termination",
350382
),
351383
"ebeam_terminator_tm1550": (
352384
"EBeam",
353385
"ebeam_terminator_tm1550",
354386
[((0.0, 0.0), 180, "TM_1550_500")],
355387
{},
388+
"termination",
356389
),
357390
"ebeam_y_1550": (
358391
"EBeam",
@@ -363,6 +396,7 @@
363396
((7.4, 2.75), 180, "TE_1550_500"),
364397
],
365398
{"port_symmetries": _symmetries_3port},
399+
"y-splitter",
366400
),
367401
"ebeam_y_adiabatic": (
368402
"EBeam",
@@ -373,6 +407,7 @@
373407
((50.05, 1.25), 180, "TE-TM_1550_450"),
374408
],
375409
{"port_symmetries": _symmetries_3port},
410+
"y-splitter",
376411
),
377412
"ebeam_y_adiabatic_500pin": (
378413
"EBeam",
@@ -383,18 +418,21 @@
383418
((51.0, 1.25), 180, "TE_1550_500"),
384419
],
385420
{"port_symmetries": _symmetries_3port},
421+
"y-splitter",
386422
),
387423
"taper_si_simm_1310": (
388424
"EBeam",
389425
"taper_si_simm_1310",
390426
[((50.0, 0.0), 180, "MM_TE_1550_3000"), ((0.0, 0.0), 0, "TE_1310_350")],
391427
{},
428+
"taper",
392429
),
393430
"taper_si_simm_1550": (
394431
"EBeam",
395432
"taper_si_simm_1550",
396433
[((50.0, 0.0), 180, "MM_TE_1550_3000"), ((0.0, 0.0), 0, "TE_1550_500")],
397434
{},
435+
"taper",
398436
),
399437
}
400438

@@ -419,7 +457,9 @@ def component(
419457
The available component names are listed in the module-level tuple
420458
``component_names``.
421459
"""
422-
family, libname, port_data, kwargs = _component_data.get(cell_name, (None, None, None, None))
460+
family, libname, port_data, kwargs, thumbnail = _component_data.get(
461+
cell_name, (None, None, None, None)
462+
)
423463
if family is None:
424464
raise KeyError(f"{cell_name} is not a library component.")
425465

@@ -438,6 +478,9 @@ def component(
438478
with as_file(gdsii) as fname:
439479
c = pf.load_layout(fname, technology=technology)[cell_name]
440480

481+
if thumbnail:
482+
c.properties.__thumbnail__ = thumbnail
483+
441484
# Add ports
442485
z = technology.parametric_kwargs.get("top_oxide_thickness", -1.0)
443486
if z > 0:

0 commit comments

Comments
 (0)