Return unused layers.
authorJock Tanner <tanner.of.kha@gmail.com>
Mon, 16 Mar 2020 17:46:01 +0000 (17:46 +0000)
committerJock Tanner <tanner.of.kha@gmail.com>
Mon, 16 Mar 2020 17:46:01 +0000 (17:46 +0000)
experiments7/doAlu16.py

index f2c91bdbdbcbf76fa4cda8b6b2e64037716a69e4..21bb60148f3e77afd1c19dcebb2a18a5067980f0 100755 (executable)
@@ -9,6 +9,7 @@ import Cfg
 import Etesian
 import Katana
 import clocktree.ClockTree
+from chip import Configuration
 from Hurricane import (
     DbU, DataBase, UpdateSession, Box, Transformation, Instance,
     Contact, Vertical, Pad, Pin, NetExternalComponents,
@@ -112,10 +113,13 @@ def add(**kwargs):
 
     db = DataBase.getDB()
     print(db, dir(db))
+    METAL2 = DataBase.getDB().getTechnology().getLayer('METAL2')
     METAL3 = DataBase.getDB().getTechnology().getLayer('METAL3')
+    METAL5 = DataBase.getDB().getTechnology().getLayer('METAL5')
     BLOCKAGE2 = DataBase.getDB().getTechnology().getLayer('BLOCKAGE2')
     BLOCKAGE3 = DataBase.getDB().getTechnology().getLayer('BLOCKAGE3')
     BLOCKAGE4 = DataBase.getDB().getTechnology().getLayer('BLOCKAGE4')
+    BLOCKAGE5 = DataBase.getDB().getTechnology().getLayer('BLOCKAGE5')
 
     cell = af.getCell('add', CRL.Catalog.State.Logical)
     print(cell.getNet('a(0)'))
@@ -221,10 +225,13 @@ def sub(**kwargs):
 
     db = DataBase.getDB()
     print(db, dir(db))
+    METAL2 = DataBase.getDB().getTechnology().getLayer('METAL2')
     METAL3 = DataBase.getDB().getTechnology().getLayer('METAL3')
+    METAL5 = DataBase.getDB().getTechnology().getLayer('METAL5')
     BLOCKAGE2 = DataBase.getDB().getTechnology().getLayer('BLOCKAGE2')
     BLOCKAGE3 = DataBase.getDB().getTechnology().getLayer('BLOCKAGE3')
     BLOCKAGE4 = DataBase.getDB().getTechnology().getLayer('BLOCKAGE4')
+    BLOCKAGE5 = DataBase.getDB().getTechnology().getLayer('BLOCKAGE5')
 
     cell = af.getCell('sub', CRL.Catalog.State.Logical)
     print(cell.getNet('a(0)'))
@@ -326,9 +333,7 @@ def sub(**kwargs):
 
 
 def alu16(**kwargs):
-    editor = None
-    if kwargs.has_key('editor') and kwargs['editor']:
-        editor = kwargs['editor']
+    editor = kwargs.get('editor', None)
 
     db = DataBase.getDB()
     print(db, dir(db))