Flat vs leaf is related to cells and pins in a hierarchical design. You might have a timing path that starts at registerA and ends at registerB. If your cell hierarchy is this:
top_cell
--child_A
--registerA
--child_B
--registerB
then registerA and registerB are leaf cells. The driver and receiver pins are the leaf pins. The net connection from registerA to registerB must also exit child_A and enter child_B through hierarchical pins. A flat collection will include both the leaf pins and the hierarchical pins.
In Synopsys tools, you can quickly get command descriptions with man
.
For example, man all_fanin
all_fanin
Creates a collection of pins, ports, or cells in the fanin of
the specified sinks.
. . .
-flat Includes objects throughout the design hierarchy in the result.
This means that the only non-leaf objects in the result are
hierarchical sink pins.
If you do not specify this option, the result includes only
objects within the same hierarchical level as the current sink.
. . .
-only_cells
Includes only cells in the timing fanin of the specified sinks
in the result and not pins or ports.
. . .
There is no -only_leaf
option to all_fanin
or all_fanout
. Returning only leaf objects is the default condition.