File size: 1,347 Bytes
660c0b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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