Correct Cell object detection while reading Oceane parameters.
* Bug: In karakaze/AnalogDesign.readParameters(), when asserting the type of dspec[0], it can either be a type (for analog devices) or a Cell object (*not* a type). So the issubclass may fails. Now check first if dspec[0] is an *instance* of Cell. This is an anisotropy in the type of the first element of the devicesSpecs table, but suppress one superfluous parameter.
This commit is contained in:
parent
4483766f34
commit
c6287c8d95
|
@ -357,7 +357,9 @@ class AnalogDesign ( object ):
|
||||||
self.parameters.read( path );
|
self.parameters.read( path );
|
||||||
|
|
||||||
for dspec in self.devicesSpecs:
|
for dspec in self.devicesSpecs:
|
||||||
if issubclass(dspec[0],TransistorFamily):
|
if isinstance(dspec[0],Cell):
|
||||||
|
pass
|
||||||
|
elif issubclass(dspec[0],TransistorFamily):
|
||||||
Tname = dspec[1].split('_')[0]
|
Tname = dspec[1].split('_')[0]
|
||||||
Tparameters = self.parameters.getTransistor( Tname )
|
Tparameters = self.parameters.getTransistor( Tname )
|
||||||
if not Tparameters:
|
if not Tparameters:
|
||||||
|
@ -380,8 +382,6 @@ class AnalogDesign ( object ):
|
||||||
trace( 110, '\t- \"%s\" : C:%fpF\n' % (Cname ,dspec[4]) )
|
trace( 110, '\t- \"%s\" : C:%fpF\n' % (Cname ,dspec[4]) )
|
||||||
elif issubclass(dspec[0],ResistorFamily):
|
elif issubclass(dspec[0],ResistorFamily):
|
||||||
print WarningMessage( 'Resistor devices are not supported yet by Oceane parser (instance:"{}").'.format(dspec[1]) )
|
print WarningMessage( 'Resistor devices are not supported yet by Oceane parser (instance:"{}").'.format(dspec[1]) )
|
||||||
elif dspec[0] == Cell:
|
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
print WarningMessage( 'Unsupported analog device type {0} (instance:"{1}").'.format(dspec[0],dspec[1]) )
|
print WarningMessage( 'Unsupported analog device type {0} (instance:"{1}").'.format(dspec[0],dspec[1]) )
|
||||||
trace( 110, '-,' )
|
trace( 110, '-,' )
|
||||||
|
|
Loading…
Reference in New Issue