|
1 | | -# # Parametric differential vias |
| 1 | +# # Coplanar Waveguide with Via Array |
2 | 2 | # |
3 | | -# This example demonstrates how a differential via pair can be created using the EDB Python |
| 3 | +# This example demonstrates how a coplanar waveguide with via array can be created using the EDB Python |
4 | 4 | # interface. |
5 | 5 | # |
6 | | -# The final differential via pair is shown below. |
| 6 | +# <img src="_static/cpw_via_array.png" width="500"> |
7 | 7 | # |
8 | | -# <img src="_static/diff_via.png" width="500"> |
9 | | -# |
10 | | -# Keywords: **Differential Via** |
| 8 | +# Keywords: **coplanar waveguide, via array** |
11 | 9 |
|
12 | 10 |
|
13 | 11 | # ## Prerequisites |
|
29 | 27 | # ### Start the EDB |
30 | 28 |
|
31 | 29 | # + |
32 | | -aedb_path = os.path.join(temp_folder.name, "diff_via.aedb") |
| 30 | +aedb_path = os.path.join(temp_folder.name, "cpw_via_array.aedb") |
33 | 31 | print(f"AEDB file path: {aedb_path}") |
34 | 32 |
|
35 | 33 | edb = pyedb.Edb(edbpath=aedb_path, edbversion=AEDT_VERSION) |
|
43 | 41 | # [configuration file](https://examples.aedt.docs.pyansys.com/version/dev/examples/edb/use_configuration/import_stackup.html). |
44 | 42 |
|
45 | 43 | edb.stackup.add_layer("GND") |
46 | | -edb.stackup.add_layer("Diel", "GND", layer_type="dielectric", thickness="0.1mm", material="FR4_epoxy") |
| 44 | +edb.stackup.add_layer("Diel", "GND", layer_type="dielectric", thickness="0.5mm", material="FR4_epoxy") |
47 | 45 | edb.stackup.add_layer("TOP", "Diel", thickness="0.05mm") |
48 | 46 |
|
49 | 47 | # ### Create signal nets and ground planes |
50 | 48 | # Create a signal net and ground planes. |
51 | 49 |
|
52 | 50 | points = [[0.0, 0], [100e-3, 0.0]] |
53 | | -edb.modeler.create_trace(points, "TOP", width=1e-3) |
| 51 | +trace = edb.modeler.create_trace(points, "TOP", width=1e-3,end_cap_style="Flat",start_cap_style="Flat") |
54 | 52 | points = [[0.0, 1e-3], [0.0, 10e-3], [100e-3, 10e-3], [100e-3, 1e-3], [0.0, 1e-3]] |
55 | | -edb.modeler.create_polygon(points, "GND") |
| 53 | +edb.modeler.create_polygon(points, "TOP") |
56 | 54 | points = [[0.0, -1e-3], [0.0, -10e-3], [100e-3, -10e-3], [100e-3, -1e-3], [0.0, -1e-3]] |
| 55 | +edb.modeler.create_polygon(points, "TOP") |
| 56 | +points = [[0.0, -10e-3], [0, 10e-3], [100e-3, 10e-3], [100e-3, -10e-3]] |
57 | 57 | edb.modeler.create_polygon(points, "GND") |
58 | 58 |
|
| 59 | +# ## Create wave ports on the main trace's ends. |
| 60 | + |
| 61 | +edb.hfss.create_wave_port(prim_id = trace.id,point_on_edge = ["-10mm","10mm"],port_name="wport1") |
| 62 | + |
| 63 | +edb.hfss.create_wave_port(prim_id = trace.id,point_on_edge = ["100mm","0mm"],port_name="wport2") |
59 | 64 |
|
60 | 65 | # ## Place vias |
61 | 66 |
|
62 | 67 | edb.padstacks.create("MyVia") |
63 | 68 | edb.padstacks.place([5e-3, 5e-3], "MyVia") |
64 | 69 | edb.padstacks.place([15e-3, 5e-3], "MyVia") |
| 70 | +edb.padstacks.place([25e-3, 5e-3], "MyVia") |
65 | 71 | edb.padstacks.place([35e-3, 5e-3], "MyVia") |
66 | 72 | edb.padstacks.place([45e-3, 5e-3], "MyVia") |
| 73 | +edb.padstacks.place([55e-3, 5e-3], "MyVia") |
| 74 | +edb.padstacks.place([65e-3, 5e-3], "MyVia") |
| 75 | +edb.padstacks.place([75e-3, 5e-3], "MyVia") |
| 76 | +edb.padstacks.place([85e-3, 5e-3], "MyVia") |
| 77 | +edb.padstacks.place([95e-3, 5e-3], "MyVia") |
67 | 78 | edb.padstacks.place([5e-3, -5e-3], "MyVia") |
68 | 79 | edb.padstacks.place([15e-3, -5e-3], "MyVia") |
| 80 | +edb.padstacks.place([25e-3, -5e-3], "MyVia") |
69 | 81 | edb.padstacks.place([35e-3, -5e-3], "MyVia") |
70 | 82 | edb.padstacks.place([45e-3, -5e-3], "MyVia") |
| 83 | +edb.padstacks.place([55e-3, -5e-3], "MyVia") |
| 84 | +edb.padstacks.place([65e-3, -5e-3], "MyVia") |
| 85 | +edb.padstacks.place([75e-3, -5e-3], "MyVia") |
| 86 | +edb.padstacks.place([85e-3, -5e-3], "MyVia") |
| 87 | +edb.padstacks.place([95e-3, -5e-3], "MyVia") |
| 88 | + |
| 89 | +# ### Create simulation setup |
| 90 | + |
| 91 | +setup = edb.create_hfss_setup(name= "Setup1") |
| 92 | +setup.set_solution_single_frequency("1GHz", max_num_passes=1, max_delta_s="0.02") |
| 93 | +setup.add_sweep(name="Sweep1") |
71 | 94 |
|
72 | 95 |
|
73 | 96 | # ### View the nets |
|
0 commit comments