reposition add and sub, and do place in the *middle* of alu16
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 17 Mar 2020 07:37:27 +0000 (07:37 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 17 Mar 2020 07:37:27 +0000 (07:37 +0000)
experiments7/doAlu16.py

index 674f7ac36c8455f68be1b448cfb85618430a34c2..749343c88bf81fc840eceb998b454888eb260651 100755 (executable)
@@ -73,7 +73,7 @@ def coriolisSetup():
     Cfg.getParamBool('misc.verboseLevel1').setBool(True)
     Cfg.getParamBool('misc.verboseLevel2').setBool(True)
     Cfg.getParamEnumerate('etesian.effort').setInt(2)
-    Cfg.getParamPercentage('etesian.spaceMargin').setPercentage(20.0)
+    Cfg.getParamPercentage('etesian.spaceMargin').setPercentage(10.0)
     Cfg.getParamPercentage('etesian.aspectRatio').setPercentage(100.0)
     Cfg.getParamBool('etesian.uniformDensity').setBool(True)
     Cfg.getParamInt('anabatic.edgeLenght').setInt(24)
@@ -330,7 +330,7 @@ def alu16(**kwargs):
         return False
     kwargs['cell'] = cell
 
-    ab = Box(l(0.0), l(0.0), l(1050.0), l(700.0))
+    ab = Box(l(0.0), l(0.0), l(1100.0), l(600.0))
 
     UpdateSession.open()
     cell.setAbutmentBox(ab)
@@ -338,7 +338,7 @@ def alu16(**kwargs):
     ins = cell.getInstance('subckt_48_add')
     ins.setTransformation(
         Transformation(
-            toDbU(100.0), toDbU(150.0), Transformation.Orientation.ID
+            toDbU(25.0), toDbU(75.0), Transformation.Orientation.ID
         )
     )
     ins.setPlacementStatus(Instance.PlacementStatus.FIXED)
@@ -346,7 +346,7 @@ def alu16(**kwargs):
     ins = cell.getInstance('subckt_49_sub')
     ins.setTransformation(
         Transformation(
-            toDbU(600.0), toDbU(150.0), Transformation.Orientation.ID
+            toDbU(725.0), toDbU(75.0), Transformation.Orientation.ID
         )
     )
     ins.setPlacementStatus(Instance.PlacementStatus.FIXED)
@@ -406,6 +406,24 @@ def alu16(**kwargs):
 
     print("editor", editor, dir(editor))
 
+    # place first (in middle, between two)
+    # this puts all the remaining cells (little ones)
+    # into this (small) space so that they do not go
+    # "all over the place" around the add and sub
+    ab2 = Box( l( 400.0 )
+            , l(   50.0 )
+            , l( 700.0 )
+            , l( 500.0 ) )
+
+    cell.setAbutmentBox( ab2 )
+    etesian = Etesian.EtesianEngine.create(cell)
+    etesian.place()
+
+    # then route (globally)
+    # this connects up not just in the remaining (little) cells,
+    # it connects *to add and sub and the outside world as well*
+    cell.setAbutmentBox( ab )
+
     result = placeAndRoute(cell)
 
     af.saveCell(cell, CRL.Catalog.State.Views)
@@ -422,19 +440,10 @@ def ScriptMain(**kwargs):
 
 
 if __name__ == '__main__':
-    try:
-        kwargs = {}
-        success = ScriptMain(**kwargs)
-        shellSuccess = 0
-        if not success:
-            shellSuccess = 1
-
-    except ImportError, e:
-        showPythonTrace(__file__, e, False)
-        sys.exit(1)
-
-    except Exception, e:
-        showPythonTrace(__file__, e)
-        sys.exit(2)
+    kwargs = {}
+    success = ScriptMain(**kwargs)
+    shellSuccess = 0
+    if not success:
+        shellSuccess = 1
 
     sys.exit(shellSuccess)