pyedb 0.5.2__tar.gz → 0.7.0__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.

Files changed (160) hide show
  1. {pyedb-0.5.2 → pyedb-0.7.0}/PKG-INFO +1 -1
  2. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/__init__.py +2 -3
  3. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/application/Variables.py +22 -0
  4. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb.py +51 -15
  5. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/model.py +39 -0
  6. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/components.py +23 -1
  7. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/configuration.py +175 -60
  8. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/definition/component_def.py +24 -3
  9. pyedb-0.7.0/src/pyedb/dotnet/edb_core/definition/component_model.py +52 -0
  10. pyedb-0.7.0/src/pyedb/dotnet/edb_core/definition/definition_obj.py +38 -0
  11. pyedb-0.7.0/src/pyedb/dotnet/edb_core/definition/definitions.py +56 -0
  12. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/definition/package_def.py +23 -3
  13. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/dotnet/database.py +22 -0
  14. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/dotnet/layout.py +22 -0
  15. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/dotnet/primitive.py +22 -0
  16. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/components_data.py +112 -3
  17. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/connectable.py +22 -0
  18. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/control_file.py +22 -0
  19. pyedb-0.7.0/src/pyedb/dotnet/edb_core/edb_data/design_options.py +58 -0
  20. pyedb-0.7.0/src/pyedb/dotnet/edb_core/edb_data/edbvalue.py +68 -0
  21. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +22 -0
  22. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +22 -0
  23. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/layer_data.py +22 -0
  24. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/nets_data.py +23 -1
  25. pyedb-0.7.0/src/pyedb/dotnet/edb_core/edb_data/obj_base.py +51 -0
  26. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/padstacks_data.py +42 -0
  27. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/ports.py +22 -0
  28. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/primitives_data.py +62 -7
  29. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +22 -0
  30. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/simulation_setup.py +22 -0
  31. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +22 -0
  32. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/sources.py +23 -3
  33. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/terminals.py +22 -0
  34. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/utilities.py +25 -2
  35. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/variables.py +23 -0
  36. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/general.py +22 -0
  37. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/hfss.py +23 -1
  38. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/layout.py +68 -35
  39. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/layout_validation.py +24 -2
  40. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/materials.py +22 -0
  41. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/net_class.py +22 -0
  42. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/nets.py +27 -5
  43. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/padstack.py +22 -0
  44. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/siwave.py +22 -0
  45. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/stackup.py +22 -0
  46. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/edb_logger.py +22 -0
  47. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/generic/constants.py +22 -0
  48. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/generic/data_handlers.py +0 -1
  49. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/generic/design_types.py +24 -0
  50. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/generic/general_methods.py +22 -2
  51. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/generic/plot.py +3 -13
  52. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/generic/settings.py +22 -0
  53. pyedb-0.7.0/src/pyedb/ipc2581/bom/bom.py +43 -0
  54. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/bom/bom_item.py +22 -0
  55. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/bom/characteristics.py +22 -0
  56. pyedb-0.7.0/src/pyedb/ipc2581/bom/refdes.py +38 -0
  57. pyedb-0.7.0/src/pyedb/ipc2581/content/color.py +60 -0
  58. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/content/content.py +22 -0
  59. pyedb-0.7.0/src/pyedb/ipc2581/content/dictionary_color.py +51 -0
  60. pyedb-0.7.0/src/pyedb/ipc2581/content/dictionary_fill.py +50 -0
  61. pyedb-0.7.0/src/pyedb/ipc2581/content/dictionary_line.py +52 -0
  62. pyedb-0.7.0/src/pyedb/ipc2581/content/entry_color.py +35 -0
  63. pyedb-0.7.0/src/pyedb/ipc2581/content/entry_line.py +36 -0
  64. pyedb-0.7.0/src/pyedb/ipc2581/content/fill.py +37 -0
  65. pyedb-0.7.0/src/pyedb/ipc2581/content/layer_ref.py +32 -0
  66. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/content/standard_geometries_dictionary.py +22 -0
  67. pyedb-0.7.0/src/pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +48 -0
  68. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/cad_data.py +22 -0
  69. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/component.py +22 -0
  70. pyedb-0.7.0/src/pyedb/ipc2581/ecad/cad_data/drill.py +52 -0
  71. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/feature.py +22 -0
  72. pyedb-0.7.0/src/pyedb/ipc2581/ecad/cad_data/layer.py +63 -0
  73. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/layer_feature.py +22 -0
  74. pyedb-0.7.0/src/pyedb/ipc2581/ecad/cad_data/logical_net.py +54 -0
  75. pyedb-0.7.0/src/pyedb/ipc2581/ecad/cad_data/outline.py +47 -0
  76. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/package.py +22 -0
  77. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/padstack_def.py +22 -0
  78. pyedb-0.7.0/src/pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +46 -0
  79. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/padstack_instance.py +22 -0
  80. pyedb-0.7.0/src/pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +48 -0
  81. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/path.py +22 -0
  82. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/phy_net.py +22 -0
  83. pyedb-0.7.0/src/pyedb/ipc2581/ecad/cad_data/pin.py +53 -0
  84. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/polygon.py +22 -0
  85. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/profile.py +22 -0
  86. pyedb-0.7.0/src/pyedb/ipc2581/ecad/cad_data/stackup.py +53 -0
  87. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/stackup_group.py +22 -0
  88. pyedb-0.7.0/src/pyedb/ipc2581/ecad/cad_data/stackup_layer.py +43 -0
  89. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/step.py +22 -0
  90. pyedb-0.7.0/src/pyedb/ipc2581/ecad/cad_header.py +55 -0
  91. pyedb-0.7.0/src/pyedb/ipc2581/ecad/ecad.py +41 -0
  92. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/spec.py +22 -0
  93. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/history_record.py +22 -0
  94. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ipc2581.py +22 -0
  95. pyedb-0.7.0/src/pyedb/ipc2581/logistic_header.py +47 -0
  96. pyedb-0.7.0/src/pyedb/misc/aedtlib_personalib_install.py +36 -0
  97. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/downloads.py +22 -0
  98. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/misc.py +22 -0
  99. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/siw_feature_config/emc/component_tags.py +3 -5
  100. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/siw_feature_config/emc/net_tags.py +1 -3
  101. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/siw_feature_config/emc/tag_library.py +5 -4
  102. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/siw_feature_config/emc/xml_generic.py +1 -2
  103. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +55 -30
  104. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/siwave.py +6 -4
  105. pyedb-0.5.2/src/pyedb/dotnet/edb_core/definition/component_model.py +0 -30
  106. pyedb-0.5.2/src/pyedb/dotnet/edb_core/definition/definition_obj.py +0 -18
  107. pyedb-0.5.2/src/pyedb/dotnet/edb_core/definition/definitions.py +0 -35
  108. pyedb-0.5.2/src/pyedb/dotnet/edb_core/edb_data/design_options.py +0 -35
  109. pyedb-0.5.2/src/pyedb/dotnet/edb_core/edb_data/edbvalue.py +0 -45
  110. pyedb-0.5.2/src/pyedb/dotnet/edb_core/edb_data/obj_base.py +0 -28
  111. pyedb-0.5.2/src/pyedb/ipc2581/bom/bom.py +0 -21
  112. pyedb-0.5.2/src/pyedb/ipc2581/bom/refdes.py +0 -16
  113. pyedb-0.5.2/src/pyedb/ipc2581/content/color.py +0 -38
  114. pyedb-0.5.2/src/pyedb/ipc2581/content/dictionary_color.py +0 -29
  115. pyedb-0.5.2/src/pyedb/ipc2581/content/dictionary_fill.py +0 -28
  116. pyedb-0.5.2/src/pyedb/ipc2581/content/dictionary_line.py +0 -30
  117. pyedb-0.5.2/src/pyedb/ipc2581/content/entry_color.py +0 -13
  118. pyedb-0.5.2/src/pyedb/ipc2581/content/entry_line.py +0 -14
  119. pyedb-0.5.2/src/pyedb/ipc2581/content/fill.py +0 -15
  120. pyedb-0.5.2/src/pyedb/ipc2581/content/layer_ref.py +0 -10
  121. pyedb-0.5.2/src/pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +0 -26
  122. pyedb-0.5.2/src/pyedb/ipc2581/ecad/cad_data/drill.py +0 -30
  123. pyedb-0.5.2/src/pyedb/ipc2581/ecad/cad_data/layer.py +0 -41
  124. pyedb-0.5.2/src/pyedb/ipc2581/ecad/cad_data/logical_net.py +0 -32
  125. pyedb-0.5.2/src/pyedb/ipc2581/ecad/cad_data/outline.py +0 -25
  126. pyedb-0.5.2/src/pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +0 -24
  127. pyedb-0.5.2/src/pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +0 -26
  128. pyedb-0.5.2/src/pyedb/ipc2581/ecad/cad_data/pin.py +0 -31
  129. pyedb-0.5.2/src/pyedb/ipc2581/ecad/cad_data/stackup.py +0 -31
  130. pyedb-0.5.2/src/pyedb/ipc2581/ecad/cad_data/stackup_layer.py +0 -21
  131. pyedb-0.5.2/src/pyedb/ipc2581/ecad/cad_header.py +0 -33
  132. pyedb-0.5.2/src/pyedb/ipc2581/ecad/ecad.py +0 -19
  133. pyedb-0.5.2/src/pyedb/ipc2581/logistic_header.py +0 -25
  134. pyedb-0.5.2/src/pyedb/misc/aedtlib_personalib_install.py +0 -14
  135. {pyedb-0.5.2 → pyedb-0.7.0}/LICENSE +0 -0
  136. {pyedb-0.5.2 → pyedb-0.7.0}/README.md +0 -0
  137. {pyedb-0.5.2 → pyedb-0.7.0}/pyproject.toml +0 -0
  138. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/__init__.py +0 -0
  139. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/application/__init__.py +0 -0
  140. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/clr_module.py +0 -0
  141. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/__init__.py +0 -0
  142. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/cell/__init__.py +0 -0
  143. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/__init__.py +0 -0
  144. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/definition/__init__.py +0 -0
  145. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/dotnet/__init__.py +0 -0
  146. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/dotnet/edb_core/edb_data/__init__.py +0 -0
  147. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/generic/__init__.py +0 -0
  148. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/generic/filesystem.py +0 -0
  149. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/generic/process.py +0 -0
  150. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/__init__.py +0 -0
  151. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/bom/__init__.py +0 -0
  152. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/content/__init__.py +0 -0
  153. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/__init__.py +0 -0
  154. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/ipc2581/ecad/cad_data/__init__.py +0 -0
  155. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/__init__.py +0 -0
  156. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/pyedb.runtimeconfig.json +0 -0
  157. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/siw_feature_config/__init__.py +0 -0
  158. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/siw_feature_config/emc/__init__.py +0 -0
  159. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/misc/utilities.py +0 -0
  160. {pyedb-0.5.2 → pyedb-0.7.0}/src/pyedb/modeler/geometry_operators.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyedb
3
- Version: 0.5.2
3
+ Version: 0.7.0
4
4
  Summary: Higher-Level Pythonic Ansys Electronics Data Base
5
5
  Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
6
6
  Maintainer-email: PyEDB developers <simon.vandenbrouck@ansys.com>
@@ -44,10 +44,9 @@ deprecation_warning()
44
44
  #
45
45
 
46
46
  pyedb_path = os.path.dirname(__file__)
47
- __version__ = "0.5.2"
47
+ __version__ = "0.7.0"
48
48
  version = __version__
49
49
 
50
50
  #
51
51
 
52
- from pyedb.generic.design_types import Edb
53
- from pyedb.generic.design_types import Siwave
52
+ from pyedb.generic.design_types import Edb, Siwave
@@ -1,3 +1,25 @@
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
+
1
23
  """
2
24
  This module contains these classes: `CSVDataset`, `DataSet`, `Expression`, `Variable`, and `VariableManager`.
3
25
 
@@ -1,3 +1,25 @@
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
+
1
23
  """This module contains the ``Edb`` class.
2
24
 
3
25
  This module is implicitly loaded in HFSS 3D Layout when launched.
@@ -191,10 +213,21 @@ class Edb(Database):
191
213
  os.path.dirname(edbpath),
192
214
  "pyedb_" + os.path.splitext(os.path.split(edbpath)[-1])[0] + ".log",
193
215
  )
216
+ aedt_file = os.path.splitext(edbpath)[0] + ".aedt"
217
+ files = [aedt_file, aedt_file + ".lock"]
218
+ for file in files:
219
+ if os.path.isfile(file):
220
+ try:
221
+ shutil.rmtree(file)
222
+ self.logger.info(f"Removing {file} to allow loading EDB file.")
223
+ except:
224
+ self.logger.info(
225
+ f"Failed to delete {file} which is located at the same location as the EDB file."
226
+ )
194
227
 
195
228
  if isaedtowned and (inside_desktop or settings.remote_rpc_session):
196
229
  self.open_edb_inside_aedt()
197
- elif edbpath[-3:] in ["brd", "mcm", "sip", "gds", "xml", "dxf", "tgz"]:
230
+ elif edbpath[-3:] in ["brd", "mcm", "sip", "gds", "xml", "dxf", "tgz", "anf"]:
198
231
  self.edbpath = edbpath[:-4] + ".aedb"
199
232
  working_dir = os.path.dirname(edbpath)
200
233
  control_file = None
@@ -2290,9 +2323,9 @@ class Edb(Database):
2290
2323
  list_prims = subtract(p, voids_data)
2291
2324
  for prim in list_prims:
2292
2325
  if not prim.IsNull():
2293
- poly_to_create.append([prim, prim_1.layer_name, net, list_void])
2326
+ poly_to_create.append([prim, prim_1.layer.name, net, list_void])
2294
2327
  else:
2295
- poly_to_create.append([p, prim_1.layer_name, net, list_void])
2328
+ poly_to_create.append([p, prim_1.layer.name, net, list_void])
2296
2329
 
2297
2330
  prims_to_delete.append(prim_1)
2298
2331
 
@@ -2318,8 +2351,10 @@ class Edb(Database):
2318
2351
 
2319
2352
  for item in reference_paths:
2320
2353
  clip_path(item)
2321
- with ThreadPoolExecutor(number_of_threads) as pool:
2322
- pool.map(lambda item: clean_prim(item), reference_prims)
2354
+ for prim in reference_prims: # removing multithreading as failing with new layer from primitive
2355
+ clean_prim(prim)
2356
+ # with ThreadPoolExecutor(number_of_threads) as pool:
2357
+ # pool.map(lambda item: clean_prim(item), reference_prims)
2323
2358
 
2324
2359
  for el in poly_to_create:
2325
2360
  self.modeler.create_polygon(el[0], el[1], net_name=el[2], voids=el[3])
@@ -4141,7 +4176,7 @@ class Edb(Database):
4141
4176
  if via_holes: # pragma no cover
4142
4177
  hole_variable = self._clean_string_for_variable_name("$hole_diam_{}".format(def_name))
4143
4178
  if hole_variable not in self.variables:
4144
- self.add_design_variable(hole_variable, padstack_def.hole_properties[0])
4179
+ self.add_design_variable(hole_variable, padstack_def.hole_diameter_string)
4145
4180
  padstack_def.hole_properties = hole_variable
4146
4181
  parameters.append(hole_variable)
4147
4182
  if pads:
@@ -4151,7 +4186,7 @@ class Edb(Database):
4151
4186
  "$pad_diam_{}_{}".format(def_name, layer)
4152
4187
  )
4153
4188
  if pad_diameter_variable not in self.variables:
4154
- self.add_design_variable(pad_diameter_variable, pad.parameters_values[0])
4189
+ self.add_design_variable(pad_diameter_variable, pad.parameters_values_string[0])
4155
4190
  pad.parameters = {"Diameter": pad_diameter_variable}
4156
4191
  parameters.append(pad_diameter_variable)
4157
4192
  if pad.geometry_type == 2: # pragma no cover
@@ -4159,7 +4194,7 @@ class Edb(Database):
4159
4194
  "$pad_size_{}_{}".format(def_name, layer)
4160
4195
  )
4161
4196
  if pad_size_variable not in self.variables:
4162
- self.add_design_variable(pad_size_variable, pad.parameters_values[0])
4197
+ self.add_design_variable(pad_size_variable, pad.parameters_values_string[0])
4163
4198
  pad.parameters = {"Size": pad_size_variable}
4164
4199
  parameters.append(pad_size_variable)
4165
4200
  elif pad.geometry_type == 3: # pragma no cover
@@ -4170,8 +4205,8 @@ class Edb(Database):
4170
4205
  "$pad_size_y_{}_{}".format(def_name, layer)
4171
4206
  )
4172
4207
  if pad_size_variable_x not in self.variables and pad_size_variable_y not in self.variables:
4173
- self.add_design_variable(pad_size_variable_x, pad.parameters_values[0])
4174
- self.add_design_variable(pad_size_variable_y, pad.parameters_values[1])
4208
+ self.add_design_variable(pad_size_variable_x, pad.parameters_values_string[0])
4209
+ self.add_design_variable(pad_size_variable_y, pad.parameters_values_string[1])
4175
4210
  pad.parameters = {"XSize": pad_size_variable_x, "YSize": pad_size_variable_y}
4176
4211
  parameters.append(pad_size_variable_x)
4177
4212
  parameters.append(pad_size_variable_y)
@@ -4182,7 +4217,7 @@ class Edb(Database):
4182
4217
  "$antipad_diam_{}_{}".format(def_name, layer)
4183
4218
  )
4184
4219
  if antipad_diameter_variable not in self.variables: # pragma no cover
4185
- self.add_design_variable(antipad_diameter_variable, antipad.parameters_values[0])
4220
+ self.add_design_variable(antipad_diameter_variable, antipad.parameters_values_string[0])
4186
4221
  antipad.parameters = {"Diameter": antipad_diameter_variable}
4187
4222
  parameters.append(antipad_diameter_variable)
4188
4223
  if antipad.geometry_type == 2: # pragma no cover
@@ -4190,7 +4225,7 @@ class Edb(Database):
4190
4225
  "$antipad_size_{}_{}".format(def_name, layer)
4191
4226
  )
4192
4227
  if antipad_size_variable not in self.variables: # pragma no cover
4193
- self.add_design_variable(antipad_size_variable, antipad.parameters_values[0])
4228
+ self.add_design_variable(antipad_size_variable, antipad.parameters_values_string[0])
4194
4229
  antipad.parameters = {"Size": antipad_size_variable}
4195
4230
  parameters.append(antipad_size_variable)
4196
4231
  elif antipad.geometry_type == 3: # pragma no cover
@@ -4204,8 +4239,8 @@ class Edb(Database):
4204
4239
  antipad_size_variable_x not in self.variables
4205
4240
  and antipad_size_variable_y not in self.variables
4206
4241
  ): # pragma no cover
4207
- self.add_design_variable(antipad_size_variable_x, antipad.parameters_values[0])
4208
- self.add_design_variable(antipad_size_variable_y, antipad.parameters_values[1])
4242
+ self.add_design_variable(antipad_size_variable_x, antipad.parameters_values_string[0])
4243
+ self.add_design_variable(antipad_size_variable_y, antipad.parameters_values_string[1])
4209
4244
  antipad.parameters = {"XSize": antipad_size_variable_x, "YSize": antipad_size_variable_y}
4210
4245
  parameters.append(antipad_size_variable_x)
4211
4246
  parameters.append(antipad_size_variable_y)
@@ -4235,4 +4270,5 @@ class Edb(Database):
4235
4270
  def definitions(self):
4236
4271
  """Definitions class."""
4237
4272
  from pyedb.dotnet.edb_core.definition.definitions import Definitions
4238
- return Definitions(self)
4273
+
4274
+ return Definitions(self)
@@ -1,3 +1,25 @@
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
+
1
23
  from pyedb.dotnet.edb_core.edb_data.obj_base import ObjBase
2
24
  from pyedb.generic.general_methods import pyedb_function_handler
3
25
 
@@ -64,3 +86,20 @@ class SParameterModel(Model):
64
86
 
65
87
  def component_model_name(self):
66
88
  self._edb_object.GetComponentModelName()
89
+
90
+
91
+ class SPICEModel(Model):
92
+ """Manages SPICE model class."""
93
+
94
+ def __init__(self, pedb, edb_object=None):
95
+ super().__init__(pedb, edb_object)
96
+
97
+ @property
98
+ def model_name(self):
99
+ """SPICE model name."""
100
+ return self._edb_object.GetModelName()
101
+
102
+ @property
103
+ def spice_file_path(self):
104
+ """SPICE file path."""
105
+ return self._edb_object.GetSPICEFilePath()
@@ -1,3 +1,25 @@
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
+
1
23
  """This module contains the `Components` class.
2
24
 
3
25
  """
@@ -8,10 +30,10 @@ import re
8
30
  import warnings
9
31
 
10
32
  from pyedb.dotnet.clr_module import String
33
+ from pyedb.dotnet.edb_core.definition.component_def import EDBComponentDef
11
34
  from pyedb.dotnet.edb_core.edb_data.components_data import EDBComponent
12
35
  from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
13
36
  from pyedb.dotnet.edb_core.edb_data.sources import Source, SourceType
14
- from pyedb.dotnet.edb_core.definition.component_def import EDBComponentDef
15
37
  from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
16
38
  from pyedb.dotnet.edb_core.padstack import EdbPadstacks
17
39
  from pyedb.generic.general_methods import (
@@ -1,3 +1,25 @@
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
+
1
23
  import json
2
24
  from pathlib import Path
3
25
 
@@ -19,6 +41,8 @@ class Configuration:
19
41
  self._pedb = pedb
20
42
  self._components = self._pedb.components.components
21
43
  self.data = {}
44
+ self._s_parameter_library = ""
45
+ self._spice_model_library = ""
22
46
 
23
47
  @pyedb_function_handler
24
48
  def load(self, config_file, append=True, apply_file=False, output_file=None, open_at_the_end=True):
@@ -70,9 +94,22 @@ class Configuration:
70
94
  self._pedb.logger.error("No data loaded. Please load a configuration file.")
71
95
  return False
72
96
 
97
+ # Configure general settings
98
+ if "general" in self.data:
99
+ self._load_general()
100
+
101
+ # Configure nets
102
+ if "nets" in self.data:
103
+ self._load_nets()
104
+
105
+ # Configure components
73
106
  if "components" in self.data:
74
107
  self._load_components()
75
108
 
109
+ # Configure pin groups
110
+ if "pin_groups" in self.data:
111
+ self._load_pin_groups()
112
+
76
113
  # Configure ports
77
114
  if "ports" in self.data:
78
115
  self._load_ports()
@@ -93,15 +130,18 @@ class Configuration:
93
130
  if "s_parameters" in self.data:
94
131
  self._load_s_parameter()
95
132
 
96
- return True
133
+ # Configure SPICE models
134
+ if "spice_models" in self.data:
135
+ self._load_spice_models()
97
136
 
137
+ return True
98
138
 
99
139
  @pyedb_function_handler
100
140
  def _load_components(self):
101
141
  """Imports component information from json."""
102
142
 
103
- for comp in self.data["components"] :
104
- refdes = comp["reference_designator"]
143
+ for comp in self.data["components"]:
144
+ ref_designator = comp["reference_designator"]
105
145
  part_type = comp["part_type"].lower()
106
146
  if part_type == "resistor":
107
147
  part_type = "Resistor"
@@ -116,7 +156,7 @@ class Configuration:
116
156
  else:
117
157
  part_type = "Other"
118
158
 
119
- comp_layout = self._components[refdes]
159
+ comp_layout = self._components[ref_designator]
120
160
  comp_layout.type = part_type
121
161
 
122
162
  if part_type in ["Resistor", "Capacitor", "Inductor"]:
@@ -192,7 +232,7 @@ class Configuration:
192
232
  height = solder_ball_properties["height"]
193
233
 
194
234
  self._pedb.components.set_solder_ball(
195
- component=refdes,
235
+ component=ref_designator,
196
236
  sball_diam=diameter,
197
237
  sball_mid_diam=mid_diameter,
198
238
  sball_height=height,
@@ -208,38 +248,48 @@ class Configuration:
208
248
  """Imports port information from json."""
209
249
  for port in self.data["ports"]:
210
250
  port_type = port["type"]
211
- refdes = port["reference_designator"]
212
- comp_layout = self._components[refdes]
213
- pos = port["from"]
214
- if "pin" in pos:
215
- pin_name = pos["pin"]
216
- port_name = "{}_{}".format(refdes, pin_name)
217
- pos_terminal = comp_layout.pins[pin_name].get_terminal(port_name, True)
218
- else: # Net
219
- net_name = pos["net"]
220
- port_name = "{}_{}".format(refdes, net_name)
221
- if port_type == "circuit":
222
- pg_name = "pg_{}".format(port_name)
223
- _, pg = self._pedb.siwave.create_pin_group_on_net(refdes, net_name, pg_name)
224
- pos_terminal = pg.get_terminal(port_name, True)
225
- else: # Coax port
226
- for _, p in comp_layout.pins.items():
227
- if p.net_name == net_name:
228
- pos_terminal = p.get_terminal(port_name, True)
229
- break
251
+
252
+ positive_terminal_json = port["positive_terminal"]
253
+ pos_terminal = ""
254
+ if "pin_group" in positive_terminal_json:
255
+ pin_group = self._pedb.siwave.pin_groups[positive_terminal_json["pin_group"]]
256
+ pos_terminal = pin_group.get_terminal(pin_group.name, True)
257
+ else:
258
+ ref_designator = port["reference_designator"]
259
+ comp_layout = self._components[ref_designator]
260
+
261
+ if "pin" in positive_terminal_json:
262
+ pin_name = positive_terminal_json["pin"]
263
+ port_name = "{}_{}".format(ref_designator, pin_name)
264
+ pos_terminal = comp_layout.pins[pin_name].get_terminal(port_name, True)
265
+ else: # Net
266
+ net_name = positive_terminal_json["net"]
267
+ port_name = "{}_{}".format(ref_designator, net_name)
268
+ if port_type == "circuit":
269
+ pg_name = "pg_{}".format(port_name)
270
+ _, pg = self._pedb.siwave.create_pin_group_on_net(ref_designator, net_name, pg_name)
271
+ pos_terminal = pg.get_terminal(port_name, True)
272
+ else: # Coax port
273
+ for _, p in comp_layout.pins.items():
274
+ if p.net_name == net_name:
275
+ pos_terminal = p.get_terminal(port_name, True)
276
+ break
230
277
 
231
278
  if port_type == "circuit":
232
- neg = port["to"]
233
- if "pin" in neg:
234
- pin_name = neg["pin"]
235
- port_name = "{}_{}_ref".format(refdes, pin_name)
279
+ negative_terminal_json = port["negative_terminal"]
280
+ if "pin_group" in negative_terminal_json:
281
+ pin_group = self._pedb.siwave.pin_groups[negative_terminal_json["pin_group"]]
282
+ neg_terminal = pin_group.get_terminal(pin_group.name + "_ref", True)
283
+ elif "pin" in negative_terminal_json:
284
+ pin_name = negative_terminal_json["pin"]
285
+ port_name = "{}_{}_ref".format(ref_designator, pin_name)
236
286
  neg_terminal = comp_layout.pins[pin_name].get_terminal(port_name, True)
237
287
  else:
238
- net_name = neg["net"]
239
- port_name = "{}_{}_ref".format(refdes, net_name)
288
+ net_name = negative_terminal_json["net"]
289
+ port_name = "{}_{}_ref".format(ref_designator, net_name)
240
290
  pg_name = "pg_{}".format(port_name)
241
291
  if pg_name not in self._pedb.siwave.pin_groups:
242
- _, pg = self._pedb.siwave.create_pin_group_on_net(refdes, net_name, pg_name)
292
+ _, pg = self._pedb.siwave.create_pin_group_on_net(ref_designator, net_name, pg_name)
243
293
  else:
244
294
  pg = self._pedb.siwave.pin_groups[pg_name]
245
295
  neg_terminal = pg.get_terminal(port_name, True)
@@ -254,36 +304,47 @@ class Configuration:
254
304
 
255
305
  for src in self.data["sources"]:
256
306
  src_type = src["type"]
257
- refdes = src["reference_designator"]
258
307
  name = src["name"]
259
- comp_layout = self._components[refdes]
260
-
261
- pos = src["from"]
262
- if "pin" in pos:
263
- pin_name = pos["pin"]
264
- src_name = name
265
- pos_terminal = comp_layout.pins[pin_name].get_terminal(src_name, True)
266
- elif "net" in pos: # Net
267
- net_name = pos["net"]
268
- src_name = "{}_{}".format(refdes, net_name)
269
- pg_name = "pg_{}".format(src_name)
270
- _, pg = self._pedb.siwave.create_pin_group_on_net(refdes, net_name, pg_name)
271
- pos_terminal = pg.get_terminal(src_name, True)
272
-
273
- neg = src["to"]
274
- if "pin" in neg:
275
- pin_name = neg["pin"]
276
- src_name = name + "_ref"
277
- neg_terminal = comp_layout.pins[pin_name].get_terminal(src_name, True)
278
- elif "net" in neg:
279
- net_name = neg["net"]
280
- src_name = name + "_ref"
281
- pg_name = "pg_{}".format(src_name)
282
- if pg_name not in self._pedb.siwave.pin_groups:
283
- _, pg = self._pedb.siwave.create_pin_group_on_net(refdes, net_name, pg_name)
284
- else: # pragma no cover
285
- pg = self._pedb.siwave.pin_groups[pg_name]
286
- neg_terminal = pg.get_terminal(src_name, True)
308
+
309
+ positive_terminal_json = src["positive_terminal"]
310
+ if "pin_group" in positive_terminal_json:
311
+ pin_group = self._pedb.siwave.pin_groups[positive_terminal_json["pin_group"]]
312
+ pos_terminal = pin_group.get_terminal(pin_group.name, True)
313
+ else:
314
+ ref_designator = src["reference_designator"]
315
+ comp_layout = self._components[ref_designator]
316
+
317
+ if "pin" in positive_terminal_json:
318
+ pin_name = positive_terminal_json["pin"]
319
+ src_name = name
320
+ pos_terminal = comp_layout.pins[pin_name].get_terminal(src_name, True)
321
+ elif "net" in positive_terminal_json: # Net
322
+ net_name = positive_terminal_json["net"]
323
+ src_name = "{}_{}".format(ref_designator, net_name)
324
+ pg_name = "pg_{}".format(src_name)
325
+ _, pg = self._pedb.siwave.create_pin_group_on_net(ref_designator, net_name, pg_name)
326
+ pos_terminal = pg.get_terminal(src_name, True)
327
+
328
+ negative_terminal_json = src["negative_terminal"]
329
+ if "pin_group" in negative_terminal_json:
330
+ pin_group = self._pedb.siwave.pin_groups[negative_terminal_json["pin_group"]]
331
+ neg_terminal = pin_group.get_terminal(pin_group.name + "_ref", True)
332
+ else:
333
+ ref_designator = src["reference_designator"]
334
+ comp_layout = self._components[ref_designator]
335
+ if "pin" in negative_terminal_json:
336
+ pin_name = negative_terminal_json["pin"]
337
+ src_name = name + "_ref"
338
+ neg_terminal = comp_layout.pins[pin_name].get_terminal(src_name, True)
339
+ elif "net" in negative_terminal_json:
340
+ net_name = negative_terminal_json["net"]
341
+ src_name = name + "_ref"
342
+ pg_name = "pg_{}".format(src_name)
343
+ if pg_name not in self._pedb.siwave.pin_groups:
344
+ _, pg = self._pedb.siwave.create_pin_group_on_net(ref_designator, net_name, pg_name)
345
+ else: # pragma no cover
346
+ pg = self._pedb.siwave.pin_groups[pg_name]
347
+ neg_terminal = pg.get_terminal(src_name, True)
287
348
 
288
349
  if src_type == "voltage":
289
350
  src_obj = self._pedb.create_voltage_source(pos_terminal, neg_terminal)
@@ -409,6 +470,8 @@ class Configuration:
409
470
 
410
471
  for sp in self.data["s_parameters"]:
411
472
  fpath = sp["file_path"]
473
+ if not Path(fpath).anchor:
474
+ fpath = str(Path(self._s_parameter_library) / fpath)
412
475
  sp_name = sp["name"]
413
476
  comp_def_name = sp["component_definition"]
414
477
  comp_def = self._pedb.definitions.component[comp_def_name]
@@ -421,3 +484,55 @@ class Configuration:
421
484
  for refdes, comp in comp_def.components.items():
422
485
  if refdes in sp["components"]:
423
486
  comp.use_s_parameter_model(sp_name)
487
+
488
+ @pyedb_function_handler
489
+ def _load_spice_models(self):
490
+ """Imports SPICE information from json."""
491
+
492
+ for sp in self.data["spice_models"]:
493
+ fpath = sp["file_path"]
494
+ if not Path(fpath).anchor:
495
+ fpath = str(Path(self._spice_model_library) / fpath)
496
+ sp_name = sp["name"]
497
+ sub_circuit_name = sp.get("sub_circuit_name", None)
498
+ comp_def_name = sp["component_definition"]
499
+ comp_def = self._pedb.definitions.component[comp_def_name]
500
+ comps = comp_def.components
501
+ if sp["apply_to_all"]:
502
+ for refdes, comp in comps.items():
503
+ if refdes not in sp["components"]:
504
+ comp.assign_spice_model(fpath, sp_name, sub_circuit_name)
505
+ else:
506
+ for refdes, comp in comps.items():
507
+ if refdes in sp["components"]:
508
+ comp.assign_spice_model(fpath, sp_name, sub_circuit_name)
509
+
510
+ @pyedb_function_handler
511
+ def _load_pin_groups(self):
512
+ """Imports pin groups information from JSON."""
513
+ for pg in self.data["pin_groups"]:
514
+ name = pg["name"]
515
+ ref_designator = pg["reference_designator"]
516
+ if "pins" in pg:
517
+ self._pedb.siwave.create_pin_group(ref_designator, pg["pins"], name)
518
+ elif "net" in pg:
519
+ self._pedb.siwave.create_pin_group_on_net(ref_designator, pg["net"], name)
520
+
521
+ @pyedb_function_handler
522
+ def _load_nets(self):
523
+ """Imports nets information from JSON."""
524
+ nets = self._pedb.nets.nets
525
+ for i in self.data["nets"]["power_ground_nets"]:
526
+ nets[i].is_power_ground = True
527
+
528
+ for i in self.data["nets"]["signal_nets"]:
529
+ nets[i].is_power_ground = False
530
+
531
+ @pyedb_function_handler
532
+ def _load_general(self):
533
+ """Imports general information from JSON."""
534
+ general = self.data["general"]
535
+ if "s_parameter_library" in general:
536
+ self._s_parameter_library = general["s_parameter_library"]
537
+ if "spice_model_library" in general:
538
+ self._spice_model_library = general["spice_model_library"]
@@ -1,10 +1,30 @@
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
+
1
23
  import os
2
24
 
25
+ from pyedb.dotnet.edb_core.definition.component_model import NPortComponentModel
3
26
  from pyedb.dotnet.edb_core.edb_data.obj_base import ObjBase
4
27
  from pyedb.generic.general_methods import pyedb_function_handler
5
- from pyedb.dotnet.edb_core.definition.component_model import (
6
- NPortComponentModel
7
- )
8
28
 
9
29
 
10
30
  class EDBComponentDef(ObjBase):
@@ -65,6 +85,7 @@ class EDBComponentDef(ObjBase):
65
85
  dict of :class:`EDBComponent`
66
86
  """
67
87
  from pyedb.dotnet.edb_core.edb_data.components_data import EDBComponent
88
+
68
89
  comp_list = [
69
90
  EDBComponent(self._pedb, l)
70
91
  for l in self._pedb.edb_api.cell.hierarchy.component.FindByComponentDef(