HFSSAutoConfiguration#
- class pyedb.workflows.sipi.hfss_auto_configuration.HFSSAutoConfiguration(edb=None)#
Overview#
Automatically create and populate |
|
Append a new BatchGroup to the configuration. |
|
Append a new |
|
Create a: class:.SimulationSetup instance and attach it to the configuration. |
|
Group signal nets into disjoint batches while preserving differential pairs. |
|
Import detail#
from pyedb.workflows.sipi.hfss_auto_configuration import HFSSAutoConfiguration
Attribute detail#
- HFSSAutoConfiguration.batch_groups: list[BatchGroup] = []#
- HFSSAutoConfiguration.solder_balls: list[SolderBallsInfo] = []#
- HFSSAutoConfiguration.simulation_setup: SimulationSetup#
Method detail#
- HFSSAutoConfiguration.auto_populate_batch_groups(pattern: str | list[str] | None = None) None#
Automatically create and populate
batch_groupsfrom the currentsignal_nets.This is a thin convenience wrapper around
group_nets_by_prefix(). It only executes when both:auto_evaluate_batch_groupsisTrue, andsignal_netsis non-empty.
- Parameters:
- pattern
str|list[str] |None,optional POSIX ERE prefix pattern(s) that control which nets are grouped.
None(default) – activate auto-discovery mode: nets are clustered heuristically and then split into chunks of sizebatch_size.str– treat the single string as a prefix pattern (automatically anchored:pattern + ".*").list[str] – each list element becomes its own prefix pattern; oneBatchGroupis created per list entry, regardless ofbatch_size.
- pattern
- HFSSAutoConfiguration.add_batch_group(name: str, nets: Sequence[str] | None = None, *, simulation_setup: SimulationSetup | None = None) BatchGroup#
Append a new BatchGroup to the configuration.
- Parameters:
- name
str Descriptive name for the group (will also become the regex pattern when the group is built automatically).
- nets
Sequence[str],optional List of net names that belong to this batch. If omitted an empty list is assumed and you can fill it later.
- simulation_setup
SimulationSetup,optional Per-batch simulation settings. When None the global
self.simulation_setupis used.
- name
- Returns:
BatchGroupThe freshly created instance (already appended to
self.batch_groups) so the caller can further manipulate it if desired.
- HFSSAutoConfiguration.add_solder_ball(ref_des: str, shape: str = 'cylinder', diameter: str | float | None = None, mid_diameter: str | float | None = None, height: str | float | None = None) SolderBallsInfo#
Append a new
SolderBallsInfoentry to the configuration.- Parameters:
- ref_des
str Reference designator of the component to which the solder-ball definition applies (e.g.
"U1").- shape
str,default"cylinder" Geometric model used for the solder ball. Supported values are
"cylinder","sphere","spheroid", etc.- diameter
str|float|None,optional Nominal diameter. When
NoneHFSS auto-evaluates the value from the footprint.- mid_diameter
str|float|None,optional Middle diameter required only for spheroid shapes. Ignored for all other geometries.
- height
str|float|None,optional Ball height. When
NoneHFSS computes an appropriate value automatically.
- ref_des
- Returns:
SolderBallsInfoThe newly created instance (already appended to
solder_balls). The object can be further edited in-place by the caller if desired.
Examples
>>> cfg = HfssAutoConfig() >>> cfg.add_solder_ball("U1", diameter="0.3mm", height="0.2mm") >>> cfg.add_solder_ball( ... "U2", ... shape="spheroid", ... diameter="0.25mm", ... mid_diameter="0.35mm", ... height="0.18mm", ... )
- HFSSAutoConfiguration.add_simulation_setup(meshing_frequency: str | float | None = '10GHz', maximum_pass_number: int = 15, start_frequency: str | float | None = 0, stop_frequency: str | float | None = '40GHz', frequency_step: str | float | None = '0.05GHz', replace: bool = True) SimulationSetup#
Create a: class:.SimulationSetup instance and attach it to the configuration.
- Parameters:
- meshing_frequency
Union[str,: class:float], default"10GHz" Driven frequency used during mesh generation.
- maximum_pass_numberclass:int, default
15 Maximum number of adaptive passes.
- start_frequency
Union[str,: class:float], default0 Lower bound of the sweep window.
- stop_frequency
Union[str,: class:float], default"40GHz" Upper bound of the sweep window.
- frequency_step
Union[str,: class:float], default"0.05GHz" Linear step size for the frequency sweep.
- mesh_operation_size
Union[str,: class:float,None],optional Maximum element size for mesh operations. When
NoneHFSS computes an appropriate value automatically.- replaceclass:bool, default
False Placement strategy for the new setup:
False– append a per-batch setup by creating an auxiliaryBatchGroup(name="extra_setup") whoseBatchGroup.simulation_setuppoints to the new object.True– overwrite the global: attr:simulation_setup attribute of the currentHfssAutoConfiginstance.
- meshing_frequency
- Returns:
SimulationSetupThe newly created instance (already stored inside the configuration).
Examples
>>> cfg = HfssAutoConfig() >>> # global setup >>> cfg.add_simulation_setup(frequency_max="60GHz", replace=True) >>> # per-batch setup >>> cfg.add_simulation_setup(frequency_step="0.1GHz")
- HFSSAutoConfiguration.group_nets_by_prefix(prefix_patterns: Sequence[str] | None = None) Dict[str, List[List[str]]]#
Group signal nets into disjoint batches while preserving differential pairs.
- Parameters:
- prefix_patterns
Sequence[str],optional POSIX ERE patterns that define the prefixes to be grouped. Example:
["PCIe", "USB"]➜ interpreted as["PCIe.*", "USB.*"]. IfNonepatterns are derived heuristically from the data set (see_infer_prefix_patterns()).
- prefix_patterns
- Returns:
Dict[str,List[List[str]]]Keys are the original / generated pattern strings. Values are lists of batches; each batch is an alphabetically sorted list of net names. When prefix_patterns was supplied the list contains exactly one element (the complete group); in auto-discovery mode the list may contain multiple slices sized according to
batch_size.
Notes
Differential recognition strips the suffixes
_[PN],_[ML],_[+-](case-insensitive).The function updates the instance attribute
batch_groupsin place.
Examples
Explicit grouping (production intent):
>>> cfg.signal_nets = ["PCIe_RX0_P", "PCIe_RX0_N", "PCIe_TX0_P", ... "USB3_DP", "USB3_DN", "DDR4_A0", "DDR4_A1"] >>> cfg.batch_size = 1_000 # ignored when patterns are supplied >>> cfg.group_nets_by_prefix(["PCIe", "USB"]) {'PCIe.*': [['PCIe_RX0_N', 'PCIe_RX0_P', 'PCIe_TX0_P']], 'USB.*': [['USB3_DN', 'USB3_DP']]}
Auto-discovery with batching:
>>> cfg.group_nets_by_prefix() # batch_size = 2 {'PCIe.*': [['PCIe_RX0_N', 'PCIe_RX0_P'], ['PCIe_TX0_P']], 'USB.*': [['USB3_DN', 'USB3_DP']], 'DDR4.*': [['DDR4_A0', 'DDR4_A1']]}
- HFSSAutoConfiguration.create_projects()#