Fix bad relative import in various (old/experimental) cumulus plugins.

This commit is contained in:
Jean-Paul Chaput 2023-10-08 19:16:25 +02:00 committed by Rob Taylor
parent a11f1cdc4f
commit 6583efd485
7 changed files with 32 additions and 32 deletions

View File

@ -15,7 +15,7 @@
import sys
import traceback
import Viewer
from .. import Viewer
from ..helpers.io import ErrorMessage, WarningMessage, catch
from .. import plugins

View File

@ -15,13 +15,13 @@
import sys
import traceback
from ..helpers import setTraceLevel, trace
from ..helpers.io import ErrorMessage, WarningMessage, catch
from ..helpers.overlay import UpdateSession
from .. import plugins
from ..Hurricane import Breakpoint, DbU, Box, Net, Cell, Instance, \
Transformation
from .chip.configuration import GaugeConf
from ..helpers import setTraceLevel, trace
from ..helpers.io import ErrorMessage, WarningMessage, catch
from ..helpers.overlay import UpdateSession
from .. import plugins
from ..Hurricane import Breakpoint, DbU, Box, Net, Cell, Instance, \
Transformation
from .block.configuration import GaugeConf
DIRECT = 0x0001

View File

@ -19,7 +19,7 @@ import traceback
from ...helpers.io import ErrorMessage, WarningMessage, catch
from ...helpers.overlay import UpdateSession
from ...helpers import setTraceLevel, trace, l, u, n
import ...cumulus import plugins
from ...cumulus import plugins
from ...Hurricane import Breakpoint, DbU, Box, Net, Cell, Instance, \
Transformation, PythonAttributes
from ...Foehn import FoehnEngine, DagExtension

View File

@ -23,7 +23,7 @@ import traceback
from ..helpers.io import ErrorMessage, WarningMessage, catch
from ..helpers.overlay import UpdateSession
from ..helpers import setTraceLevel, trace
from ..cumulus import plugins
from .. import plugins
from ..Hurricane import Breakpoint, DbU, Box, Net, Cell, Instance, \
Transformation

View File

@ -16,7 +16,7 @@ try:
import Viewer
import CRL
import plugins.rsave
except Exception, e:
except Exception as e:
catch( e )
sys.exit(2)

View File

@ -34,7 +34,7 @@ try:
import helpers
from helpers import trace
from helpers.io import ErrorMessage
except ImportError, e:
except ImportError as e:
serror = str(e)
if serror.startswith('No module named'):
module = serror.split()[-1]
@ -46,7 +46,7 @@ except ImportError, e:
print( ' Under RHEL 6, you must be under devtoolset-2.' )
print( ' (scl enable devtoolset-2 bash)' )
sys.exit(1)
except Exception, e:
except Exception as e:
print( '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' )
print( ' modules. Something may be wrong at Python/C API level.\n' )
print( ' {}'.format(e) )
@ -120,7 +120,7 @@ def px2mpx ( editor, pxCell ):
if pxCell == None:
raise ErrorMessage( 3, 'px2mpx.px2mpx(): Mandatory pxCell argument is None.' )
mpxCell = None
print '\nProcessing', pxCell
print( '\nProcessing', pxCell )
UpdateSession.open()
try:
@ -163,7 +163,7 @@ def px2mpx ( editor, pxCell ):
layer = component.getLayer()
dupComponent = None
print ' Processing', component
print( ' Processing', component )
if isinstance(component,Contact):
dupComponent = Contact.create( mpxNet
@ -183,21 +183,21 @@ def px2mpx ( editor, pxCell ):
if component.getSourceX() > component.getTargetX(): component.invert()
if isinstance(layer,RegularLayer):
if layer.getBasicLayer().getMaterial().getCode() == BasicLayer.Material.blockage:
print ' Blockage BB:%s vs. AB:%s' % (bb, ab)
print( ' Blockage BB:%s vs. AB:%s' % (bb, ab) )
if layer.getName()[-1] == '2' or layer.getName()[-1] == '4':
state = 0
if bb.getXMin() <= ab.getXMin(): state |= Left
if bb.getXMax() >= ab.getXMax(): state |= Right
if not (state&Left):
print ' Shrink left.'
print( ' Shrink left.' )
dLLeft = dL - DbU.fromLambda( 1.5 )
if not(state&Right):
print ' Shrink right.'
print( ' Shrink right.' )
dLRight = dL - DbU.fromLambda( 1.5 )
if layer.getName()[-1] == '4' and state == AllSpan:
print ' Skipping component.'
print( ' Skipping component.' )
skipComponent = True
width = mW
@ -213,9 +213,9 @@ def px2mpx ( editor, pxCell ):
, component.getDxSource()*2 - dLLeft
, component.getDxTarget()*2 + dLRight
)
print ' Copy:', dupComponent
print( ' Copy:', dupComponent )
else:
print ' Horizontal component too small *or* skipped, not converted'
print( ' Horizontal component too small *or* skipped, not converted' )
elif isinstance(component,Vertical):
dL, dW, mW = getDeltas( component.getLayer() )
@ -245,7 +245,7 @@ def px2mpx ( editor, pxCell ):
if layer.getName()[-1] == '5':
if state == AllSpan:
print ' Skipping component.'
print( ' Skipping component.' )
skipComponent = True
else:
dLTop = DbU.fromLambda(120.0) - component.getDyTarget()*2
@ -263,20 +263,20 @@ def px2mpx ( editor, pxCell ):
, component.getDyTarget()*2 + dLTop
)
else:
print ' Vertical component too small *or* skipped, not converted'
print( ' Vertical component too small *or* skipped, not converted' )
else:
print '[WARNING] Unchanged component:', component
print( '[WARNING] Unchanged component:', component )
if dupComponent and NetExternalComponents.isExternal( component ):
NetExternalComponents.setExternal( dupComponent )
if editor: editor.fit()
except ErrorMessage, e:
print e; errorCode = e.code
except Exception, e:
print '\n\n', e; errorCode = 1
except ErrorMessage as e:
print( e ); errorCode = e.code
except Exception as e:
print( '\n\n', e ); errorCode = 1
traceback.print_tb(sys.exc_info()[2])
UpdateSession.close()
@ -297,7 +297,7 @@ def scriptMain ( **kw ):
editor = None
if kw.has_key('editor') and kw['editor']:
editor = kw['editor']
print ' o Editor detected, running in graphic mode.'
print( ' o Editor detected, running in graphic mode.' )
if pxCell == None: pxCell = editor.getCell()
if pxCell:
@ -306,7 +306,7 @@ def scriptMain ( **kw ):
pxlibDir = '/dsk/l1/jpc/alliance/Linux.slsoc6x/install/cells/pxlib'
if os.path.isdir(pxlibDir):
print ' o <%s> found.' % pxlibDir
print( ' o <%s> found.' % pxlibDir )
for viewFile in os.listdir( pxlibDir ):
if viewFile == 'padreal.ap':
pxCell = framework.getCell( viewFile[:-3], CRL.Catalog.State.Views )
@ -323,7 +323,7 @@ def scriptMain ( **kw ):
mpxCell = px2mpx( editor, pxCell )
framework.saveCell( mpxCell, CRL.Catalog.State.Physical )
else:
print '[WARNING] <%s> not found.' % pxlibDir
print( '[WARNING] <%s> not found.' % pxlibDir )
return 0

View File

@ -107,7 +107,7 @@ if __name__ == '__main__':
rcode = yosys.run( options.design, top=options.top )
except Exception, e:
except Exception as e:
catch( e )
sys.exit(2)