pyedb 0.60.0__py3-none-any.whl → 0.61.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyedb might be problematic. Click here for more details.
- pyedb/__init__.py +1 -1
- pyedb/configuration/cfg_components.py +35 -7
- pyedb/dotnet/database/cell/hierarchy/component.py +8 -6
- pyedb/dotnet/database/cell/hierarchy/model.py +1 -28
- pyedb/dotnet/database/cell/hierarchy/s_parameter_model.py +10 -14
- pyedb/dotnet/database/cell/hierarchy/spice_model.py +13 -7
- pyedb/dotnet/database/components.py +5 -1
- pyedb/dotnet/database/edb_data/padstacks_data.py +5 -3
- pyedb/dotnet/database/modeler.py +2 -1
- pyedb/dotnet/database/padstack.py +187 -1
- pyedb/dotnet/edb.py +70 -1
- pyedb/generic/general_methods.py +21 -0
- pyedb/grpc/database/definition/materials.py +1 -1
- pyedb/grpc/database/definition/padstack_def.py +16 -9
- pyedb/grpc/database/padstacks.py +201 -6
- pyedb/grpc/database/primitive/padstack_instance.py +90 -0
- pyedb/grpc/edb.py +70 -1
- pyedb/grpc/rpc_session.py +16 -3
- pyedb/workflows/__init__.py +21 -0
- pyedb/workflows/job_manager/__init__.py +21 -0
- pyedb/workflows/job_manager/backend/__init__.py +21 -0
- pyedb/workflows/job_manager/backend/job_manager_handler.py +910 -0
- pyedb/workflows/job_manager/backend/job_submission.py +1169 -0
- pyedb/workflows/job_manager/backend/service.py +1663 -0
- pyedb/workflows/job_manager/backend/start_service.py +86 -0
- pyedb/workflows/job_manager/backend/submit_job_on_scheduler.py +168 -0
- pyedb/workflows/job_manager/backend/submit_local_job.py +166 -0
- pyedb/workflows/utilities/__init__.py +21 -0
- pyedb/workflows/utilities/cutout.py +1 -1
- pyedb/workflows/utilities/hfss_log_parser.py +446 -0
- {pyedb-0.60.0.dist-info → pyedb-0.61.0.dist-info}/METADATA +7 -4
- {pyedb-0.60.0.dist-info → pyedb-0.61.0.dist-info}/RECORD +34 -24
- {pyedb-0.60.0.dist-info → pyedb-0.61.0.dist-info}/WHEEL +0 -0
- {pyedb-0.60.0.dist-info → pyedb-0.61.0.dist-info}/licenses/LICENSE +0 -0
pyedb/grpc/database/padstacks.py
CHANGED
|
@@ -346,6 +346,188 @@ class Padstacks(object):
|
|
|
346
346
|
"""Return a PadType Enumerator."""
|
|
347
347
|
return GrpcPadType
|
|
348
348
|
|
|
349
|
+
def create_dielectric_filled_backdrills(
|
|
350
|
+
self,
|
|
351
|
+
layer: str,
|
|
352
|
+
diameter: Union[float, str],
|
|
353
|
+
material: str,
|
|
354
|
+
permittivity: float,
|
|
355
|
+
padstack_instances: Optional[List[PadstackInstance]] = None,
|
|
356
|
+
padstack_definition: Optional[Union[str, List[str]]] = None,
|
|
357
|
+
dielectric_loss_tangent: Optional[float] = None,
|
|
358
|
+
nets: Optional[Union[str, List[str]]] = None,
|
|
359
|
+
) -> bool:
|
|
360
|
+
r"""Create dielectric-filled back-drills for through-hole vias.
|
|
361
|
+
|
|
362
|
+
Back-drilling (a.k.a. controlled-depth drilling) is used to remove the
|
|
363
|
+
unused via stub that acts as an unterminated transmission-line segment,
|
|
364
|
+
thereby improving signal-integrity at high frequencies. This routine
|
|
365
|
+
goes one step further: after the stub is removed the resulting cylindrical
|
|
366
|
+
cavity is **completely filled** with a user-specified dielectric. The
|
|
367
|
+
fill material restores mechanical rigidity, prevents solder-wicking, and
|
|
368
|
+
keeps the original via’s electrical characteristics intact on the
|
|
369
|
+
remaining, still-plated, portion.
|
|
370
|
+
|
|
371
|
+
Selection criteria
|
|
372
|
+
------------------
|
|
373
|
+
A via is processed only when **all** of the following are true:
|
|
374
|
+
|
|
375
|
+
1. It is a through-hole structure (spans at least three metal layers).
|
|
376
|
+
2. It includes the requested ``layer`` somewhere in its layer span.
|
|
377
|
+
3. It belongs to one of the supplied ``padstack_definition`` names
|
|
378
|
+
(or to *any* definition if the argument is omitted).
|
|
379
|
+
4. It is attached to one of the supplied ``nets`` (or to *any* net if
|
|
380
|
+
the argument is omitted).
|
|
381
|
+
|
|
382
|
+
Geometry that is created
|
|
383
|
+
------------------------
|
|
384
|
+
For every qualified via the routine
|
|
385
|
+
|
|
386
|
+
* Generates a new pad-stack definition named ``<original_name>_BD``.
|
|
387
|
+
The definition is drilled from the **bottom-most signal layer** up to
|
|
388
|
+
and **including** ``layer``, uses the exact ``diameter`` supplied, and
|
|
389
|
+
is plated at 100 %.
|
|
390
|
+
* Places an additional pad-stack instance on top of the original via,
|
|
391
|
+
thereby filling the newly drilled cavity with the requested
|
|
392
|
+
``material``.
|
|
393
|
+
* Leaves the original via untouched—only its unused stub is removed.
|
|
394
|
+
|
|
395
|
+
The back-drill is **not** subtracted from anti-pads or plane clearances;
|
|
396
|
+
the filling material is assumed to be electrically invisible at the
|
|
397
|
+
frequencies of interest.
|
|
398
|
+
|
|
399
|
+
Parameters
|
|
400
|
+
----------
|
|
401
|
+
layer : :class:`str`
|
|
402
|
+
Signal layer name up to which the back-drill is performed (inclusive).
|
|
403
|
+
The drill always starts on the bottom-most signal layer of the stack-up.
|
|
404
|
+
diameter : :class:`float` or :class:`str`
|
|
405
|
+
Finished hole diameter for the back-drill. A numeric value is
|
|
406
|
+
interpreted in the database length unit; a string such as
|
|
407
|
+
``"0.3mm"`` is evaluated with units.
|
|
408
|
+
material : :class:`str`
|
|
409
|
+
Name of the dielectric material that fills the drilled cavity. If the
|
|
410
|
+
material does not yet exist in the central material library it is
|
|
411
|
+
created on the fly.
|
|
412
|
+
permittivity : :class:`float`
|
|
413
|
+
Relative permittivity :math:`\varepsilon_{\mathrm{r}}` used when the
|
|
414
|
+
material has to be created. Must be positive.
|
|
415
|
+
padstack_instances : :class:`list` [:class:`PadstackInstance` ], optional
|
|
416
|
+
Explicit list of via instances to process. When provided,
|
|
417
|
+
``padstack_definition`` and ``nets`` are ignored for filtering.
|
|
418
|
+
padstack_definition : :class:`str` or :class:`list` [:class:`str` ], optional
|
|
419
|
+
Pad-stack definition(s) to process. If omitted, **all** through-hole
|
|
420
|
+
definitions are considered.
|
|
421
|
+
dielectric_loss_tangent : :class:`float`, optional
|
|
422
|
+
Loss tangent :math:`\tan\delta` used when the material has to be
|
|
423
|
+
created. Defaults to ``0.0``.
|
|
424
|
+
nets : :class:`str` or :class:`list` [:class:`str` ], optional
|
|
425
|
+
Net name(s) used to filter vias. If omitted, vias belonging to
|
|
426
|
+
**any** net are processed.
|
|
427
|
+
|
|
428
|
+
Returns
|
|
429
|
+
-------
|
|
430
|
+
:class:`bool`
|
|
431
|
+
``True`` when at least one back-drill was successfully created.
|
|
432
|
+
``False`` if no suitable via was found or any error occurred.
|
|
433
|
+
|
|
434
|
+
Raises
|
|
435
|
+
------
|
|
436
|
+
ValueError
|
|
437
|
+
If ``material`` is empty or if ``permittivity`` is non-positive when a
|
|
438
|
+
new material must be created.
|
|
439
|
+
|
|
440
|
+
Notes
|
|
441
|
+
-----
|
|
442
|
+
* The routine is safe to call repeatedly: existing back-drills are **not**
|
|
443
|
+
duplicated because the ``*_BD`` definition name is deterministic.
|
|
444
|
+
* The original via keeps its pad-stack definition and net assignment; only
|
|
445
|
+
its unused stub is removed.
|
|
446
|
+
* The back-drill is **not** subtracted from anti-pads or plane clearances;
|
|
447
|
+
the filling material is assumed to be electrically invisible at the
|
|
448
|
+
frequencies of interest.
|
|
449
|
+
|
|
450
|
+
Examples
|
|
451
|
+
--------
|
|
452
|
+
Create back-drills on all vias belonging to two specific pad-stack
|
|
453
|
+
definitions and two DDR4 nets:
|
|
454
|
+
|
|
455
|
+
>>> edb.padstacks.create_dielectric_filled_backdrills(
|
|
456
|
+
... layer="L3",
|
|
457
|
+
... diameter="0.25mm",
|
|
458
|
+
... material="EPON_827",
|
|
459
|
+
... permittivity=3.8,
|
|
460
|
+
... dielectric_loss_tangent=0.015,
|
|
461
|
+
... padstack_definition=["VIA_10MIL", "VIA_16MIL"],
|
|
462
|
+
... nets=["DDR4_DQ0", "DDR4_DQ1"],
|
|
463
|
+
... )
|
|
464
|
+
True
|
|
465
|
+
"""
|
|
466
|
+
_padstack_instances = defaultdict(list)
|
|
467
|
+
if padstack_instances:
|
|
468
|
+
for inst in padstack_instances:
|
|
469
|
+
_padstack_instances[inst.padstack_def.name].append(inst)
|
|
470
|
+
else:
|
|
471
|
+
if padstack_definition:
|
|
472
|
+
if isinstance(padstack_definition, str):
|
|
473
|
+
padstack_definition = [padstack_definition]
|
|
474
|
+
padstack_definitions = [
|
|
475
|
+
self.definitions.get(padstack_def, None) for padstack_def in padstack_definition
|
|
476
|
+
]
|
|
477
|
+
if nets:
|
|
478
|
+
if isinstance(nets, str):
|
|
479
|
+
nets = [nets]
|
|
480
|
+
for padstack_definition in padstack_definitions:
|
|
481
|
+
_padstack_instances[padstack_definition.name] = self.get_instances(
|
|
482
|
+
definition_name=padstack_definition.name, net_name=nets
|
|
483
|
+
)
|
|
484
|
+
else:
|
|
485
|
+
for padstack_definition in padstack_definitions:
|
|
486
|
+
_padstack_instances[padstack_definition.name] = padstack_definition.instances
|
|
487
|
+
elif nets:
|
|
488
|
+
instances = self.get_instances(net_name=nets)
|
|
489
|
+
for inst in instances:
|
|
490
|
+
padsatck_def_name = inst.padstack_def.name
|
|
491
|
+
padstack_def_layers = inst.padstack_def.data.layer_names
|
|
492
|
+
if layer in padstack_def_layers and len(padstack_def_layers) >= 3:
|
|
493
|
+
_padstack_instances[padsatck_def_name].append(inst)
|
|
494
|
+
else:
|
|
495
|
+
self._pedb.logger.info(
|
|
496
|
+
f"Drill layer {layer} not in padstack definition layers "
|
|
497
|
+
f"or layer number = {len(padstack_def_layers)} "
|
|
498
|
+
f"for padstack definition {padsatck_def_name}, skipping for backdrills"
|
|
499
|
+
)
|
|
500
|
+
if not material:
|
|
501
|
+
raise ValueError("`material` must be specified")
|
|
502
|
+
if not material in self._pedb.materials:
|
|
503
|
+
if not dielectric_loss_tangent:
|
|
504
|
+
dielectric_loss_tangent = 0.0
|
|
505
|
+
self._pedb.materials.add_dielectric_material(
|
|
506
|
+
name=material, permittivity=permittivity, dielectric_loss_tangent=dielectric_loss_tangent
|
|
507
|
+
)
|
|
508
|
+
for def_name, instances in _padstack_instances.items():
|
|
509
|
+
padstack_def_backdrill_name = f"{def_name}_BD"
|
|
510
|
+
start_layer = list(self._pedb.stackup.signal_layers.keys())[-1] # bottom layer
|
|
511
|
+
self.create(
|
|
512
|
+
padstackname=padstack_def_backdrill_name,
|
|
513
|
+
holediam=self._pedb.value(diameter),
|
|
514
|
+
paddiam="0.0",
|
|
515
|
+
antipaddiam="0.0",
|
|
516
|
+
start_layer=start_layer,
|
|
517
|
+
stop_layer=layer,
|
|
518
|
+
)
|
|
519
|
+
self.definitions[padstack_def_backdrill_name].material = material
|
|
520
|
+
self.definitions[padstack_def_backdrill_name].hole_plating_ratio = 100.0
|
|
521
|
+
for inst in instances:
|
|
522
|
+
inst.set_back_drill_by_layer(drill_to_layer=layer, offset=0.0, diameter=self._pedb.value(diameter))
|
|
523
|
+
self.place(
|
|
524
|
+
position=inst.position,
|
|
525
|
+
definition_name=padstack_def_backdrill_name,
|
|
526
|
+
fromlayer=start_layer,
|
|
527
|
+
tolayer=layer,
|
|
528
|
+
)
|
|
529
|
+
return True
|
|
530
|
+
|
|
349
531
|
def create_circular_padstack(
|
|
350
532
|
self,
|
|
351
533
|
padstackname: Optional[str] = None,
|
|
@@ -810,6 +992,23 @@ class Padstacks(object):
|
|
|
810
992
|
via_list.append(inst)
|
|
811
993
|
return via_list
|
|
812
994
|
|
|
995
|
+
def layers_between(self, layers, start_layer=None, stop_layer=None):
|
|
996
|
+
"""
|
|
997
|
+
Return the sub-list of *layers* that lies between *start_layer*
|
|
998
|
+
(inclusive) and *stop_layer* (inclusive). Works no matter which
|
|
999
|
+
of the two is nearer the top of the stack.
|
|
1000
|
+
"""
|
|
1001
|
+
if not layers:
|
|
1002
|
+
return []
|
|
1003
|
+
|
|
1004
|
+
# default to the full stack if one end is unspecified
|
|
1005
|
+
start_idx = layers.index(start_layer) if start_layer in layers else 0
|
|
1006
|
+
stop_idx = layers.index(stop_layer) if stop_layer in layers else len(layers) - 1
|
|
1007
|
+
|
|
1008
|
+
# always slice from the smaller to the larger index
|
|
1009
|
+
lo, hi = sorted((start_idx, stop_idx))
|
|
1010
|
+
return layers[lo : hi + 1]
|
|
1011
|
+
|
|
813
1012
|
def create(
|
|
814
1013
|
self,
|
|
815
1014
|
padstackname: Optional[str] = None,
|
|
@@ -951,11 +1150,7 @@ class Padstacks(object):
|
|
|
951
1150
|
else: # pragma no cover
|
|
952
1151
|
self._logger.error("Unknown padstack hole range")
|
|
953
1152
|
padstack_data.material = "copper"
|
|
954
|
-
|
|
955
|
-
if start_layer and start_layer in layers: # pragma no cover
|
|
956
|
-
layers = layers[layers.index(start_layer) :]
|
|
957
|
-
if stop_layer and stop_layer in layers: # pragma no cover
|
|
958
|
-
layers = layers[: layers.index(stop_layer) + 1]
|
|
1153
|
+
layers = self.layers_between(layers=layers, start_layer=start_layer, stop_layer=stop_layer)
|
|
959
1154
|
if not isinstance(paddiam, list):
|
|
960
1155
|
pad_array = [paddiam]
|
|
961
1156
|
else:
|
|
@@ -1315,7 +1510,7 @@ class Padstacks(object):
|
|
|
1315
1510
|
name: Optional[str] = None,
|
|
1316
1511
|
pid: Optional[int] = None,
|
|
1317
1512
|
definition_name: Optional[str] = None,
|
|
1318
|
-
net_name: Optional[str] = None,
|
|
1513
|
+
net_name: Optional[Union[str, List[str]]] = None,
|
|
1319
1514
|
component_reference_designator: Optional[str] = None,
|
|
1320
1515
|
component_pin: Optional[str] = None,
|
|
1321
1516
|
) -> List[PadstackInstance]:
|
|
@@ -728,6 +728,96 @@ class PadstackInstance(GrpcPadstackInstance):
|
|
|
728
728
|
except:
|
|
729
729
|
return False
|
|
730
730
|
|
|
731
|
+
@property
|
|
732
|
+
def backdrill_diameter(self):
|
|
733
|
+
parameters = []
|
|
734
|
+
if self.backdrill_bottom:
|
|
735
|
+
parameters = self.get_back_drill_by_layer(True)
|
|
736
|
+
elif self.backdrill_top:
|
|
737
|
+
parameters = self.get_back_drill_by_layer(False)
|
|
738
|
+
if parameters:
|
|
739
|
+
return round(parameters[-1].value, 9)
|
|
740
|
+
return 0.0
|
|
741
|
+
|
|
742
|
+
@backdrill_diameter.setter
|
|
743
|
+
def backdrill_diameter(self, value):
|
|
744
|
+
if self.backdrill_bottom:
|
|
745
|
+
parameters = self.get_back_drill_by_layer(True)
|
|
746
|
+
self.set_back_drill_by_layer(
|
|
747
|
+
drill_to_layer=parameters[0],
|
|
748
|
+
offset=parameters[1],
|
|
749
|
+
diameter=self._pedb.value(value),
|
|
750
|
+
from_bottom=True,
|
|
751
|
+
)
|
|
752
|
+
elif self.backdrill_top:
|
|
753
|
+
parameters = self.get_back_drill_by_layer(False)
|
|
754
|
+
self.set_back_drill_by_layer(
|
|
755
|
+
drill_to_layer=parameters[0],
|
|
756
|
+
offset=parameters[1],
|
|
757
|
+
diameter=Value(value),
|
|
758
|
+
from_bottom=False,
|
|
759
|
+
)
|
|
760
|
+
|
|
761
|
+
@property
|
|
762
|
+
def backdrill_layer(self):
|
|
763
|
+
parameters = []
|
|
764
|
+
if self.backdrill_bottom:
|
|
765
|
+
parameters = self.get_back_drill_by_layer(True)
|
|
766
|
+
elif self.backdrill_top:
|
|
767
|
+
parameters = self.get_back_drill_by_layer(False)
|
|
768
|
+
if parameters:
|
|
769
|
+
return parameters[0]
|
|
770
|
+
return ""
|
|
771
|
+
|
|
772
|
+
@backdrill_layer.setter
|
|
773
|
+
def backdrill_layer(self, value):
|
|
774
|
+
if self.backdrill_bottom:
|
|
775
|
+
parameters = self.get_back_drill_by_layer(True)
|
|
776
|
+
self.set_back_drill_by_layer(
|
|
777
|
+
drill_to_layer=self._pedb.stackup.layers[value],
|
|
778
|
+
offset=parameters[1],
|
|
779
|
+
diameter=parameters[2],
|
|
780
|
+
from_bottom=True,
|
|
781
|
+
)
|
|
782
|
+
elif self.backdrill_top:
|
|
783
|
+
parameters = self.get_back_drill_by_layer(False)
|
|
784
|
+
self.set_back_drill_by_layer(
|
|
785
|
+
drill_to_layer=value,
|
|
786
|
+
offset=parameters[1],
|
|
787
|
+
diameter=parameters[2],
|
|
788
|
+
from_bottom=False,
|
|
789
|
+
)
|
|
790
|
+
|
|
791
|
+
@property
|
|
792
|
+
def backdrill_offset(self):
|
|
793
|
+
parameters = []
|
|
794
|
+
if self.backdrill_bottom:
|
|
795
|
+
parameters = self.get_back_drill_by_layer(True)
|
|
796
|
+
elif self.backdrill_top:
|
|
797
|
+
parameters = self.get_back_drill_by_layer(False)
|
|
798
|
+
if parameters:
|
|
799
|
+
return parameters[1].value
|
|
800
|
+
return 0.0
|
|
801
|
+
|
|
802
|
+
@backdrill_offset.setter
|
|
803
|
+
def backdrill_offset(self, value):
|
|
804
|
+
if self.backdrill_bottom:
|
|
805
|
+
parameters = self.get_back_drill_by_layer(True)
|
|
806
|
+
self.set_back_drill_by_layer(
|
|
807
|
+
drill_to_layer=parameters[0],
|
|
808
|
+
offset=Value(value),
|
|
809
|
+
diameter=parameters[2],
|
|
810
|
+
from_bottom=True,
|
|
811
|
+
)
|
|
812
|
+
elif self.backdrill_top:
|
|
813
|
+
parameters = self.get_back_drill_by_layer(False)
|
|
814
|
+
self.set_back_drill_by_layer(
|
|
815
|
+
drill_to_layer=parameters[0],
|
|
816
|
+
offset=Value(value),
|
|
817
|
+
diameter=parameters[2],
|
|
818
|
+
from_bottom=False,
|
|
819
|
+
)
|
|
820
|
+
|
|
731
821
|
@property
|
|
732
822
|
def metal_volume(self) -> float:
|
|
733
823
|
"""Metal volume of the via hole instance in cubic units (m3). Metal plating ratio is accounted.
|
pyedb/grpc/edb.py
CHANGED
|
@@ -135,6 +135,7 @@ from pyedb.ipc2581.ipc2581 import Ipc2581
|
|
|
135
135
|
from pyedb.misc.decorators import deprecate_argument_name
|
|
136
136
|
from pyedb.modeler.geometry_operators import GeometryOperators
|
|
137
137
|
from pyedb.workflow import Workflow
|
|
138
|
+
from pyedb.workflows.job_manager.backend.job_manager_handler import JobManagerHandler
|
|
138
139
|
from pyedb.workflows.utilities.cutout import Cutout
|
|
139
140
|
|
|
140
141
|
os.environ["no_proxy"] = "localhost,127.0.0.1"
|
|
@@ -430,6 +431,7 @@ class Edb(EdbInit):
|
|
|
430
431
|
self._source_excitation = SourceExcitation(self)
|
|
431
432
|
self._differential_pairs = DifferentialPairs(self)
|
|
432
433
|
self._extended_nets = ExtendedNets(self)
|
|
434
|
+
self._job_manager = JobManagerHandler(self)
|
|
433
435
|
|
|
434
436
|
def value(self, val) -> float:
|
|
435
437
|
"""Convert a value into a pyedb value."""
|
|
@@ -439,6 +441,17 @@ class Edb(EdbInit):
|
|
|
439
441
|
context = self.active_cell if not str(val).startswith("$") else self.active_db
|
|
440
442
|
return Value(GrpcValue(val, context), context)
|
|
441
443
|
|
|
444
|
+
@property
|
|
445
|
+
def job_manager(self):
|
|
446
|
+
"""Job manager for handling simulation tasks.
|
|
447
|
+
|
|
448
|
+
Returns
|
|
449
|
+
-------
|
|
450
|
+
:class:`JobManagerHandler <pyedb.workflows.job_manager.job_manager_handler.JobManagerHandler>`
|
|
451
|
+
Job manager instance for submitting and managing simulation jobs.
|
|
452
|
+
"""
|
|
453
|
+
return self._job_manager
|
|
454
|
+
|
|
442
455
|
@property
|
|
443
456
|
def cell_names(self) -> List[str]:
|
|
444
457
|
"""List of all cell names in the database.
|
|
@@ -872,6 +885,62 @@ class Edb(EdbInit):
|
|
|
872
885
|
self.edbpath = os.path.join(working_dir, aedb_name)
|
|
873
886
|
return self.open_edb()
|
|
874
887
|
|
|
888
|
+
def import_vlctech_stackup(
|
|
889
|
+
self,
|
|
890
|
+
vlctech_file,
|
|
891
|
+
working_dir="",
|
|
892
|
+
export_xml=None,
|
|
893
|
+
):
|
|
894
|
+
"""Import a vlc.tech file and generate an ``edb.def`` file in the working directory containing only the stackup.
|
|
895
|
+
|
|
896
|
+
Parameters
|
|
897
|
+
----------
|
|
898
|
+
vlctech_file : str
|
|
899
|
+
Full path to the technology stackup file. It must be vlc.tech.
|
|
900
|
+
working_dir : str, optional
|
|
901
|
+
Directory in which to create the ``aedb`` folder. The name given to the AEDB file
|
|
902
|
+
is the same as the name of the board file.
|
|
903
|
+
export_xml : str, optional
|
|
904
|
+
Export technology file in XML control file format.
|
|
905
|
+
|
|
906
|
+
Returns
|
|
907
|
+
-------
|
|
908
|
+
Full path to the AEDB file : str
|
|
909
|
+
|
|
910
|
+
"""
|
|
911
|
+
if not working_dir:
|
|
912
|
+
working_dir = os.path.dirname(vlctech_file)
|
|
913
|
+
command = os.path.join(self.base_path, "helic", "tools", "raptorh", "bin", "make-edb")
|
|
914
|
+
if is_windows:
|
|
915
|
+
command += ".exe"
|
|
916
|
+
else:
|
|
917
|
+
os.environ["HELIC_ROOT"] = os.path.join(self.base_path, "helic")
|
|
918
|
+
cmd_make_edb = [
|
|
919
|
+
command,
|
|
920
|
+
"-t",
|
|
921
|
+
"{}".format(vlctech_file),
|
|
922
|
+
"-o",
|
|
923
|
+
"{}".format(os.path.join(working_dir, "vlctech")),
|
|
924
|
+
]
|
|
925
|
+
if export_xml:
|
|
926
|
+
cmd_make_edb.extend(["-x", "{}".format(export_xml)])
|
|
927
|
+
|
|
928
|
+
try:
|
|
929
|
+
subprocess.run(cmd_make_edb, check=True) # nosec
|
|
930
|
+
except subprocess.CalledProcessError as e: # nosec
|
|
931
|
+
raise RuntimeError(
|
|
932
|
+
"Failed to create edb. Please check if the executable is present in the base path."
|
|
933
|
+
) from e
|
|
934
|
+
|
|
935
|
+
if not os.path.exists(os.path.join(working_dir, "vlctech.aedb")):
|
|
936
|
+
self.logger.error("Failed to create edb. Please check if the executable is present in the base path.")
|
|
937
|
+
return False
|
|
938
|
+
else:
|
|
939
|
+
self.logger.info("edb successfully created.")
|
|
940
|
+
self.edbpath = os.path.join(working_dir, "vlctech.aedb")
|
|
941
|
+
self.open()
|
|
942
|
+
return self.edbpath
|
|
943
|
+
|
|
875
944
|
def export_to_ipc2581(self, ipc_path=None, units="MILLIMETER") -> str:
|
|
876
945
|
"""Export design to IPC2581 format.
|
|
877
946
|
|
|
@@ -3127,7 +3196,7 @@ class Edb(EdbInit):
|
|
|
3127
3196
|
except subprocess.CalledProcessError as e: # nosec
|
|
3128
3197
|
raise RuntimeError(
|
|
3129
3198
|
"EDBDiff.exe execution failed. Please check if the executable is present in the base path."
|
|
3130
|
-
)
|
|
3199
|
+
) from e
|
|
3131
3200
|
|
|
3132
3201
|
if not os.path.exists(os.path.join(results, "EDBDiff.csv")):
|
|
3133
3202
|
self.logger.error("Comparison execution failed")
|
pyedb/grpc/rpc_session.py
CHANGED
|
@@ -150,11 +150,24 @@ class RpcSession:
|
|
|
150
150
|
|
|
151
151
|
@staticmethod
|
|
152
152
|
def kill_all_instances():
|
|
153
|
-
|
|
153
|
+
# collect PIDs safely
|
|
154
|
+
proc = []
|
|
155
|
+
for p in psutil.process_iter(["pid", "name"]):
|
|
156
|
+
try:
|
|
157
|
+
if "edb_rpc" in p.info["name"].lower():
|
|
158
|
+
proc.append(p.info["pid"])
|
|
159
|
+
except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
|
|
160
|
+
continue
|
|
161
|
+
|
|
154
162
|
time.sleep(latency_delay)
|
|
163
|
+
|
|
164
|
+
# terminate gracefully
|
|
155
165
|
for pid in proc:
|
|
156
|
-
|
|
157
|
-
|
|
166
|
+
try:
|
|
167
|
+
p = psutil.Process(pid)
|
|
168
|
+
p.terminate()
|
|
169
|
+
except (psutil.NoSuchProcess, psutil.AccessDenied):
|
|
170
|
+
continue
|
|
158
171
|
|
|
159
172
|
@staticmethod
|
|
160
173
|
def close():
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|