Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8462c3397f | |||
| a4ac88f002 | |||
| 54d20eb154 | |||
| 8a17f1dde0 | |||
| 8da92ced57 | |||
| 518eb06591 | |||
| 52be015967 | |||
| 9f2e3f3f78 |
@@ -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 }}
|
|
||||||
path: dist/*.whl
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
# --- JOB 2: THE RELEASER ---
|
- name: Inject Prebuilt Windows Wheel
|
||||||
create-release:
|
# This copies your locally-built Windows wheel into the dist/ folder
|
||||||
name: Publish to GitHub Releases
|
# so they sit side-by-side right before the release is published.
|
||||||
needs: build-wheels # Waits for both Windows and Linux to finish
|
run: |
|
||||||
runs-on: ubuntu-latest
|
if [ -d "prebuilt_wheels" ]; then
|
||||||
permissions:
|
cp prebuilt_wheels/*.whl dist/ || true
|
||||||
contents: write # Required to allow the bot to create a release page
|
echo "✅ Windows wheel staged for release."
|
||||||
|
else
|
||||||
steps:
|
echo "⚠️ No prebuilt_wheels directory found."
|
||||||
- name: Checkout Code
|
fi
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Download all OS Wheels
|
- name: Create Gitea Release
|
||||||
uses: actions/download-artifact@v4
|
uses: https://gitea.com/actions/release-action@main
|
||||||
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 }}
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
@@ -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")
|
||||||
@@ -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...")
|
||||||
@@ -66,4 +66,4 @@ def build_and_harvest():
|
|||||||
print(f"\n🚀 Success! Your secure package is ready in: {release_dir.parent.resolve()}")
|
print(f"\n🚀 Success! Your secure package is ready in: {release_dir.parent.resolve()}")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
build_and_harvest()
|
build_and_harvest()
|
||||||
|
|||||||
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 296 KiB |
|
After Width: | Height: | Size: 158 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 294 KiB |
|
After Width: | Height: | Size: 240 KiB |
|
After Width: | Height: | Size: 298 KiB |
|
After Width: | Height: | Size: 277 KiB |
|
After Width: | Height: | Size: 249 KiB |
|
After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 212 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 156 KiB |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 155 KiB |
|
After Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 441 KiB |
|
After Width: | Height: | Size: 425 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 40 KiB |