CfgSpiceModels#

class pyedb.configuration.cfg_spice_models.CfgSpiceModels(pdata=None, data=None, path_lib=None)#

Collect SPICE model assignments for serialization.

Overview#

to_list

Serialize all SPICE models to a list of dictionaries.

get_data_from_db

Read SPICE model assignments from EDB by inspecting components.

add

Add a SPICE model assignment.

Import detail#

from pyedb.configuration.cfg_spice_models import CfgSpiceModels

Attribute detail#

CfgSpiceModels.path_libraries = None#
CfgSpiceModels.models#

Method detail#

CfgSpiceModels.to_list()#

Serialize all SPICE models to a list of dictionaries.

CfgSpiceModels.get_data_from_db(cfg_components)#

Read SPICE model assignments from EDB by inspecting components.

Groups components that share the same SPICE model (by model name, component definition, file path, and sub-circuit) into a single spice_models entry suitable for round-trip export.

Parameters:
cfg_componentslist of dict

Per-component dictionaries already retrieved by CfgComponents.retrieve_parameters_from_edb. Components assigned a SPICE model carry the data under the spice_model key.

Returns:
list of dict

JSON-serializable SPICE model assignment entries.

CfgSpiceModels.add(name: str, component_definition: str, file_path: str, sub_circuit_name: str = '', apply_to_all: bool = True, components=None, terminal_pairs=None)#

Add a SPICE model assignment.