The-OpenROAD-Project / OpenROAD

OpenROAD's unified application implementing an RTL-to-GDS Flow. Documentation at https://openroad.readthedocs.io/en/latest/
https://theopenroadproject.org/
BSD 3-Clause "New" or "Revised" License
1.49k stars 525 forks source link

overlapping path delays not respected #1879

Closed egorxe closed 2 years ago

egorxe commented 2 years ago

If one set_max_delay constraint terminates (-to) on combinational cell where another one starts (-from) one or both of these constraints are lost. I'm attaching a simple example. Two first SDC lines should create two timing paths:

set_max_delay -from [get_pins {_1_/A}] -to [get_ports out0] 0.01000
set_max_delay -from [get_ports in0] -to [get_pins {_1_/X}] 0.02000
#set_max_delay -from [get_ports in0] -to [get_pins {_1_/A}] 0.02000

But none are reported:

openroad -exit sdc_ignored.tcl
OpenROAD v2.0-3265-gc1c315118 
This program is licensed under the BSD-3 license. See the LICENSE file for details.
Components of this program may be licensed under more restrictive licenses which must be honored.
[INFO ODB-0222] Reading LEF file: sky130_fd_sc_hd__nom.tlef
[INFO ODB-0223]     Created 13 technology layers
[INFO ODB-0224]     Created 25 technology vias
[INFO ODB-0226] Finished LEF file:  sky130_fd_sc_hd__nom.tlef
[INFO ODB-0222] Reading LEF file: sky130_fd_sc_hd.lef
[WARNING ODB-0220] WARNING (LEFPARS-2008): NOWIREEXTENSIONATPIN statement is obsolete in version 5.6 or later.
The NOWIREEXTENSIONATPIN statement will be ignored. See file sky130_fd_sc_hd.lef at line 2.

[INFO ODB-0225]     Created 441 library cells
[INFO ODB-0226] Finished LEF file:  sky130_fd_sc_hd.lef
No paths found.

If we comment out any one of these two first SDC lines the remaining path will be reported as normal:

openroad -exit sdc_ignored.tcl
OpenROAD v2.0-3265-gc1c315118 
...
[INFO ODB-0226] Finished LEF file:  sky130_fd_sc_hd.lef
Startpoint: in0 (input port)
Endpoint: _1_/X (internal path endpoint)
Path Group: **default**
Path Type: max

  Delay    Time   Description
---------------------------------------------------------
   0.00    0.00 v input external delay
   0.00    0.00 v in0 (in)
   0.07    0.07 v _1_/X (sky130_fd_sc_hd__buf_1)
           0.07   data arrival time

   0.02    0.02   max_delay
   0.00    0.02   output external delay
           0.02   data required time
---------------------------------------------------------
           0.02   data required time
          -0.07   data arrival time
---------------------------------------------------------
          -0.05   slack (VIOLATED)

Startpoint: in0 (input port)
Endpoint: _1_/X (internal path endpoint)
Path Group: **default**
Path Type: max

  Delay    Time   Description
---------------------------------------------------------
   0.00    0.00 ^ input external delay
   0.00    0.00 ^ in0 (in)
   0.07    0.07 ^ _1_/X (sky130_fd_sc_hd__buf_1)
           0.07   data arrival time

   0.02    0.02   max_delay
   0.00    0.02   output external delay
           0.02   data required time
---------------------------------------------------------
           0.02   data required time
          -0.07   data arrival time
---------------------------------------------------------
          -0.05   slack (VIOLATED)

Interestingly if we comment out the second SDC line and uncomment initially commented third, which terminates on another pin of the same cell, then only the third path will be reported:

openroad -exit sdc_ignored.tcl
OpenROAD v2.0-3265-gc1c315118 
...
[INFO ODB-0226] Finished LEF file:  sky130_fd_sc_hd.lef
Startpoint: in0 (input port)
Endpoint: _1_/A (internal path endpoint)
Path Group: **default**
Path Type: max

  Delay    Time   Description
---------------------------------------------------------
   0.00    0.00 ^ input external delay
   0.00    0.00 ^ in0 (in)
   0.00    0.00 ^ _1_/A (sky130_fd_sc_hd__buf_1)
           0.00   data arrival time

   0.02    0.02   max_delay
   0.00    0.02   output external delay
           0.02   data required time
---------------------------------------------------------
           0.02   data required time
          -0.00   data arrival time
---------------------------------------------------------
           0.02   slack (MET)

Startpoint: in0 (input port)
Endpoint: _1_/A (internal path endpoint)
Path Group: **default**
Path Type: max

  Delay    Time   Description
---------------------------------------------------------
   0.00    0.00 v input external delay
   0.00    0.00 v in0 (in)
   0.00    0.00 v _1_/A (sky130_fd_sc_hd__buf_1)
           0.00   data arrival time

   0.02    0.02   max_delay
   0.00    0.02   output external delay
           0.02   data required time
---------------------------------------------------------
           0.02   data required time
          -0.00   data arrival time
---------------------------------------------------------
           0.02   slack (MET)

sdc_ignored.tar.gz .

jjcherry56 commented 2 years ago

This is actually an OpenSTA issue. It is fixed by commit c7debe5 but not integrated into openroad (yet)