pyedb 0.18.0__tar.gz → 0.20.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 (193) hide show
  1. {pyedb-0.18.0 → pyedb-0.20.0}/PKG-INFO +8 -8
  2. {pyedb-0.18.0 → pyedb-0.20.0}/pyproject.toml +7 -7
  3. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/__init__.py +1 -1
  4. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_data.py +8 -11
  5. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_nets.py +14 -0
  6. pyedb-0.20.0/src/pyedb/configuration/cfg_pin_groups.py +95 -0
  7. pyedb-0.20.0/src/pyedb/configuration/cfg_ports_sources.py +371 -0
  8. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/configuration.py +51 -17
  9. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb.py +156 -236
  10. pyedb-0.20.0/src/pyedb/dotnet/edb_core/cell/connectable.py +64 -0
  11. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/component.py +12 -10
  12. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/hierarchy_obj.py +1 -1
  13. pyedb-0.20.0/src/pyedb/dotnet/edb_core/cell/layout.py +326 -0
  14. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/layout_obj.py +4 -49
  15. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/primitive.py +14 -2
  16. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/terminal/padstack_instance_terminal.py +10 -0
  17. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/terminal/pingroup_terminal.py +5 -0
  18. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/terminal/point_terminal.py +1 -12
  19. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/terminal/terminal.py +36 -20
  20. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/voltage_regulator.py +2 -16
  21. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/components.py +88 -31
  22. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/dotnet/database.py +5 -10
  23. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/dotnet/primitive.py +20 -7
  24. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/control_file.py +2 -12
  25. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/padstacks_data.py +28 -37
  26. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/ports.py +0 -18
  27. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/primitives_data.py +1 -1
  28. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/general.py +6 -9
  29. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/hfss.py +4 -8
  30. pyedb-0.20.0/src/pyedb/dotnet/edb_core/layout_obj_instance.py +30 -0
  31. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/materials.py +4 -11
  32. pyedb-0.18.0/src/pyedb/dotnet/edb_core/layout.py → pyedb-0.20.0/src/pyedb/dotnet/edb_core/modeler.py +153 -7
  33. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/net_class.py +7 -8
  34. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/nets.py +3 -9
  35. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/padstack.py +23 -10
  36. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/sim_setup_data/data/sim_setup_info.py +42 -3
  37. pyedb-0.20.0/src/pyedb/dotnet/edb_core/sim_setup_data/data/simulation_settings.py +358 -0
  38. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/sim_setup_data/data/siw_dc_ir_settings.py +22 -22
  39. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +5 -2
  40. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/sim_setup_data/io/siwave.py +76 -76
  41. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/siwave.py +5 -6
  42. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/stackup.py +18 -23
  43. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/utilities/hfss_simulation_setup.py +23 -94
  44. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/utilities/simulation_setup.py +40 -41
  45. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/utilities/siwave_simulation_setup.py +26 -17
  46. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/generic/filesystem.py +2 -8
  47. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/generic/general_methods.py +4 -10
  48. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/generic/plot.py +26 -29
  49. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/generic/process.py +2 -6
  50. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/downloads.py +3 -40
  51. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/siwave.py +2 -5
  52. pyedb-0.18.0/src/pyedb/configuration/cfg_pin_groups.py +0 -58
  53. pyedb-0.18.0/src/pyedb/configuration/cfg_ports_sources.py +0 -183
  54. pyedb-0.18.0/src/pyedb/dotnet/edb_core/cell/layout.py +0 -131
  55. pyedb-0.18.0/src/pyedb/dotnet/edb_core/dotnet/layout.py +0 -260
  56. pyedb-0.18.0/src/pyedb/dotnet/edb_core/sim_setup_data/data/simulation_settings.py +0 -424
  57. {pyedb-0.18.0 → pyedb-0.20.0}/LICENSE +0 -0
  58. {pyedb-0.18.0 → pyedb-0.20.0}/README.md +0 -0
  59. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/__init__.py +0 -0
  60. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_boundaries.py +0 -0
  61. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_common.py +0 -0
  62. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_components.py +0 -0
  63. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_general.py +0 -0
  64. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_operations.py +0 -0
  65. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_package_definition.py +0 -0
  66. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_padstacks.py +0 -0
  67. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_s_parameter_models.py +0 -0
  68. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_setup.py +0 -0
  69. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_spice_models.py +0 -0
  70. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/configuration/cfg_stackup.py +0 -0
  71. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/__init__.py +0 -0
  72. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/application/Variables.py +0 -0
  73. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/application/__init__.py +0 -0
  74. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/clr_module.py +0 -0
  75. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/__init__.py +0 -0
  76. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/__init__.py +0 -0
  77. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/__init__.py +0 -0
  78. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/model.py +0 -0
  79. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/netlist_model.py +0 -0
  80. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/pin_pair_model.py +0 -0
  81. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/s_parameter_model.py +0 -0
  82. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/hierarchy/spice_model.py +0 -0
  83. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/terminal/__init__.py +0 -0
  84. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/terminal/bundle_terminal.py +0 -0
  85. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/cell/terminal/edge_terminal.py +0 -0
  86. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/definition/__init__.py +0 -0
  87. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/definition/component_def.py +0 -0
  88. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/definition/component_model.py +0 -0
  89. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/definition/definition_obj.py +0 -0
  90. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/definition/definitions.py +0 -0
  91. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/definition/package_def.py +0 -0
  92. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/dotnet/__init__.py +0 -0
  93. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/__init__.py +0 -0
  94. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/design_options.py +0 -0
  95. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/edbvalue.py +0 -0
  96. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +0 -0
  97. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +0 -0
  98. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/layer_data.py +0 -0
  99. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/nets_data.py +0 -0
  100. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +0 -0
  101. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +0 -0
  102. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/sources.py +0 -0
  103. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/utilities.py +0 -0
  104. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/edb_data/variables.py +0 -0
  105. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/geometry/__init__.py +0 -0
  106. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/geometry/point_data.py +0 -0
  107. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/geometry/polygon_data.py +0 -0
  108. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/layout_validation.py +0 -0
  109. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/sim_setup_data/__init__.py +0 -0
  110. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/sim_setup_data/data/__init__.py +0 -0
  111. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/sim_setup_data/data/adaptive_frequency_data.py +0 -0
  112. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/sim_setup_data/data/mesh_operation.py +0 -0
  113. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/sim_setup_data/data/settings.py +0 -0
  114. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/sim_setup_data/io/__init__.py +0 -0
  115. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/utilities/__init__.py +0 -0
  116. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/utilities/heatsink.py +0 -0
  117. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/dotnet/edb_core/utilities/obj_base.py +0 -0
  118. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/edb_logger.py +0 -0
  119. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/exceptions.py +0 -0
  120. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/generic/__init__.py +0 -0
  121. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/generic/constants.py +0 -0
  122. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/generic/data_handlers.py +0 -0
  123. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/generic/design_types.py +0 -0
  124. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/generic/settings.py +0 -0
  125. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/__init__.py +0 -0
  126. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/bom/__init__.py +0 -0
  127. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/bom/bom.py +0 -0
  128. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/bom/bom_item.py +0 -0
  129. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/bom/characteristics.py +0 -0
  130. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/bom/refdes.py +0 -0
  131. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/content/__init__.py +0 -0
  132. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/content/color.py +0 -0
  133. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/content/content.py +0 -0
  134. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/content/dictionary_color.py +0 -0
  135. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/content/dictionary_fill.py +0 -0
  136. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/content/dictionary_line.py +0 -0
  137. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/content/entry_color.py +0 -0
  138. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/content/entry_line.py +0 -0
  139. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/content/fill.py +0 -0
  140. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/content/layer_ref.py +0 -0
  141. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/content/standard_geometries_dictionary.py +0 -0
  142. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/__init__.py +0 -0
  143. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/__init__.py +0 -0
  144. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +0 -0
  145. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/cad_data.py +0 -0
  146. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/component.py +0 -0
  147. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/drill.py +0 -0
  148. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/feature.py +0 -0
  149. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/layer.py +0 -0
  150. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/layer_feature.py +0 -0
  151. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/logical_net.py +0 -0
  152. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/outline.py +0 -0
  153. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/package.py +0 -0
  154. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/padstack_def.py +0 -0
  155. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +0 -0
  156. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/padstack_instance.py +0 -0
  157. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +0 -0
  158. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/path.py +0 -0
  159. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/phy_net.py +0 -0
  160. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/pin.py +0 -0
  161. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/polygon.py +0 -0
  162. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/profile.py +0 -0
  163. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/stackup.py +0 -0
  164. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/stackup_group.py +0 -0
  165. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/stackup_layer.py +0 -0
  166. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_data/step.py +0 -0
  167. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/cad_header.py +0 -0
  168. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/ecad.py +0 -0
  169. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ecad/spec.py +0 -0
  170. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/history_record.py +0 -0
  171. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/ipc2581.py +0 -0
  172. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/ipc2581/logistic_header.py +0 -0
  173. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/__init__.py +0 -0
  174. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/aedtlib_personalib_install.py +0 -0
  175. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/misc.py +0 -0
  176. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/pyedb.runtimeconfig.json +0 -0
  177. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/__init__.py +0 -0
  178. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/emc/__init__.py +0 -0
  179. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/emc/component_tags.py +0 -0
  180. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/emc/net_tags.py +0 -0
  181. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/emc/tag_library.py +0 -0
  182. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/emc/xml_generic.py +0 -0
  183. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +0 -0
  184. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/xtalk_scan/fd_xtalk_scan_config.py +0 -0
  185. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/xtalk_scan/impedance_scan_config.py +0 -0
  186. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/xtalk_scan/net.py +0 -0
  187. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/xtalk_scan/pins.py +0 -0
  188. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/xtalk_scan/scan_config.py +0 -0
  189. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/siw_feature_config/xtalk_scan/td_xtalk_config.py +0 -0
  190. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/misc/utilities.py +0 -0
  191. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/modeler/geometry_operators.py +0 -0
  192. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/siwave_core/icepak.py +0 -0
  193. {pyedb-0.18.0 → pyedb-0.20.0}/src/pyedb/workflow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyedb
3
- Version: 0.18.0
3
+ Version: 0.20.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>
@@ -19,16 +19,19 @@ Requires-Dist: cffi>=1.16.0,<1.17; platform_system=='Linux'
19
19
  Requires-Dist: pywin32 >= 303;platform_system=='Windows'
20
20
  Requires-Dist: ansys-pythonnet >= 3.1.0rc3
21
21
  Requires-Dist: dotnetcore2 ==3.1.23;platform_system=='Linux'
22
- Requires-Dist: pydantic>=2.6.4,<2.8
23
- Requires-Dist: toml == 0.10.2
24
- Requires-Dist: Rtree >= 1.2.0
25
22
  Requires-Dist: numpy>=1.20.0,<2
23
+ Requires-Dist: pandas>=1.1.0,<2.3
24
+ Requires-Dist: pydantic>=2.6.4,<2.9
25
+ Requires-Dist: Rtree >= 1.2.0
26
+ Requires-Dist: toml == 0.10.2
26
27
  Requires-Dist: ansys-sphinx-theme>=0.10.0,<0.17 ; extra == "doc"
27
28
  Requires-Dist: imageio>=2.30.0,<2.35 ; extra == "doc"
28
- Requires-Dist: ipython>=8.13.0,<8.26 ; extra == "doc"
29
+ Requires-Dist: ipython>=8.13.0,<8.27 ; extra == "doc"
29
30
  Requires-Dist: jupyterlab>=4.0.0,<4.3 ; extra == "doc"
31
+ Requires-Dist: jupytext>=1.16.0,<1.17 ; extra == "doc"
30
32
  Requires-Dist: matplotlib>=3.5.0,<3.10 ; extra == "doc"
31
33
  Requires-Dist: nbsphinx>=0.9.0,<0.10 ; extra == "doc"
34
+ Requires-Dist: nbconvert < 7.17 ; extra == "doc"
32
35
  Requires-Dist: numpydoc>=1.5.0,<1.8 ; extra == "doc"
33
36
  Requires-Dist: pypandoc>=1.10.0,<1.14 ; extra == "doc"
34
37
  Requires-Dist: recommonmark ; extra == "doc"
@@ -39,11 +42,8 @@ Requires-Dist: sphinx-copybutton>=0.5.0,<0.6 ; extra == "doc"
39
42
  Requires-Dist: sphinx-gallery>=0.14.0,<0.17 ; extra == "doc"
40
43
  Requires-Dist: sphinx_design>=0.4.0,<0.7 ; extra == "doc"
41
44
  Requires-Dist: matplotlib>=3.5.0,<3.10 ; extra == "full"
42
- Requires-Dist: pandas>=1.1.0,<2.3 ; extra == "full"
43
45
  Requires-Dist: matplotlib>=3.5.0,<3.10 ; extra == "tests"
44
- Requires-Dist: numpy>=1.20.0,<2 ; extra == "tests"
45
46
  Requires-Dist: mock>=5.1.0,<5.2 ; extra == "tests"
46
- Requires-Dist: pandas>=1.1.0,<2.3 ; extra == "tests"
47
47
  Requires-Dist: pytest>=7.4.0,<8.3 ; extra == "tests"
48
48
  Requires-Dist: pytest-cov>=4.0.0,<5.1 ; extra == "tests"
49
49
  Requires-Dist: pytest-xdist>=3.5.0,<3.7 ; extra == "tests"
@@ -29,18 +29,17 @@ dependencies = [
29
29
  "pywin32 >= 303;platform_system=='Windows'",
30
30
  "ansys-pythonnet >= 3.1.0rc3",
31
31
  "dotnetcore2 ==3.1.23;platform_system=='Linux'",
32
- "pydantic>=2.6.4,<2.8",
33
- "toml == 0.10.2",
34
- "Rtree >= 1.2.0",
35
32
  "numpy>=1.20.0,<2",
33
+ "pandas>=1.1.0,<2.3",
34
+ "pydantic>=2.6.4,<2.9",
35
+ "Rtree >= 1.2.0",
36
+ "toml == 0.10.2",
36
37
  ]
37
38
 
38
39
  [project.optional-dependencies]
39
40
  tests = [
40
41
  "matplotlib>=3.5.0,<3.10",
41
- "numpy>=1.20.0,<2",
42
42
  "mock>=5.1.0,<5.2",
43
- "pandas>=1.1.0,<2.3",
44
43
  "pytest>=7.4.0,<8.3",
45
44
  "pytest-cov>=4.0.0,<5.1",
46
45
  "pytest-xdist>=3.5.0,<3.7",
@@ -48,10 +47,12 @@ tests = [
48
47
  doc = [
49
48
  "ansys-sphinx-theme>=0.10.0,<0.17",
50
49
  "imageio>=2.30.0,<2.35",
51
- "ipython>=8.13.0,<8.26",
50
+ "ipython>=8.13.0,<8.27",
52
51
  "jupyterlab>=4.0.0,<4.3",
52
+ "jupytext>=1.16.0,<1.17",
53
53
  "matplotlib>=3.5.0,<3.10",
54
54
  "nbsphinx>=0.9.0,<0.10",
55
+ "nbconvert < 7.17",
55
56
  "numpydoc>=1.5.0,<1.8",
56
57
  "pypandoc>=1.10.0,<1.14",
57
58
  # NOTE: Remove recommonmark once examples are reworked.
@@ -65,7 +66,6 @@ doc = [
65
66
  ]
66
67
  full = [
67
68
  "matplotlib>=3.5.0,<3.10",
68
- "pandas>=1.1.0,<2.3",
69
69
  ]
70
70
 
71
71
 
@@ -44,7 +44,7 @@ deprecation_warning()
44
44
  #
45
45
 
46
46
  pyedb_path = os.path.dirname(__file__)
47
- __version__ = "0.18.0"
47
+ __version__ = "0.20.0"
48
48
  version = __version__
49
49
 
50
50
  #
@@ -28,8 +28,8 @@ from pyedb.configuration.cfg_nets import CfgNets
28
28
  from pyedb.configuration.cfg_operations import CfgOperations
29
29
  from pyedb.configuration.cfg_package_definition import CfgPackageDefinitions
30
30
  from pyedb.configuration.cfg_padstacks import CfgPadstacks
31
- from pyedb.configuration.cfg_pin_groups import CfgPinGroup
32
- from pyedb.configuration.cfg_ports_sources import CfgPort, CfgSources
31
+ from pyedb.configuration.cfg_pin_groups import CfgPinGroups
32
+ from pyedb.configuration.cfg_ports_sources import CfgPorts, CfgSources
33
33
  from pyedb.configuration.cfg_s_parameter_models import CfgSParameterModel
34
34
  from pyedb.configuration.cfg_setup import CfgSetups
35
35
  from pyedb.configuration.cfg_spice_models import CfgSpiceModel
@@ -41,28 +41,25 @@ class CfgData(object):
41
41
 
42
42
  def __init__(self, pedb, **kwargs):
43
43
  self._pedb = pedb
44
- self.edb_comps = self._pedb.components.components
45
44
  self.general = CfgGeneral(self, kwargs.get("general", None))
46
45
 
47
46
  self.boundaries = {}
48
47
  if kwargs.get("boundaries", None):
49
48
  self.boundaries = CfgBoundaries(self, kwargs.get("boundaries", None))
50
49
 
51
- self.nets = None
52
- if kwargs.get("nets"):
53
- self.nets = CfgNets(
54
- self, kwargs.get("nets", {}).get("signal_nets", []), kwargs.get("nets", {}).get("power_ground_nets", [])
55
- )
50
+ self.nets = CfgNets(
51
+ self, kwargs.get("nets", {}).get("signal_nets", []), kwargs.get("nets", {}).get("power_ground_nets", [])
52
+ )
56
53
 
57
54
  self.components = CfgComponents(self._pedb, components_data=kwargs.get("components", []))
58
55
 
59
56
  self.padstacks = CfgPadstacks(self, kwargs.get("padstacks", None))
60
57
 
61
- self.pin_groups = [CfgPinGroup(self, pin_group) for pin_group in kwargs.get("pin_groups", [])]
58
+ self.pin_groups = CfgPinGroups(self._pedb, pingroup_data=kwargs.get("pin_groups", []))
62
59
 
63
- self.ports = [CfgPort(self, **port) for port in kwargs.get("ports", [])]
60
+ self.ports = CfgPorts(self._pedb, ports_data=kwargs.get("ports", []))
64
61
 
65
- self.sources = [CfgSources(self, **source) for source in kwargs.get("sources", [])]
62
+ self.sources = CfgSources(self._pedb, sources_data=kwargs.get("sources", []))
66
63
 
67
64
  self.setups = CfgSetups(self._pedb, setups_data=kwargs.get("setups", []))
68
65
 
@@ -41,3 +41,17 @@ class CfgNets:
41
41
  for power_net in self.power_nets:
42
42
  if power_net in self._pedb.nets:
43
43
  self._pedb.nets.nets[power_net].is_power_ground = True
44
+
45
+ def _load_data_from_db(self):
46
+ self.signal_nets = []
47
+ self.power_nets = []
48
+ for net in self._pedb.nets.signal:
49
+ self.signal_nets.append(net)
50
+ for net in self._pedb.nets.power:
51
+ self.power_nets.append(net)
52
+
53
+ def get_data_from_db(self):
54
+ """Get net information."""
55
+ self._load_data_from_db()
56
+ data = {"signal_nets": self.signal_nets, "power_ground_nets": self.power_nets}
57
+ return data
@@ -0,0 +1,95 @@
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
+
25
+
26
+ class CfgPinGroups:
27
+ """Manage configuration pin group class."""
28
+
29
+ def __init__(self, pedb, pingroup_data):
30
+ self._pedb = pedb
31
+ self.pin_groups = [CfgPinGroup(self._pedb, **pg) for pg in pingroup_data]
32
+
33
+ def apply(self):
34
+ for pg in self.pin_groups:
35
+ pg.create()
36
+
37
+ def get_data_from_db(self):
38
+ self.pin_groups = []
39
+ for name, pg in self._pedb.siwave.pin_groups.items():
40
+ pins = [p.aedt_name for p in pg.pins.values()]
41
+ cfg_pg = CfgPinGroup(
42
+ self._pedb,
43
+ name=name,
44
+ reference_designator=None,
45
+ pins=pins,
46
+ )
47
+ self.pin_groups.append(cfg_pg)
48
+ return self.export_properties()
49
+
50
+ def export_properties(self):
51
+ pin_groups = []
52
+ for pg in self.pin_groups:
53
+ pin_groups.append(pg.export_properties())
54
+ return pin_groups
55
+
56
+
57
+ class CfgPinGroup(CfgBase):
58
+ def __init__(self, pedb, **kwargs):
59
+ self._pedb = pedb
60
+ self.name = kwargs["name"]
61
+ self.reference_designator = kwargs.get("reference_designator")
62
+ self.pins = kwargs.get("pins")
63
+ self.net = kwargs.get("net")
64
+
65
+ def create(self):
66
+ """Apply pin group on layout."""
67
+ if self.pins:
68
+ if self.reference_designator is None:
69
+ self._pedb.modeler.create_pin_group(self.name, pins_by_aedt_name=self.pins)
70
+ else:
71
+ self._pedb.siwave.create_pin_group(self.reference_designator, list(self.pins), self.name)
72
+ elif self.net:
73
+ if self.reference_designator in self._pedb.components.instances:
74
+ comp = self._pedb.components.instances[self.reference_designator]
75
+ else:
76
+ raise f"Component not found for creating pin group {self.name}."
77
+ pins = [p for p, obj in comp.pins.items() if obj.net_name in self.net]
78
+ if not self._pedb.siwave.create_pin_group(self.reference_designator, pins, self.name):
79
+ self._pedb.logger.error(f"Failed to create pin group {self.name}")
80
+ else:
81
+ self._pedb.logger.error(f"No net and pins defined for defining pin group {self.name}")
82
+
83
+ def export_properties(self):
84
+ if self.pins:
85
+ return {
86
+ "name": self.name,
87
+ "reference_designator": self.reference_designator,
88
+ "pins": self.pins,
89
+ }
90
+ else:
91
+ return {
92
+ "name": self.name,
93
+ "reference_designator": self.reference_designator,
94
+ "net": self.net,
95
+ }
@@ -0,0 +1,371 @@
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
+
25
+
26
+ class CfgTerminalInfo(CfgBase):
27
+ CFG_TERMINAL_TYPES = ["pin", "net", "pin_group", "nearest_pin", "coordinates"]
28
+
29
+ def __init__(self, pedb, **kwargs):
30
+ self._pedb = pedb
31
+ self.type = list(kwargs.keys())[0]
32
+ self.value = kwargs[self.type]
33
+
34
+ def export_properties(self):
35
+ return {self.type: self.value}
36
+
37
+
38
+ class CfgCoordianteTerminalInfo(CfgTerminalInfo):
39
+ def __init__(self, pedb, **kwargs):
40
+ super().__init__(pedb, **kwargs)
41
+
42
+ self.layer = self.value["layer"]
43
+ self.point_x = self.value["point"][0]
44
+ self.point_y = self.value["point"][1]
45
+ self.net = self.value["net"]
46
+
47
+ def export_properties(self):
48
+ return {"layer": self.layer, "point_x": self.point_x, "point_y": self.point_y, "net": self.net}
49
+
50
+
51
+ class CfgNearestPinTerminalInfo(CfgTerminalInfo):
52
+ def __init__(self, pedb, **kwargs):
53
+ super().__init__(pedb, **kwargs)
54
+ self.reference_net = self.value["reference_net"]
55
+ self.search_radius = self.value["search_radius"]
56
+
57
+ def export_properties(self):
58
+ return {"reference_net": self.reference_net, "search_radius": self.search_radius}
59
+
60
+
61
+ class CfgSources:
62
+ def __init__(self, pedb, sources_data):
63
+ self._pedb = pedb
64
+ self.sources = [CfgSource(self._pedb, **src) for src in sources_data]
65
+
66
+ def apply(self):
67
+ for src in self.sources:
68
+ src.create()
69
+
70
+ def get_data_from_db(self):
71
+ self.sources = []
72
+ sources = {name: t for name, t in self._pedb.terminals.items() if not t.is_reference_terminal}
73
+ sources = {name: t for name, t in sources.items() if t.is_current_source or t.is_voltage_source}
74
+
75
+ for _, src in sources.items():
76
+ src_type = "voltage" if "voltage" in src.boundary_type.lower() else "current"
77
+ name = src.name
78
+ magnitude = src.magnitude
79
+
80
+ if src.terminal_type == "PinGroupTerminal":
81
+ refdes = ""
82
+ pg = self._pedb.siwave.pin_groups[src._edb_object.GetPinGroup().GetName()]
83
+ pos_term_info = {"pin_group": pg.name}
84
+ elif src.terminal_type == "PadstackInstanceTerminal":
85
+ refdes = src.component.refdes if src.component else ""
86
+ pos_term_info = {"pin": src.padstack_instance.component_pin}
87
+
88
+ neg_term = self._pedb.terminals[src.ref_terminal.name]
89
+ if neg_term.terminal_type == "PinGroupTerminal":
90
+ pg = self._pedb.siwave.pin_groups[neg_term._edb_object.GetPinGroup().GetName()]
91
+ neg_term_info = {"pin_group": pg.name}
92
+ elif neg_term.terminal_type == "PadstackInstanceTerminal":
93
+ neg_term_info = {"pin": neg_term.padstack_instance.component_pin}
94
+
95
+ cfg_src = CfgSource(
96
+ self._pedb,
97
+ name=name,
98
+ type=src_type,
99
+ magnitude=magnitude,
100
+ reference_designator=refdes,
101
+ positive_terminal=pos_term_info,
102
+ negative_terminal=neg_term_info,
103
+ )
104
+ self.sources.append(cfg_src)
105
+ return self.export_properties()
106
+
107
+ def export_properties(self):
108
+ sources = []
109
+ for src in self.sources:
110
+ sources.append(src.export_properties())
111
+ return sources
112
+
113
+
114
+ class CfgPorts:
115
+ def __init__(self, pedb, ports_data):
116
+ self._pedb = pedb
117
+ self.ports = [CfgPort(self._pedb, **p) for p in ports_data]
118
+
119
+ def apply(self):
120
+ for p in self.ports:
121
+ p.create()
122
+
123
+ def get_data_from_db(self):
124
+ self.ports = []
125
+ ports = {name: t for name, t in self._pedb.terminals.items() if not t.is_reference_terminal}
126
+ ports = {name: t for name, t in ports.items() if t.is_port}
127
+
128
+ for _, p in ports.items():
129
+ port_type = "circuit" if p.is_circuit_port else "coax"
130
+
131
+ if p.terminal_type == "PinGroupTerminal":
132
+ refdes = ""
133
+ pg = self._pedb.siwave.pin_groups[p._edb_object.GetPinGroup().GetName()]
134
+ pos_term_info = {"pin_group": pg.name}
135
+ elif p.terminal_type == "PadstackInstanceTerminal":
136
+ refdes = p.component.refdes if p.component else ""
137
+ pos_term_info = {"pin": p.padstack_instance.component_pin}
138
+
139
+ if port_type == "circuit":
140
+ neg_term = self._pedb.terminals[p.ref_terminal.name]
141
+ if neg_term.terminal_type == "PinGroupTerminal":
142
+ pg = self._pedb.siwave.pin_groups[neg_term._edb_object.GetPinGroup().GetName()]
143
+ neg_term_info = {"pin_group": pg.name}
144
+ elif neg_term.terminal_type == "PadstackInstanceTerminal":
145
+ neg_term_info = {"pin": neg_term.padstack_instance.component_pin}
146
+
147
+ cfg_port = CfgPort(
148
+ self._pedb,
149
+ name=p.name,
150
+ type=port_type,
151
+ reference_designator=refdes,
152
+ positive_terminal=pos_term_info,
153
+ negative_terminal=neg_term_info,
154
+ )
155
+ else:
156
+ cfg_port = CfgPort(
157
+ self._pedb,
158
+ name=p.name,
159
+ type=port_type,
160
+ reference_designator=refdes,
161
+ positive_terminal=pos_term_info,
162
+ )
163
+
164
+ self.ports.append(cfg_port)
165
+ return self.export_properties()
166
+
167
+ def export_properties(self):
168
+ ports = []
169
+ for p in self.ports:
170
+ ports.append(p.export_properties())
171
+ return ports
172
+
173
+
174
+ class CfgCircuitElement(CfgBase):
175
+ def __init__(self, pedb, **kwargs):
176
+ self._pedb = pedb
177
+ self.name = kwargs.get("name", None)
178
+ self.type = kwargs.get("type", None)
179
+ self.reference_designator = kwargs.get("reference_designator", None)
180
+ self.distributed = kwargs.get("distributed", False)
181
+
182
+ pos = kwargs["positive_terminal"] # {"pin" : "A1"}
183
+ if list(pos.keys())[0] == "coordinates":
184
+ self.positive_terminal_info = CfgCoordianteTerminalInfo(self._pedb, **pos)
185
+ else:
186
+ self.positive_terminal_info = CfgTerminalInfo(self._pedb, **pos)
187
+
188
+ neg = kwargs.get("negative_terminal", {})
189
+ if len(neg) == 0:
190
+ self.negative_terminal_info = None
191
+ elif list(neg.keys())[0] == "coordinates":
192
+ self.negative_terminal_info = CfgCoordianteTerminalInfo(self._pedb, **neg)
193
+ elif list(neg.keys())[0] == "nearest_pin":
194
+ self.negative_terminal_info = CfgNearestPinTerminalInfo(self._pedb, **neg)
195
+ else:
196
+ self.negative_terminal_info = CfgTerminalInfo(self._pedb, **neg)
197
+
198
+ def _create_terminals(self):
199
+ """Create step 1. Collect positive and negative terminals."""
200
+
201
+ pos_type, pos_value = self.positive_terminal_info.type, self.positive_terminal_info.value
202
+ pos_objs = dict()
203
+ pos_coor_terminal = dict()
204
+ if self.type == "coax":
205
+ pins = self._get_pins(pos_type, pos_value)
206
+ pins = {f"{self.name}_{self.reference_designator}": i for _, i in pins.items()}
207
+ pos_objs.update(pins)
208
+ elif pos_type == "coordinates":
209
+ layer = self.positive_terminal_info.layer
210
+ point = [self.positive_terminal_info.point_x, self.positive_terminal_info.point_y]
211
+ net_name = self.positive_terminal_info.net
212
+ pos_coor_terminal[self.name] = self._pedb.get_point_terminal(self.name, net_name, point, layer)
213
+ elif pos_type == "pin_group":
214
+ if self.distributed:
215
+ pins = self._get_pins(pos_type, pos_value)
216
+ pos_objs.update(pins)
217
+ self._elem_num = len(pos_objs)
218
+ else:
219
+ pos_objs[pos_value] = self._pedb.siwave.pin_groups[pos_value]
220
+ elif pos_type == "net":
221
+ if self.distributed:
222
+ pins = self._get_pins(pos_type, pos_value)
223
+ pos_objs.update(pins)
224
+ self._elem_num = len(pos_objs)
225
+ else:
226
+ pins = self._get_pins(pos_type, pos_value)
227
+ # create pin group
228
+ neg_obj = self._create_pin_group(pins)
229
+ pos_objs.update(neg_obj)
230
+ elif pos_type == "pin":
231
+ pins = {pos_value: self._pedb.components.components[self.reference_designator].pins[pos_value]}
232
+ pos_objs.update(pins)
233
+ else:
234
+ raise f"Wrong positive terminal type {pos_type}"
235
+
236
+ self.pos_terminals = {i: j.create_terminal(i) for i, j in pos_objs.items()}
237
+ self.pos_terminals.update(pos_coor_terminal)
238
+
239
+ self.neg_terminal = None
240
+ if self.negative_terminal_info:
241
+ neg_type, neg_value = self.negative_terminal_info.type, self.negative_terminal_info.value
242
+
243
+ if neg_type == "coordinates":
244
+ layer = self.negative_terminal_info.layer
245
+ point = [self.negative_terminal_info.point_x, self.positive_terminal_info.point_y]
246
+ net_name = self.negative_terminal_info.net
247
+ self.neg_terminal = self._pedb.get_point_terminal(self.name + "_ref", net_name, point, layer)
248
+ elif neg_type == "nearest_pin":
249
+ ref_net = neg_value.get("reference_net", "GND")
250
+ search_radius = neg_value.get("search_radius", "5e-3")
251
+ temp = dict()
252
+ for i, j in pos_objs.items():
253
+ temp[i] = self._pedb.padstacks.get_reference_pins(j, ref_net, search_radius, max_limit=1)[0]
254
+ self.neg_terminal = {
255
+ i: j.create_terminal(i + "_ref") if not j.terminal else j.terminal for i, j in temp.items()
256
+ }
257
+ else:
258
+ if neg_type == "pin_group":
259
+ neg_obj = {neg_value: self._pedb.siwave.pin_groups[neg_value]}
260
+ elif neg_type == "net":
261
+ # Get pins
262
+ pins = self._get_pins(neg_type, neg_value) # terminal type pin or net
263
+ # create pin group
264
+ neg_obj = self._create_pin_group(pins, True)
265
+ elif neg_type == "pin":
266
+ neg_obj = {neg_value: self._pedb.components.components[self.reference_designator].pins[neg_value]}
267
+ else:
268
+ raise f"Wrong negative terminal type {neg_type}"
269
+ self.neg_terminal = [
270
+ j.create_terminal(i) if not j.terminal else j.terminal for i, j in neg_obj.items()
271
+ ][0]
272
+
273
+ def _get_pins(self, terminal_type, terminal_value):
274
+ terminal_value = terminal_value if isinstance(terminal_value, list) else [terminal_value]
275
+
276
+ def get_pin_obj(pin_name):
277
+ return {pin_name: self._pedb.components.components[self.reference_designator].pins[pin_name]}
278
+
279
+ pins = dict()
280
+ if terminal_type == "pin":
281
+ for i in terminal_value:
282
+ pins.update(get_pin_obj(i))
283
+ else:
284
+ if terminal_type == "net":
285
+ temp = self._pedb.components.get_pins(self.reference_designator, terminal_value[0])
286
+ elif terminal_type == "pin_group":
287
+ pin_group = self._pedb.siwave.pin_groups[terminal_value[0]]
288
+ temp = pin_group.pins
289
+ pins.update({f"{self.reference_designator}_{terminal_value[0]}_{i}": j for i, j in temp.items()})
290
+ return pins
291
+
292
+ def _create_pin_group(self, pins, is_ref=False):
293
+ if is_ref:
294
+ pg_name = f"pg_{self.name}_{self.reference_designator}_ref"
295
+ else:
296
+ pg_name = f"pg_{self.name}_{self.reference_designator}"
297
+ pin_names = [i.component_pin for i in pins.values()]
298
+ name, temp = self._pedb.siwave.create_pin_group(self.reference_designator, pin_names, pg_name)
299
+ return {name: temp}
300
+
301
+
302
+ class CfgPort(CfgCircuitElement):
303
+ """Manage port."""
304
+
305
+ CFG_PORT_TYPE = {"circuit": [str], "coax": [str]}
306
+
307
+ def __init__(self, pedb, **kwargs):
308
+ super().__init__(pedb, **kwargs)
309
+
310
+ def create(self):
311
+ """Create port."""
312
+ self._create_terminals()
313
+ is_circuit_port = True if self.type == "circuit" else False
314
+ circuit_elements = []
315
+ for name, j in self.pos_terminals.items():
316
+ if isinstance(self.neg_terminal, dict):
317
+ elem = self._pedb.create_port(j, self.neg_terminal[name], is_circuit_port)
318
+ else:
319
+ elem = self._pedb.create_port(j, self.neg_terminal, is_circuit_port)
320
+ if not self.distributed:
321
+ elem.name = self.name
322
+ circuit_elements.append(elem)
323
+ return circuit_elements
324
+
325
+ def export_properties(self):
326
+ return {
327
+ "name": self.name,
328
+ "type": self.type,
329
+ "reference_designator": self.reference_designator,
330
+ "positive_terminal": self.positive_terminal_info.export_properties(),
331
+ "negative_terminal": self.negative_terminal_info.export_properties(),
332
+ }
333
+
334
+
335
+ class CfgSource(CfgCircuitElement):
336
+ CFG_SOURCE_TYPE = {"current": [int, float], "voltage": [int, float]}
337
+
338
+ def __init__(self, pedb, **kwargs):
339
+ super().__init__(pedb, **kwargs)
340
+
341
+ self.magnitude = kwargs.get("magnitude", 0.001)
342
+
343
+ def create(self):
344
+ """Create sources."""
345
+ self._create_terminals()
346
+ # is_circuit_port = True if self.type == "circuit" else False
347
+ circuit_elements = []
348
+ method = self._pedb.create_current_source if self.type == "current" else self._pedb.create_voltage_source
349
+ for name, j in self.pos_terminals.items():
350
+ if isinstance(self.neg_terminal, dict):
351
+ elem = method(j, self.neg_terminal[name])
352
+ else:
353
+ elem = method(j, self.neg_terminal)
354
+ if not self.distributed:
355
+ elem.name = self.name
356
+ elem.magnitude = self.magnitude
357
+ else:
358
+ elem.name = f"{self.name}_{elem.name}"
359
+ elem.magnitude = self.magnitude / self._elem_num
360
+ circuit_elements.append(elem)
361
+ return circuit_elements
362
+
363
+ def export_properties(self):
364
+ return {
365
+ "name": self.name,
366
+ "reference_designator": self.reference_designator,
367
+ "type": self.type,
368
+ "magnitude": self.magnitude,
369
+ "positive_terminal": self.positive_terminal_info.export_properties(),
370
+ "negative_terminal": self.negative_terminal_info.export_properties(),
371
+ }