Folder structure simplfied

This commit is contained in:
=
2026-06-06 16:43:26 +08:00
parent 8da92ced57
commit 8a17f1dde0
138 changed files with 10429 additions and 1432 deletions
+475 -1
View File
@@ -4,7 +4,7 @@ import nazca as nd
import numpy as np
import nazca.interconnects as IC
from ...structures import *
from ...geometry import *
from ...routing import *
from .unit import *
@@ -16,6 +16,56 @@ from ...electronics import Vias
from ...basic import __array_convert__,__list_convert__,__xs_exist__,__cell_arg__
class STD_CROW_V:
"""
STD CROW V primitive component.
This component builds the STD CROW V layout cell.
Parameters
----------
ring : Any
Ring cell or component used by this composite.
bus : Any
Bus waveguide cell or component used by this composite.
w_bus : float or list
Width parameter in microns.
w_ring : float or list
Width parameter in microns.
sz_ring : float or list
Value for the sz_ring parameter.
sz_bus : float or list
Value for the sz_bus parameter.
name : str, optional
Unique identifier for the device cell. Default is None.
gap_crows : float or list, optional
Spacing or gap parameter in microns. Default is [0.4].
gap_cp : float or list, optional
Spacing or gap parameter in microns. Default is [0.45, 0.45].
w_heater : float or list, optional
Width parameter in microns. Default is 0.
xs_heater : str, optional
Layer or cross-section name used by the device. Default is 'heater'.
connected : bool, optional
Value for the connected parameter. Default is True.
w_metal : float, optional
Width parameter in microns. Default is 8.
xs_metal : str, optional
Layer or cross-section name used by the device. Default is 'metal'.
via_h2m : Any, optional
Via definition used between heater and metal layers. Default is None.
isl : Any, optional
Isolation-trench definition used by the electrical layout. Default is None.
ht_shift : int, optional
Value for the ht_shift parameter. Default is 0.
A_ht : int, optional
Angle parameter in degrees. Default is 45.
ISL_LEFT : bool, optional
Value for the ISL_LEFT parameter. Default is True.
ISL_RIGHT : bool, optional
Value for the ISL_RIGHT parameter. Default is True.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
"""
def __init__(self,
ring: Any,
@@ -425,6 +475,82 @@ class STD_CROW_V:
class CROW_Eul_Ring(STD_CROW_V) :
"""
CROW Eul Ring primitive component.
This component builds the CROW Eul Ring layout cell.
Parameters
----------
name : str
Unique identifier for the device cell.
R0 : int, optional
Radius parameter in microns. Default is 10.
R1 : int, optional
Radius parameter in microns. Default is 3.
w0 : float, optional
Width parameter in microns. Default is 0.38.
w1 : float, optional
Width parameter in microns. Default is 0.65.
w_bus : float, optional
Width parameter in microns. Default is 0.35.
R_att : int, optional
Radius parameter in microns. Default is 15.
R_att_min : int, optional
Radius parameter in microns. Default is 3.
A_att : int, optional
Angle parameter in degrees. Default is 30.
w_wg : float, optional
Width parameter in microns. Default is 0.45.
dLx : float, optional
Value for the dLx parameter. Default is 0.
dLy : float, optional
Value for the dLy parameter. Default is 0.
xs_wg : str, optional
Layer or cross-section name used by the device. Default is 'strip'.
gap_crows : list, optional
Spacing or gap parameter in microns. Default is [0.4].
gap_cp : float, optional
Spacing or gap parameter in microns. Default is 0.45.
w_heater : float, optional
Width parameter in microns. Default is 0.
xs_heater : str, optional
Layer or cross-section name used by the device. Default is 'heater'.
connected : bool, optional
Value for the connected parameter. Default is True.
w_metal : float, optional
Width parameter in microns. Default is 8.
xs_metal : str, optional
Layer or cross-section name used by the device. Default is 'metal'.
via_h2m : Any, optional
Via definition used between heater and metal layers. Default is None.
isl : Any, optional
Isolation-trench definition used by the electrical layout. Default is None.
ISL_LEFT : bool, optional
Value for the ISL_LEFT parameter. Default is True.
ISL_RIGHT : bool, optional
Value for the ISL_RIGHT parameter. Default is True.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
sharp_patch : bool, optional
Whether to add geometry patches for sharp corners or cladding continuity. Default is True.
dL_p2p : Optional[float], optional
Value for the dL_p2p parameter. Default is None.
Ltp_bus : int, optional
Length parameter in microns. Default is 0.
ht_shift : int, optional
Value for the ht_shift parameter. Default is 0.
A_ht : int, optional
Angle parameter in degrees. Default is 45.
R_cp : Any, optional
Radius parameter in microns. Default is None.
bus_order : float, optional
Value for the bus_order parameter. Default is 1.0.
width_type : str, optional
Width parameter in microns. Default is 'crow_customize'.
A_cp : int, optional
Angle parameter in degrees. Default is 0.
"""
def __init__(self,
name: str,
R0: int = 10, R1: int=3,
@@ -516,6 +642,76 @@ class CROW_Eul_Ring(STD_CROW_V) :
A_ht=A_ht)
class CROW_Eul_RCK(STD_CROW_V) :
"""
CROW Eul RCK primitive component.
This component builds the CROW Eul RCK layout cell.
Parameters
----------
R0 : int, optional
Radius parameter in microns. Default is 10.
R1 : int, optional
Radius parameter in microns. Default is 3.
R2 : int, optional
Radius parameter in microns. Default is 20.
w0 : float, optional
Width parameter in microns. Default is 0.38.
w1 : float, optional
Width parameter in microns. Default is 0.65.
w_bus : float, optional
Width parameter in microns. Default is 0.35.
R_att : int, optional
Radius parameter in microns. Default is 15.
R_att_min : int, optional
Radius parameter in microns. Default is 3.
A_att : int, optional
Angle parameter in degrees. Default is 30.
w_wg : float, optional
Width parameter in microns. Default is 0.45.
dAc : float, optional
Value for the dAc parameter. Default is 0.
dLx : float, optional
Value for the dLx parameter. Default is 0.
dLy : float, optional
Value for the dLy parameter. Default is 0.
xs_wg : str, optional
Layer or cross-section name used by the device. Default is 'strip'.
gap_crows : list, optional
Spacing or gap parameter in microns. Default is [0.4].
gap_cp : float, optional
Spacing or gap parameter in microns. Default is 0.45.
w_heater : float, optional
Width parameter in microns. Default is 0.
xs_heater : str, optional
Layer or cross-section name used by the device. Default is 'heater'.
connected : bool, optional
Value for the connected parameter. Default is True.
w_metal : float, optional
Width parameter in microns. Default is 8.
xs_metal : str, optional
Layer or cross-section name used by the device. Default is 'metal'.
via_h2m : Any, optional
Via definition used between heater and metal layers. Default is None.
isl : Any, optional
Isolation-trench definition used by the electrical layout. Default is None.
ISL_LEFT : bool, optional
Value for the ISL_LEFT parameter. Default is True.
ISL_RIGHT : bool, optional
Value for the ISL_RIGHT parameter. Default is True.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
sharp_patch : bool, optional
Whether to add geometry patches for sharp corners or cladding continuity. Default is True.
dL_p2p : Optional[float], optional
Value for the dL_p2p parameter. Default is None.
Ltp_bus : int, optional
Length parameter in microns. Default is 0.
ht_shift : int, optional
Value for the ht_shift parameter. Default is 0.
A_ht : int, optional
Angle parameter in degrees. Default is 45.
"""
def __init__(self,
R0: int = 10, R1: int=3,R2: int=20,
w0: float = 0.38,w1: float=0.65,
@@ -590,6 +786,84 @@ class CROW_Eul_RCK(STD_CROW_V) :
""" Circular ring """
class CROW_Circular_ring(STD_CROW_V):
"""
CROW Circular ring primitive component.
This component builds the CROW Circular ring layout cell.
Parameters
----------
r_ring : float, optional
Radius parameter in microns. Default is 10.
w_ring : float, optional
Width parameter in microns. Default is 0.45.
xs_ring : str, optional
Layer or cross-section name used by the device. Default is 'strip'.
w1_bus : float, optional
Value for the w1_bus parameter. Default is 0.45.
A1_cp : int, optional
Angle parameter in degrees. Default is 10.
w2_bus : float, optional
Value for the w2_bus parameter. Default is 0.45.
A2_cp : int, optional
Angle parameter in degrees. Default is 10.
gap1 : float, optional
Spacing or gap parameter in microns. Default is 0.45.
gap2 : float, optional
Spacing or gap parameter in microns. Default is 0.45.
w_wg : float, optional
Width parameter in microns. Default is 0.45.
Euler_trasition : bool, optional
Value for the Euler_trasition parameter. Default is True.
R1_cp : Any, optional
Radius parameter in microns. Default is None.
R2_cp : Any, optional
Radius parameter in microns. Default is None.
R1_att : float, optional
Radius parameter in microns. Default is 10.
R2_att : float, optional
Radius parameter in microns. Default is 10.
R1_att_min : float, optional
Radius parameter in microns. Default is 5.
R2_att_min : float, optional
Radius parameter in microns. Default is 5.
A1_att : int, optional
Angle parameter in degrees. Default is 45.
A2_att : int, optional
Angle parameter in degrees. Default is 45.
gap_crows : float or list, optional
Spacing or gap parameter in microns. Default is [0.4].
w_heater : float or list, optional
Width parameter in microns. Default is 0.
xs_heater : str, optional
Layer or cross-section name used by the device. Default is 'heater'.
connected : bool, optional
Value for the connected parameter. Default is True.
w_metal : float, optional
Width parameter in microns. Default is 8.
xs_metal : str, optional
Layer or cross-section name used by the device. Default is 'metal'.
via_h2m : Any, optional
Via definition used between heater and metal layers. Default is None.
isl : Any, optional
Isolation-trench definition used by the electrical layout. Default is None.
ISL_LEFT : bool, optional
Value for the ISL_LEFT parameter. Default is True.
ISL_RIGHT : bool, optional
Value for the ISL_RIGHT parameter. Default is True.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
sharp_patch : bool, optional
Whether to add geometry patches for sharp corners or cladding continuity. Default is True.
dL_p2p : Optional[float], optional
Value for the dL_p2p parameter. Default is None.
Ltp_bus : int, optional
Length parameter in microns. Default is 0.
ht_shift : int, optional
Value for the ht_shift parameter. Default is 0.
A_ht : int, optional
Angle parameter in degrees. Default is 45.
"""
def __init__(self,
r_ring: float = 10, w_ring:float = 0.45,xs_ring: str='strip',
w1_bus: float = 0.45,A1_cp: int = 10,
@@ -723,6 +997,64 @@ class CROW_Circular_ring(STD_CROW_V):
""" CROW with standard identical ring """
class CROW_STD_Allpass(CROW_Circular_ring):
"""
CROW STD Allpass primitive component.
This component builds the CROW STD Allpass layout cell.
Parameters
----------
r_ring : float, optional
Radius parameter in microns. Default is 10.
w_ring : float, optional
Width parameter in microns. Default is 0.45.
xs_ring : str, optional
Layer or cross-section name used by the device. Default is 'strip'.
w_bus : float, optional
Width parameter in microns. Default is 0.45.
A_cp : int, optional
Angle parameter in degrees. Default is 10.
gap_bus : float, optional
Spacing or gap parameter in microns. Default is 0.45.
w_wg : float, optional
Width parameter in microns. Default is 0.45.
Euler_trasition : bool, optional
Value for the Euler_trasition parameter. Default is True.
R_att : float, optional
Radius parameter in microns. Default is 10.
R_att_min : float, optional
Radius parameter in microns. Default is 5.
A_att : int, optional
Angle parameter in degrees. Default is 45.
gap_crows : float or list, optional
Spacing or gap parameter in microns. Default is [0.4].
w_heater : float or list, optional
Width parameter in microns. Default is 0.
xs_heater : str, optional
Layer or cross-section name used by the device. Default is 'heater'.
connected : bool, optional
Value for the connected parameter. Default is True.
w_metal : float, optional
Width parameter in microns. Default is 8.
xs_metal : str, optional
Layer or cross-section name used by the device. Default is 'metal'.
via_h2m : Any, optional
Via definition used between heater and metal layers. Default is None.
isl : Any, optional
Isolation-trench definition used by the electrical layout. Default is None.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
sharp_patch : bool, optional
Whether to add geometry patches for sharp corners or cladding continuity. Default is True.
dL_p2p : Optional[float], optional
Value for the dL_p2p parameter. Default is None.
Ltp_bus : int, optional
Length parameter in microns. Default is 0.
ht_shift : int, optional
Value for the ht_shift parameter. Default is 0.
A_ht : int, optional
Angle parameter in degrees. Default is 45.
"""
def __init__(self,
r_ring: float=10,
w_ring: float = 0.45,
@@ -786,6 +1118,64 @@ class CROW_STD_Allpass(CROW_Circular_ring):
A_ht=A_ht)
class CROW_STD_Adddrop(CROW_Circular_ring):
"""
CROW STD Adddrop primitive component.
This component builds the CROW STD Adddrop layout cell.
Parameters
----------
r_ring : float, optional
Radius parameter in microns. Default is 10.
w_ring : float, optional
Width parameter in microns. Default is 0.45.
xs_ring : str, optional
Layer or cross-section name used by the device. Default is 'strip'.
w_bus : float, optional
Width parameter in microns. Default is 0.45.
A_cp : int, optional
Angle parameter in degrees. Default is 10.
gap_bus : float, optional
Spacing or gap parameter in microns. Default is 0.45.
w_wg : float, optional
Width parameter in microns. Default is 0.45.
Euler_trasition : bool, optional
Value for the Euler_trasition parameter. Default is True.
R_att : float, optional
Radius parameter in microns. Default is 10.
R_att_min : float, optional
Radius parameter in microns. Default is 5.
A_att : int, optional
Angle parameter in degrees. Default is 45.
gap_crows : float or list, optional
Spacing or gap parameter in microns. Default is [0.4].
w_heater : float or list, optional
Width parameter in microns. Default is 0.
xs_heater : str, optional
Layer or cross-section name used by the device. Default is 'heater'.
connected : bool, optional
Value for the connected parameter. Default is True.
w_metal : float, optional
Width parameter in microns. Default is 8.
xs_metal : str, optional
Layer or cross-section name used by the device. Default is 'metal'.
via_h2m : Any, optional
Via definition used between heater and metal layers. Default is None.
isl : Any, optional
Isolation-trench definition used by the electrical layout. Default is None.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
sharp_patch : bool, optional
Whether to add geometry patches for sharp corners or cladding continuity. Default is True.
dL_p2p : Optional[float], optional
Value for the dL_p2p parameter. Default is None.
Ltp_bus : int, optional
Length parameter in microns. Default is 0.
ht_shift : int, optional
Value for the ht_shift parameter. Default is 0.
A_ht : int, optional
Angle parameter in degrees. Default is 45.
"""
def __init__(self,
r_ring: float=10,
w_ring: float = 0.45,
@@ -851,6 +1241,90 @@ class CROW_STD_Adddrop(CROW_Circular_ring):
""" Adiabatic Elipse Diameter """
class CROW_AED(STD_CROW_V):
"""
CROW AED primitive component.
This component builds the CROW AED layout cell.
Parameters
----------
r_outer : float, optional
Radius parameter in microns. Default is 10.
wa : float, optional
Width parameter in microns. Default is 0.45.
wb : float, optional
Width parameter in microns. Default is 0.45.
xs_ring : str, optional
Layer or cross-section name used by the device. Default is 'strip'.
w1_bus : float, optional
Value for the w1_bus parameter. Default is 0.45.
A1_cp : int, optional
Angle parameter in degrees. Default is 10.
w2_bus : float, optional
Value for the w2_bus parameter. Default is 0.45.
A2_cp : int, optional
Angle parameter in degrees. Default is 10.
gap1 : float, optional
Spacing or gap parameter in microns. Default is 0.45.
gap2 : float, optional
Spacing or gap parameter in microns. Default is 0.45.
w_wg : float, optional
Width parameter in microns. Default is 0.45.
Euler_trasition : bool, optional
Value for the Euler_trasition parameter. Default is True.
R1_cp : float, optional
Radius parameter in microns. Default is None.
R2_cp : float, optional
Radius parameter in microns. Default is None.
R1_att : float, optional
Radius parameter in microns. Default is 15.
R2_att : float, optional
Radius parameter in microns. Default is 15.
R1_att_min : float, optional
Radius parameter in microns. Default is 5.
R2_att_min : float, optional
Radius parameter in microns. Default is 5.
L_tilt : int, optional
Length parameter in microns. Default is 0.
A1_att : int, optional
Angle parameter in degrees. Default is 45.
A2_att : int, optional
Angle parameter in degrees. Default is 45.
Ltp_bus : int, optional
Length parameter in microns. Default is 0.
dL_p2p : Optional[float], optional
Value for the dL_p2p parameter. Default is None.
gap_crows : float or list, optional
Spacing or gap parameter in microns. Default is [0.4].
gap_cp : float or list, optional
Spacing or gap parameter in microns. Default is [0.45, 0.45].
w_heater : float or list, optional
Width parameter in microns. Default is 0.
xs_heater : str, optional
Layer or cross-section name used by the device. Default is 'heater'.
connected : bool, optional
Value for the connected parameter. Default is True.
w_metal : float, optional
Width parameter in microns. Default is 8.
xs_metal : str, optional
Layer or cross-section name used by the device. Default is 'metal'.
via_h2m : Any, optional
Via definition used between heater and metal layers. Default is None.
isl : Any, optional
Isolation-trench definition used by the electrical layout. Default is None.
ISL_LEFT : bool, optional
Value for the ISL_LEFT parameter. Default is True.
ISL_RIGHT : bool, optional
Value for the ISL_RIGHT parameter. Default is True.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
sharp_patch : bool, optional
Whether to add geometry patches for sharp corners or cladding continuity. Default is True.
ht_shift : int, optional
Value for the ht_shift parameter. Default is 0.
A_ht : int, optional
Angle parameter in degrees. Default is 45.
"""
def __init__(self,
r_outer: float = 10,
wa: float = 0.45,