From 5ccc41757b7e756b84ec2acc70af74e8dcb7fd74 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 27 Feb 2020 12:38:49 +0000 Subject: [PATCH] overlap error in routing (two connections on same METAL2 layer) --- experiments5/doAlu16.py | 64 ++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/experiments5/doAlu16.py b/experiments5/doAlu16.py index 9683dd9..313bef5 100755 --- a/experiments5/doAlu16.py +++ b/experiments5/doAlu16.py @@ -69,6 +69,8 @@ env.setGROUND( 'vss' ) Cfg.Configuration.popDefaultPriority() +################### +# add def add ( **kw ): editor = None @@ -81,9 +83,6 @@ def add ( **kw ): metal3 = DataBase.getDB().getTechnology().getLayer( 'metal3' ) metal5 = DataBase.getDB().getTechnology().getLayer( 'metal5' ) - ################### - # add - cell = af.getCell( 'add', CRL.Catalog.State.Logical ) print cell.getNet('a(0)') @@ -92,8 +91,8 @@ def add ( **kw ): return False kw[ 'cell' ] = cell - width = 400.0 - height = 350.0 + width = 350.0 + height = 400.0 ab = Box( l( 0.0 ) , l( 0.0 ) @@ -119,7 +118,7 @@ def add ( **kw ): , Pin.Direction.NORTH , Pin.PlacementStatus.FIXED , metal2 - , l( 20.0*i + 25.0 ), l( height + 35) # Position. + , l( 20.0*i + 35.0 ), l( height-40 ) # Position. , l( 2.0 ) , l( 2.0 ) # Size. ) if True: @@ -128,7 +127,7 @@ def add ( **kw ): , Pin.Direction.NORTH , Pin.PlacementStatus.FIXED , metal2 - , l( 20.0*i + 20.0 ), l( height + 35) # Position. + , l( 20.0*i + 20.0 ), l( height-40 ) # Position. , l( 2.0 ) , l( 2.0 ) # Size. ) if True: @@ -175,8 +174,10 @@ def add ( **kw ): #af.saveCell( cell, CRL.Catalog.State.Views ) plugins.RSavePlugin.ScriptMain( **kw ) -def sub(**kw): +################### +# sub +def sub ( **kw ): editor = None if kw.has_key('editor') and kw['editor']: editor = kw['editor'] @@ -185,9 +186,7 @@ def sub(**kw): print db, dir(db) metal2 = DataBase.getDB().getTechnology().getLayer( 'metal2' ) metal3 = DataBase.getDB().getTechnology().getLayer( 'metal3' ) - - ################### - # sub + metal5 = DataBase.getDB().getTechnology().getLayer( 'metal5' ) cell = af.getCell( 'sub', CRL.Catalog.State.Logical ) print cell.getNet('a(0)') @@ -197,10 +196,23 @@ def sub(**kw): return False kw[ 'cell' ] = cell + width = 350.0 + height = 400.0 + ab = Box( l( 0.0 ) , l( 0.0 ) - , l( 2000.0 ) - , l( 600.0 ) ) + , l( width ) + , l( height ) ) + + cellGauge = af.getCellGauge() + spaceMargin = (Cfg.getParamPercentage('etesian.spaceMargin').asPercentage()+5) / 100.0 + aspectRatio = Cfg.getParamPercentage('etesian.aspectRatio').asPercentage() / 100.0 + clocktree.ClockTree.computeAbutmentBox( cell, spaceMargin, aspectRatio, cellGauge ) + ab = cell.getAbutmentBox() + print "calc box", ab, ab.getHeight(), ab.getWidth() + + #height = ab.getHeight() + #width = ab.getWidth() UpdateSession.open() cell.setAbutmentBox( ab ) @@ -208,27 +220,28 @@ def sub(**kw): for i in range(16): Pin.create( cell.getNet('a(%d)' % i) , 'a(%d).0' % i - , Pin.Direction.SOUTH + , Pin.Direction.NORTH , Pin.PlacementStatus.FIXED - , metal3 - , l( 100.0*i + 50.0 ) , l( 0.0 ) # Position. + , metal2 + , l( 20.0*i + 25.0 ), l( height ) # Position. , l( 2.0 ) , l( 2.0 ) # Size. ) - if False: + if True: Pin.create( cell.getNet('b(%d)' % i) , 'b(%d).0' % i - , Pin.Direction.EAST + , Pin.Direction.NORTH , Pin.PlacementStatus.FIXED - , metal3 - , l( 0.0 ), l( 100.0*i + 50.0 ) # Position. + , metal2 + , l( 20.0*i + 20.0 ), l( height ) # Position. , l( 2.0 ) , l( 2.0 ) # Size. ) - Pin.create( cell.getNet('o(%d)' % i) + if True: + Pin.create( cell.getNet('o(%d)' % i) , 'o(%d).0' % i , Pin.Direction.SOUTH , Pin.PlacementStatus.FIXED - , metal3 - , l( 100.0*i + 20.0 ) , l( 0.0 ) # Position. + , metal2 + , l( 10.0*i + 100.0 ), l( 0) # Position. , l( 2.0 ) , l( 2.0 ) # Size. ) @@ -252,7 +265,7 @@ def sub(**kw): katana = Katana.KatanaEngine.create(cell) katana.digitalInit () - #katana.runNegociatePreRouted() + katana.runNegociatePreRouted() print dir(katana) katana.runGlobalRouter (0) katana.loadGlobalRouting ( Anabatic.EngineLoadGrByNet ) @@ -266,8 +279,6 @@ def sub(**kw): #af.saveCell( cell, CRL.Catalog.State.Views ) plugins.RSavePlugin.ScriptMain( **kw ) - print "done with add and sub" - def alu_hier(**kw): editor = None @@ -364,6 +375,7 @@ def alu_hier(**kw): if __name__ == '__main__': success = add() + #success = sub() #success = alu_hier() shellSuccess = 0 if not success: shellSuccess = 1 -- 2.30.2