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

Function _compileSLiCAPLibraries

SLiCAP/SLiCAPyacc.py:118–144  ·  view source on GitHub ↗

Compiles the SLiCAP bult-in libraries and writes the subcircuit, models, and global parameters to SLiCAPCIRCUITS, SLiCAPMODELS, and SLiCAPPARAMS, respectively. :return: None :rtype: NoneType

()

Source from the content-addressed store, hash-verified

116 _USERPARAMS = {}
117
118def _compileSLiCAPLibraries():
119 """
120 Compiles the SLiCAP bult-in libraries and writes the subcircuit, models,
121 and global parameters to SLiCAPCIRCUITS, SLiCAPMODELS, and SLiCAPPARAMS,
122 respectively.
123
124 :return: None
125 :rtype: NoneType
126 """
127 global _SLiCAPCIRCUITS, _SLiCAPMODELS, _SLiCAPPARAMS
128 for fi in _SLiCAPLIBS:
129 print("Compiling library: " + fi + ".")
130 f = open(ini.main_lib_path + fi, 'r')
131 netlist = f.read()
132 f.close()
133 cirName = fi.split('.')[0]
134 _parseNetlist(netlist, cirName, 'system')
135 for model in _SLiCAPCIRCUITS[cirName].modelDefs.keys():
136 _SLiCAPMODELS[model] = _SLiCAPCIRCUITS[cirName].modelDefs[model]
137 for param in _SLiCAPCIRCUITS[cirName].parDefs.keys():
138 _SLiCAPPARAMS[param] = _SLiCAPCIRCUITS[cirName].parDefs[param]
139 del _SLiCAPCIRCUITS[cirName]
140 # PASS 2 and 3
141 for cir in _SLiCAPCIRCUITS.keys():
142 _checkReferences(_SLiCAPCIRCUITS[cir])
143 _expandCircuit(_SLiCAPCIRCUITS[cir])
144 ini.SLiCAPPARAMS = _SLiCAPPARAMS
145
146def _compileUSERLibrary(fileName):
147 """

Callers 1

_makeLibrariesFunction · 0.85

Calls 3

_parseNetlistFunction · 0.85
_checkReferencesFunction · 0.85
_expandCircuitFunction · 0.85

Tested by

no test coverage detected