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.64k stars 566 forks source link

OpenSTA is not able to read `estimate_parasitics -spef_file` dialect #6225

Open oharboe opened 5 days ago

oharboe commented 5 days ago

With https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/pull/2587, the below should work:

make DESIGN_CONFIG=designs/asap7/mock-array/Element/config.mk grt
make ABSTRACT_SOURCE=5_1_grt DESIGN_CONFIG=designs/asap7/mock-array/Element/config.mk do-generate_abstract
cp results/asap7/mock-array_Element/base/5_1_grt.v results/asap7/mock-array_Element/base/6_final.v
cp results/asap7/mock-array_Element/base/5_1_grt_default.spef results/asap7/mock-array_Element/base/6_final.spef
make ABSTRACT_SOURCE=5_1_grt DESIGN_CONFIG=designs/asap7/mock-array/config.mk grt
cp results/asap7/mock-array/base/5_1_grt.v results/asap7/mock-array/base/6_final.v
cp results/asap7/mock-array/base/5_1_grt_default.spef results/asap7/mock-array/base/6_final.spef
cp results/asap7/mock-array/base/5_1_grt.sdc results/asap7/mock-array/base/6_final.sdc
make DESIGN_CONFIG=designs/asap7/mock-array/config.mk simulate power

Originally posted by @oharboe in https://github.com/The-OpenROAD-Project/OpenROAD/discussions/6219#discussioncomment-11359461

Error:

make DESIGN_CONFIG=designs/asap7/mock-array/config.mk power

.spef files generated by estimate_parasitics -global_route do not not match global route .v file:

[deleted]
Warning: ./results/asap7/mock-array/base/6_final.spef line 4182, pin REG_9$_DFF_P_/QN not found.
Warning: ./results/asap7/mock-array/base/6_final.spef line 4183, pin _065_/A not found.
Warning: ./results/asap7/mock-array/base/6_final.spef line 4196, pin _065_/A not found.
Warning: ./results/asap7/mock-array/base/6_final.spef line 4197, pin REG_9$_DFF_P_/QN not found.
Warning: ./results/asap7/mock-array/base/6_final.spef line 4201, pin REG_0$_DFF_P_/QN not found.
[deleted]
oharboe commented 5 days ago

Examining the .spef file from make final vs make grt, there are some differences I see immediately:

estimate_parasitics -spec_file version:

*D_NET _000_ 0.804904
*CONN
*I REG_9\$_DFF_P_/QN O *D DFFHQNx2_ASAP7_75t_R
*I _065_/A I *D INVx3_ASAP7_75t_R
*CAP
1 _000_:1 0.0589401
2 _000_:2 0.0362502
3 _000_:3 0.313907
4 _000_:4 0.313907
5 _000_:5 0.0296043
*RES
1 _000_:1 _000_:2 0.0130799
2 _000_:2 _000_:3 0.0172
3 _000_:3 _000_:4 0.117719
4 _000_:4 _000_:5 0.0172
5 _065_/A _000_:5 0.0278819
6 REG_9\$_DFF_P_/QN _000_:1 0.025387
*END

vs:

[deleted]
*NAME_MAP
*23402 REG_9\$_DFF_P_
[deleted]
*D_NET *1 0.000501571
*CONN
*I *23403:A I *D INVx3_ASAP7_75t_R
*I *23402:QN O *D DFFHQNx2_ASAP7_75t_R
*CAP
1 *23403:A 0
2 *23402:QN 3.26469e-05
3 *1:10 0.00019743
4 *1:8 0.000230077
5 *1:8 *15540:21 6.7842e-07
6 *1:8 *19703:6 0
7 *1:10 *8:8 0
8 *1:10 *15510:21 0
9 *1:10 *15510:27 0
10 *1:10 *18132:8 1.34466e-06
11 *1:10 *19662:8 5.37866e-07
12 *1:10 *19673:8 0
13 *1:10 *19712:12 1.41197e-05
14 *1:10 *22281:21 3.05118e-08
15 *1:10 *22286:27 1.24158e-05
16 *1:10 *22295:27 9.30043e-06
17 *1:10 *22297:27 1.93482e-06
18 *1:10 *22327:27 0
19 *1:10 *22336:27 3.05118e-08
20 *1:10 *22341:27 1.02359e-06
*RES
1 *23402:QN *1:8 47.7706 
2 *1:8 *1:10 144.171 
3 *1:10 *23403:A 34.4 
*END
maliberty commented 4 days ago

The name map is optional and just reduced the file size. The pin delimiter is the real issue.

@eder-matheus perhaps it would be better to write the parasitics to odb and use the existing write_spef functionality.