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

Function _checkReferences

SLiCAP/SLiCAPyacc.py:679–703  ·  view source on GitHub ↗

Second pass of the parser: 1. Check if the referenced elements exsist in the circuit 2. Check if the parameters of a model correspond with those of its basic model, if so, the model name is replaced with the model definition. 3. Check if the model definitions of the elements

(circuitObject)

Source from the content-addressed store, hash-verified

677""" PASS 2 FUNCTIONS """
678
679def _checkReferences(circuitObject):
680 """
681 Second pass of the parser:
682
683 1. Check if the referenced elements exsist in the circuit
684 2. Check if the parameters of a model correspond with those of its basic
685 model, if so, the model name is replaced with the model definition.
686 3. Check if the model definitions of the elements are correct and can be
687 found. If so, the model name in a model definition (.model netlist
688 entry) is replaced with its definition.
689 4. Check if the element parameters correspond with those of the model.
690
691 :param circuitObject: Circuit object to be checked.
692
693 :type circuitObject: SLiCAP circuit object
694
695 :return: None
696 :rtype: NoneType
697 """
698 _checkElementReferences(circuitObject)
699 _checkModelDefs(circuitObject)
700 _checkElementModel(circuitObject)
701 subCircuits = circuitObject.circuits.keys()
702 for cir in subCircuits:
703 _checkReferences(circuitObject.circuits[cir])
704
705def _checkElementReferences(circuitObject):
706 """

Callers 3

_compileSLiCAPLibrariesFunction · 0.85
_compileUSERLibraryFunction · 0.85
_checkCircuitFunction · 0.85

Calls 3

_checkElementReferencesFunction · 0.85
_checkModelDefsFunction · 0.85
_checkElementModelFunction · 0.85

Tested by

no test coverage detected