Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 35 additions & 7 deletions src/pyedb/configuration/cfg_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,42 @@ def _set_model_properties_to_edb(self):
m = self._pedb._edb.Cell.Hierarchy.PinPairModel()
for i in self.pin_pair_model:
p = self._pedb._edb.Utility.PinPair(str(i["first_pin"]), str(i["second_pin"]))
res = i.get("resistance")
if res is None:
# If resistance is not defined, set it to 0 and disable it
res = "0ohm"
en_res = False
else:
# If resistance is defined, use the provided value and enabled status
res = i["resistance"]
en_res = i.get("resistance_enabled", True)
ind = i.get("inductance")
if ind is None:
# If inductance is not defined, set it to 0 and disable it
ind = "0nH"
en_ind = False
else:
# If inductance is defined, use the provided value and enabled status
ind = i["inductance"]
en_ind = i.get("inductance_enabled", True)
cap = i.get("capacitance")
if cap is None:
# If capacitance is not defined, set it to 0 and disable it
cap = "0pF"
en_cap = False
else:
# If capacitance is defined, use the provided value and enabled status
cap = i["capacitance"]
en_cap = i.get("capacitance_enabled", True)

rlc = self._pedb._edb.Utility.Rlc(
self._pedb.edb_value(i["resistance"]),
i["resistance_enabled"],
self._pedb.edb_value(i["inductance"]),
i["inductance_enabled"],
self._pedb.edb_value(i["capacitance"]),
i["capacitance_enabled"],
i["is_parallel"],
self._pedb.edb_value(res),
en_res,
self._pedb.edb_value(ind),
en_ind,
self._pedb.edb_value(cap),
en_cap,
i.get("is_parallel", False),
)
m.SetPinPairRlc(p, rlc)
c_p.SetModel(m)
Expand Down
21 changes: 21 additions & 0 deletions src/pyedb/workflows/utilities/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
2 changes: 1 addition & 1 deletion src/pyedb/workflows/utilities/cutout.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
Loading