palaniappan-r's picture
Add markdown sources
d59bb1b verified
# What is the order of pins for get_ports?
Tool: OpenSTA
Subcategory: Usage question
## Conversation
### oharboe
I'm using `-group -order` with `set_io_constraints` and I'm using the tcl snippet below to enumerate pins.
However, this brings up the question: what order does `get_ports` return pins in?
```
proc match_pins { regex } {
set pins {}
foreach pin [get_ports -regexp $regex] {
lappend pins [get_property $pin name]
}
return $pins
}
```
### oharboe
@nerriav FYI
### maliberty
arbitrary order, no assumptions should be made
### maliberty
The command comes from SDC and such an option would be non-standard and non-portable.
### oharboe
In mock-array-big, I introduced a designs/asap7/mock-array-big/util.tcl function, which is shared between macros and top level of the design.
I'm thinking that a shared util.tcl function will be required for non-trivial designs anyway.
Perhaps it is sufficient to provide an example of this in mock-array-big for now?
I see this somewhat tying into how one would have a centralized method to calculate properties of macros and the top level design: manual placement of macros relative to eachother, sizes of macros calculated based on environment variables, etc.
https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/discussions/1067