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)
| 894 | """ PASS 3 FUNCTIONS """ |
| 895 | |
| 896 | def _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 | |
| 916 | def _doExpand(el, circuitObject): |
| 917 | parentRefDes = el.refDes |
no test coverage detected