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:
Jean-Paul Chaput 2020-05-27 16:11:53 +02:00
parent 4483766f34
commit c6287c8d95
1 changed files with 3 additions and 3 deletions

View File

@ -357,7 +357,9 @@ class AnalogDesign ( object ):
self.parameters.read( path );
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]
Tparameters = self.parameters.getTransistor( Tname )
if not Tparameters:
@ -380,8 +382,6 @@ class AnalogDesign ( object ):
trace( 110, '\t- \"%s\" : C:%fpF\n' % (Cname ,dspec[4]) )
elif issubclass(dspec[0],ResistorFamily):
print WarningMessage( 'Resistor devices are not supported yet by Oceane parser (instance:"{}").'.format(dspec[1]) )
elif dspec[0] == Cell:
pass
else:
print WarningMessage( 'Unsupported analog device type {0} (instance:"{1}").'.format(dspec[0],dspec[1]) )
trace( 110, '-,' )