from Hurricane import Box
from Hurricane import Transformation
from Hurricane import Instance
+from Hurricane import Contact
+from Hurricane import Vertical
from Hurricane import Pin
import Viewer
import CRL
af = CRL.AllianceFramework.get()
+
+def toDbU ( l ): return DbU.fromLambda(l)
+
+def createVertical ( contacts, x, layer, width=None):
+ def yincrease ( lhs, rhs ): return int(lhs.getY() - rhs.getY())
+
+ contacts.sort( yincrease )
+
+ if width is None: width = l(2.0)
+
+ 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 )
+
+
+def createHorizontal ( contactPaths, y, layer, width=None):
+ def xincrease ( lhs, rhs ): return int(lhs.getX() - rhs.getX())
+
+ contacts = contactPaths
+
+ if width is None: width = toDbU(2.0)
+
+ contacts.sort( xincrease )
+
+ for i in range(1,len(contacts)):
+ Horizontal.create( contacts[i-1], contacts[i], layer, y, width )
+
+def build_downtrace(net, layer, x, y, y1):
+
+ contacts = \
+ [ Contact.create( net, layer, l(x), l(y), l(2.0), l(2.0) )
+ , Contact.create( net, layer, l(x), l(y1), l(2.0), l(2.0) )
+ ]
+
+ createVertical( contacts, l(x), layer )
+
#print "af", dir(af)
#sys.exit(0)
#Cfg.getParamInt ( 'misc.minTraceLevel' ).setInt ( 159 )
#Cfg.getParamInt ( 'misc.maxTraceLevel' ).setInt ( 160 )
Cfg.getParamEnumerate ( 'etesian.effort' ).setInt ( 2 )
-Cfg.getParamPercentage( 'etesian.spaceMargin' ).setPercentage( 9.0 )
+Cfg.getParamPercentage( 'etesian.spaceMargin' ).setPercentage( 20.0 )
Cfg.getParamPercentage( 'etesian.aspectRatio' ).setPercentage( 100.0 )
Cfg.getParamBool ( 'etesian.uniformDensity' ).setBool ( True )
Cfg.getParamInt ( 'anabatic.edgeLenght' ).setInt ( 24 )
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()
+ ab2 = cell.getAbutmentBox()
print "calc box", ab, ab.getHeight(), ab.getWidth()
#height = ab.getHeight()
, l( 2.0 ) , l( 2.0 ) # Size.
)
if True:
- Pin.create( cell.getNet('b(%d)' % i)
+ net = cell.getNet('b(%d)' % i)
+ x = 20.0*i + 18.0
+ y = height
+ #build_downtrace(net, metal3, x, y, y-5)
+ #continue
+ Pin.create( net
, 'b(%d).0' % i
, Pin.Direction.NORTH
- , Pin.PlacementStatus.FIXED
+ , Pin.PlacementStatus.UNPLACED
, metal3
- , l( 20.0*i + 19.0 ), l( height-25 ) # Position.
+ , l( x ), l( y - 21 ) # Position.
, l( 2.0 ) , l( 2.0 ) # Size.
)
if True:
)
UpdateSession.close()
- if editor: editor.setCell( cell )
-
- 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()
-
- #af.saveCell( cell, CRL.Catalog.State.Views )
+ if True:
+ if editor: editor.setCell( cell )
+
+ 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()
+
+ #af.saveCell( cell, CRL.Catalog.State.Views )
plugins.RSavePlugin.ScriptMain( **kw )
###################
sys.exit( shellSuccess )
+