Technolgy file archetecture revised with dictionary input method
This commit is contained in:
Binary file not shown.
@@ -13,10 +13,10 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT))
|
||||
|
||||
import nazca as nd
|
||||
import time
|
||||
|
||||
import mxpic as mx
|
||||
|
||||
|
||||
OUTPUT_GDS = ROOT / "tests" / "build_all_primitives.gds"
|
||||
PRIMITIVES_PACKAGE = "mxpic.components.primitives"
|
||||
SKIP_CLASSES = {"Route"}
|
||||
@@ -24,9 +24,8 @@ SKIP_CLASSES = {"Route"}
|
||||
|
||||
def bootstrap_technology() -> None:
|
||||
"""Register broad layer and xsection defaults used by primitive examples."""
|
||||
mx.technologies.CUMEC.CUMEC_CSiP130Cu()
|
||||
mx.technologies.Silterra.EOM1_2ML_CU()
|
||||
|
||||
mx.technologies.foundry["CUMEC"]["CUMEC_CSiP130Cu"]()
|
||||
mx.technologies.foundry["Silterra"]["EMO1_2ML_CU_Al_RDL"]()
|
||||
# Compatibility layer aliases used by older primitive modules.
|
||||
alias_layers = {
|
||||
"STRIP_COR": (31, 1),
|
||||
|
||||
@@ -8,6 +8,7 @@ import yaml
|
||||
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
sys.path.insert(0, ROOT)
|
||||
|
||||
import mxpic.technologies as technologies
|
||||
from scripts.export_technology_manifests import build_silterra_eom1_manifest, export_manifests
|
||||
|
||||
|
||||
@@ -29,11 +30,73 @@ class TechnologyManifestExportTest(unittest.TestCase):
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
export_manifests(temp_dir)
|
||||
output = os.path.join(temp_dir, "Silterra", "EMO1_2ML_CU_Al_RDL", "technology.yml")
|
||||
si_palik = os.path.join(
|
||||
temp_dir,
|
||||
"Silterra",
|
||||
"EMO1_2ML_CU_Al_RDL",
|
||||
"EMO1_2ML_CU_materials",
|
||||
"si_palik.csv",
|
||||
)
|
||||
self.assertTrue(os.path.exists(output))
|
||||
self.assertTrue(os.path.exists(si_palik))
|
||||
with open(output, "r", encoding="utf-8") as file:
|
||||
data = yaml.safe_load(file)
|
||||
self.assertEqual(data["xsections"]["metal_1"]["family"], "electrical")
|
||||
|
||||
def test_silterra_technology_loads_from_manifest(self):
|
||||
technology = technologies.foundry["Silterra"]["EMO1_2ML_CU_Al_RDL"]()
|
||||
expected_manifest = os.path.join(
|
||||
"mxpic",
|
||||
"technologies",
|
||||
"silterra",
|
||||
"EMO1_2ML_CU.yml",
|
||||
)
|
||||
self.assertTrue(str(technology.manifest_path).endswith(expected_manifest))
|
||||
self.assertEqual(technology.layers["WG_HM"].layer, (275, 0))
|
||||
self.assertEqual(technology.layers["WG_HM"].z_start, 0.0)
|
||||
self.assertEqual(technology.layers["WG_HM"].thickness, 0.22)
|
||||
self.assertEqual(technology.layers["WG_HM"].sidewall_angle, 83.0)
|
||||
|
||||
si_palik = technology.materials["si_palik"]
|
||||
self.assertTrue(
|
||||
si_palik.data_file.endswith(
|
||||
os.path.join(
|
||||
"mxpic",
|
||||
"technologies",
|
||||
"silterra",
|
||||
"EMO1_2ML_CU_materials",
|
||||
"si_palik.csv",
|
||||
)
|
||||
)
|
||||
)
|
||||
self.assertTrue(os.path.exists(si_palik.data_file))
|
||||
|
||||
def test_foundry_registry_uses_manifest_names(self):
|
||||
loader = technologies.foundry["Silterra"]["EMO1_2ML_CU_Al_RDL"]
|
||||
self.assertEqual(loader.foundry, "Silterra")
|
||||
self.assertEqual(loader.technology, "EMO1_2ML_CU_Al_RDL")
|
||||
self.assertEqual(loader.manifest, "silterra/EMO1_2ML_CU.yml")
|
||||
|
||||
def test_all_modern_technologies_load_from_manifests(self):
|
||||
technology_loaders = (
|
||||
technologies.foundry["CUMEC"]["CUMEC_CSiP130Cu"],
|
||||
technologies.foundry["CUMEC"]["CUMEC_CSiP180Al_PASSIVE"],
|
||||
technologies.foundry["AMF"]["AMF_Si220_Active"],
|
||||
technologies.foundry["ANT"]["ANT_Si220_MPW"],
|
||||
technologies.foundry["consemi"]["PSIN_SOI"],
|
||||
technologies.foundry["IMEC"]["IMEC_Si220_Active"],
|
||||
technologies.foundry["IMECAS"]["IMECAS_SiP"],
|
||||
technologies.foundry["CompTek"]["CT_CU3ML"],
|
||||
technologies.foundry["SITRI"]["SITRI_LSIN_SOI"],
|
||||
technologies.foundry["Silterra"]["EMO1_2ML_CU_Al_RDL"],
|
||||
)
|
||||
|
||||
for technology_loader in technology_loaders:
|
||||
technology = technology_loader()
|
||||
self.assertIsNotNone(technology.manifest_path)
|
||||
self.assertTrue(os.path.exists(technology.manifest_path))
|
||||
self.assertGreater(len(technology.layers), 0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user