Skip to content

Commit

Permalink
DOC: update development documentation 555b67b
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenb-dev committed Apr 25, 2024
0 parents commit a768454
Show file tree
Hide file tree
Showing 22,630 changed files with 8,502,058 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
edb.docs.pyansys.com
10 changes: 10 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Redirecting to https://edb.docs.pyansys.com/version/stable/</title>
<meta name="description" content="">
<meta http-equiv="refresh" content="0; URL=https://edb.docs.pyansys.com/version/stable/">
<link rel="canonical" href="https://edb.docs.pyansys.com/version/stable/">
</head>
</html>
6,321 changes: 6,321 additions & 0 deletions sitemap.xml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions version/0.1/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: eeaf8aac981eed09b6f2c6deca652f1e
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
"""
EDB: post-layout parameterization
---------------------------------
This example shows you how to parameterize the signal net in post-layout.
"""

###############################################################################
# Define input parameters
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal_net_name = "DDR4_ALERT3"
coplanar_plane_net_name = "1V0" # Specify coplanar plane net name for adding clearance
layers = ["16_Bottom"] # Specify layers to be parameterized

###############################################################################
# Perform required imports
# ~~~~~~~~~~~~~~~~~~~~~~~~
import os

import pyedb
from pyedb.generic.general_methods import (
generate_unique_folder_name,
generate_unique_name,
)
from pyedb.misc.downloads import download_file

temppath = generate_unique_folder_name()

###############################################################################
# Download and open example layout file in edb format
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
edb_fpath = download_file("edb/ANSYS-HSD_V1.aedb", destination=temppath)
appedb = pyedb.Edb(edb_fpath, edbversion="2023.2")

###############################################################################
# Cutout
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
appedb.cutout([signal_net_name], [coplanar_plane_net_name, "GND"], remove_single_pin_components=True)

###############################################################################
# Get all trace segments from the signal net
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net = appedb.nets[signal_net_name]
trace_segments = []
for p in net.primitives:
if p.layer_name not in layers:
continue
if not p.type == "Path":
continue
trace_segments.append(p)

###############################################################################
# Create and assign delta w variable per layer
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
for p in trace_segments:
vname = f"{p.net_name}_{p.layer_name}_dw"
if vname not in appedb.variables:
appedb[vname] = "0mm"
new_w = f"{p.width}+{vname}"
p.width = new_w

###############################################################################
# Delete existing clearance
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
for p in trace_segments:
for g in appedb.modeler.get_polygons_by_layer(p.layer_name, coplanar_plane_net_name):
for v in g.voids:
if p.is_intersecting(v):
v.delete()

###############################################################################
# Create and assign clearance variable per layer
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
for p in trace_segments:
clr = f"{p.net_name}_{p.layer_name}_clr"
if clr not in appedb.variables:
appedb[clr] = "0.5mm"
path = p.get_center_line()
for g in appedb.modeler.get_polygons_by_layer(p.layer_name, coplanar_plane_net_name):
void = appedb.modeler.create_trace(path, p.layer_name, f"{p.width}+{clr}*2")
g.add_void(void)

###############################################################################
# Plot
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
appedb.nets.plot(layers=layers[0], size=2000)

###############################################################################
# Save and close Edb
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

save_edb_fpath = os.path.join(temppath, generate_unique_name("post_layout_parameterization") + ".aedb")
appedb.save_edb_as(save_edb_fpath)
print("Edb is saved to ", save_edb_fpath)
appedb.close_edb()
Loading

0 comments on commit a768454

Please sign in to comment.