Skip to content

Commit

Permalink
Merge branch 'release/0.34.1' into release/0.34
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys committed Dec 3, 2024
2 parents 9cdc45d + c9b0b9a commit 569654d
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tests = [
doc = [
"ansys-sphinx-theme>=0.10.0,<1.1",
"imageio>=2.30.0,<2.37",
"ipython>=8.13.0,<8.30",
"ipython>=8.13.0,<8.31",
"jupyterlab>=4.0.0,<4.4",
"jupytext>=1.16.0,<1.17",
"matplotlib>=3.5.0,<3.10",
Expand Down
2 changes: 1 addition & 1 deletion src/pyedb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def custom_show_warning(message, category, filename, lineno, file=None, line=Non
#

pyedb_path = os.path.dirname(__file__)
__version__ = "0.34.0"
__version__ = "0.34.1"
version = __version__

#
Expand Down
66 changes: 60 additions & 6 deletions src/pyedb/dotnet/edb_core/edb_data/layer_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,16 @@ def top_hallhuray_nodule_radius(self):

@top_hallhuray_nodule_radius.setter
def top_hallhuray_nodule_radius(self, value):
self._top_hallhuray_nodule_radius = value
top_roughness_model = self.get_roughness_model("top")
if top_roughness_model:
if str(top_roughness_model).split(".")[-1] == "HurrayRoughnessModel":
layer_clone = self._edb_layer
layer_clone.SetTopRoughnessEnabled(True)
self._top_hallhuray_nodule_radius = value
top_roughness_model.NoduleRadius = self._pedb.edb_value(value)
region = top_roughness_model.Region.Top
layer_clone.SetRoughnessModel(region, top_roughness_model)
self._pedb.stackup._set_layout_stackup(layer_clone, "change_attribute")

@property
def top_hallhuray_surface_ratio(self):
Expand All @@ -515,7 +524,16 @@ def top_hallhuray_surface_ratio(self):

@top_hallhuray_surface_ratio.setter
def top_hallhuray_surface_ratio(self, value):
self._top_hallhuray_surface_ratio = value
top_roughness_model = self.get_roughness_model("top")
if top_roughness_model:
if str(top_roughness_model).split(".")[-1] == "HurrayRoughnessModel":
layer_clone = self._edb_layer
layer_clone.SetTopRoughnessEnabled(True)
self._top_hallhuray_surface_ratio = value
top_roughness_model.SurfaceRatio = self._pedb.edb_value(value)
region = top_roughness_model.Region.Top
layer_clone.SetRoughnessModel(region, top_roughness_model)
self._pedb.stackup._set_layout_stackup(layer_clone, "change_attribute")

@property
def bottom_hallhuray_nodule_radius(self):
Expand All @@ -527,7 +545,16 @@ def bottom_hallhuray_nodule_radius(self):

@bottom_hallhuray_nodule_radius.setter
def bottom_hallhuray_nodule_radius(self, value):
self._bottom_hallhuray_nodule_radius = value
bottom_roughness_model = self.get_roughness_model("bottom")
if bottom_roughness_model:
if str(bottom_roughness_model).split(".")[-1] == "HurrayRoughnessModel":
layer_clone = self._edb_layer
layer_clone.SetBottomRoughnessEnabled(True)
self._bottom_hallhuray_nodule_radius = value
bottom_roughness_model.NoduleRadius = self._pedb.edb_value(value)
region = bottom_roughness_model.Region.Bottom
layer_clone.SetRoughnessModel(region, bottom_roughness_model)
self._pedb.stackup._set_layout_stackup(layer_clone, "change_attribute")

@property
def bottom_hallhuray_surface_ratio(self):
Expand All @@ -539,7 +566,16 @@ def bottom_hallhuray_surface_ratio(self):

@bottom_hallhuray_surface_ratio.setter
def bottom_hallhuray_surface_ratio(self, value):
self._bottom_hallhuray_surface_ratio = value
bottom_roughness_model = self.get_roughness_model("bottom")
if bottom_roughness_model:
if str(bottom_roughness_model).split(".")[-1] == "HurrayRoughnessModel":
layer_clone = self._edb_layer
layer_clone.SetBottomRoughnessEnabled(True)
self._bottom_hallhuray_surface_ratio = value
bottom_roughness_model.SurfaceRatio = self._pedb.edb_value(value)
region = bottom_roughness_model.Region.Bottom
layer_clone.SetRoughnessModel(region, bottom_roughness_model)
self._pedb.stackup._set_layout_stackup(layer_clone, "change_attribute")

@property
def side_hallhuray_nodule_radius(self):
Expand All @@ -551,7 +587,16 @@ def side_hallhuray_nodule_radius(self):

@side_hallhuray_nodule_radius.setter
def side_hallhuray_nodule_radius(self, value):
self._side_hallhuray_nodule_radius = value
side_roughness_model = self.get_roughness_model("side")
if side_roughness_model:
if str(side_roughness_model).split(".")[-1] == "HurrayRoughnessModel":
layer_clone = self._edb_layer
layer_clone.SetRoughnessEnabled(True)
self._side_hallhuray_nodule_radius = value
side_roughness_model.NoduleRadius = self._pedb.edb_value(value)
region = side_roughness_model.Region.Side
layer_clone.SetRoughnessModel(region, side_roughness_model)
self._pedb.stackup._set_layout_stackup(layer_clone, "change_attribute")

@property
def side_hallhuray_surface_ratio(self):
Expand All @@ -563,7 +608,16 @@ def side_hallhuray_surface_ratio(self):

@side_hallhuray_surface_ratio.setter
def side_hallhuray_surface_ratio(self, value):
self._side_hallhuray_surface_ratio = value
side_roughness_model = self.get_roughness_model("side")
if side_roughness_model:
if str(side_roughness_model).split(".")[-1] == "HurrayRoughnessModel":
layer_clone = self._edb_layer
layer_clone.SetRoughnessEnabled(True)
self._side_hallhuray_surface_ratio = value
side_roughness_model.SurfaceRatio = self._pedb.edb_value(value)
region = side_roughness_model.Region.Side
layer_clone.SetRoughnessModel(region, side_roughness_model)
self._pedb.stackup._set_layout_stackup(layer_clone, "change_attribute")

def get_roughness_model(self, surface="top"):
"""Get roughness model of the layer.
Expand Down
21 changes: 20 additions & 1 deletion tests/legacy/system/test_edb_stackup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ def validate_material(pedb_materials, material, delta):
assert 0 == validate_material(edbapp.materials, layer["dielectric_fill"], delta)
assert (pedb_lay.thickness - layer["thickness"]) < delta
assert (pedb_lay.etch_factor - layer["etch_factor"]) < delta
assert pedb_lay.roughness_enabled == layer["roughness_enabled"]
# assert pedb_lay.roughness_enabled == layer["roughness_enabled"]
if layer["roughness_enabled"]:
assert (pedb_lay.top_hallhuray_nodule_radius - layer["top_hallhuray_nodule_radius"]) < delta
assert (pedb_lay.top_hallhuray_surface_ratio - layer["top_hallhuray_surface_ratio"]) < delta
Expand Down Expand Up @@ -1138,3 +1138,22 @@ def test_20_layer_properties(self, edb_examples):
layer_data = edbapp.stackup.layers["1_Top"].properties
assert layer_data == data
edbapp.close()

def test_roughness(self, edb_examples):
edbapp = edb_examples.get_si_verse()
for layer_name, layer in edbapp.stackup.signal_layers.items():
layer.roughness_enabled = True
layer.etch_factor = 0.1
layer.top_hallhuray_nodule_radius = 4e-7
layer.top_hallhuray_surface_ratio = 2.7
layer.bottom_hallhuray_nodule_radius = 4e-7
layer.bottom_hallhuray_surface_ratio = 2.7
layer.side_hallhuray_nodule_radius = 4e-7
layer.side_hallhuray_surface_ratio = 2.7
assert layer.top_hallhuray_nodule_radius == 4e-7
assert layer.top_hallhuray_surface_ratio == 2.7
assert layer.bottom_hallhuray_nodule_radius == 4e-7
assert layer.bottom_hallhuray_surface_ratio == 2.7
assert layer.side_hallhuray_nodule_radius == 4e-7
assert layer.side_hallhuray_surface_ratio == 2.7
edbapp.close()

0 comments on commit 569654d

Please sign in to comment.