Command line support for Katana in cgt.

* New: In Unicorn/cgt.py, add "-K" option to use Katana for global and
    detailed routed (in place of Knik/Kite).
      Comment the preroute stage to ensure determinism (I often forgot
    to run this stage while in graphic mode).
This commit is contained in:
Jean-Paul Chaput 2019-02-26 20:09:26 +01:00
parent 9e6463c217
commit 57d52023e1
1 changed files with 21 additions and 3 deletions

View File

@ -114,6 +114,7 @@ if __name__ == '__main__':
parser.add_option( '-D', '--core-dump' , action='store_true', dest='coreDump' , help='Enable core-dump when a crash occurs.')
parser.add_option( '-L', '--log-mode' , action='store_true', dest='logMode' , help='Disable ANSI escape sequences in console output.')
parser.add_option( '-t', '--text' , action='store_true', dest='textMode' , help='Run in command line mode.')
parser.add_option( '-K', '--use-katana' , action='store_true', dest='useKatana' , help='Use Katana instead of Knik/Kite router.')
parser.add_option( '-m', '--margin' , type='float' , dest='margin' , help='Percentage of free area to add to the minimal placement area.')
parser.add_option( '-P', '--place' , action='store_true', dest='place' , help='Run the analytical placer (Etesian).')
parser.add_option( '-G', '--global-route' , action='store_true', dest='globalRoute' , help='Run the global router (Knik).')
@ -129,7 +130,8 @@ if __name__ == '__main__':
(options, args) = parser.parse_args()
args.insert(0, 'cgt')
flags = 0
useKatana = False
flags = 0
if options.noInit:
flags |= CRL.AllianceFramework.NoPythonInit
@ -151,6 +153,7 @@ if __name__ == '__main__':
if options.vTracksLocal: Cfg.getParamInt ('kite.vTracksReservedLocal').setInt(options.vTracksLocal)
if options.eventsLimit: Cfg.getParamInt ('kite.eventsLimit' ).setInt(options.eventsLimit)
if options.topRoutingLayer: Cfg.getParamString ('katabatic.topRoutingLayer').setString(options.topRoutingLayer)
if options.useKatana: useKatana = True
loadGlobal = options.loadGlobal
saveGlobal = options.saveGlobal
@ -196,8 +199,8 @@ if __name__ == '__main__':
runScript(options.script,unicorn)
setCgtBanner(unicorn.getBanner())
print unicorn.getBanner()
print credits()
#print unicorn.getBanner()
#print credits()
if cell: unicorn.setCell(cell)
unicorn.show()
@ -214,6 +217,21 @@ if __name__ == '__main__':
if detailRoute and not (loadGlobal or globalRoute): globalRoute = True
runKiteTool = loadGlobal or globalRoute or detailRoute
if useKatana and runKiteTool:
runKiteTool = False
katana = Katana.KatanaEngine.create( cell )
#katana.printConfiguration ()
katana.digitalInit ()
#katana.runNegociatePreRouted()
katana.runGlobalRouter ()
katana.loadGlobalRouting ( Anabatic.EngineLoadGrByNet )
katana.layerAssign ( Anabatic.EngineNoNetLayerAssign )
katana.runNegociate ( Katana.Flags.NoFlags )
kiteSuccess = katana.getToolSuccess()
#katana.finalizeLayout()
katana.destroy()
if runKiteTool:
if loadGlobal: globalFlags = Kite.KtLoadGlobalRouting
else: globalFlags = Kite.KtBuildGlobalRouting