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,
+ DbU, DataBase, UpdateSession, Box, Transformation, Instance, Pad, Pin,
+ NetExternalComponents,
)
-from helpers import l, showPythonTrace
+from helpers import l
from plugins import RSavePlugin
import symbolic.cmos # do not remove
return x, y
-def placeAndRoute(cell):
+def place_and_route(cell):
+ """
+ Places and routes.
+
+ :param cell: Hurricane.Cell object to operate on,
+ :return: True on success, False otherwise.
+ """
etesian = Etesian.EtesianEngine.create(cell)
etesian.place()
return success
-def coriolisSetup():
+def coriolis_setup():
Cfg.Configuration.pushDefaultPriority(Cfg.Parameter.Priority.UserFile)
cellsTop = '~/alliance-check-toolkit/cells'
Cfg.Configuration.popDefaultPriority()
-def add(**kwargs):
- editor = kwargs.get('editor', None)
+def add(editor=None, **kwargs):
db = DataBase.getDB()
print(db, dir(db))
if editor:
editor.setCell(cell)
- placeAndRoute(cell)
+ place_and_route(cell)
UpdateSession.open()
Pad.create(last_net, BLOCKAGE4, ab)
UpdateSession.close()
- RSavePlugin.ScriptMain(**kwargs)
+ RSavePlugin.ScriptMain(editor=editor, **kwargs)
-def sub(**kwargs):
- editor = kwargs.get('editor', None)
+def sub(editor=None, **kwargs):
db = DataBase.getDB()
print(db, dir(db))
if editor:
editor.setCell(cell)
- placeAndRoute(cell)
+ place_and_route(cell)
UpdateSession.open()
Pad.create(last_net, BLOCKAGE4, ab)
UpdateSession.close()
- RSavePlugin.ScriptMain(**kwargs)
+ RSavePlugin.ScriptMain(editor=editor, **kwargs)
-def alu16(**kwargs):
- editor = kwargs.get('editor', None)
+def alu16(editor=None, **kwargs):
db = DataBase.getDB()
print(db, dir(db))
# it connects *to add and sub and the outside world as well*
cell.setAbutmentBox(ab)
- result = placeAndRoute(cell)
+ result = place_and_route(cell)
af.saveCell(cell, CRL.Catalog.State.Views)
- RSavePlugin.ScriptMain(**kwargs)
+ RSavePlugin.ScriptMain(editor=editor, **kwargs)
return result
def ScriptMain(**kwargs):
- coriolisSetup()
+ coriolis_setup()
add(**kwargs)
sub(**kwargs)
return alu16(**kwargs)