From: Luke Kenneth Casson Leighton Date: Fri, 28 Feb 2020 10:44:46 +0000 (+0000) Subject: hmm still not adding traces X-Git-Tag: partial-core-ls180-gdsii~188 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e18d5d3cb5836018e11c3994e5e304c317bef9a;p=soclayout.git hmm still not adding traces --- diff --git a/experiments5/doAlu16.py b/experiments5/doAlu16.py index 75c3369..e827f79 100755 --- a/experiments5/doAlu16.py +++ b/experiments5/doAlu16.py @@ -17,6 +17,7 @@ from Hurricane import Transformation from Hurricane import Instance from Hurricane import Contact from Hurricane import Vertical +from Hurricane import Horizontal from Hurricane import Pin from Hurricane import NetExternalComponents import Viewer @@ -61,6 +62,19 @@ def createHorizontal ( contactPaths, y, layer, width=None): for i in range(1,len(contacts)): Horizontal.create( contacts[i-1], contacts[i], layer, y, width ) + +def build_crosstrace(net, via, layer, x, x1, y): + + contacts = \ + [ Contact.create( net, via, l(x), l(y), l(1.0), l(1.0) ) + , Contact.create( net, via, l(x1), l(y), l(1.0), l(1.0) ) + ] + + createHorizontal( contacts, l(y), layer ) + print "slaves", contacts[-1].getSlaveComponents() + for component in contacts[-1].getSlaveComponents(): + NetExternalComponents.setExternal(component) + def build_downtrace(net, via, layer, x, y, y1): contacts = \ @@ -69,9 +83,9 @@ def build_downtrace(net, via, layer, x, y, y1): ] createVertical( contacts, l(x), layer ) - #print "slaves", contacts[-1].getSlaveComponents() - #for component in contacts[-1].getSlaveComponents(): - #NetExternalComponents.setExternal(component) + print "slaves", contacts[-1].getSlaveComponents() + for component in contacts[-1].getSlaveComponents(): + NetExternalComponents.setExternal(component) #print "af", dir(af) #sys.exit(0) @@ -229,14 +243,20 @@ def add ( **kw ): if True: VIA23 = DataBase.getDB().getTechnology().getLayer( 'VIA23' ) UpdateSession.open() + #net = cell.getNet('b(%d)' % 0) + net = cell.getNet('vdd') + build_downtrace(net, VIA23, metal3, 5, 10, 20) build_downtrace(net, VIA23, metal3, 10, 10, 20) - cell.setAbutmentBox( ab ) + build_crosstrace(net, VIA23, metal3, 5, 10, 10) + build_crosstrace(net, VIA23, metal3, 5, 10, 20) for i in range(16): if False: net = cell.getNet('b(%d)' % i) x = 20.0*i + 10.0 + 10 y = height-10 build_downtrace(net, metal2, x, y, y+10) + ab.inflate ( l(2.0) ) + cell.setAbutmentBox( ab ) UpdateSession.close() #af.saveCell( cell, CRL.Catalog.State.Views )