pyedb 0.12.2__tar.gz → 0.13.dev0__tar.gz
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.
Potentially problematic release.
This version of pyedb might be problematic. Click here for more details.
- {pyedb-0.12.2 → pyedb-0.13.dev0}/PKG-INFO +1 -1
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/__init__.py +1 -1
- pyedb-0.13.dev0/src/pyedb/configuration/cfg_common.py +48 -0
- pyedb-0.13.dev0/src/pyedb/configuration/cfg_components.py +133 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/cfg_data.py +8 -10
- pyedb-0.13.dev0/src/pyedb/configuration/cfg_operations.py +63 -0
- pyedb-0.13.dev0/src/pyedb/configuration/cfg_package_definition.py +128 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/cfg_stackup.py +80 -46
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/configuration.py +45 -15
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb.py +167 -7
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/cell/hierarchy/model.py +1 -1
- pyedb-0.12.2/src/pyedb/dotnet/edb_core/edb_data/connectable.py → pyedb-0.13.dev0/src/pyedb/dotnet/edb_core/cell/layout_obj.py +1 -1
- pyedb-0.13.dev0/src/pyedb/dotnet/edb_core/cell/primitive.py +142 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/components.py +1 -1
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/definition/component_def.py +1 -1
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/definition/component_model.py +1 -1
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/definition/definition_obj.py +1 -1
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/definition/package_def.py +2 -1
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/components_data.py +19 -7
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/padstacks_data.py +3 -3
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/primitives_data.py +5 -126
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/terminals.py +2 -2
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/geometry/polygon_data.py +1 -1
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/materials.py +2 -1
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/padstack.py +86 -27
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/generic/general_methods.py +33 -0
- pyedb-0.12.2/src/pyedb/configuration/cfg_components.py +0 -205
- {pyedb-0.12.2 → pyedb-0.13.dev0}/LICENSE +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/README.md +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/pyproject.toml +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/cfg_boundaries.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/cfg_general.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/cfg_nets.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/cfg_padstacks.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/cfg_pin_groups.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/cfg_ports_sources.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/cfg_s_parameter_models.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/cfg_setup.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/configuration/cfg_spice_models.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/application/Variables.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/application/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/clr_module.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/cell/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/cell/hierarchy/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/definition/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/definition/definitions.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/dotnet/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/dotnet/database.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/dotnet/layout.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/dotnet/primitive.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/control_file.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/design_options.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/edbvalue.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/layer_data.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/nets_data.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/ports.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/sources.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/utilities.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/edb_data/variables.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/general.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/geometry/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/geometry/point_data.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/hfss.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/layout.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/layout_validation.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/net_class.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/nets.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/sim_setup_data/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/sim_setup_data/data/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/sim_setup_data/data/siw_dc_ir_settings.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/siwave.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/stackup.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/utilities/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/utilities/heatsink.py +0 -0
- {pyedb-0.12.2/src/pyedb/dotnet/edb_core → pyedb-0.13.dev0/src/pyedb/dotnet/edb_core/utilities}/obj_base.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/dotnet/edb_core/utilities/simulation_setup.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/edb_logger.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/exceptions.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/generic/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/generic/constants.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/generic/data_handlers.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/generic/design_types.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/generic/filesystem.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/generic/plot.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/generic/process.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/generic/settings.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/bom/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/bom/bom.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/bom/bom_item.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/bom/characteristics.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/bom/refdes.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/content/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/content/color.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/content/content.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/content/dictionary_color.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/content/dictionary_fill.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/content/dictionary_line.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/content/entry_color.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/content/entry_line.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/content/fill.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/content/layer_ref.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/content/standard_geometries_dictionary.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/cad_data.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/component.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/drill.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/feature.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/layer.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/layer_feature.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/logical_net.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/outline.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/package.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/padstack_def.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/padstack_instance.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/path.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/phy_net.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/pin.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/polygon.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/profile.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/stackup.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/stackup_group.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/stackup_layer.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_data/step.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/cad_header.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/ecad.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ecad/spec.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/history_record.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/ipc2581.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/ipc2581/logistic_header.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/aedtlib_personalib_install.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/downloads.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/misc.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/pyedb.runtimeconfig.json +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/siw_feature_config/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/siw_feature_config/emc/__init__.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/siw_feature_config/emc/component_tags.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/siw_feature_config/emc/net_tags.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/siw_feature_config/emc/tag_library.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/siw_feature_config/emc/xml_generic.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/misc/utilities.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/modeler/geometry_operators.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/siwave.py +0 -0
- {pyedb-0.12.2 → pyedb-0.13.dev0}/src/pyedb/siwave_core/icepak.py +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
from pyedb.generic.general_methods import pyedb_function_handler
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class CfgBase:
|
|
28
|
+
@property
|
|
29
|
+
def protected_attributes(self):
|
|
30
|
+
return []
|
|
31
|
+
|
|
32
|
+
@pyedb_function_handler
|
|
33
|
+
def get_attributes(self, exclude=None):
|
|
34
|
+
attrs = {i: j for i, j in self.__dict__.items() if i not in self.protected_attributes}
|
|
35
|
+
if exclude is not None:
|
|
36
|
+
exclude = exclude if isinstance(exclude, list) else [exclude]
|
|
37
|
+
attrs = {i: j for i, j in attrs.items() if i not in exclude}
|
|
38
|
+
attrs = {i: j for i, j in attrs.items() if not i.startswith("_")}
|
|
39
|
+
attrs = {i: j for i, j in attrs.items() if j is not None}
|
|
40
|
+
return attrs
|
|
41
|
+
|
|
42
|
+
@pyedb_function_handler
|
|
43
|
+
def set_attributes(self, pedb_object):
|
|
44
|
+
attrs = self.get_attributes()
|
|
45
|
+
for attr, value in attrs.items():
|
|
46
|
+
if attr not in dir(pedb_object):
|
|
47
|
+
raise AttributeError(f"Invalid attribute '{attr}' in '{pedb_object}'")
|
|
48
|
+
setattr(pedb_object, attr, value)
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
from pyedb.configuration.cfg_common import CfgBase
|
|
24
|
+
from pyedb.generic.general_methods import pyedb_function_handler
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class CfgPortProperties(CfgBase):
|
|
28
|
+
def __init__(self, **kwargs):
|
|
29
|
+
self.reference_offset = kwargs.pop("reference_offset", 0)
|
|
30
|
+
self.reference_size_auto = kwargs.pop("reference_size_auto", 0)
|
|
31
|
+
self.reference_size_x = kwargs.pop("reference_size_x", 0)
|
|
32
|
+
self.reference_size_y = kwargs.pop("reference_size_y", 0)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class CfgSolderBallsProperties(CfgBase):
|
|
36
|
+
def __init__(self, **kwargs):
|
|
37
|
+
self.shape = kwargs.pop("shape", None)
|
|
38
|
+
self.diameter = kwargs.pop("diameter", None)
|
|
39
|
+
self.mid_diameter = kwargs.pop("mid_diameter", None)
|
|
40
|
+
self.height = kwargs.pop("height", None)
|
|
41
|
+
self.enabled = kwargs.pop("enabled", None)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class CfgRlcModel(CfgBase):
|
|
45
|
+
def __init__(self, **kwargs):
|
|
46
|
+
self.resistance = kwargs.get("resistance", None)
|
|
47
|
+
self.inductance = kwargs.get("inductance", None)
|
|
48
|
+
self.capacitance = kwargs.get("capacitance", None)
|
|
49
|
+
self.type = kwargs.get("type", None)
|
|
50
|
+
self.p1 = kwargs.get("p1", None)
|
|
51
|
+
self.p2 = kwargs.get("p2", None)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class CfgComponent(CfgBase):
|
|
55
|
+
def __init__(self, **kwargs):
|
|
56
|
+
self.enabled = kwargs.get("enabled", None)
|
|
57
|
+
|
|
58
|
+
self.reference_designator = kwargs.get("reference_designator", None)
|
|
59
|
+
self.type = kwargs.get("part_type", None)
|
|
60
|
+
self.value = kwargs.get("value", None)
|
|
61
|
+
self.port_properties = CfgPortProperties(**kwargs["port_properties"]) if "port_properties" in kwargs else None
|
|
62
|
+
self.solder_ball_properties = (
|
|
63
|
+
CfgSolderBallsProperties(**kwargs["solder_ball_properties"]) if "solder_ball_properties" in kwargs else None
|
|
64
|
+
)
|
|
65
|
+
rlc_models = kwargs.get("rlc_model", [])
|
|
66
|
+
|
|
67
|
+
self.rlc_model = [CfgRlcModel(**rlc_m) for rlc_m in rlc_models]
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def protected_attributes(self):
|
|
71
|
+
return ["reference_designator"]
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class CfgComponents:
|
|
75
|
+
def __init__(self, pedb, data):
|
|
76
|
+
self._pedb = pedb
|
|
77
|
+
self.components = [CfgComponent(**comp) for comp in data]
|
|
78
|
+
|
|
79
|
+
@pyedb_function_handler
|
|
80
|
+
def apply(self):
|
|
81
|
+
comps_in_db = self._pedb.components
|
|
82
|
+
for comp in self.components:
|
|
83
|
+
c_db = comps_in_db[comp.reference_designator]
|
|
84
|
+
|
|
85
|
+
for attr, value in comp.get_attributes().items(): # All component properties
|
|
86
|
+
if attr == "solder_ball_properties":
|
|
87
|
+
solder_ball_properties = value
|
|
88
|
+
port_properties = comp.port_properties
|
|
89
|
+
self._pedb.components.set_solder_ball(
|
|
90
|
+
component=comp.reference_designator,
|
|
91
|
+
sball_diam=solder_ball_properties.diameter,
|
|
92
|
+
sball_mid_diam=solder_ball_properties.mid_diameter,
|
|
93
|
+
sball_height=solder_ball_properties.height,
|
|
94
|
+
shape=solder_ball_properties.shape,
|
|
95
|
+
auto_reference_size=port_properties.reference_size_auto,
|
|
96
|
+
reference_height=port_properties.reference_offset,
|
|
97
|
+
reference_size_x=port_properties.reference_size_x,
|
|
98
|
+
reference_size_y=port_properties.reference_size_y,
|
|
99
|
+
)
|
|
100
|
+
elif attr == "port_properties":
|
|
101
|
+
pass
|
|
102
|
+
elif attr == "rlc_model":
|
|
103
|
+
rlc_models = value
|
|
104
|
+
model_layout = c_db.model
|
|
105
|
+
for pp in model_layout.pin_pairs:
|
|
106
|
+
model_layout.delete_pin_pair_rlc(pp)
|
|
107
|
+
for pp in rlc_models:
|
|
108
|
+
pin_pair = self._pedb.edb_api.utility.PinPair(pp.p1, pp.p2)
|
|
109
|
+
rlc = self._pedb.edb_api.utility.Rlc()
|
|
110
|
+
rlc.IsParallel = False if pp.type else True
|
|
111
|
+
if pp.resistance is not None:
|
|
112
|
+
rlc.REnabled = True
|
|
113
|
+
rlc.R = self._pedb.edb_value(pp.resistance)
|
|
114
|
+
else:
|
|
115
|
+
rlc.REnabled = False
|
|
116
|
+
if pp.inductance is not None:
|
|
117
|
+
rlc.LEnabled = True
|
|
118
|
+
rlc.L = self._pedb.edb_value(pp.inductance)
|
|
119
|
+
else:
|
|
120
|
+
rlc.LEnabled = False
|
|
121
|
+
|
|
122
|
+
if pp.capacitance is not None:
|
|
123
|
+
rlc.CEnabled = True
|
|
124
|
+
rlc.C = self._pedb.edb_value(pp.capacitance)
|
|
125
|
+
else:
|
|
126
|
+
rlc.CEnabled = False
|
|
127
|
+
model_layout._set_pin_pair_rlc(pin_pair, rlc)
|
|
128
|
+
comps_in_db.model = model_layout
|
|
129
|
+
else:
|
|
130
|
+
if attr in dir(c_db):
|
|
131
|
+
setattr(c_db, attr, value)
|
|
132
|
+
else:
|
|
133
|
+
raise AttributeError(f"'{attr}' is not valid component attribute.")
|
|
@@ -20,10 +20,13 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
+
|
|
23
24
|
from pyedb.configuration.cfg_boundaries import CfgBoundaries
|
|
24
|
-
from pyedb.configuration.cfg_components import
|
|
25
|
+
from pyedb.configuration.cfg_components import CfgComponents
|
|
25
26
|
from pyedb.configuration.cfg_general import CfgGeneral
|
|
26
27
|
from pyedb.configuration.cfg_nets import CfgNets
|
|
28
|
+
from pyedb.configuration.cfg_operations import CfgOperations
|
|
29
|
+
from pyedb.configuration.cfg_package_definition import CfgPackageDefinitions
|
|
27
30
|
from pyedb.configuration.cfg_padstacks import CfgPadstacks
|
|
28
31
|
from pyedb.configuration.cfg_pin_groups import CfgPinGroup
|
|
29
32
|
from pyedb.configuration.cfg_ports_sources import CfgPort, CfgSources
|
|
@@ -31,7 +34,6 @@ from pyedb.configuration.cfg_s_parameter_models import CfgSParameterModel
|
|
|
31
34
|
from pyedb.configuration.cfg_setup import CfgSetup
|
|
32
35
|
from pyedb.configuration.cfg_spice_models import CfgSpiceModel
|
|
33
36
|
from pyedb.configuration.cfg_stackup import CfgStackup
|
|
34
|
-
from pyedb.generic.general_methods import pyedb_function_handler
|
|
35
37
|
|
|
36
38
|
|
|
37
39
|
class CfgData(object):
|
|
@@ -52,7 +54,8 @@ class CfgData(object):
|
|
|
52
54
|
self, kwargs.get("nets", {}).get("signal_nets", []), kwargs.get("nets", {}).get("power_ground_nets", [])
|
|
53
55
|
)
|
|
54
56
|
|
|
55
|
-
self.components = [CfgComponent(self, **component) for component in kwargs.get("components", [])]
|
|
57
|
+
# self.components = [CfgComponent(self, **component) for component in kwargs.get("components", [])]
|
|
58
|
+
self.components = CfgComponents(self._pedb, data=kwargs.get("components", []))
|
|
56
59
|
|
|
57
60
|
self.padstacks = CfgPadstacks(self, kwargs.get("padstacks", None))
|
|
58
61
|
|
|
@@ -78,10 +81,5 @@ class CfgData(object):
|
|
|
78
81
|
for spice_model in kwargs.get("spice_models", [])
|
|
79
82
|
]
|
|
80
83
|
|
|
81
|
-
self.
|
|
82
|
-
self.operations =
|
|
83
|
-
|
|
84
|
-
@pyedb_function_handler
|
|
85
|
-
def apply(self):
|
|
86
|
-
"""Apply configuration settings to the current design"""
|
|
87
|
-
self.stackup.apply()
|
|
84
|
+
self.package_definitions = CfgPackageDefinitions(self._pedb, data=kwargs.get("package_definitions", []))
|
|
85
|
+
self.operations = CfgOperations(self._pedb, data=kwargs.get("operations", []))
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
from pyedb.configuration.cfg_common import CfgBase
|
|
24
|
+
from pyedb.generic.general_methods import pyedb_function_handler
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class CfgCutout(CfgBase):
|
|
28
|
+
def __init__(self, **kwargs):
|
|
29
|
+
self.signal_list = kwargs.get("signal_list")
|
|
30
|
+
self.reference_list = kwargs.get("reference_list")
|
|
31
|
+
self.extent_type = kwargs.get("extent_type")
|
|
32
|
+
self.expansion_size = kwargs.get("expansion_size")
|
|
33
|
+
self.use_round_corner = kwargs.get("use_round_corner")
|
|
34
|
+
self.output_aedb_path = kwargs.get("output_aedb_path")
|
|
35
|
+
self.open_cutout_at_end = kwargs.get("open_cutout_at_end")
|
|
36
|
+
self.use_pyaedt_cutout = kwargs.get("use_pyaedt_cutout")
|
|
37
|
+
self.number_of_threads = kwargs.get("number_of_threads")
|
|
38
|
+
self.use_pyaedt_extent_computing = kwargs.get("use_pyaedt_extent_computing")
|
|
39
|
+
self.extent_defeature = kwargs.get("extent_defeature")
|
|
40
|
+
self.remove_single_pin_components = kwargs.get("remove_single_pin_components")
|
|
41
|
+
self.custom_extent = kwargs.get("custom_extent")
|
|
42
|
+
self.custom_extent_units = kwargs.get("custom_extent_units")
|
|
43
|
+
self.include_partial_instances = kwargs.get("include_partial_instances")
|
|
44
|
+
self.keep_voids = kwargs.get("keep_voids")
|
|
45
|
+
self.check_terminals = kwargs.get("check_terminals")
|
|
46
|
+
self.include_pingroups = kwargs.get("include_pingroups")
|
|
47
|
+
self.expansion_factor = kwargs.get("expansion_factor")
|
|
48
|
+
self.maximum_iterations = kwargs.get("maximum_iterations")
|
|
49
|
+
self.preserve_components_with_model = kwargs.get("preserve_components_with_model")
|
|
50
|
+
self.simple_pad_check = kwargs.get("simple_pad_check")
|
|
51
|
+
self.keep_lines_as_path = kwargs.get("keep_lines_as_path")
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class CfgOperations(CfgBase):
|
|
55
|
+
def __init__(self, pedb, data):
|
|
56
|
+
self._pedb = pedb
|
|
57
|
+
self.op_cutout = CfgCutout(**data["cutout"]) if "cutout" in data else None
|
|
58
|
+
|
|
59
|
+
@pyedb_function_handler
|
|
60
|
+
def apply(self):
|
|
61
|
+
"""Imports operation information from JSON."""
|
|
62
|
+
if self.op_cutout:
|
|
63
|
+
self._pedb.cutout(**self.op_cutout.get_attributes())
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
from pyedb.configuration.cfg_common import CfgBase
|
|
24
|
+
from pyedb.dotnet.edb_core.definition.package_def import PackageDef
|
|
25
|
+
from pyedb.generic.general_methods import pyedb_function_handler
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class CfgPackage(CfgBase):
|
|
29
|
+
"""Configuration package class."""
|
|
30
|
+
|
|
31
|
+
def __init__(self, **kwargs):
|
|
32
|
+
self.name = kwargs.get("name", None)
|
|
33
|
+
self.component_definition = kwargs.get("component_definition", None)
|
|
34
|
+
self.maximum_power = kwargs.get("maximum_power", None)
|
|
35
|
+
self.therm_cond = kwargs.get("therm_cond", None)
|
|
36
|
+
self.theta_jb = kwargs.get("theta_jb", None)
|
|
37
|
+
self.theta_jc = kwargs.get("theta_jc", None)
|
|
38
|
+
self.height = kwargs.get("height", None)
|
|
39
|
+
self.apply_to_all = kwargs.get("apply_to_all", None)
|
|
40
|
+
self.components = kwargs.get("components", [])
|
|
41
|
+
self.extent_bounding_box = kwargs.get("extent_bounding_box", None)
|
|
42
|
+
self._heatsink = CfgHeatSink(**kwargs["heatsink"]) if "heatsink" in kwargs else None
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def heatsink(self):
|
|
46
|
+
return self._heatsink
|
|
47
|
+
|
|
48
|
+
@heatsink.setter
|
|
49
|
+
def heatsink(self, value):
|
|
50
|
+
self._heatsink = value
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def protected_attributes(self):
|
|
54
|
+
"""Attributes cannot be set to package definition class or don't exist in package definition class."""
|
|
55
|
+
return ["apply_to_all", "components", "extent_bounding_box", "component_definition"]
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class CfgHeatSink(CfgBase):
|
|
59
|
+
"""Configuration heat sink class."""
|
|
60
|
+
|
|
61
|
+
def __init__(self, **kwargs):
|
|
62
|
+
self.fin_base_height = kwargs.get("fin_base_height", None)
|
|
63
|
+
self.fin_height = kwargs.get("fin_height", None)
|
|
64
|
+
self.fin_orientation = kwargs.get("fin_orientation", None)
|
|
65
|
+
self.fin_spacing = kwargs.get("fin_spacing", None)
|
|
66
|
+
self.fin_thickness = kwargs.get("fin_thickness", None)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class CfgPackageDefinitions:
|
|
70
|
+
def __init__(self, pedb, data):
|
|
71
|
+
self._pedb = pedb
|
|
72
|
+
self.packages = [CfgPackage(**package) for package in data]
|
|
73
|
+
|
|
74
|
+
def apply(self):
|
|
75
|
+
for pkg in self.packages:
|
|
76
|
+
comp_def_from_db = self._pedb.definitions.component[pkg.component_definition]
|
|
77
|
+
if pkg.name in self._pedb.definitions.package:
|
|
78
|
+
self._pedb.definitions.package[pkg.name].delete()
|
|
79
|
+
|
|
80
|
+
if pkg.extent_bounding_box:
|
|
81
|
+
package_def = PackageDef(self._pedb, name=pkg.name, extent_bounding_box=pkg.extent_bounding_box)
|
|
82
|
+
else:
|
|
83
|
+
package_def = PackageDef(self._pedb, name=pkg.name, component_part_name=pkg.component_definition)
|
|
84
|
+
pkg.set_attributes(package_def)
|
|
85
|
+
|
|
86
|
+
if pkg.heatsink:
|
|
87
|
+
attrs = pkg.heatsink.get_attributes()
|
|
88
|
+
for attr, value in attrs.items():
|
|
89
|
+
package_def.set_heatsink(**attrs)
|
|
90
|
+
|
|
91
|
+
comp_list = dict()
|
|
92
|
+
if pkg.apply_to_all:
|
|
93
|
+
comp_list.update(
|
|
94
|
+
{
|
|
95
|
+
refdes: comp
|
|
96
|
+
for refdes, comp in comp_def_from_db.components.items()
|
|
97
|
+
if refdes not in pkg.components
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
else:
|
|
101
|
+
comp_list.update(
|
|
102
|
+
{refdes: comp for refdes, comp in comp_def_from_db.components.items() if refdes in pkg.components}
|
|
103
|
+
)
|
|
104
|
+
for _, i in comp_list.items():
|
|
105
|
+
i.package_def = pkg.name
|
|
106
|
+
|
|
107
|
+
@pyedb_function_handler
|
|
108
|
+
def get_data_from_db(self):
|
|
109
|
+
package_definitions = []
|
|
110
|
+
|
|
111
|
+
for pkg_name, pkg_obj in self._pedb.definitions.package.items():
|
|
112
|
+
pkg = {}
|
|
113
|
+
pkg_attrs = [i for i in dir(pkg_obj) if not i.startswith("_")]
|
|
114
|
+
pkg_attrs = {i for i in pkg_attrs if i in CfgPackage().__dict__}
|
|
115
|
+
for pkg_attr_name in pkg_attrs:
|
|
116
|
+
pkg[pkg_attr_name] = getattr(pkg_obj, pkg_attr_name)
|
|
117
|
+
|
|
118
|
+
hs_obj = pkg_obj.heatsink
|
|
119
|
+
if hs_obj:
|
|
120
|
+
hs = {}
|
|
121
|
+
hs_attrs = [i for i in dir(hs_obj) if not i.startswith("_")]
|
|
122
|
+
hs_attrs = [i for i in hs_attrs if i in CfgHeatSink().__dict__]
|
|
123
|
+
for hs_attr_name in hs_attrs:
|
|
124
|
+
hs[hs_attr_name] = getattr(hs_obj, hs_attr_name)
|
|
125
|
+
pkg["heatsink"] = hs
|
|
126
|
+
package_definitions.append(pkg)
|
|
127
|
+
|
|
128
|
+
return package_definitions
|
|
@@ -20,34 +20,68 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
from pyedb.configuration.cfg_common import CfgBase
|
|
24
24
|
from pyedb.generic.general_methods import pyedb_function_handler
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
class CfgMaterial(CfgBase):
|
|
28
|
+
def __init__(self, **kwargs):
|
|
29
|
+
self.name = kwargs.get("name", None)
|
|
30
|
+
self.permittivity = kwargs.get("permittivity", None)
|
|
31
|
+
self.conductivity = kwargs.get("conductivity", None)
|
|
32
|
+
self.dielectric_loss_tangent = kwargs.get("dielectric_loss_tangent", None)
|
|
33
|
+
self.magnetic_loss_tangent = kwargs.get("magnetic_loss_tangent", None)
|
|
34
|
+
self.mass_density = kwargs.get("mass_density", None)
|
|
35
|
+
self.permeability = kwargs.get("permeability", None)
|
|
36
|
+
self.poisson_ratio = kwargs.get("poisson_ratio", None)
|
|
37
|
+
self.specific_heat = kwargs.get("specific_heat", None)
|
|
38
|
+
self.thermal_conductivity = kwargs.get("thermal_conductivity", None)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class CfgLayer(CfgBase):
|
|
42
|
+
def __init__(self, **kwargs):
|
|
43
|
+
self.name = kwargs.get("name", None)
|
|
44
|
+
self.type = kwargs.get("type", None)
|
|
45
|
+
self.material = kwargs.get("material", None)
|
|
46
|
+
self.fill_material = kwargs.get("fill_material", None)
|
|
47
|
+
self.thickness = kwargs.get("thickness", None)
|
|
48
|
+
|
|
49
|
+
|
|
27
50
|
class CfgStackup:
|
|
28
51
|
def __init__(self, pedb, data):
|
|
29
52
|
self._pedb = pedb
|
|
30
53
|
|
|
31
|
-
self.materials = [CfgMaterial(
|
|
32
|
-
self.layers = [CfgLayer(
|
|
54
|
+
self.materials = [CfgMaterial(**mat) for mat in data.get("materials", [])]
|
|
55
|
+
self.layers = [CfgLayer(**lay) for lay in data.get("layers", [])]
|
|
33
56
|
|
|
34
57
|
@pyedb_function_handler
|
|
35
58
|
def apply(self):
|
|
36
59
|
"""Apply configuration settings to the current design"""
|
|
37
60
|
if len(self.materials):
|
|
38
61
|
self.__apply_materials()
|
|
62
|
+
|
|
63
|
+
input_signal_layers = [i for i in self.layers if i.type.lower() == "signal"]
|
|
64
|
+
|
|
39
65
|
if len(self.layers):
|
|
40
|
-
self.
|
|
66
|
+
if len(self._pedb.stackup.signal_layers) == 0:
|
|
67
|
+
self.__create_stackup()
|
|
68
|
+
elif not len(input_signal_layers) == len(self._pedb.stackup.signal_layers):
|
|
69
|
+
raise Exception(f"Input signal layer count do not match.")
|
|
70
|
+
else:
|
|
71
|
+
self.__apply_layers()
|
|
72
|
+
|
|
73
|
+
def __create_stackup(self):
|
|
74
|
+
layers = list()
|
|
75
|
+
layers.extend(self.layers)
|
|
76
|
+
for l_attrs in layers:
|
|
77
|
+
attrs = l_attrs.get_attributes()
|
|
78
|
+
self._pedb.stackup.add_layer_bottom(**attrs)
|
|
41
79
|
|
|
42
80
|
@pyedb_function_handler
|
|
43
81
|
def __apply_layers(self):
|
|
44
82
|
"""Apply layer settings to the current design"""
|
|
45
83
|
layers = list()
|
|
46
84
|
layers.extend(self.layers)
|
|
47
|
-
input_signal_layers = [i for i in layers if i.type.lower() == "signal"]
|
|
48
|
-
if not len(input_signal_layers) == len(self._pedb.stackup.signal_layers):
|
|
49
|
-
self._pedb.logger.error("Input signal layer count do not match.")
|
|
50
|
-
return False
|
|
51
85
|
|
|
52
86
|
removal_list = []
|
|
53
87
|
lc_signal_layers = []
|
|
@@ -66,9 +100,7 @@ class CfgStackup:
|
|
|
66
100
|
if l.type == "signal":
|
|
67
101
|
layer_id = lc_signal_layers[signal_idx]
|
|
68
102
|
layer_name = id_name[layer_id]
|
|
69
|
-
attrs =
|
|
70
|
-
i: j for i, j in l.__dict__.items() if not i.startswith("_") and isinstance(j, (int, float, str))
|
|
71
|
-
}
|
|
103
|
+
attrs = l.get_attributes()
|
|
72
104
|
self._pedb.stackup.layers[layer_name].update(**attrs)
|
|
73
105
|
signal_idx = signal_idx + 1
|
|
74
106
|
|
|
@@ -79,13 +111,11 @@ class CfgStackup:
|
|
|
79
111
|
if l.type == "signal":
|
|
80
112
|
prev_layer_clone = self._pedb.stackup.layers[l.name]
|
|
81
113
|
else:
|
|
82
|
-
attrs =
|
|
114
|
+
attrs = l.get_attributes()
|
|
83
115
|
prev_layer_clone = self._pedb.stackup.add_layer_top(**attrs)
|
|
84
116
|
for idx, l in enumerate(layers):
|
|
85
117
|
if l.type == "dielectric":
|
|
86
|
-
attrs =
|
|
87
|
-
i: j for i, j in l.__dict__.items() if not i.startswith("_") and isinstance(j, (int, float, str))
|
|
88
|
-
}
|
|
118
|
+
attrs = l.get_attributes()
|
|
89
119
|
prev_layer_clone = self._pedb.stackup.add_layer_below(base_layer_name=prev_layer_clone.name, **attrs)
|
|
90
120
|
elif l.type == "signal":
|
|
91
121
|
prev_layer_clone = self._pedb.stackup.layers[l.name]
|
|
@@ -98,38 +128,42 @@ class CfgStackup:
|
|
|
98
128
|
if mat_in_cfg.name.lower() in materials_in_db:
|
|
99
129
|
self._pedb.materials.delete_material(materials_in_db[mat_in_cfg.name.lower()])
|
|
100
130
|
|
|
101
|
-
attrs =
|
|
102
|
-
i: j
|
|
103
|
-
for i, j in mat_in_cfg.__dict__.items()
|
|
104
|
-
if not i.startswith("_") and isinstance(j, (int, float, str))
|
|
105
|
-
}
|
|
131
|
+
attrs = mat_in_cfg.get_attributes()
|
|
106
132
|
mat = self._pedb.materials.add_material(**attrs)
|
|
107
133
|
|
|
134
|
+
@pyedb_function_handler
|
|
135
|
+
def __get_materials_from_db(self):
|
|
136
|
+
materials = []
|
|
137
|
+
for name, p in self._pedb.materials.materials.items():
|
|
138
|
+
mat = {}
|
|
139
|
+
for p_name in CfgMaterial().__dict__:
|
|
140
|
+
mat[p_name] = getattr(p, p_name)
|
|
141
|
+
materials.append(mat)
|
|
142
|
+
return materials
|
|
108
143
|
|
|
109
|
-
|
|
110
|
-
def
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
self.specific_heat = kwargs.get("specific_heat", None)
|
|
121
|
-
self.thermal_conductivity = kwargs.get("thermal_conductivity", None)
|
|
122
|
-
self.youngs_modulus = kwargs.get("youngs_modulus", None)
|
|
123
|
-
self.thermal_expansion_coefficient = kwargs.get("thermal_expansion_coefficient", None)
|
|
124
|
-
|
|
144
|
+
@pyedb_function_handler
|
|
145
|
+
def __get_layers_from_db(self):
|
|
146
|
+
layers = []
|
|
147
|
+
for name, obj in self._pedb.stackup.all_layers.items():
|
|
148
|
+
layer = {}
|
|
149
|
+
for p_name in CfgLayer().__dict__:
|
|
150
|
+
p_value = getattr(obj, p_name, None)
|
|
151
|
+
if p_value is not None:
|
|
152
|
+
layer[p_name] = getattr(obj, p_name)
|
|
153
|
+
layers.append(layer)
|
|
154
|
+
return layers
|
|
125
155
|
|
|
126
|
-
|
|
127
|
-
def
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
156
|
+
@pyedb_function_handler
|
|
157
|
+
def get_data_from_db(self):
|
|
158
|
+
"""Get configuration data from layout.
|
|
159
|
+
|
|
160
|
+
Returns
|
|
161
|
+
-------
|
|
162
|
+
dict
|
|
163
|
+
"""
|
|
164
|
+
stackup = {}
|
|
165
|
+
materials = self.__get_materials_from_db()
|
|
166
|
+
stackup["materials"] = materials
|
|
167
|
+
layers = self.__get_layers_from_db()
|
|
168
|
+
stackup["layers"] = layers
|
|
169
|
+
return stackup
|