From 392e6d655e25616760cb32b2a3e1bc25a88b23c8 Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 1 Jun 2026 13:18:57 +0800 Subject: [PATCH] Removing mxpic_forge from the dependncy --- GDS_SVG_GENERATION_LOGIC.md | 2 + INTRANET_DEPLOYMENT.md | 5 +- README.md | 5 +- backend/__pycache__/database.cpython-39.pyc | Bin 5977 -> 5984 bytes .../__pycache__/gds_builder.cpython-39.pyc | Bin 2331 -> 2357 bytes backend/__pycache__/pdk_access.cpython-39.pyc | Bin 2438 -> 2464 bytes .../routed_layout_preview.cpython-39.pyc | Bin 1621 -> 1647 bytes .../router_dependency.cpython-39.pyc | Bin 2451 -> 2497 bytes .../technology_manifest.cpython-39.pyc | Bin 1516 -> 1542 bytes backend/router_dependency.py | 12 +- .../mxpic_project_1/mxpic_project_1.svg | 681 ++++++++++++++++-- .../mxpic_project_1/mxpic_project_1.yml | 39 +- database/mxpic_data.db | Bin 131072 -> 131072 bytes tests/layout-backend-static.test.js | 6 +- 14 files changed, 628 insertions(+), 122 deletions(-) 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 8f3ad1e3e50d844735d382e1ebe54fffe6eee4e2..0b75b5ebd3a8b2ad9b7cba6161654842fd3fc3cc 100644 GIT binary patch delta 42 wcmcbq_dt(3k(ZZ?0SFSAWjAu`FbU|US;Z8k7UUOamgE;@rWS8@V3HIC0Ox26l>h($ delta 35 pcmaE$cT~c diff --git a/backend/__pycache__/gds_builder.cpython-39.pyc b/backend/__pycache__/gds_builder.cpython-39.pyc index 253c0ca266c211d73ef8b122ac4d22a3629b5fec..52581564d5f57f2660213d413d24226631ae693c 100644 GIT binary patch delta 80 zcmbO&v{i^Nk(ZZ?0SFSAWwTtlH}VxSNgJeD#T2C$3-$weHK E0fQfgc5UsoM#))xL5&EG?W2LoW4kX#AiOb(JF4*meeCq z-fSQ-0wEO8udDNc<1FZVs9=h zr4zb;pj%<9)P=tTsmqmr09H08?)fAXJbZrlzVH3G?|#*O)ZEbXDr4$9++H|y|5f}_ z9429(f`4}VzfKe(tv;|ky%+=3-Oq?S<4t2ig)IUFUj~}802t$7{@on+3}Zrc$-5?! z;31R|uv&vF&dDopMx9&ZT40J>@_7RbR0avC6|r`a`%76!oelq0RUVpx*WH;Y-4Rj0ZWHkH?tN{ zs*E{9j321Hh#N>maVDqclRB=etu4oEJ#KHL?Fxnvt%Y)vzY(@ D%Bnl{ diff --git a/backend/__pycache__/router_dependency.cpython-39.pyc b/backend/__pycache__/router_dependency.cpython-39.pyc index 5d1181b4a64808f0a9f0ef035a10355c9cb7e857..c8af590a640a5d4fefa82c7236f526658d6b4e9f 100644 GIT binary patch delta 462 zcmY*V%}T>S5YBAUB(26)ia!UHQBYba#ghm1CMZ_)U_qgm60_SHZIilP|3ZpTZ-Sug zQG|+5AijW}d<(yHvXr8rPr?15exMc^9T|nET$Xv0{IQH?H z&+81gM{ndt9OB1TWXUXKD*Yq=E|jNctvCu9m?Ju*fB+%nQ~T0%o{MJk Yu$oWvnOI^h4pTom1IZ1@$=&4gH(cw3RsaA1 delta 384 zcmX>oJXx4Gk(ZZ?0SNZrk;!u3$jiVQ?GrxcfDPrl6F zD#%f!2n>cIb`Ze{ByLU4Sme iu4HDsHTgG-Es(Ti4PaE9+{LQJCI{4Bq&RsOs}TUp$ru&@ delta 56 zcmZqUdBe?}$ji&c00c2UG8?&F85!j^XEUy3W{jFF%4!QFgINO@ 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 25ac96b020d27d4b2b3008244f8557a65e1a127b..817af6726d4b6581ea2c659055c43680e76f86f9 100644 GIT binary patch delta 215 zcmZo@;Am*z*zm=kac1*Z`|V%t8TmIbOEVQsXaB&c%f+&f`8jh5vjbDn#zqq+-bSxh zNp1#Cab<1o#?r|LpIgfsnwsb+C>58bD_JQhrCG(q6r~pA7iX5_7iFdvPrv<*F_GKU z%Fx2f&?L&RRbsNBqw@6pZ;WgZK?B36f>!bAvllZuFQf6&M%2bSeAwlcK@X=w~@ q6`QV|%y<-{2`p@23N%R+VG>Z#0*ImtTScbNZe(=cZt<1z1Q!6hQAIWY delta 48 zcmV-00MGw`fCzwq2(a`&0hELFKezQi0S~YP76kH_2k-$cv4Oq>1962Emz#kBL$^5f G0musH8xv&! 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' ); }