Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
6262d4b
REFACTOR: EDB configuration example for DCIR setup
gkorompi Nov 28, 2024
f0ad542
Merge branch 'dcir_example'
gkorompi Nov 29, 2024
4b6cb46
Merge remote-tracking branch 'origin/main'
gkorompi Dec 19, 2024
c0fcbf7
Merge remote-tracking branch 'origin/main'
gkorompi Jan 9, 2025
b18af1a
Merge remote-tracking branch 'origin/main'
gkorompi Feb 7, 2025
df932e8
Merge remote-tracking branch 'origin/main'
gkorompi Apr 17, 2025
3fec643
Merge remote-tracking branch 'origin/main'
gkorompi Apr 22, 2025
1d4ed30
Merge remote-tracking branch 'origin/main'
gkorompi Apr 24, 2025
98c3593
Merge remote-tracking branch 'origin/main'
gkorompi May 5, 2025
39cd57f
Merge remote-tracking branch 'origin/main'
gkorompi May 8, 2025
2ff25fd
FIX: path to examples
gkorompi May 14, 2025
55460e7
Merge remote-tracking branch 'origin/main'
gkorompi May 20, 2025
134ef14
Merge remote-tracking branch 'origin/main'
gkorompi May 21, 2025
bea2606
Merge remote-tracking branch 'origin/main'
gkorompi May 22, 2025
d3ebc0f
Merge remote-tracking branch 'origin/main'
gkorompi May 22, 2025
76d8702
Merge remote-tracking branch 'origin/main'
gkorompi Jun 3, 2025
7ddeaea
Merge remote-tracking branch 'origin/main'
gkorompi Jun 26, 2025
cc88377
Merge remote-tracking branch 'origin/main'
gkorompi Jul 3, 2025
dfd558e
Merge remote-tracking branch 'origin/main'
gkorompi Jul 4, 2025
ded61a0
Merge remote-tracking branch 'origin/main'
gkorompi Jul 8, 2025
63d94c3
Merge remote-tracking branch 'origin/main'
gkorompi Jul 24, 2025
e899808
FEAT: import vlc.tech without gds
gkorompi Jul 24, 2025
a37f918
FEAT: import vlc.tech without gds
gkorompi Jul 24, 2025
fbfb3ba
FEATURE:vlctech stackup
gkorompi Jul 24, 2025
fae2648
Merge branch 'main' into import_stackup_from_vlc.tech
gkorompi Jul 24, 2025
56fc446
FEATURE:vlctech stackup
gkorompi Jul 24, 2025
29a2d51
Merge remote-tracking branch 'origin/import_stackup_from_vlc.tech' in…
gkorompi Jul 24, 2025
e688afd
FEAT: vlctech
gkorompi Jul 25, 2025
a92eab5
FEAT: vlctech
gkorompi Jul 25, 2025
c4769d3
Merge branch 'main' into import_stackup_from_vlc.tech
gkorompi Jul 25, 2025
c9b2739
Merge remote-tracking branch 'origin/main'
gkorompi Jul 30, 2025
1c3e529
Merge remote-tracking branch 'origin/main'
gkorompi Aug 5, 2025
dad81e0
Merge remote-tracking branch 'origin/main'
gkorompi Aug 26, 2025
004b475
Merge remote-tracking branch 'origin/main'
gkorompi Sep 4, 2025
a49452f
Merge remote-tracking branch 'origin/main'
gkorompi Sep 8, 2025
faf0149
Merge branch 'main' into import_stackup_from_vlc.tech
gkorompi Sep 10, 2025
e558d27
FIX: vlctech
gkorompi Sep 11, 2025
f84f622
Merge remote-tracking branch 'origin/main'
gkorompi Sep 18, 2025
9c2a64a
Merge remote-tracking branch 'origin/main'
gkorompi Sep 22, 2025
151567d
Merge remote-tracking branch 'origin/main'
gkorompi Sep 23, 2025
4d66b4c
FIX: vlctech fix
gkorompi Oct 17, 2025
4523b89
Merge remote-tracking branch 'origin/main'
gkorompi Oct 17, 2025
106b0bb
FEAT: import vlc.tech without gds
gkorompi Jul 24, 2025
f0cdd38
FEAT: import vlc.tech without gds
gkorompi Jul 24, 2025
9f33ab1
FEATURE:vlctech stackup
gkorompi Jul 24, 2025
c8156d3
FEATURE:vlctech stackup
gkorompi Jul 24, 2025
8875b79
FEAT: vlctech
gkorompi Jul 25, 2025
e4542cf
FEAT: vlctech
gkorompi Jul 25, 2025
600ff2d
FIX: vlctech
gkorompi Sep 11, 2025
4699673
FIX: vlctech fix
gkorompi Oct 17, 2025
1b3ce4d
Merge branch 'main' into import_stackup_from_vlc.tech
gkorompi Oct 17, 2025
98856e1
MISC: Auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 17, 2025
2071b44
Merge remote-tracking branch 'origin/import_stackup_from_vlc.tech' in…
gkorompi Oct 17, 2025
d794168
FIX: vlctech fix
gkorompi Oct 17, 2025
2fc8ee2
FIX: vlctech fix
gkorompi Oct 17, 2025
e13dbee
FIX: vlctech vulnerabilities
gkorompi Oct 20, 2025
696c55b
FEATURE: mode change
gkorompi Oct 24, 2025
9fec9a8
Merge branch 'main' into des
gkorompi Oct 24, 2025
846a838
Update test_edb.py
gkorompi Oct 24, 2025
dcd5c38
chore: adding changelog file 1605.added.md [dependabot-skip]
pyansys-ci-bot Oct 24, 2025
70e7a17
Update test_edb.py
gkorompi Oct 24, 2025
518d344
FEAT: Layout file warnings (#1602)
gkorompi Oct 24, 2025
4971ce3
CI: Adding artifact attestations and fix warnings related to coverage…
ecoussoux-ansys Oct 24, 2025
281b860
REFACTOR: EDB configuration example for DCIR setup
gkorompi Nov 28, 2024
a290138
FEAT: Layout file warnings (#1602)
gkorompi Oct 24, 2025
0ccdc6f
CI: Adding artifact attestations and fix warnings related to coverage…
ecoussoux-ansys Oct 24, 2025
7d484d2
-
gkorompi Oct 25, 2025
2d8cebe
FEATURE: mode change
gkorompi Oct 24, 2025
b414540
Update test_edb.py
gkorompi Oct 24, 2025
93c85a5
chore: adding changelog file 1605.added.md [dependabot-skip]
pyansys-ci-bot Oct 24, 2025
296d820
Update test_edb.py
gkorompi Oct 24, 2025
0569b96
-
gkorompi Oct 25, 2025
c835db6
Merge remote-tracking branch 'origin/des' into des
gkorompi Oct 25, 2025
a180335
MISC: Auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 25, 2025
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
35 changes: 23 additions & 12 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ jobs:
smoke-tests:
name: Build and Smoke tests (${{ matrix.os }} | Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
permissions:
attestations: write
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
Expand All @@ -107,6 +111,7 @@ jobs:
library-name: ${{ env.PACKAGE_NAME }}
operating-system: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
attest-provenance: true

- name: Import python package
shell: bash
Expand Down Expand Up @@ -449,14 +454,14 @@ jobs:
- name: "Create coverage files"
run: |
. .venv/bin/activate
python -m coverage html -d .cov\system-html
python -m coverage xml -o .cov\system.xml
python -m coverage html -d .cov/system-html
python -m coverage xml -o .cov/system.xml

- name: Upload Coverage Results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: .cov\system-html
path: .cov/system-html
name: html-system-linux-coverage-${{ github.job }}-${{ github.run_attempt }}
retention-days: 7

Expand Down Expand Up @@ -524,14 +529,14 @@ jobs:
- name: "Create coverage files"
run: |
. .venv/bin/activate
python -m coverage html -d .cov\system-html
python -m coverage xml -o .cov\system.xml
python -m coverage html -d .cov/system-html
python -m coverage xml -o .cov/system.xml

- name: Upload Coverage Results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: .cov\system-html
path: .cov/system-html
name: html-system-linux-coverage-${{ github.job }}-${{ github.run_attempt }}
retention-days: 7

Expand Down Expand Up @@ -599,14 +604,14 @@ jobs:
- name: "Create coverage files"
run: |
. .venv/bin/activate
python -m coverage html -d .cov\unit-html
python -m coverage xml -o .cov\unit.xml
python -m coverage html -d .cov/unit-html
python -m coverage xml -o .cov/unit.xml

- name: Upload Coverage Results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: .cov\unit-html
path: .cov/unit-html
name: html-unit-linux-coverage-${{ github.job }}-${{ github.run_attempt }}
retention-days: 7

Expand Down Expand Up @@ -674,14 +679,14 @@ jobs:
- name: "Create coverage files"
run: |
. .venv/bin/activate
python -m coverage html -d .cov\unit-html
python -m coverage xml -o .cov\unit.xml
python -m coverage html -d .cov/unit-html
python -m coverage xml -o .cov/unit.xml

- name: Upload Coverage Results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: .cov\unit-html
path: .cov/unit-html
name: html-unit-linux-coverage-${{ github.job }}-${{ github.run_attempt }}
retention-days: 7

Expand Down Expand Up @@ -929,12 +934,17 @@ jobs:
unit-tests-linux-grpc,
docs-build]
runs-on: ubuntu-latest
permissions:
attestations: write
contents: read
id-token: write
steps:
- name: Build library source and wheel artifacts
uses: ansys/actions/build-library@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
attest-provenance: true

release:
name: Release project
Expand Down Expand Up @@ -967,6 +977,7 @@ jobs:
with:
library-name: ${{ env.PACKAGE_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
add-artifact-attestation-notes: true

upload-dev-docs:
name: Upload dev documentation
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/1601.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adding artifact attestations and fix warnings related to coverage upload
1 change: 1 addition & 0 deletions doc/changelog.d/1602.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Layout file warnings
1 change: 1 addition & 0 deletions doc/changelog.d/1605.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Design_mode
179 changes: 179 additions & 0 deletions examples/use_configuration/dcir.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
# 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.

# # DCIR Setup Leveraging EDB Configuration Format

# ## Import the required packages

import json

# +
import os
import tempfile

from ansys.aedt.core import Hfss3dLayout
from ansys.aedt.core.downloads import download_file

from pyedb import Edb

AEDT_VERSION = "2024.2"
NG_MODE = False

# -

# Download the example BGA Package design.

temp_folder = tempfile.TemporaryDirectory(suffix=".ansys")
file_edb = download_file(source=r"edb/BGA_Package.aedb", destination=temp_folder.name)

# ## Load example layout

edbapp = Edb(file_edb, edbversion=AEDT_VERSION)

# ## Create config file

# Define Component with solderballs.

cfg_components = [
{
"reference_designator": "FCHIP",
"part_type": "other",
"solder_ball_properties": {
"shape": "cylinder",
"diameter": "0.1mm",
"height": "0.085mm",
"chip_orientation": "chip_up",
},
"port_properties": {
"reference_offset": 0,
"reference_size_auto": False,
"reference_size_x": 0,
"reference_size_y": 0,
},
},
{
"reference_designator": "BGA",
"part_type": "io",
"solder_ball_properties": {
"shape": "cylinder",
"diameter": "0.45mm",
"height": "0.45mm",
"chip_orientation": "chip_down",
},
"port_properties": {
"reference_offset": 0,
"reference_size_auto": False,
"reference_size_x": 0,
"reference_size_y": 0,
},
},
]

# Define Pin Groups on Components.

cfg_pin_groups = [
{"name": "BGA_VSS", "reference_designator": "BGA", "net": "VSS"},
{"name": "BGA_VDD", "reference_designator": "BGA", "net": "VDD"},
]

# Define sources.

cfg_sources = [
{
"name": "FCHIP_Current",
"reference_designator": "FCHIP",
"type": "current",
"magnitude": 2,
"distributed": True,
"positive_terminal": {"net": "VDD"},
"negative_terminal": {"nearest_pin": {"reference_net": "VSS", "search_radius": 5e-3}},
},
{
"name": "BGA_Voltage",
"reference_designator": "BGA",
"type": "voltage",
"magnitude": 1,
"positive_terminal": {"pin_group": "BGA_VDD"},
"negative_terminal": {"pin_group": "BGA_VSS"},
},
]

# Define DCIR setup.

cfg_setups = [
{
"name": "siwave_dc",
"type": "siwave_dc",
"dc_slider_position": 1,
"dc_ir_settings": {"export_dc_thermal_data": True},
}
]

# Create final configuration.

cfg = {
"components": cfg_components,
"sources": cfg_sources,
"pin_groups": cfg_pin_groups,
"setups": cfg_setups,
}

# Create the config file.

file_json = os.path.join(temp_folder.name, "edb_configuration.json")
with open(file_json, "w") as f:
json.dump(cfg, f, indent=4, ensure_ascii=False)

# ## Apply Config file

# Apply configuration to the example layout

edbapp.configuration.load(config_file=file_json)
edbapp.configuration.run()

# Save and close EDB.

edbapp.save()
edbapp.close()

# The configured EDB file is saved in a temp folder.

print(temp_folder.name)

# ## Load edb into HFSS 3D Layout.

h3d = Hfss3dLayout(edbapp.edbpath, version=AEDT_VERSION, non_graphical=NG_MODE, new_desktop=True)

# Solve.

h3d.analyze(setup="siwave_dc")

# Plot insertion loss.

h3d.post.create_fieldplot_layers_nets(layers_nets=[["VDD_C1", "VDD"]], quantity="Voltage", setup="siwave_dc")

# Shut Down Electronics Desktop

h3d.close_desktop()

# All project files are saved in the folder ``temp_file.dir``. If you've run this example as a Jupyter notebook you
# can retrieve those project files.
10 changes: 7 additions & 3 deletions src/pyedb/dotnet/edb.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,11 +839,15 @@ def import_layout_file(
try:
subprocess.run(cmd_translator, check=True) # nosec
except subprocess.CalledProcessError as e: # nosec
raise RuntimeError("An error occurred while translating board file to ``edb.def`` file") from e
raise RuntimeError(
"An error occurred while translating board file to ``edb.def`` file. Please check the log file."
) from e
if not os.path.exists(os.path.join(working_dir, aedb_name)):
raise RuntimeWarning(f"Translator failed. command : {' '.join(cmd_translator)}")
raise RuntimeWarning(
f"Translation failed. command : {' '.join(cmd_translator)}. Please check the log file."
)
else:
self.logger.info("Translation correctly completed")
self.logger.info("Translation successfully completed")
self.edbpath = os.path.join(working_dir, aedb_name)
return self.open_edb()

Expand Down
Loading
Loading