From: Jock Tanner Date: Fri, 20 Mar 2020 09:32:13 +0000 (+0000) Subject: Do some cleanup. X-Git-Tag: partial-core-ls180-gdsii~163 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f7b8b7357498b2f642bf502cda8478a84a16c0bc;p=soclayout.git Do some cleanup. --- diff --git a/experiments7/doAlu16.py b/experiments7/doAlu16.py index 2fae8c6..9ac210b 100755 --- a/experiments7/doAlu16.py +++ b/experiments7/doAlu16.py @@ -9,12 +9,11 @@ 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, + 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 @@ -103,7 +102,13 @@ def create_pins(cell, net, name, direction, 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() @@ -120,7 +125,7 @@ def placeAndRoute(cell): return success -def coriolisSetup(): +def coriolis_setup(): Cfg.Configuration.pushDefaultPriority(Cfg.Parameter.Priority.UserFile) cellsTop = '~/alliance-check-toolkit/cells' @@ -157,8 +162,7 @@ def coriolisSetup(): Cfg.Configuration.popDefaultPriority() -def add(**kwargs): - editor = kwargs.get('editor', None) +def add(editor=None, **kwargs): db = DataBase.getDB() print(db, dir(db)) @@ -211,7 +215,7 @@ def add(**kwargs): if editor: editor.setCell(cell) - placeAndRoute(cell) + place_and_route(cell) UpdateSession.open() @@ -225,11 +229,10 @@ def add(**kwargs): 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)) @@ -283,7 +286,7 @@ def sub(**kwargs): if editor: editor.setCell(cell) - placeAndRoute(cell) + place_and_route(cell) UpdateSession.open() @@ -296,11 +299,10 @@ def sub(**kwargs): 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)) @@ -366,16 +368,16 @@ def alu16(**kwargs): # 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)