updated with github #5

Merged
PotatoMaxwell merged 19 commits from qinyue_main into develope 2026-06-01 05:21:23 +00:00
14 changed files with 628 additions and 122 deletions
Showing only changes of commit 392e6d655e - Show all commits
+2
View File
@@ -25,6 +25,8 @@ Important functions:
`../mxpic_router` checkout to `sys.path` when present.
- `require_router_stack` (`backend/router_dependency.py` line 31) imports
`mxpic_router`, `nazca`, and the route backend used by `mxpic_router`.
The preferred route backend is `mxpic_forge.Route`; if it is absent,
`mxpic_router` falls back to Nazca `interconnects.Interconnect`.
`gdstk` is checked only when SVG preview generation requests it.
## Generated Files
+3 -2
View File
@@ -10,8 +10,9 @@ Organization : OptiHK Limited
The Flask server can launch for login, dashboard, canvas editing, YAML
generation, and PDK browsing without importing `mxpic_router` or `mxpic_forge`.
Build actions require the matched `mxpic_router` and `mxpic_forge` checkouts;
SVG preview generation also requires `gdstk`.
Build actions require `mxpic_router` and Nazca. When `mxpic_forge.Route` is not
available, routing falls back to Nazca `interconnects.Interconnect`; SVG preview
generation also requires `gdstk`.
## Start on the office LAN
+3 -2
View File
@@ -12,8 +12,9 @@ flask
## Build-Time Router Stack
Login, dashboard, canvas editing, YAML generation, and PDK browsing run without
importing `mxpic_router` or `mxpic_forge`. Build actions require the matched
`mxpic_router` and `mxpic_forge` checkouts; SVG preview generation also requires
importing `mxpic_router` or `mxpic_forge`. Build actions require `mxpic_router`
and Nazca. When `mxpic_forge.Route` is unavailable, routing falls back to
Nazca `interconnects.Interconnect`; SVG preview generation also requires
`gdstk`.
## PDK and Technology Roots
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+6 -6
View File
@@ -60,18 +60,18 @@ def require_router_stack(require_gdstk: bool = False) -> RouterStackStatus:
try:
router_builder = importlib.import_module("mxpic_router.builder")
route_factory = getattr(router_builder, "_import_mxpic_forge_route")
route_factory()
checked.append("mxpic_forge Route")
route_factory = getattr(router_builder, "_import_route_backend")
route_backend = route_factory()
checked.append(getattr(route_backend, "backend_name", "route backend"))
except Exception as exc:
missing.append(f"mxpic_forge Route: {exc}")
missing.append(f"route backend: {exc}")
if missing:
details = "; ".join(missing)
raise RouterStackUnavailable(
"Required mxpic_router runtime stack is unavailable. "
"Build actions require the matched mxpic_router and mxpic_forge checkouts, "
f"Nazca, and gdstk for SVG preview generation. Details: {details}"
"Build actions require mxpic_router, Nazca, and either mxpic_forge Route "
f"or the Nazca Interconnect fallback. gdstk is also required for SVG preview generation. Details: {details}"
)
return RouterStackStatus(ok=True, router_root=router_root, checked=checked)
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 165 KiB

@@ -25,21 +25,10 @@ pins:
# 2. Instances (The sub-components dropped onto this canvas)
instances:
MMI_1:
component: Silterra/EMO1_2ML_CU_Al_RDL/primitives/multimode_interferometers/1x2MMI_1310nm_TE_Silterra_202603_ZKY_v2
x: 557.2
y: -1888.3
rotation: 0.0
flip: 0
flop: 0
mirror: false
settings:
length:
MMI_2:
component: Silterra/EMO1_2ML_CU_Al_RDL/primitives/multimode_interferometers/1x2MMI_1310nm_TE_Silterra_202603_ZKY_v2
x: 689.2
y: -1797.5
MZM_1:
component: Silterra/EMO1_2ML_CU_Al_RDL/composites/Mach_Zender_modulators/MZI_SiN400_Si220_PIN_mod_1310_L1300_QY_202603
x: 222.2
y: -473.8
rotation: 0.0
flip: 0
flop: 0
@@ -48,19 +37,6 @@ instances:
length:
elements:
port:
type: port
x: 50.0
y: -150.0
angle: 180.0
pin_number: 1
pitch: 10
layer: WG_CORE
width: 0.5
description: ""
pins:
- name: port_io1
role: io1
port:
type: port
x: 50.0
@@ -80,10 +56,3 @@ bundles:
output_bus:
routing_type: euler_bend
links:
- from: MMI_1:b1
to: MMI_2:a1
xsection: strip
family: optical
width: 0.45
radius: 10
routing_type: euler_bend
Binary file not shown.
+4 -2
View File
@@ -132,7 +132,7 @@ assert(
routerDependencyPy.includes('require_gdstk: bool = False') &&
routerDependencyPy.includes('importlib.import_module("nazca")') &&
routerDependencyPy.includes('mxpic_router.builder') &&
routerDependencyPy.includes('_import_mxpic_forge_route'),
routerDependencyPy.includes('_import_route_backend'),
'router dependency gate should validate mxpic_router, Nazca, optional gdstk, and route backend imports'
);
@@ -151,7 +151,9 @@ if (fs.existsSync(routerDir)) {
routerBuilderPy.includes('_port_element_pin_entries') &&
routerBuilderPy.includes('_anchor_element_pin_entries') &&
routerBuilderPy.includes('_metadata_pins') &&
routerBuilderPy.includes('link.src_pin'),
routerBuilderPy.includes('link.src_pin') &&
routerBuilderPy.includes('_NazcaInterconnectRoute') &&
routerBuilderPy.includes('_import_route_backend'),
'mxpic_router builder should register named element pins and route through pin endpoints'
);
}