Is there a list somewhere of all available TCL com...
# openroad
t
Is there a list somewhere of all available TCL commands ? I need to find an instance name from a "glob". ( actual instance name is something like
gpio\[0\].gpio_I.genblk1.genblk1.genblk1.genblk1.genblk1.genblk1.pad_I
) but I'd like to find the complete name using just the prefix
gpio\[0\]
.
a
Tcl command
help
I believe lists all commands in the global namespace.
t
Copy code
proc get_io {index} {
    foreach inst [[ord::get_db_block] getInsts] {
        if { [string match "gpio\\\\\\\[$index\\\\\\\]*" "[$inst getName]"] } {
            return "[$inst getName]"
        }
    }
}
This is what I ended up with.
help list stuff in global name space, but seems like a lot of stuff is under "objects" and I couldn't find away to list that.
a
Does
get_cells
not work for this purpose?
t
[ERROR STA-1570] no network has been linked.
I guess being a STA thing, it's just not available where I am ATM.
a
if you want to look at the stuff in the ord namespace you can look at db.h. It's in C++ but the functions are automatically converted to Tcl using SWIG
1
You should be able to run, I think,
link_design
to get STA linked
t
yeah, I recognized the stuff under ord from the python api 😅 Unfortunately, no "glob" style search in there, so I had to iterate myself. Not sure if there is a more convenient way somewhere ... couldn't see one in db.h
a
I think it's because it's on the STA side with
get_cells
, so no need to duplicate code. The design just needs to be linked first.