Be more Python3 compliant and replace "beta" menu by "alpha".
This commit is contained in:
parent
835e7264fe
commit
3b700baec0
|
@ -1057,7 +1057,8 @@ class ChipConf ( object ):
|
||||||
raise ErrorMessage( 1, 'Chip "%s" doesn\'t seems to have a corona.' % self.cell.getName() )
|
raise ErrorMessage( 1, 'Chip "%s" doesn\'t seems to have a corona.' % self.cell.getName() )
|
||||||
self.validated = False
|
self.validated = False
|
||||||
else:
|
else:
|
||||||
for instance in self.corona.getInstances(): self.cores.append( instance )
|
for instance in self.corona.getInstances():
|
||||||
|
self.cores.append( instance )
|
||||||
|
|
||||||
if len(self.cores) > 1:
|
if len(self.cores) > 1:
|
||||||
message = [ 'Chip "%s" have more than one core:' % self.cell.getName() ]
|
message = [ 'Chip "%s" have more than one core:' % self.cell.getName() ]
|
||||||
|
|
|
@ -13,11 +13,13 @@
|
||||||
# | Python : "./plugins/conductorplugin.py" |
|
# | Python : "./plugins/conductorplugin.py" |
|
||||||
# +-----------------------------------------------------------------+
|
# +-----------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
import sys
|
||||||
|
import traceback
|
||||||
|
import os.path
|
||||||
|
import math
|
||||||
try:
|
try:
|
||||||
import sys
|
|
||||||
import traceback
|
|
||||||
import os.path
|
|
||||||
import math
|
|
||||||
import Cfg
|
import Cfg
|
||||||
import Hurricane
|
import Hurricane
|
||||||
from Hurricane import DbU
|
from Hurricane import DbU
|
||||||
|
@ -47,7 +49,7 @@ def unicornHook ( **kw ):
|
||||||
kw['beforeAction'] = 'placeAndRoute.conductor'
|
kw['beforeAction'] = 'placeAndRoute.conductor'
|
||||||
|
|
||||||
plugins.kwAddMenu ( 'placeAndRoute', 'P&&R', **kw )
|
plugins.kwAddMenu ( 'placeAndRoute', 'P&&R', **kw )
|
||||||
plugins.kwUnicornHook( 'misc.beta.conductor'
|
plugins.kwUnicornHook( 'misc.alpha.conductor'
|
||||||
, 'P&&R Conductor'
|
, 'P&&R Conductor'
|
||||||
, 'Perform a placement driven by global routing, then detailed routing'
|
, 'Perform a placement driven by global routing, then detailed routing'
|
||||||
, sys.modules[__name__].__file__
|
, sys.modules[__name__].__file__
|
||||||
|
@ -92,7 +94,7 @@ def scriptMain ( **kw ):
|
||||||
editor = None
|
editor = None
|
||||||
if kw.has_key('editor') and kw['editor']:
|
if kw.has_key('editor') and kw['editor']:
|
||||||
editor = kw['editor']
|
editor = kw['editor']
|
||||||
print ' o Editor found, running in graphic mode.'
|
print( ' o Editor found, running in graphic mode.' )
|
||||||
editor.setLayerVisible( 'rubber', False )
|
editor.setLayerVisible( 'rubber', False )
|
||||||
if cell == None: cell = editor.getCell()
|
if cell == None: cell = editor.getCell()
|
||||||
|
|
||||||
|
@ -105,10 +107,10 @@ def scriptMain ( **kw ):
|
||||||
iteration = 0
|
iteration = 0
|
||||||
|
|
||||||
while iteration < maxPlaceIterations:
|
while iteration < maxPlaceIterations:
|
||||||
print '\n o P&R Conductor iteration: %d (max:%s)' % (iteration,maxPlaceIterations)
|
print( '\n o P&R Conductor iteration: {} (max:{})'.format(iteration,maxPlaceIterations) )
|
||||||
|
|
||||||
if not (katana is None):
|
if not (katana is None):
|
||||||
print ' o Global routing has failed, re-place design.'
|
print( ' o Global routing has failed, re-place design.' )
|
||||||
katana.resetRouting()
|
katana.resetRouting()
|
||||||
katana.destroy ()
|
katana.destroy ()
|
||||||
katana = None
|
katana = None
|
||||||
|
@ -117,11 +119,12 @@ def scriptMain ( **kw ):
|
||||||
|
|
||||||
etesian = Etesian.EtesianEngine.create( cell )
|
etesian = Etesian.EtesianEngine.create( cell )
|
||||||
etesian.setPassNumber( iteration )
|
etesian.setPassNumber( iteration )
|
||||||
if editor: etesian.setViewer( editor )
|
if editor: etesian.setViewer( editor )
|
||||||
if iteration:
|
if iteration:
|
||||||
if useFixedAbHeight and iteration == 1:
|
if useFixedAbHeight and iteration == 1:
|
||||||
etesian.setFixedAbHeight( cell.getAbutmentBox().getHeight() )
|
etesian.setFixedAbHeight( cell.getAbutmentBox().getHeight() )
|
||||||
print 'etesian.setFixedAbHeight():', DbU.getValueString(cell.getAbutmentBox().getHeight())
|
print( 'etesian.setFixedAbHeight(): {}'.format(
|
||||||
|
DbU.getValueString(cell.getAbutmentBox().getHeight())) )
|
||||||
etesian.resetPlacement()
|
etesian.resetPlacement()
|
||||||
etesian.place()
|
etesian.place()
|
||||||
etesian.destroy()
|
etesian.destroy()
|
||||||
|
|
|
@ -1111,10 +1111,10 @@ class MatrixPlacer ( object ):
|
||||||
# Plugin hook functions, unicornHook:menus, ScritMain:call
|
# Plugin hook functions, unicornHook:menus, ScritMain:call
|
||||||
|
|
||||||
def unicornHook ( **kw ):
|
def unicornHook ( **kw ):
|
||||||
kw['beforeAction'] = 'misc.beta'
|
kw['beforeAction'] = 'misc.alpha'
|
||||||
|
|
||||||
#plugins.kwAddMenu ( 'placeAndRoute', 'P&&R', **kw )
|
#plugins.kwAddMenu ( 'placeAndRoute', 'P&&R', **kw )
|
||||||
plugins.kwUnicornHook( 'misc.beta.matrixPlacer'
|
plugins.kwUnicornHook( 'misc.alpha.matrixPlacer'
|
||||||
, 'Matrix Placer'
|
, 'Matrix Placer'
|
||||||
, 'Look for a Matrix-Like netlist strucure and place it'
|
, 'Look for a Matrix-Like netlist strucure and place it'
|
||||||
, sys.modules[__name__].__file__
|
, sys.modules[__name__].__file__
|
||||||
|
|
Loading…
Reference in New Issue