hammer
hammer copied to clipboard
Invoking Python-based hooks from TCL tools
As hooks are right now tied to invocation of a particular HammerTool, there isn't an alternate way of invoking this script from within Innovus without calling it from TCL.
maybe something like process hooks -> determine TCL portions -> write TCL portions -> execute <TCL portions> <Python portions> <TCL portions> ... as per order of the TCL portions?
_Originally posted by @harrisonliew in #511
Is the idea that you might have some kind of embedded method that can be called as a __main__()
and some behind-the-scenes magic would produce the tcl that would call it?
Possibly. Another way to do it (and avoid the Python -> TCL -> Python loop) is to run the TCL tool until a Python step shows up, run the Python step, then continue running any remaining TCL steps.
I like the second approach better as it avoids the environment issues I ran into running the Python script from within Innovus 18.1's TCL interpreter. Some issues I forsee are:
- Tool logs would be discontinuous
- Loss of database settings caused by #430
Getting this to work would be good for something like OpenROAD anyway, since a par action over there submits to more than 1 tool.