MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _expandCircuit

Function _expandCircuit

SLiCAP/SLiCAPyacc.py:896–914  ·  view source on GitHub ↗

This functions flattens the hierarchy of circuitObject: 1. Sub circuits and model expansions will be expanded and connected to the main circuit 2. Parameter definitions will be updated: :param circuitObject: SLiCAP circuit object to be expanded :return: SLiCAP circuit

(circuitObject)

Source from the content-addressed store, hash-verified

894""" PASS 3 FUNCTIONS """
895
896def _expandCircuit(circuitObject):
897 """
898 This functions flattens the hierarchy of circuitObject:
899
900 1. Sub circuits and model expansions will be expanded and connected to
901 the main circuit
902 2. Parameter definitions will be updated:
903
904 :param circuitObject: SLiCAP circuit object to be expanded
905
906 :return: SLiCAP circuit object of the expanded circuit
907 :rtype: SLiCAP circuit object
908 """
909 #elNames = list(circuitObject.elements.keys())
910 for elName in list(circuitObject.elements.keys()):
911 el = circuitObject.elements[elName]
912 if isinstance(el.model, circuit):
913 circuitObject = _doExpand(el, circuitObject)
914 return circuitObject
915
916def _doExpand(el, circuitObject):
917 parentRefDes = el.refDes

Callers 2

_compileSLiCAPLibrariesFunction · 0.85
_checkCircuitFunction · 0.85

Calls 1

_doExpandFunction · 0.85

Tested by

no test coverage detected