pyedb 0.10.dev0__tar.gz → 0.11.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 (158) hide show
  1. {pyedb-0.10.dev0 → pyedb-0.11.0}/PKG-INFO +2 -2
  2. {pyedb-0.10.dev0 → pyedb-0.11.0}/pyproject.toml +1 -1
  3. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/__init__.py +1 -1
  4. pyedb-0.11.0/src/pyedb/configuration/cfg_boundaries.py +115 -0
  5. pyedb-0.11.0/src/pyedb/configuration/cfg_components.py +205 -0
  6. pyedb-0.11.0/src/pyedb/configuration/cfg_data.py +68 -0
  7. pyedb-0.11.0/src/pyedb/configuration/cfg_general.py +34 -0
  8. pyedb-0.11.0/src/pyedb/configuration/cfg_nets.py +43 -0
  9. pyedb-0.11.0/src/pyedb/configuration/cfg_padstacks.py +125 -0
  10. pyedb-0.11.0/src/pyedb/configuration/cfg_pin_groups.py +58 -0
  11. pyedb-0.11.0/src/pyedb/configuration/cfg_ports_sources.py +164 -0
  12. pyedb-0.11.0/src/pyedb/configuration/cfg_s_parameter_models.py +60 -0
  13. pyedb-0.11.0/src/pyedb/configuration/cfg_setup.py +201 -0
  14. pyedb-0.11.0/src/pyedb/configuration/cfg_spice_models.py +49 -0
  15. pyedb-0.11.0/src/pyedb/configuration/configuration.py +286 -0
  16. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb.py +32 -4
  17. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/components.py +43 -0
  18. pyedb-0.11.0/src/pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +465 -0
  19. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/padstacks_data.py +17 -1
  20. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +0 -4
  21. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +4 -2
  22. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/sources.py +21 -5
  23. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/terminals.py +2 -1
  24. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/layout.py +13 -8
  25. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/padstack.py +23 -3
  26. pyedb-0.11.0/src/pyedb/dotnet/edb_core/sim_setup_data/data/__init__.py +3 -0
  27. pyedb-0.11.0/src/pyedb/dotnet/edb_core/sim_setup_data/data/siw_dc_ir_settings.py +235 -0
  28. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/siwave.py +2 -1
  29. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/stackup.py +38 -29
  30. pyedb-0.11.0/src/pyedb/dotnet/edb_core/utilities/__init__.py +3 -0
  31. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/utilities/simulation_setup.py +16 -7
  32. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/siwave.py +32 -6
  33. pyedb-0.11.0/src/pyedb/siwave_core/icepak.py +153 -0
  34. pyedb-0.10.dev0/src/pyedb/configuration/cfg_data.py +0 -45
  35. pyedb-0.10.dev0/src/pyedb/configuration/cfg_ports.py +0 -149
  36. pyedb-0.10.dev0/src/pyedb/configuration/configuration.py +0 -781
  37. pyedb-0.10.dev0/src/pyedb/dotnet/sim_setup_data/data/siw_dc_ir_settings.py +0 -46
  38. {pyedb-0.10.dev0 → pyedb-0.11.0}/LICENSE +0 -0
  39. {pyedb-0.10.dev0 → pyedb-0.11.0}/README.md +0 -0
  40. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/configuration/__init__.py +0 -0
  41. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/__init__.py +0 -0
  42. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/application/Variables.py +0 -0
  43. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/application/__init__.py +0 -0
  44. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/clr_module.py +0 -0
  45. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/__init__.py +0 -0
  46. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/cell/__init__.py +0 -0
  47. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/__init__.py +0 -0
  48. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/model.py +0 -0
  49. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/definition/__init__.py +0 -0
  50. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/definition/component_def.py +0 -0
  51. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/definition/component_model.py +0 -0
  52. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/definition/definition_obj.py +0 -0
  53. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/definition/definitions.py +0 -0
  54. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/definition/package_def.py +0 -0
  55. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/dotnet/__init__.py +0 -0
  56. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/dotnet/database.py +0 -0
  57. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/dotnet/layout.py +0 -0
  58. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/dotnet/primitive.py +0 -0
  59. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/__init__.py +0 -0
  60. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/components_data.py +0 -0
  61. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/connectable.py +0 -0
  62. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/control_file.py +0 -0
  63. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/design_options.py +0 -0
  64. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/edbvalue.py +0 -0
  65. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +0 -0
  66. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +0 -0
  67. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/layer_data.py +0 -0
  68. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/nets_data.py +0 -0
  69. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/ports.py +0 -0
  70. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/primitives_data.py +0 -0
  71. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +0 -0
  72. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/utilities.py +0 -0
  73. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/edb_data/variables.py +0 -0
  74. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/general.py +0 -0
  75. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/geometry/__init__.py +0 -0
  76. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/geometry/point_data.py +0 -0
  77. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/geometry/polygon_data.py +0 -0
  78. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/hfss.py +0 -0
  79. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/layout_validation.py +0 -0
  80. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/materials.py +0 -0
  81. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/net_class.py +0 -0
  82. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/nets.py +0 -0
  83. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/obj_base.py +0 -0
  84. {pyedb-0.10.dev0/src/pyedb/dotnet/edb_core/utilities → pyedb-0.11.0/src/pyedb/dotnet/edb_core/sim_setup_data}/__init__.py +0 -0
  85. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/dotnet/edb_core/utilities/heatsink.py +0 -0
  86. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/edb_logger.py +0 -0
  87. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/exceptions.py +0 -0
  88. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/generic/__init__.py +0 -0
  89. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/generic/constants.py +0 -0
  90. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/generic/data_handlers.py +0 -0
  91. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/generic/design_types.py +0 -0
  92. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/generic/filesystem.py +0 -0
  93. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/generic/general_methods.py +0 -0
  94. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/generic/plot.py +0 -0
  95. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/generic/process.py +0 -0
  96. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/generic/settings.py +0 -0
  97. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/__init__.py +0 -0
  98. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/bom/__init__.py +0 -0
  99. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/bom/bom.py +0 -0
  100. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/bom/bom_item.py +0 -0
  101. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/bom/characteristics.py +0 -0
  102. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/bom/refdes.py +0 -0
  103. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/content/__init__.py +0 -0
  104. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/content/color.py +0 -0
  105. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/content/content.py +0 -0
  106. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/content/dictionary_color.py +0 -0
  107. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/content/dictionary_fill.py +0 -0
  108. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/content/dictionary_line.py +0 -0
  109. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/content/entry_color.py +0 -0
  110. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/content/entry_line.py +0 -0
  111. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/content/fill.py +0 -0
  112. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/content/layer_ref.py +0 -0
  113. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/content/standard_geometries_dictionary.py +0 -0
  114. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/__init__.py +0 -0
  115. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/__init__.py +0 -0
  116. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +0 -0
  117. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/cad_data.py +0 -0
  118. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/component.py +0 -0
  119. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/drill.py +0 -0
  120. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/feature.py +0 -0
  121. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/layer.py +0 -0
  122. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/layer_feature.py +0 -0
  123. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/logical_net.py +0 -0
  124. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/outline.py +0 -0
  125. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/package.py +0 -0
  126. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/padstack_def.py +0 -0
  127. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +0 -0
  128. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/padstack_instance.py +0 -0
  129. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +0 -0
  130. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/path.py +0 -0
  131. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/phy_net.py +0 -0
  132. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/pin.py +0 -0
  133. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/polygon.py +0 -0
  134. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/profile.py +0 -0
  135. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/stackup.py +0 -0
  136. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/stackup_group.py +0 -0
  137. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/stackup_layer.py +0 -0
  138. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_data/step.py +0 -0
  139. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/cad_header.py +0 -0
  140. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/ecad.py +0 -0
  141. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ecad/spec.py +0 -0
  142. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/history_record.py +0 -0
  143. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/ipc2581.py +0 -0
  144. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/ipc2581/logistic_header.py +0 -0
  145. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/__init__.py +0 -0
  146. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/aedtlib_personalib_install.py +0 -0
  147. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/downloads.py +0 -0
  148. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/misc.py +0 -0
  149. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/pyedb.runtimeconfig.json +0 -0
  150. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/siw_feature_config/__init__.py +0 -0
  151. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/siw_feature_config/emc/__init__.py +0 -0
  152. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/siw_feature_config/emc/component_tags.py +0 -0
  153. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/siw_feature_config/emc/net_tags.py +0 -0
  154. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/siw_feature_config/emc/tag_library.py +0 -0
  155. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/siw_feature_config/emc/xml_generic.py +0 -0
  156. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +0 -0
  157. {pyedb-0.10.dev0 → pyedb-0.11.0}/src/pyedb/misc/utilities.py +0 -0
  158. {pyedb-0.10.dev0 → pyedb-0.11.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.10.dev0
3
+ Version: 0.11.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>
@@ -22,7 +22,7 @@ Requires-Dist: dotnetcore2 ==3.1.23;platform_system=='Linux'
22
22
  Requires-Dist: pydantic>=2.6.4,<2.8
23
23
  Requires-Dist: toml == 0.10.2
24
24
  Requires-Dist: Rtree >= 1.2.0
25
- Requires-Dist: ansys-sphinx-theme>=0.10.0,<0.16 ; extra == "doc"
25
+ Requires-Dist: ansys-sphinx-theme>=0.10.0,<0.17 ; extra == "doc"
26
26
  Requires-Dist: imageio>=2.30.0,<2.35 ; extra == "doc"
27
27
  Requires-Dist: ipython>=8.13.0,<8.25 ; extra == "doc"
28
28
  Requires-Dist: jupyterlab>=4.0.0,<4.3 ; extra == "doc"
@@ -45,7 +45,7 @@ tests = [
45
45
  "pytest-xdist>=3.5.0,<3.7",
46
46
  ]
47
47
  doc = [
48
- "ansys-sphinx-theme>=0.10.0,<0.16",
48
+ "ansys-sphinx-theme>=0.10.0,<0.17",
49
49
  "imageio>=2.30.0,<2.35",
50
50
  "ipython>=8.13.0,<8.25",
51
51
  "jupyterlab>=4.0.0,<4.3",
@@ -44,7 +44,7 @@ deprecation_warning()
44
44
  #
45
45
 
46
46
  pyedb_path = os.path.dirname(__file__)
47
- __version__ = "0.10.dev0"
47
+ __version__ = "0.11.0"
48
48
  version = __version__
49
49
 
50
50
  #
@@ -0,0 +1,115 @@
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 enum import Enum
24
+
25
+
26
+ class CfgBoundaries:
27
+ def __init__(self, pdata, boundaries_dict):
28
+ self._pedb = pdata.pedb
29
+ self._boundaries_dict = boundaries_dict
30
+ self.open_region = self._boundaries_dict.get("open_region", True)
31
+ self._map_open_region_type()
32
+ self.pml_visible = self._boundaries_dict.get("pml_visible", False)
33
+ self.pml_operation_frequency = self._boundaries_dict.get("pml_operation_frequency", "5GHz")
34
+ self.pml_radiation_factor = self._boundaries_dict.get("pml_radiation_factor", 10)
35
+ self._map_dielectric_extend_type()
36
+ self.dielectric_base_polygon = self._boundaries_dict.get("dielectric_base_polygon", "")
37
+ self.horizontal_padding = self._boundaries_dict.get("horizontal_padding", 0.0)
38
+ self.honor_primitives_on_dielectric_layers = self._boundaries_dict.get(
39
+ "honor_primitives_on_dielectric_layers", False
40
+ )
41
+ self._map_air_box_extend_type()
42
+ self.air_box_base_polygon = self._boundaries_dict.get("air_box_base_polygon", "")
43
+ self.air_box_truncate_model_ground_layers = self._boundaries_dict.get(
44
+ "air_box_truncate_model_ground_layers", False
45
+ )
46
+ self.air_box_horizontal_padding = self._boundaries_dict.get("air_box_horizontal_padding", 0.15)
47
+ self.air_box_positive_vertical_padding = self._boundaries_dict.get("air_box_positive_vertical_padding", 1)
48
+ self.air_box_negative_vertical_padding = self._boundaries_dict.get("air_box_negative_vertical_padding", 1)
49
+
50
+ def _map_air_box_extend_type(self):
51
+ air_box_type = self._boundaries_dict.get("air_box_extents_type", None)
52
+ if air_box_type == "bounding_box":
53
+ self.air_box_extents_type = self.ExtentType.BOUNDING_BOX
54
+ elif air_box_type == "conformal":
55
+ self.air_box_extents_type = self.ExtentType.CONFORMAL
56
+ elif air_box_type == "convex_hull":
57
+ self.air_box_extents_type = self.ExtentType.CONVEX_HULL
58
+ elif air_box_type == "polygon":
59
+ self.air_box_extents_type = self.ExtentType.POLYGON
60
+ else:
61
+ self.air_box_extents_type = self.ExtentType.BOUNDING_BOX
62
+
63
+ def _map_open_region_type(self):
64
+ open_region = self._boundaries_dict.get("open_region_type", None)
65
+ if open_region == "radiation":
66
+ self.open_region_type = self.OpenRegionType.RADIATION
67
+ elif open_region == "pec":
68
+ self.open_region_type = self.OpenRegionType.PEC
69
+ else:
70
+ self.open_region_type = self.OpenRegionType.RADIATION
71
+
72
+ def _map_dielectric_extend_type(self):
73
+ extend_type = self._boundaries_dict.get("dielectric_extents_type", None)
74
+ if extend_type == "bounding_box":
75
+ self.dielectric_extents_type = self.ExtentType.BOUNDING_BOX
76
+ elif extend_type == "conformal":
77
+ self.dielectric_extents_type = self.ExtentType.CONFORMAL
78
+ elif extend_type == "convex_hull":
79
+ self.dielectric_extents_type = self.ExtentType.CONVEX_HULL
80
+ elif extend_type == "polygon":
81
+ self.dielectric_extents_type = self.ExtentType.POLYGON
82
+ else:
83
+ self.dielectric_extents_type = self.ExtentType.BOUNDING_BOX
84
+
85
+ class OpenRegionType(Enum):
86
+ RADIATION = 0
87
+ PEC = 1
88
+
89
+ class ExtentType(Enum):
90
+ BOUNDING_BOX = 0
91
+ CONFORMAL = 1
92
+ CONVEX_HULL = 2
93
+ POLYGON = 3
94
+
95
+ def apply(self):
96
+ """Imports boundary information from JSON."""
97
+ self._pedb.hfss.hfss_extent_info.use_open_region = self.open_region
98
+ self._pedb.hfss.hfss_extent_info.open_region_type = self.open_region_type.name.lower()
99
+ self._pedb.hfss.hfss_extent_info.is_pml_visible = self.pml_visible
100
+ self._pedb.hfss.hfss_extent_info.operating_freq = self.pml_operation_frequency
101
+ self._pedb.hfss.hfss_extent_info.radiation_level = self.pml_radiation_factor
102
+ self._pedb.hfss.hfss_extent_info.extent_type = self.dielectric_extents_type.name.lower()
103
+ if self.dielectric_base_polygon:
104
+ self._pedb.hfss.hfss_extent_info.dielectric_base_polygon = self.dielectric_base_polygon
105
+ self._pedb.hfss.hfss_extent_info.dielectric_extent_size = float(self.horizontal_padding)
106
+ self._pedb.hfss.hfss_extent_info.honor_user_dielectric = self.honor_primitives_on_dielectric_layers
107
+ self._pedb.hfss.hfss_extent_info.extent_type = self.air_box_extents_type.name.lower()
108
+ self._pedb.hfss.hfss_extent_info.truncate_air_box_at_ground = self.air_box_truncate_model_ground_layers
109
+ self._pedb.hfss.hfss_extent_info.air_box_horizontal_extent = float(self.air_box_horizontal_padding)
110
+ self._pedb.hfss.hfss_extent_info.air_box_positive_vertical_extent = float(
111
+ self.air_box_positive_vertical_padding
112
+ )
113
+ self._pedb.hfss.hfss_extent_info.air_box_negative_vertical_extent = float(
114
+ self.air_box_negative_vertical_padding
115
+ )
@@ -0,0 +1,205 @@
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 enum import Enum
24
+
25
+
26
+ class CfgRlcModel:
27
+ def __init__(self):
28
+ self.resistance = 0.0
29
+ self.inductance = 0.0
30
+ self.capacitance = 0.0
31
+ self.rlc_model_type = self.RlcModelType.SERIES
32
+ self.enabled = False
33
+ self.pin_pairs = []
34
+
35
+ class RlcModelType(Enum):
36
+ SERIES = 0
37
+ PARALLEL = 1
38
+
39
+
40
+ class CfgPortProperties:
41
+ def __init__(self):
42
+ self.ref_offset = 0.0
43
+ self.ref_size_auto = True
44
+ self.ref_size_x = 0.0
45
+ self.ref_size_y = 0.0
46
+
47
+
48
+ class CfgSolderBallsProperties:
49
+ def __init__(self):
50
+ self.shape = self.Shape.CYLINDER
51
+ self.diameter = 0.0
52
+ self.mid_diameter = 0.0
53
+ self.height = 0.0
54
+ self.enable = True
55
+
56
+ class Shape(Enum):
57
+ CYLINDER = 0
58
+ SPHEROID = 1
59
+
60
+
61
+ class CfgComponent:
62
+ def __init__(self, pdata, **kwargs):
63
+ self._pedb = pdata.pedb
64
+ self._comp_dict = kwargs
65
+ self.reference_designator = ""
66
+ self.part_type = self.ComponentType.RESISTOR
67
+ self.enabled = True
68
+ self.rlc_model = CfgRlcModel()
69
+ self.port_properties = CfgPortProperties()
70
+ self.solder_balls = CfgSolderBallsProperties()
71
+ self._update()
72
+ self.layout_comp = None
73
+
74
+ class ComponentType(Enum):
75
+ RESISTOR = 0
76
+ INDUCTOR = 1
77
+ CAPACITOR = 2
78
+ IO = 3
79
+ IC = 4
80
+ OTHER = 5
81
+
82
+ def _update(self):
83
+ self.reference_designator = self._comp_dict.get("reference_designator")
84
+ self.enabled = self._comp_dict.get("enabled")
85
+ part_type = self._comp_dict["part_type"].lower()
86
+ if part_type == "resistor":
87
+ self.part_type = self.part_type.RESISTOR
88
+ elif part_type == "capacitor":
89
+ self.part_type = self.part_type.CAPACITOR
90
+ elif part_type == "inductor":
91
+ self.part_type = self.part_type.INDUCTOR
92
+ elif part_type == "io":
93
+ self.part_type = self.part_type.IO
94
+ elif part_type == "ic":
95
+ self.part_type = self.part_type.IC
96
+ else:
97
+ self.part_type = self.part_type.OTHER
98
+
99
+ if self.part_type.value in [0, 1, 2]:
100
+ rlc_model = self._comp_dict["rlc_model"] if "rlc_model" in self._comp_dict else None
101
+ if rlc_model:
102
+ pin_pairs = rlc_model["pin_pairs"] if "pin_pairs" in rlc_model else None
103
+ if pin_pairs:
104
+ self.rlc_model.pin_pairs = []
105
+ for pp in pin_pairs:
106
+ if pp["type"] == "Parallel":
107
+ self.rlc_model.rlc_model_type = self.rlc_model.rlc_model_type.PARALLEL
108
+
109
+ self.rlc_model.pin_pairs.append([pp["p1"], pp["p2"]])
110
+ self.rlc_model.resistance = pp["resistance"] if "resistance" in pp else None
111
+ self.rlc_model.inductance = pp["inductance"] if "inductance" in pp else None
112
+ self.rlc_model.capacitance = pp["capacitance"] if "capacitance" in pp else None
113
+
114
+ port_properties = self._comp_dict["port_properties"] if "port_properties" in self._comp_dict else None
115
+ if port_properties:
116
+ self.port_properties.ref_offset = float(port_properties["reference_offset"])
117
+ self.port_properties.ref_size_auto = bool(port_properties["reference_size_auto"])
118
+ self.port_properties.ref_size_x = float(port_properties["reference_size_x"])
119
+ self.port_properties.ref_size_y = float(port_properties["reference_size_y"])
120
+
121
+ solder_ball_properties = (
122
+ self._comp_dict["solder_ball_properties"] if "solder_ball_properties" in self._comp_dict else None
123
+ )
124
+ if solder_ball_properties:
125
+ if solder_ball_properties["shape"].lower() == "spheroid":
126
+ self.solder_balls.shape = self.solder_balls.shape.SPHEROID
127
+ self.solder_balls.diameter = solder_ball_properties["diameter"]
128
+ self.solder_balls.mid_diameter = (
129
+ float(solder_ball_properties["mid_diameter"])
130
+ if "mid_diameter" in solder_ball_properties
131
+ else self.solder_balls.diameter
132
+ )
133
+ self.solder_balls.height = solder_ball_properties["height"]
134
+
135
+ def apply(self):
136
+ """Apply component on layout."""
137
+ self.layout_comp = self._pedb.components[self.reference_designator]
138
+ if self.layout_comp:
139
+ self._apply_part_type()
140
+ if self.part_type.name in ["CAPACITOR", "RESISTOR", "INDUCTOR"]:
141
+ self._apply_rlc_model()
142
+ else:
143
+ self._apply_solder_balls()
144
+
145
+ def _apply_part_type(self):
146
+ if self.part_type.name == "CAPACITOR":
147
+ self.layout_comp.type = "Capacitor"
148
+ elif self.part_type.name == "RESISTOR":
149
+ self.layout_comp.type = "Resistor"
150
+ elif self.part_type.name == "INDUCTOR":
151
+ self.layout_comp.type = "Inductor"
152
+ elif self.part_type.name == "IC":
153
+ self.layout_comp.type = "IC"
154
+ elif self.part_type.name == "IO":
155
+ self.layout_comp.type = "IO"
156
+ elif self.part_type.name == "OTHER":
157
+ self.layout_comp.type = "Other"
158
+
159
+ def _apply_rlc_model(self):
160
+ if self.part_type.value in [0, 1, 2]:
161
+ self.layout_comp.is_enabled = self.enabled
162
+ if self.rlc_model:
163
+ model_layout = self.layout_comp.model
164
+ if self.rlc_model.pin_pairs:
165
+ for pp in model_layout.pin_pairs:
166
+ model_layout.delete_pin_pair_rlc(pp)
167
+ for pp in self.rlc_model.pin_pairs:
168
+ pin_pair = self._pedb.edb_api.utility.PinPair(pp[0], pp[1])
169
+ rlc = self._pedb.edb_api.utility.Rlc()
170
+ rlc.IsParallel = False if self.rlc_model.rlc_model_type.SERIES else True
171
+ if not self.rlc_model.resistance is None:
172
+ rlc.REnabled = True
173
+ rlc.R = self._pedb.edb_value(self.rlc_model.resistance)
174
+ else:
175
+ rlc.REnabled = False
176
+ if not self.rlc_model.inductance is None:
177
+ rlc.LEnabled = True
178
+ rlc.L = self._pedb.edb_value(self.rlc_model.inductance)
179
+ else:
180
+ rlc.LEnabled = False
181
+
182
+ if not self.rlc_model.capacitance is None:
183
+ rlc.CEnabled = True
184
+ rlc.C = self._pedb.edb_value(self.rlc_model.capacitance)
185
+ else:
186
+ rlc.CEnabled = False
187
+ model_layout._set_pin_pair_rlc(pin_pair, rlc)
188
+ self.layout_comp.model = model_layout
189
+
190
+ def _apply_solder_balls(self):
191
+ if self.solder_balls.enable:
192
+ shape = "Cylinder"
193
+ if self.solder_balls.shape == self.solder_balls.shape.SPHEROID:
194
+ shape = "Spheroid"
195
+ self._pedb.components.set_solder_ball(
196
+ component=self.reference_designator,
197
+ sball_diam=self.solder_balls.diameter,
198
+ sball_mid_diam=self.solder_balls.mid_diameter,
199
+ sball_height=self.solder_balls.height,
200
+ shape=shape,
201
+ auto_reference_size=self.port_properties.ref_size_auto,
202
+ reference_height=self.port_properties.ref_offset,
203
+ reference_size_x=self.port_properties.ref_size_x,
204
+ reference_size_y=self.port_properties.ref_size_y,
205
+ )
@@ -0,0 +1,68 @@
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_boundaries import CfgBoundaries
24
+ from pyedb.configuration.cfg_components import CfgComponent
25
+ from pyedb.configuration.cfg_general import CfgGeneral
26
+ from pyedb.configuration.cfg_nets import CfgNets
27
+ from pyedb.configuration.cfg_padstacks import CfgPadstacks
28
+ from pyedb.configuration.cfg_pin_groups import CfgPinGroup
29
+ from pyedb.configuration.cfg_ports_sources import CfgPort, CfgSources
30
+ from pyedb.configuration.cfg_s_parameter_models import CfgSParameterModel
31
+ from pyedb.configuration.cfg_setup import CfgSetup
32
+ from pyedb.configuration.cfg_spice_models import CfgSpiceModel
33
+
34
+
35
+ class CfgData(object):
36
+ """Manages configure data."""
37
+
38
+ def __init__(self, pedb, **kwargs):
39
+ self.pedb = pedb
40
+ self.edb_comps = self.pedb.components.components
41
+ self.general = CfgGeneral(self, kwargs.get("general", None))
42
+ self.boundaries = {}
43
+ if kwargs.get("boundaries", None):
44
+ self.boundaries = CfgBoundaries(self, kwargs.get("boundaries", None))
45
+ self.nets = CfgNets(self)
46
+ if kwargs.get("nets"):
47
+ self.nets = CfgNets(
48
+ self, kwargs.get("nets", {}).get("signal_nets", []), kwargs.get("nets", {}).get("power_ground_nets", [])
49
+ )
50
+ self.components = [CfgComponent(self, **component) for component in kwargs.get("components", [])]
51
+ self.padstacks = CfgPadstacks(self, kwargs.get("padstacks", None))
52
+ self.pin_groups = [CfgPinGroup(self, pin_group) for pin_group in kwargs.get("pin_groups", [])]
53
+ self.ports = [CfgPort(self, **port) for port in kwargs.get("ports", [])]
54
+ self.sources = [CfgSources(self, **source) for source in kwargs.get("sources", [])]
55
+ self.setups = [CfgSetup(self)]
56
+ if kwargs.get("setups", None):
57
+ self.setups = [CfgSetup(self, setup) for setup in kwargs.get("setups", [])]
58
+ self.stackup = None
59
+ self.s_parameters = [
60
+ CfgSParameterModel(self, self.general.s_parameter_library, sparam_model)
61
+ for sparam_model in kwargs.get("s_parameters", [])
62
+ ]
63
+ self.spice_models = [
64
+ CfgSpiceModel(self, self.general.spice_model_library, spice_model)
65
+ for spice_model in kwargs.get("spice_models", [])
66
+ ]
67
+ self.package_definition = None
68
+ self.operations = None
@@ -0,0 +1,34 @@
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
+ class CfgGeneral:
25
+ """Manage configuration general settings."""
26
+
27
+ def __init__(self, pdata, general_dict):
28
+ self._pedb = pdata.pedb
29
+ self.spice_model_library = ""
30
+ self.s_parameter_library = ""
31
+ if general_dict:
32
+ self._general_dict = general_dict
33
+ self.spice_model_library = self._general_dict.get("spice_model_library", "")
34
+ self.s_parameter_library = self._general_dict.get("s_parameter_library", "")
@@ -0,0 +1,43 @@
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
+ class CfgNets:
25
+ """Manage configuration net class."""
26
+
27
+ def __init__(self, pdata, signal_nets=None, power_nets=None):
28
+ self._pedb = pdata.pedb
29
+ self.signal_nets = []
30
+ self.power_nets = []
31
+ if signal_nets:
32
+ self.signal_nets = signal_nets
33
+ if power_nets:
34
+ self.power_nets = power_nets
35
+
36
+ def apply(self):
37
+ """Apply net on layout."""
38
+ for signal_net in self.signal_nets:
39
+ if signal_net in self._pedb.nets:
40
+ self._pedb.nets.nets[signal_net].is_power_ground = False
41
+ for power_net in self.power_nets:
42
+ if power_net in self._pedb.nets:
43
+ self._pedb.nets.nets[power_net].is_power_ground = True
@@ -0,0 +1,125 @@
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 enum import Enum
25
+
26
+
27
+ class CfgPadstacks:
28
+ """Padstack data class."""
29
+
30
+ def __init__(self, pdata, padstack_dict=None):
31
+ self._pedb = pdata.pedb
32
+ self.definitions = []
33
+ self.instances = []
34
+ self._padstack_dict = padstack_dict
35
+ if self._padstack_dict:
36
+ if self._padstack_dict.get("definitions", ""):
37
+ self._definitions_dict = self._padstack_dict.get("definitions", "")
38
+ self.definitions = [Definition(pdata, definition) for definition in self._definitions_dict]
39
+ if self._padstack_dict.get("instances", None):
40
+ self._instances_dict = self._padstack_dict.get("instances", "")
41
+ self.instances = [Instance(pdata, inst) for inst in self._instances_dict]
42
+
43
+ def apply(self):
44
+ """Apply padstack definition and instances on layout."""
45
+ for definition in self.definitions:
46
+ definition.apply()
47
+ for instance in self.instances:
48
+ instance.apply()
49
+
50
+
51
+ class Definition:
52
+ """Padstack definition data class."""
53
+
54
+ def __init__(self, pdata, definition_dict):
55
+ self._pedb = pdata.pedb
56
+ self._definition_dict = definition_dict
57
+ self.name = self._definition_dict.get("name", "")
58
+ self.hole_diameter = self._definition_dict.get("hole_diameter", "")
59
+ self.hole_plating_thickness = self._definition_dict.get("hole_plating_thickness", "")
60
+ self.hole_material = self._definition_dict.get("hole_material", "")
61
+ self.hole_range = self._definition_dict.get("hole_range", "")
62
+
63
+ def apply(self):
64
+ """Apply padstack definition on layout."""
65
+ padstack_defs = self._pedb.padstacks.definitions
66
+ pdef = padstack_defs[self.name]
67
+ pdef.hole_diameter = self.hole_diameter
68
+ pdef.hole_plating_thickness = self.hole_plating_thickness
69
+ pdef.material = self.hole_material
70
+ pdef.hole_range = self.hole_range
71
+
72
+
73
+ class Instance:
74
+ """Instance data class."""
75
+
76
+ def __init__(self, pdata, instances_dict):
77
+ self._pedb = pdata.pedb
78
+ self._instances_dict = instances_dict
79
+ self.name = self._instances_dict.get("name", "")
80
+ self.backdrill_top = None
81
+ self.backdrill_bottom = None
82
+ self._update_backdrill()
83
+
84
+ def _update_backdrill(self):
85
+ if "backdrill_top" in self._instances_dict:
86
+ self.backdrill_top = self.BackDrill()
87
+ self.backdrill_top.type = self.backdrill_top.BackDrillType.TOP
88
+ backdrill_top_dict = self._instances_dict["backdrill_top"]
89
+ self.backdrill_top.drill_to_layer = backdrill_top_dict.get("drill_to_layer", "")
90
+ self.backdrill_top.drill_diameter = backdrill_top_dict.get("drill_diameter", "")
91
+ self.backdrill_top.stub_length = backdrill_top_dict.get("stub_length", "")
92
+ if "backdrill_bottom" in self._instances_dict:
93
+ self.backdrill_bottom = self.BackDrill()
94
+ backdrill_bottom_dict = self._instances_dict["backdrill_bottom"]
95
+ self.backdrill_bottom.drill_to_layer = backdrill_bottom_dict.get("drill_to_layer", "")
96
+ self.backdrill_bottom.drill_diameter = backdrill_bottom_dict.get("drill_diameter", "")
97
+ self.backdrill_bottom.stub_length = backdrill_bottom_dict.get("stub_length", "")
98
+
99
+ class BackDrill:
100
+ """Backdrill data class."""
101
+
102
+ def __init__(self):
103
+ self.type = self.BackDrillType.BOTTOM
104
+ self.drill_to_layer = ""
105
+ self.drill_diameter = ""
106
+ self.stub_length = ""
107
+
108
+ class BackDrillType(Enum):
109
+ TOP = 0
110
+ BOTTOM = 1
111
+
112
+ def apply(self):
113
+ """Apply padstack instance on layout."""
114
+ padstack_instances = self._pedb.padstacks.instances_by_name
115
+ inst = padstack_instances[self.name]
116
+ if self.backdrill_top:
117
+ inst.set_backdrill_top(
118
+ self.backdrill_top.drill_to_layer, self.backdrill_top.drill_diameter, self.backdrill_top.stub_length
119
+ )
120
+ if self.backdrill_bottom:
121
+ inst.set_backdrill_bottom(
122
+ self.backdrill_bottom.drill_to_layer,
123
+ self.backdrill_bottom.drill_diameter,
124
+ self.backdrill_bottom.stub_length,
125
+ )