From: Luke Kenneth Casson Leighton Date: Thu, 27 Feb 2020 21:10:47 +0000 (+0000) Subject: do sub layout as well X-Git-Tag: partial-core-ls180-gdsii~192 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6296564b9c6041f2e50a947476ed6b5467cc8398;p=soclayout.git do sub layout as well --- diff --git a/experiments5/doAlu16.py b/experiments5/doAlu16.py index 2b1c335..8b3580e 100755 --- a/experiments5/doAlu16.py +++ b/experiments5/doAlu16.py @@ -18,6 +18,7 @@ from Hurricane import Instance from Hurricane import Contact from Hurricane import Vertical from Hurricane import Pin +from Hurricane import NetExternalComponents import Viewer import CRL import Etesian @@ -44,7 +45,8 @@ def createVertical ( contacts, x, layer, width=None): for i in range(1,len(contacts)): print "create vert", contacts[i-1], contacts[i], layer, x, width - Vertical.create( contacts[i-1], contacts[i], layer, x, width ) + v = Vertical.create( contacts[i-1], contacts[i], layer, x, width ) + print "v", v def createHorizontal ( contactPaths, y, layer, width=None): @@ -67,6 +69,9 @@ def build_downtrace(net, layer, x, y, y1): ] createVertical( contacts, l(x), layer ) + print "slaves", contacts[-1].getSlaveComponents() + for component in contacts[-1].getSlaveComponents(): + NetExternalComponents.setExternal(component) #print "af", dir(af) #sys.exit(0) @@ -130,7 +135,7 @@ def add ( **kw ): kw[ 'cell' ] = cell width = 350.0 - height = 400.0 + height = 405.0 ab = Box( l( 0.0 ) , l( 0.0 ) @@ -142,7 +147,8 @@ def add ( **kw ): aspectRatio = Cfg.getParamPercentage('etesian.aspectRatio').asPercentage() / 100.0 clocktree.ClockTree.computeAbutmentBox( cell, spaceMargin, aspectRatio, cellGauge ) ab2 = cell.getAbutmentBox() - print "calc box", ab, ab.getHeight(), ab.getWidth() + print "box", ab, ab.getHeight(), ab.getWidth() + print "calc box", ab2, ab2.getHeight(), ab2.getWidth() #height = ab.getHeight() #width = ab.getWidth() @@ -151,38 +157,43 @@ def add ( **kw ): cell.setAbutmentBox( ab ) for i in range(16): - Pin.create( cell.getNet('a(%d)' % i) - , 'a(%d).0' % i - , Pin.Direction.NORTH - , Pin.PlacementStatus.FIXED - , metal3 - , l( 20.0*i + 15.0 ), l( height ) # Position. - , l( 2.0 ) , l( 2.0 ) # Size. - ) if True: - net = cell.getNet('b(%d)' % i) - x = 20.0*i + 18.0 + x = 20.0*i + 10.0 y = height - #build_downtrace(net, metal3, x, y, y-5) - #continue - Pin.create( net - , 'b(%d).0' % i + Pin.create( cell.getNet('a(%d)' % i) + , 'a(%d).0' % i , Pin.Direction.NORTH - , Pin.PlacementStatus.UNPLACED + , Pin.PlacementStatus.FIXED , metal3 - , l( x ), l( y - 15 ) # Position. + , l( x ), l( y - 0 ) # Position. , l( 2.0 ) , l( 2.0 ) # Size. ) + for i in range(16): if True: Pin.create( cell.getNet('o(%d)' % i) , 'o(%d).0' % i , Pin.Direction.SOUTH , Pin.PlacementStatus.FIXED - , metal2 + , metal3 , l( 10.0*i + 100.0 ), l( 0) # Position. , l( 2.0 ) , l( 2.0 ) # Size. ) + for i in range(16): + if True: + net = cell.getNet('b(%d)' % i) + x = 20.0*i + 10.0 + 10 + y = height - 0 + #build_downtrace(net, metal3, x, y+11, y) + #continue + Pin.create( net + , 'b(%d).0' % i + , Pin.Direction.NORTH + , Pin.PlacementStatus.FIXED + , metal3 + , l( x ), l( y - 0 ) # Position. + , l( 2.0 ) , l( 2.0 ) # Size. + ) if False: Pin.create( cell.getNet('rst') , 'p_reset.0' @@ -215,6 +226,17 @@ def add ( **kw ): success = katana.getSuccessState() katana.destroy() + if False: + UpdateSession.open() + cell.setAbutmentBox( ab ) + for i in range(16): + if True: + net = cell.getNet('b(%d)' % i) + x = 20.0*i + 10.0 + 10 + y = height-10 + build_downtrace(net, metal2, x, y, y+10) + UpdateSession.close() + #af.saveCell( cell, CRL.Catalog.State.Views ) plugins.RSavePlugin.ScriptMain( **kw ) @@ -241,7 +263,7 @@ def sub ( **kw ): kw[ 'cell' ] = cell width = 350.0 - height = 400.0 + height = 405.0 ab = Box( l( 0.0 ) , l( 0.0 ) @@ -252,8 +274,9 @@ def sub ( **kw ): 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() + ab2 = cell.getAbutmentBox() + print "box", ab, ab.getHeight(), ab.getWidth() + print "calc box", ab2, ab2.getHeight(), ab2.getWidth() #height = ab.getHeight() #width = ab.getWidth() @@ -262,33 +285,43 @@ def sub ( **kw ): cell.setAbutmentBox( ab ) for i in range(16): - Pin.create( cell.getNet('a(%d)' % i) - , 'a(%d).0' % i - , Pin.Direction.NORTH - , Pin.PlacementStatus.FIXED - , metal2 - , l( 20.0*i + 25.0 ), l( height ) # Position. - , l( 2.0 ) , l( 2.0 ) # Size. - ) if True: - Pin.create( cell.getNet('b(%d)' % i) - , 'b(%d).0' % i + x = 20.0*i + 10.0 + y = height + Pin.create( cell.getNet('a(%d)' % i) + , 'a(%d).0' % i , Pin.Direction.NORTH , Pin.PlacementStatus.FIXED - , metal2 - , l( 20.0*i + 20.0 ), l( height ) # Position. + , metal3 + , l( x ), l( y - 0 ) # Position. , l( 2.0 ) , l( 2.0 ) # Size. ) + for i in range(16): if True: Pin.create( cell.getNet('o(%d)' % i) , 'o(%d).0' % i , Pin.Direction.SOUTH , Pin.PlacementStatus.FIXED - , metal2 + , metal3 , l( 10.0*i + 100.0 ), l( 0) # Position. , l( 2.0 ) , l( 2.0 ) # Size. ) + for i in range(16): + if True: + net = cell.getNet('b(%d)' % i) + x = 20.0*i + 10.0 + 10 + y = height - 0 + #build_downtrace(net, metal3, x, y+11, y) + #continue + Pin.create( net + , 'b(%d).0' % i + , Pin.Direction.NORTH + , Pin.PlacementStatus.FIXED + , metal3 + , l( x ), l( y - 0 ) # Position. + , l( 2.0 ) , l( 2.0 ) # Size. + ) if False: Pin.create( cell.getNet('rst') , 'p_reset.0' @@ -302,25 +335,37 @@ def sub ( **kw ): ) UpdateSession.close() - if editor: editor.setCell( cell ) + if True: + if editor: editor.setCell( cell ) - etesian = Etesian.EtesianEngine.create(cell) - etesian.place() + etesian = Etesian.EtesianEngine.create(cell) + etesian.place() - katana = Katana.KatanaEngine.create(cell) - katana.digitalInit () - #katana.runNegociatePreRouted() - print dir(katana) - katana.runGlobalRouter (0) - katana.loadGlobalRouting ( Anabatic.EngineLoadGrByNet ) - katana.layerAssign ( Anabatic.EngineNoNetLayerAssign ) - katana.runNegociate ( Katana.Flags.NoFlags ) - katana.finalizeLayout () - print dir(katana) - success = katana.getSuccessState() - katana.destroy() + katana = Katana.KatanaEngine.create(cell) + katana.digitalInit () + #katana.runNegociatePreRouted() + print dir(katana) + katana.runGlobalRouter (0) + katana.loadGlobalRouting ( Anabatic.EngineLoadGrByNet ) + katana.layerAssign ( Anabatic.EngineNoNetLayerAssign ) + katana.runNegociate ( Katana.Flags.NoFlags ) + katana.finalizeLayout () + print dir(katana) + success = katana.getSuccessState() + katana.destroy() - #af.saveCell( cell, CRL.Catalog.State.Views ) + if False: + UpdateSession.open() + cell.setAbutmentBox( ab ) + for i in range(16): + if True: + net = cell.getNet('b(%d)' % i) + x = 20.0*i + 10.0 + 10 + y = height-10 + build_downtrace(net, metal2, x, y, y+10) + UpdateSession.close() + + #af.saveCell( cell, CRL.Catalog.State.Views ) plugins.RSavePlugin.ScriptMain( **kw ) def alu_hier(**kw): @@ -419,7 +464,7 @@ def alu_hier(**kw): if __name__ == '__main__': success = add() - #success = sub() + success = sub() #success = alu_hier() shellSuccess = 0 if not success: shellSuccess = 1