Skip to content

Commit

Permalink
FEAT: Siwave icepak settings (#404)
Browse files Browse the repository at this point in the history
* FEATURE: add icepak property siwave.py

* FEATURE: update edb_example class.

* FEATURE: add unittest

* MISC: Auto fixes from pre-commit.com hooks

For more information, see https://pre-commit.ci

* Fix PR tittle

---------

Co-authored-by: ring630 <@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
hui-zhou-a and pre-commit-ci[bot] authored Apr 24, 2024
1 parent 5d672a9 commit d135483
Show file tree
Hide file tree
Showing 4 changed files with 925 additions and 11 deletions.
31 changes: 31 additions & 0 deletions src/pyedb/dotnet/edb_core/siwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -1454,3 +1454,34 @@ def place_voltage_probe(
p_terminal = self._pedb.get_point_terminal(name, positive_net_name, positive_location, positive_layer)
n_terminal = self._pedb.get_point_terminal(name + "_ref", negative_net_name, negative_location, negative_layer)
return self._pedb.create_voltage_probe(p_terminal, n_terminal)

@property
def icepak_use_minimal_comp_defaults(self):
"""Icepak default setting. If "True", only resistor are active in Icepak simulation.
The power dissipation of the resistors are calculated from DC results.
"""
siwave_id = self._pedb.edb_api.ProductId.SIWave
cell = self._pedb.active_cell._active_cell
_, value = cell.GetProductProperty(siwave_id, 422, "")
return bool(value)

@icepak_use_minimal_comp_defaults.setter
def icepak_use_minimal_comp_defaults(self, value):
value = "True" if bool(value) else ""
siwave_id = self._pedb.edb_api.ProductId.SIWave
cell = self._pedb.active_cell._active_cell
cell.SetProductProperty(siwave_id, 422, value)

@property
def icepak_component_file(self):
"""Icepak component file path."""
siwave_id = self._pedb.edb_api.ProductId.SIWave
cell = self._pedb.active_cell._active_cell
_, value = cell.GetProductProperty(siwave_id, 420, "")
return value

@icepak_component_file.setter
def icepak_component_file(self, value):
siwave_id = self._pedb.edb_api.ProductId.SIWave
cell = self._pedb.active_cell._active_cell
cell.SetProductProperty(siwave_id, 420, value)
Loading

0 comments on commit d135483

Please sign in to comment.