diff --git a/GDS_SVG_GENERATION_LOGIC.md b/GDS_SVG_GENERATION_LOGIC.md index b1f106b..f50aad4 100644 --- a/GDS_SVG_GENERATION_LOGIC.md +++ b/GDS_SVG_GENERATION_LOGIC.md @@ -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 diff --git a/INTRANET_DEPLOYMENT.md b/INTRANET_DEPLOYMENT.md index 5b5fb4a..b135af9 100644 --- a/INTRANET_DEPLOYMENT.md +++ b/INTRANET_DEPLOYMENT.md @@ -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 diff --git a/README.md b/README.md index cae8cf4..79af408 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/backend/__pycache__/database.cpython-39.pyc b/backend/__pycache__/database.cpython-39.pyc index 8f3ad1e..0b75b5e 100644 Binary files a/backend/__pycache__/database.cpython-39.pyc and b/backend/__pycache__/database.cpython-39.pyc differ diff --git a/backend/__pycache__/gds_builder.cpython-39.pyc b/backend/__pycache__/gds_builder.cpython-39.pyc index 253c0ca..5258156 100644 Binary files a/backend/__pycache__/gds_builder.cpython-39.pyc and b/backend/__pycache__/gds_builder.cpython-39.pyc differ diff --git a/backend/__pycache__/pdk_access.cpython-39.pyc b/backend/__pycache__/pdk_access.cpython-39.pyc index 3be826e..9c788b4 100644 Binary files a/backend/__pycache__/pdk_access.cpython-39.pyc and b/backend/__pycache__/pdk_access.cpython-39.pyc differ diff --git a/backend/__pycache__/routed_layout_preview.cpython-39.pyc b/backend/__pycache__/routed_layout_preview.cpython-39.pyc index 90c5746..041666a 100644 Binary files a/backend/__pycache__/routed_layout_preview.cpython-39.pyc and b/backend/__pycache__/routed_layout_preview.cpython-39.pyc differ diff --git a/backend/__pycache__/router_dependency.cpython-39.pyc b/backend/__pycache__/router_dependency.cpython-39.pyc index 5d1181b..c8af590 100644 Binary files a/backend/__pycache__/router_dependency.cpython-39.pyc and b/backend/__pycache__/router_dependency.cpython-39.pyc differ diff --git a/backend/__pycache__/technology_manifest.cpython-39.pyc b/backend/__pycache__/technology_manifest.cpython-39.pyc index 8f6c75d..a833997 100644 Binary files a/backend/__pycache__/technology_manifest.cpython-39.pyc and b/backend/__pycache__/technology_manifest.cpython-39.pyc differ diff --git a/backend/router_dependency.py b/backend/router_dependency.py index e7e286f..2fa5f44 100644 --- a/backend/router_dependency.py +++ b/backend/router_dependency.py @@ -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) diff --git a/database/admin/layout/mxpic_project_1/mxpic_project_1.svg b/database/admin/layout/mxpic_project_1/mxpic_project_1.svg index 66dc540..0bac00e 100644 --- a/database/admin/layout/mxpic_project_1/mxpic_project_1.svg +++ b/database/admin/layout/mxpic_project_1/mxpic_project_1.svg @@ -1,88 +1,619 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Parameters: +x = 0.0 +y = 4.475 +a = 180.0 +width = 0.7 +name = a1 +Parameters: +x = 0.0 +y = -4.475 +a = 180.0 +width = 0.7 +name = a2 +Parameters: +x = 1660.0 +y = 4.475 +a = 360.0 +width = 0.7 +name = b1 +Parameters: +x = 1660.0 +y = -4.475 +a = 360.0 +width = 0.7 +name = b2 +Parameters: +x = 1660.0 +y = 25.0 +a = 0.0 +width = 5 +name = pin_p +Parameters: +x = 1660.0 +y = 55.0 +a = 0.0 +width = 5 +name = pin_n +Parameters: +x = 1660.0 +y = -25.0 +a = 0.0 +width = 5 +name = ht_s +Parameters: +x = 1660.0 +y = -55.0 +a = 0.0 +width = 5 +name = ht_g + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - + \ No newline at end of file diff --git a/database/admin/layout/mxpic_project_1/mxpic_project_1.yml b/database/admin/layout/mxpic_project_1/mxpic_project_1.yml index 8512327..0607770 100644 --- a/database/admin/layout/mxpic_project_1/mxpic_project_1.yml +++ b/database/admin/layout/mxpic_project_1/mxpic_project_1.yml @@ -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 \ No newline at end of file diff --git a/database/mxpic_data.db b/database/mxpic_data.db index 25ac96b..817af67 100644 Binary files a/database/mxpic_data.db and b/database/mxpic_data.db differ diff --git a/tests/layout-backend-static.test.js b/tests/layout-backend-static.test.js index a2d1582..9721715 100644 --- a/tests/layout-backend-static.test.js +++ b/tests/layout-backend-static.test.js @@ -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' ); }