Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: assign spice model docstring #777

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion src/pyedb/dotnet/edb_core/cell/hierarchy/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,10 @@ def assign_spice_model(
File path of the Spice model.
name : str, optional
Name of the Spice model.
sub_circuit_name : str, optional
Name of the sub circuit.
terminal_pairs : list, optional
list of terminal pairs.

Returns
-------
Expand Down Expand Up @@ -879,7 +883,8 @@ def assign_s_param_model(self, file_path, name=None, reference_net=None):
File path of the S-parameter model.
name : str, optional
Name of the S-parameter model.

reference_net : str, optional
Name of the reference net.
Returns
-------

Expand Down
16 changes: 13 additions & 3 deletions src/pyedb/dotnet/edb_core/definition/component_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,32 @@ def assign_s_param_model(self, file_path, model_name=None, reference_net=None):
comp.assign_s_param_model(file_path, model_name, reference_net)
return True

def assign_spice_model(self, file_path, model_name=None):
def assign_spice_model(
self,
file_path,
model_name=None,
sub_circuit_name=None,
terminal_pairs=None,
):
"""Assign Spice model to all components under this part name.

Parameters
----------
file_path : str
File path of the Spice model.
name : str, optional
model_name : str, optional
Name of the Spice model.
sub_circuit_name : str, optional
Name of the sub circuit.
terminal_pairs : list, optional
list of terminal pairs.

Returns
-------

"""
for comp in list(self.components.values()):
comp.assign_spice_model(file_path, model_name)
comp.assign_spice_model(file_path, model_name, sub_circuit_name, terminal_pairs)
return True

@property
Expand Down
Loading