Skip to content

Commit

Permalink
edb design options (#2595)
Browse files Browse the repository at this point in the history
* doc update

* doc update

* doc update

* [pre-commit.ci] auto fixes from pre-commit.com hooks

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

* doc update

* doc update

* doc update

---------

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
ring630 and pre-commit-ci[bot] committed Mar 8, 2023
1 parent 8434593 commit 27decbe
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _unittest/test_00_EDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -2202,3 +2202,9 @@ def test_136_rlc_component_values_getter_setter(self):
assert res.res_value == 12.5 and res.ind_value == 5e-9 and res.cap_value == 1e-12
res.cap_value = 8e-12
assert res.res_value == 12.5 and res.ind_value == 5e-9 and res.cap_value == 8e-12

def test_137_design_options(self):
self.edbapp.design_options.suppress_pads = False
assert not self.edbapp.design_options.suppress_pads
self.edbapp.design_options.antipads_always_on = True
assert self.edbapp.design_options.antipads_always_on
6 changes: 6 additions & 0 deletions pyaedt/edb.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from pyaedt.edb_core import EdbNets
from pyaedt.edb_core import EdbSiwave
from pyaedt.edb_core import EdbStackup
from pyaedt.edb_core.edb_data.design_options import EdbDesignOptions
from pyaedt.edb_core.edb_data.edb_builder import EdbBuilder
from pyaedt.edb_core.edb_data.hfss_simulation_setup_data import HfssSimulationSetup
from pyaedt.edb_core.edb_data.padstacks_data import EDBPadstackInstance
Expand Down Expand Up @@ -643,6 +644,11 @@ def core_stackup(self):
self._stackup = EdbStackup(self)
return self._stackup

@property
def design_options(self):
"""Design options."""
return EdbDesignOptions(self.active_cell)

@property
def stackup(self):
"""Stackup."""
Expand Down
35 changes: 35 additions & 0 deletions pyaedt/edb_core/edb_data/design_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
class EdbDesignOptions:
def __init__(self, active_cell):
self._active_cell = active_cell

@property
def suppress_pads(self):
"""Whether to suppress non-functional pads.
Returns
-------
bool
``True`` if suppress non-functional pads is on, ``False`` otherwise.
"""
return self._active_cell.GetSuppressPads()

@suppress_pads.setter
def suppress_pads(self, value):
self._active_cell.SetSuppressPads(value)

@property
def antipads_always_on(self):
"""Whether to always turn on antipad.
Returns
-------
bool
``True`` if antipad is always on, ``False`` otherwise.
"""
return self._active_cell.GetAntiPadsAlwaysOn()

@antipads_always_on.setter
def antipads_always_on(self, value):
self._active_cell.SetAntiPadsAlwaysOn(value)

0 comments on commit 27decbe

Please sign in to comment.