Directional coupler and grating coupler added

This commit is contained in:
2026-05-04 17:33:40 +08:00
parent 802ab5115d
commit 37ecf0fab3
7 changed files with 2232 additions and 37 deletions
+40 -4
View File
@@ -1,4 +1,4 @@
# <span style="color: #6decff;">mxPIC Quick-Reference Style Guide</span>
# <span style="color: #5573fa;">mxPIC Quick-Reference Style Guide</span>
Welcome to the collaboration of the repository of **mxPIC** program. This repository is aimed for a self-designed PDK that based on ***nazca***, ***gdstk*** and other libraries for the functional build up of photonic integrated circuits (PIC).
@@ -11,7 +11,35 @@ This is the fast-track guide to contributing to **mxPIC**. Adherence to these ru
- pandas 0.12.0
-
## <span style="color: #ff57c7;">1. Annotation & Documentation</span>
## <span style="color: #ff57c7;">1. File & architecture</span>
The repository have an archtecture like this.
```
mxpic_forge/
├── primitives/
│ ├── edge_couplers/
│ │ └── EC_dual_layer_px3.py
│ ├── multimode_interferomters/
│ ├── directional_couplers/
│ ├── grating_couplers/
│ └── microring_modulators/
├── composite/
│ └── mach_zender_modulators/
├── electronics/
│ ├── resistors/
│ ├── inductors/
│ ├── vias/
│ └── pads/
├── others/
├── structures/
├── routing/
├── foundries/
└── docs/
└── source/
└── conf.py
```
## <span style="color: #ff57c7;">2. Annotation & Documentation</span>
We strictly use **Type Hints** (PEP 484) and **NumPy-Style Docstrings**.
* <span style="color: #d2a8ff;">**Rule:**</span> Every function MUST have its parameter types and return type explicitly declared.
@@ -42,7 +70,7 @@ We strictly use **Type Hints** (PEP 484) and **NumPy-Style Docstrings**.
```
---
## <span style="color: #ff57c7;">2. Class mangement of devices</span>
## <span style="color: #ff57c7;">3. Class mangement of devices</span>
The devices are divided into four major types, which is <span style="color: #d2a8ff;">**primitives, composite, electronics, and others**</span>. All photonic and electronic devices are built within the for types.
In the definitial of classes, compulsary keys are required, including **name** , **show_pins** , all defaults are None.
All classes are cored at the **cell** class of **nazca**, which is generated through an internal method named "generate_gds"
@@ -62,7 +90,7 @@ class GratingCoupler():
return C
```
---
## <span style="color: #ff57c7;">3. Port information formatting</span>
## <span style="color: #ff57c7;">4. Port information formatting</span>
The basic routing algorthium is based the information between nodes, which is the **pin** attribute inside each file. The formatting of **pin** name will be important.
**<span style="color: #bf0000;">Note</span>**: The pin name should only be related to different functionalities instead of material, layer or shaped. Say, the pin name of a *silicon directional coupler* is the same as a *silicon nitride directional coupler*.
@@ -77,3 +105,11 @@ The basic routing algorthium is based the information between nodes, which is th
| Transistors (MOS)| ele_ | gt/su/dr | 1~x | ele_gt1 | MOSFET
## <span style="color: #ff57c7;">5. Layer and cross-sections</span>
Inside **nazca**, an important feature is the concept of **cross-sections (xs)**. Typically, **xs** is a conbination of different layers which is required by the foundry DRC. Below is a example in Silterra tapeout.
``` python
nazca.add_xsection("strip")
nazca.add_layer_to_xsection("WG_HM",growx=2,growy=2)
nazca.add_layer_to_xsection("WG_STRIP",growx=2,growy=2)
```