8 Commits

529 changed files with 65921 additions and 7427 deletions
+27 -44
View File
@@ -1,67 +1,50 @@
name: Build and Release mxPIC Wheels name: Build Linux and Release mxPIC
# This tells GitHub to ONLY run this pipeline when you push a version tag (e.g., v1.0.0)
on: on:
release: release:
types: [published] [published]
jobs: jobs:
# --- JOB 1: THE COMPILER --- build-and-release:
build-wheels: name: Build Linux & Publish Release
name: Build on ${{ matrix.os }} # This targets your Docker runner on the Synology NAS
# The matrix allows us to build for Windows and Linux simultaneously! runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.10']
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python 3.10
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python-version }} python-version: '3.10'
- name: Install Build Dependencies - name: Install Build Dependencies
# Install the tools required by our custom build_wheel.py script
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install build wheel mypy Cython setuptools pip install build wheel mypy Cython setuptools
- name: Run Auto-Builder (Compiles C-extensions & Injects .pyi) - name: Run Auto-Builder (Compiles Linux C-extensions & Injects .pyi)
# This generates the linux_x86_64.whl inside the dist/ folder
run: python build_wheel.py run: python build_wheel.py
- name: Temporarily Store the Built Wheel - name: Export Technology Manifests
uses: actions/upload-artifact@v4 run: python scripts/export_technology_manifests.py --dest exported_PDKs
with:
name: mxpic-wheels-${{ matrix.os }} - name: Inject Prebuilt Windows Wheel
path: dist/*.whl # This copies your locally-built Windows wheel into the dist/ folder
retention-days: 1 # so they sit side-by-side right before the release is published.
run: |
# --- JOB 2: THE RELEASER --- if [ -d "prebuilt_wheels" ]; then
create-release: cp prebuilt_wheels/*.whl dist/ || true
name: Publish to GitHub Releases echo "✅ Windows wheel staged for release."
needs: build-wheels # Waits for both Windows and Linux to finish else
runs-on: ubuntu-latest echo "⚠️ No prebuilt_wheels directory found."
permissions: fi
contents: write # Required to allow the bot to create a release page
- name: Create Gitea Release
steps: uses: https://gitea.com/actions/release-action@main
- name: Checkout Code
uses: actions/checkout@v4
- name: Download all OS Wheels
uses: actions/download-artifact@v4
with:
pattern: mxpic-wheels-*
path: dist
merge-multiple: true
- name: Upload Assets to Gitea Release
uses: softprops/action-gh-release@v1
with: with:
# This command scopes up everything currently sitting in the dist/ folder
files: "dist/*.whl" files: "dist/*.whl"
api_key: ${{ secrets.GITEA_TOKEN }} api_key: ${{ secrets.GITEA_TOKEN }}
+11 -8
View File
@@ -7,6 +7,7 @@ This is the fast-track guide to contributing to **mxPIC**. Adherence to these ru
### <span style="color: #ff57c7;">0. Installation dependencies</span> ### <span style="color: #ff57c7;">0. Installation dependencies</span>
- python 3.10.1 - python 3.10.1
- nazca 0.5.13 - nazca 0.5.13
- build 1.4.4
- gdstk 1.0.0 - gdstk 1.0.0
- numpy 1.22.3 - numpy 1.22.3
- pandas 1.3.3 - pandas 1.3.3
@@ -16,15 +17,12 @@ This is the fast-track guide to contributing to **mxPIC**. Adherence to these ru
- myst-parser 3.0.1 - myst-parser 3.0.1
- sphinx-rtd-theme 3.1.0 - sphinx-rtd-theme 3.1.0
```
pip install sphinx myst-parser sphinx-rtd-theme gdstk==1.0.0
```
## <span style="color: #ff57c7;">1. File & architecture</span> ## <span style="color: #ff57c7;">1. File & architecture</span>
The repository have an archtecture like this. The repository have an archtecture like this.
``` ```
mxpic_forge/ mxpic/
├── primitives/ ├── primitives/
│ ├── edge_couplers/ │ ├── edge_couplers/
│ │ └── EC_dual_layer_px3.py │ │ └── EC_dual_layer_px3.py
@@ -42,10 +40,8 @@ mxpic_forge/
├── others/ ├── others/
├── structures/ ├── structures/
├── routing/ ├── routing/
── foundries/ ── foundries/
└── docs/
└── source/
└── conf.py
``` ```
## <span style="color: #ff57c7;">2. Annotation & Documentation</span> ## <span style="color: #ff57c7;">2. Annotation & Documentation</span>
@@ -84,6 +80,7 @@ The devices are divided into four major types, which is <span style="color: #d2a
In the definitial of classes, compulsary keys are required, including **name** , **show_pins** , all defaults are None. 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" All classes are cored at the **cell** class of **nazca**, which is generated through an internal method named "generate_gds"
``` python ``` python
class GratingCoupler(): class GratingCoupler():
def __init__(self,name:"str"=None,....,show_pins:bool=None) def __init__(self,name:"str"=None,....,show_pins:bool=None)
@@ -98,6 +95,12 @@ class GratingCoupler():
return C return C
``` ```
Please not that each class can be directly generated without any argument input which requires all the arguements to have default values, example below :
``` python
grating = GratingCoupler()
```
--- ---
## <span style="color: #ff57c7;">4. 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. 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.
+18 -7
View File
@@ -1,9 +1,20 @@
# import mxpic as mx import mxpic as mx
import mxpic_release.mxpic as mx import nazca as nd
import numpy as np
EC = mx.EC_dual_layer_px3(name="xxx",w_in=0.5,L_in=10,Ltp1=10,Ltp2=10,Ltp3=10) w_teeth_SiN = 0.5*np.ones(30)
gap_teeth_SiN = 0.5*np.ones(30)
# import uuid w_teeth_Si = 0.45*np.ones(30)
# mac = uuid.getnode() gap_teeth_Si = 0.45*np.ones(30)
# mc_addr = ':'.join(("%012X" % mac)[i:i+2] for i in range(0, 12, 2))
# print(mc_addr)
tapeout = mx.foundries.Silterra.EOM1_2ML_CU()
GC = mx.grating_couplers.GC_SiN_Si_Dual_Layer(name="test",
w_teeth_SiN=w_teeth_SiN,gap_teeth_SiN=gap_teeth_SiN,
w_teeth_Si=w_teeth_Si,gap_teeth_Si=gap_teeth_Si,
layer_Si_teeth="WG_HM",layer_Si_slab="WG_HIGHRIB",
layer_SiN_etch="SiN_Rib_WG",layer_SiN_slab="WG_N")
nd.export_gds(topcells=GC.cell,filename="..\\test.gds")
+1 -1
View File
@@ -56,7 +56,7 @@ def build_and_harvest():
# shutil.copy2(file_path, target_dir / file) # shutil.copy2(file_path, target_dir / file)
# (Optional) Copy non-code assets like config files or templates # (Optional) Copy non-code assets like config files or templates
elif file.endswith((".json", ".yaml", ".yml")): elif file.endswith((".csv", ".json", ".yaml", ".yml")):
shutil.copy2(file_path, target_dir / file) shutil.copy2(file_path, target_dir / file)
print("✨ Cleanup: Removing intermediate .c files from source...") print("✨ Cleanup: Removing intermediate .c files from source...")
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Some files were not shown because too many files have changed in this diff Show More