gsim 0.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gsim/__init__.py +16 -0
- gsim/gcloud.py +169 -0
- gsim/palace/__init__.py +120 -0
- gsim/palace/mesh/__init__.py +50 -0
- gsim/palace/mesh/generator.py +956 -0
- gsim/palace/mesh/gmsh_utils.py +484 -0
- gsim/palace/mesh/pipeline.py +188 -0
- gsim/palace/ports/__init__.py +35 -0
- gsim/palace/ports/config.py +363 -0
- gsim/palace/stack/__init__.py +149 -0
- gsim/palace/stack/extractor.py +602 -0
- gsim/palace/stack/materials.py +161 -0
- gsim/palace/stack/visualization.py +630 -0
- gsim/viz.py +86 -0
- gsim-0.0.0.dist-info/METADATA +128 -0
- gsim-0.0.0.dist-info/RECORD +18 -0
- gsim-0.0.0.dist-info/WHEEL +5 -0
- gsim-0.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"""Material properties database for EM simulation.
|
|
2
|
+
|
|
3
|
+
PDK LayerStack typically only has material names (e.g., "aluminum", "tungsten").
|
|
4
|
+
This database provides the EM properties needed for Palace simulation.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from dataclasses import dataclass
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass
|
|
13
|
+
class MaterialProperties:
|
|
14
|
+
"""EM properties for a material."""
|
|
15
|
+
|
|
16
|
+
type: str # "conductor", "dielectric", "semiconductor"
|
|
17
|
+
conductivity: float | None = None # S/m (for conductors)
|
|
18
|
+
permittivity: float | None = None # relative permittivity
|
|
19
|
+
loss_tangent: float | None = None # dielectric loss tangent
|
|
20
|
+
|
|
21
|
+
def to_dict(self) -> dict[str, object]:
|
|
22
|
+
"""Convert to dictionary for YAML output."""
|
|
23
|
+
d: dict[str, object] = {"type": self.type}
|
|
24
|
+
if self.conductivity is not None:
|
|
25
|
+
d["conductivity"] = self.conductivity
|
|
26
|
+
if self.permittivity is not None:
|
|
27
|
+
d["permittivity"] = self.permittivity
|
|
28
|
+
if self.loss_tangent is not None:
|
|
29
|
+
d["loss_tangent"] = self.loss_tangent
|
|
30
|
+
return d
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# Material properties database
|
|
34
|
+
# Sources:
|
|
35
|
+
# - IHP SG13G2 process documentation
|
|
36
|
+
# - Standard material properties from literature
|
|
37
|
+
MATERIALS_DB: dict[str, MaterialProperties] = {
|
|
38
|
+
# Conductors (conductivity in S/m)
|
|
39
|
+
"aluminum": MaterialProperties(
|
|
40
|
+
type="conductor",
|
|
41
|
+
conductivity=3.77e7, # S/m
|
|
42
|
+
),
|
|
43
|
+
"copper": MaterialProperties(
|
|
44
|
+
type="conductor",
|
|
45
|
+
conductivity=5.8e7,
|
|
46
|
+
),
|
|
47
|
+
"tungsten": MaterialProperties(
|
|
48
|
+
type="conductor",
|
|
49
|
+
conductivity=1.82e7,
|
|
50
|
+
),
|
|
51
|
+
"gold": MaterialProperties(
|
|
52
|
+
type="conductor",
|
|
53
|
+
conductivity=4.1e7,
|
|
54
|
+
),
|
|
55
|
+
"TiN": MaterialProperties(
|
|
56
|
+
type="conductor",
|
|
57
|
+
conductivity=5.0e6,
|
|
58
|
+
),
|
|
59
|
+
"poly_si": MaterialProperties(
|
|
60
|
+
type="conductor",
|
|
61
|
+
conductivity=1.0e5, # Heavily doped polysilicon
|
|
62
|
+
),
|
|
63
|
+
# Dielectrics
|
|
64
|
+
"SiO2": MaterialProperties(
|
|
65
|
+
type="dielectric",
|
|
66
|
+
permittivity=4.1, # Matches gds2palace IHP SG13G2
|
|
67
|
+
loss_tangent=0.0, # Matches gds2palace (no loss)
|
|
68
|
+
),
|
|
69
|
+
"passive": MaterialProperties(
|
|
70
|
+
type="dielectric",
|
|
71
|
+
permittivity=6.6, # IHP SG13G2 passivation layer
|
|
72
|
+
loss_tangent=0.0,
|
|
73
|
+
),
|
|
74
|
+
"Si3N4": MaterialProperties(
|
|
75
|
+
type="dielectric",
|
|
76
|
+
permittivity=7.5,
|
|
77
|
+
loss_tangent=0.001,
|
|
78
|
+
),
|
|
79
|
+
"polyimide": MaterialProperties(
|
|
80
|
+
type="dielectric",
|
|
81
|
+
permittivity=3.4,
|
|
82
|
+
loss_tangent=0.002,
|
|
83
|
+
),
|
|
84
|
+
"air": MaterialProperties(
|
|
85
|
+
type="dielectric",
|
|
86
|
+
permittivity=1.0,
|
|
87
|
+
loss_tangent=0.0,
|
|
88
|
+
),
|
|
89
|
+
"vacuum": MaterialProperties(
|
|
90
|
+
type="dielectric",
|
|
91
|
+
permittivity=1.0,
|
|
92
|
+
loss_tangent=0.0,
|
|
93
|
+
),
|
|
94
|
+
# Semiconductors (conductivity values from gds2palace IHP SG13G2)
|
|
95
|
+
"silicon": MaterialProperties(
|
|
96
|
+
type="semiconductor",
|
|
97
|
+
permittivity=11.9,
|
|
98
|
+
conductivity=2.0, # ~50 Ω·cm substrate (matches gds2palace)
|
|
99
|
+
),
|
|
100
|
+
"si": MaterialProperties(
|
|
101
|
+
type="semiconductor",
|
|
102
|
+
permittivity=11.9,
|
|
103
|
+
conductivity=2.0, # ~50 Ω·cm substrate (matches gds2palace)
|
|
104
|
+
),
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
# Aliases for common variations in naming
|
|
108
|
+
MATERIAL_ALIASES: dict[str, str] = {
|
|
109
|
+
"al": "aluminum",
|
|
110
|
+
"cu": "copper",
|
|
111
|
+
"w": "tungsten",
|
|
112
|
+
"au": "gold",
|
|
113
|
+
"tin": "TiN",
|
|
114
|
+
"polysilicon": "poly_si",
|
|
115
|
+
"poly": "poly_si",
|
|
116
|
+
"oxide": "SiO2",
|
|
117
|
+
"sio2": "SiO2",
|
|
118
|
+
"nitride": "Si3N4",
|
|
119
|
+
"sin": "Si3N4",
|
|
120
|
+
"si3n4": "Si3N4",
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def get_material_properties(material_name: str) -> MaterialProperties | None:
|
|
125
|
+
"""Look up material properties by name.
|
|
126
|
+
|
|
127
|
+
Args:
|
|
128
|
+
material_name: Material name from PDK (e.g., "aluminum", "tungsten")
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
MaterialProperties if found, None otherwise
|
|
132
|
+
"""
|
|
133
|
+
# Normalize name
|
|
134
|
+
name_lower = material_name.lower().strip()
|
|
135
|
+
|
|
136
|
+
# Check direct match
|
|
137
|
+
if name_lower in MATERIALS_DB:
|
|
138
|
+
return MATERIALS_DB[name_lower]
|
|
139
|
+
|
|
140
|
+
# Check aliases
|
|
141
|
+
if name_lower in MATERIAL_ALIASES:
|
|
142
|
+
return MATERIALS_DB[MATERIAL_ALIASES[name_lower]]
|
|
143
|
+
|
|
144
|
+
# Check case-insensitive match in DB
|
|
145
|
+
for db_name, props in MATERIALS_DB.items():
|
|
146
|
+
if db_name.lower() == name_lower:
|
|
147
|
+
return props
|
|
148
|
+
|
|
149
|
+
return None
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def material_is_conductor(material_name: str) -> bool:
|
|
153
|
+
"""Check if a material is a conductor."""
|
|
154
|
+
props = get_material_properties(material_name)
|
|
155
|
+
return props is not None and props.type == "conductor"
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def material_is_dielectric(material_name: str) -> bool:
|
|
159
|
+
"""Check if a material is a dielectric."""
|
|
160
|
+
props = get_material_properties(material_name)
|
|
161
|
+
return props is not None and props.type == "dielectric"
|