librelane 2.4.0.dev0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of librelane might be problematic. Click here for more details.

Files changed (166) hide show
  1. librelane/__init__.py +38 -0
  2. librelane/__main__.py +470 -0
  3. librelane/__version__.py +43 -0
  4. librelane/common/__init__.py +61 -0
  5. librelane/common/cli.py +75 -0
  6. librelane/common/drc.py +245 -0
  7. librelane/common/generic_dict.py +319 -0
  8. librelane/common/metrics/__init__.py +35 -0
  9. librelane/common/metrics/__main__.py +413 -0
  10. librelane/common/metrics/library.py +354 -0
  11. librelane/common/metrics/metric.py +186 -0
  12. librelane/common/metrics/util.py +279 -0
  13. librelane/common/misc.py +402 -0
  14. librelane/common/ring_buffer.py +63 -0
  15. librelane/common/tcl.py +80 -0
  16. librelane/common/toolbox.py +549 -0
  17. librelane/common/tpe.py +41 -0
  18. librelane/common/types.py +117 -0
  19. librelane/config/__init__.py +32 -0
  20. librelane/config/__main__.py +158 -0
  21. librelane/config/config.py +1025 -0
  22. librelane/config/flow.py +490 -0
  23. librelane/config/pdk_compat.py +255 -0
  24. librelane/config/preprocessor.py +464 -0
  25. librelane/config/removals.py +45 -0
  26. librelane/config/variable.py +722 -0
  27. librelane/container.py +264 -0
  28. librelane/env_info.py +306 -0
  29. librelane/examples/spm/config.yaml +33 -0
  30. librelane/examples/spm/pin_order.cfg +14 -0
  31. librelane/examples/spm/src/impl.sdc +73 -0
  32. librelane/examples/spm/src/signoff.sdc +68 -0
  33. librelane/examples/spm/src/spm.v +73 -0
  34. librelane/examples/spm/verify/spm_tb.v +106 -0
  35. librelane/examples/spm-user_project_wrapper/SPM_example.v +286 -0
  36. librelane/examples/spm-user_project_wrapper/base_sdc_file.sdc +145 -0
  37. librelane/examples/spm-user_project_wrapper/config-tut.json +12 -0
  38. librelane/examples/spm-user_project_wrapper/config.json +13 -0
  39. librelane/examples/spm-user_project_wrapper/defines.v +66 -0
  40. librelane/examples/spm-user_project_wrapper/template.def +7656 -0
  41. librelane/examples/spm-user_project_wrapper/user_project_wrapper.v +123 -0
  42. librelane/flows/__init__.py +24 -0
  43. librelane/flows/builtins.py +18 -0
  44. librelane/flows/classic.py +330 -0
  45. librelane/flows/cli.py +463 -0
  46. librelane/flows/flow.py +985 -0
  47. librelane/flows/misc.py +71 -0
  48. librelane/flows/optimizing.py +179 -0
  49. librelane/flows/sequential.py +367 -0
  50. librelane/flows/synth_explore.py +173 -0
  51. librelane/logging/__init__.py +40 -0
  52. librelane/logging/logger.py +323 -0
  53. librelane/open_pdks_rev +1 -0
  54. librelane/plugins.py +21 -0
  55. librelane/py.typed +0 -0
  56. librelane/scripts/base.sdc +80 -0
  57. librelane/scripts/klayout/Readme.md +2 -0
  58. librelane/scripts/klayout/open_design.py +63 -0
  59. librelane/scripts/klayout/render.py +121 -0
  60. librelane/scripts/klayout/stream_out.py +176 -0
  61. librelane/scripts/klayout/xml_drc_report_to_json.py +45 -0
  62. librelane/scripts/klayout/xor.drc +120 -0
  63. librelane/scripts/magic/Readme.md +1 -0
  64. librelane/scripts/magic/common/read.tcl +114 -0
  65. librelane/scripts/magic/def/antenna_check.tcl +35 -0
  66. librelane/scripts/magic/def/mag.tcl +19 -0
  67. librelane/scripts/magic/def/mag_gds.tcl +81 -0
  68. librelane/scripts/magic/drc.tcl +79 -0
  69. librelane/scripts/magic/extract_spice.tcl +98 -0
  70. librelane/scripts/magic/gds/drc_batch.tcl +74 -0
  71. librelane/scripts/magic/gds/erase_box.tcl +32 -0
  72. librelane/scripts/magic/gds/extras_mag.tcl +47 -0
  73. librelane/scripts/magic/gds/mag_with_pointers.tcl +32 -0
  74. librelane/scripts/magic/get_bbox.tcl +11 -0
  75. librelane/scripts/magic/lef/extras_maglef.tcl +63 -0
  76. librelane/scripts/magic/lef/maglef.tcl +27 -0
  77. librelane/scripts/magic/lef.tcl +57 -0
  78. librelane/scripts/magic/open.tcl +28 -0
  79. librelane/scripts/magic/wrapper.tcl +19 -0
  80. librelane/scripts/netgen/setup.tcl +28 -0
  81. librelane/scripts/odbpy/apply_def_template.py +49 -0
  82. librelane/scripts/odbpy/cell_frequency.py +107 -0
  83. librelane/scripts/odbpy/check_antenna_properties.py +116 -0
  84. librelane/scripts/odbpy/contextualize.py +109 -0
  85. librelane/scripts/odbpy/defutil.py +574 -0
  86. librelane/scripts/odbpy/diodes.py +373 -0
  87. librelane/scripts/odbpy/disconnected_pins.py +305 -0
  88. librelane/scripts/odbpy/exception_codes.py +17 -0
  89. librelane/scripts/odbpy/filter_unannotated.py +100 -0
  90. librelane/scripts/odbpy/io_place.py +482 -0
  91. librelane/scripts/odbpy/label_macro_pins.py +277 -0
  92. librelane/scripts/odbpy/lefutil.py +97 -0
  93. librelane/scripts/odbpy/placers.py +162 -0
  94. librelane/scripts/odbpy/power_utils.py +395 -0
  95. librelane/scripts/odbpy/random_place.py +57 -0
  96. librelane/scripts/odbpy/reader.py +246 -0
  97. librelane/scripts/odbpy/remove_buffers.py +173 -0
  98. librelane/scripts/odbpy/snap_to_grid.py +57 -0
  99. librelane/scripts/odbpy/wire_lengths.py +93 -0
  100. librelane/scripts/openroad/antenna_check.tcl +20 -0
  101. librelane/scripts/openroad/antenna_repair.tcl +31 -0
  102. librelane/scripts/openroad/basic_mp.tcl +24 -0
  103. librelane/scripts/openroad/buffer_list.tcl +10 -0
  104. librelane/scripts/openroad/common/dpl.tcl +24 -0
  105. librelane/scripts/openroad/common/dpl_cell_pad.tcl +26 -0
  106. librelane/scripts/openroad/common/grt.tcl +32 -0
  107. librelane/scripts/openroad/common/io.tcl +476 -0
  108. librelane/scripts/openroad/common/pdn_cfg.tcl +135 -0
  109. librelane/scripts/openroad/common/resizer.tcl +103 -0
  110. librelane/scripts/openroad/common/set_global_connections.tcl +78 -0
  111. librelane/scripts/openroad/common/set_layer_adjustments.tcl +31 -0
  112. librelane/scripts/openroad/common/set_power_nets.tcl +30 -0
  113. librelane/scripts/openroad/common/set_rc.tcl +75 -0
  114. librelane/scripts/openroad/common/set_routing_layers.tcl +30 -0
  115. librelane/scripts/openroad/cts.tcl +80 -0
  116. librelane/scripts/openroad/cut_rows.tcl +24 -0
  117. librelane/scripts/openroad/dpl.tcl +24 -0
  118. librelane/scripts/openroad/drt.tcl +37 -0
  119. librelane/scripts/openroad/fill.tcl +30 -0
  120. librelane/scripts/openroad/floorplan.tcl +145 -0
  121. librelane/scripts/openroad/gpl.tcl +88 -0
  122. librelane/scripts/openroad/grt.tcl +30 -0
  123. librelane/scripts/openroad/gui.tcl +15 -0
  124. librelane/scripts/openroad/insert_buffer.tcl +127 -0
  125. librelane/scripts/openroad/ioplacer.tcl +67 -0
  126. librelane/scripts/openroad/irdrop.tcl +51 -0
  127. librelane/scripts/openroad/pdn.tcl +52 -0
  128. librelane/scripts/openroad/rcx.tcl +32 -0
  129. librelane/scripts/openroad/repair_design.tcl +70 -0
  130. librelane/scripts/openroad/repair_design_postgrt.tcl +48 -0
  131. librelane/scripts/openroad/rsz_timing_postcts.tcl +68 -0
  132. librelane/scripts/openroad/rsz_timing_postgrt.tcl +70 -0
  133. librelane/scripts/openroad/sta/check_macro_instances.tcl +53 -0
  134. librelane/scripts/openroad/sta/corner.tcl +393 -0
  135. librelane/scripts/openroad/tapcell.tcl +25 -0
  136. librelane/scripts/openroad/write_views.tcl +27 -0
  137. librelane/scripts/pyosys/construct_abc_script.py +177 -0
  138. librelane/scripts/pyosys/json_header.py +84 -0
  139. librelane/scripts/pyosys/synthesize.py +493 -0
  140. librelane/scripts/pyosys/ys_common.py +153 -0
  141. librelane/scripts/tclsh/hello.tcl +1 -0
  142. librelane/state/__init__.py +24 -0
  143. librelane/state/__main__.py +61 -0
  144. librelane/state/design_format.py +180 -0
  145. librelane/state/state.py +351 -0
  146. librelane/steps/__init__.py +61 -0
  147. librelane/steps/__main__.py +511 -0
  148. librelane/steps/checker.py +637 -0
  149. librelane/steps/common_variables.py +340 -0
  150. librelane/steps/cvc_rv.py +169 -0
  151. librelane/steps/klayout.py +509 -0
  152. librelane/steps/magic.py +566 -0
  153. librelane/steps/misc.py +160 -0
  154. librelane/steps/netgen.py +253 -0
  155. librelane/steps/odb.py +955 -0
  156. librelane/steps/openroad.py +2433 -0
  157. librelane/steps/openroad_alerts.py +102 -0
  158. librelane/steps/pyosys.py +629 -0
  159. librelane/steps/step.py +1547 -0
  160. librelane/steps/tclstep.py +288 -0
  161. librelane/steps/verilator.py +222 -0
  162. librelane/steps/yosys.py +371 -0
  163. librelane-2.4.0.dev0.dist-info/METADATA +151 -0
  164. librelane-2.4.0.dev0.dist-info/RECORD +166 -0
  165. librelane-2.4.0.dev0.dist-info/WHEEL +4 -0
  166. librelane-2.4.0.dev0.dist-info/entry_points.txt +8 -0
@@ -0,0 +1,48 @@
1
+ # Copyright 2020-2023 Efabless Corporation
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ source $::env(SCRIPTS_DIR)/openroad/common/io.tcl
15
+ source $::env(SCRIPTS_DIR)/openroad/common/resizer.tcl
16
+
17
+ load_rsz_corners
18
+ read_current_odb
19
+
20
+ set_propagated_clock [all_clocks]
21
+
22
+ set_dont_touch_objects
23
+
24
+ # set rc values
25
+ source $::env(SCRIPTS_DIR)/openroad/common/set_rc.tcl
26
+
27
+ # (Re-)GRT and Estimate Parasitics
28
+ # Temporarily always enabled: https://github.com/The-OpenROAD-Project/OpenROAD/issues/5590
29
+ #if { $::env(GRT_DESIGN_REPAIR_RUN_GRT) } {
30
+ source $::env(SCRIPTS_DIR)/openroad/common/grt.tcl
31
+ #}
32
+ estimate_parasitics -global_routing
33
+
34
+ # Repair design
35
+ repair_design -verbose \
36
+ -max_wire_length $::env(GRT_DESIGN_REPAIR_MAX_WIRE_LENGTH) \
37
+ -slew_margin $::env(GRT_DESIGN_REPAIR_MAX_SLEW_PCT) \
38
+ -cap_margin $::env(GRT_DESIGN_REPAIR_MAX_CAP_PCT)
39
+
40
+ # Re-DPL and GRT
41
+ source $::env(SCRIPTS_DIR)/openroad/common/dpl.tcl
42
+ unset_dont_touch_objects
43
+ if { $::env(GRT_DESIGN_REPAIR_RUN_GRT) } {
44
+ source $::env(SCRIPTS_DIR)/openroad/common/grt.tcl
45
+ }
46
+
47
+
48
+ write_views
@@ -0,0 +1,68 @@
1
+ # Copyright 2020-2023 Efabless Corporation
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ source $::env(SCRIPTS_DIR)/openroad/common/io.tcl
15
+ source $::env(SCRIPTS_DIR)/openroad/common/resizer.tcl
16
+
17
+ load_rsz_corners
18
+ read_current_odb
19
+
20
+ set_propagated_clock [all_clocks]
21
+
22
+ set_dont_touch_objects
23
+
24
+ # set rc values
25
+ source $::env(SCRIPTS_DIR)/openroad/common/set_rc.tcl
26
+
27
+ # CTS and detailed placement move instances, so update parastic estimates.
28
+ # estimate wire rc parasitics
29
+ estimate_parasitics -placement
30
+
31
+ # Resize
32
+ set setup_args [list]
33
+ lappend setup_args -verbose
34
+ lappend setup_args -setup
35
+ lappend setup_args -setup_margin $::env(PL_RESIZER_SETUP_SLACK_MARGIN)
36
+ lappend setup_args -max_buffer_percent $::env(PL_RESIZER_SETUP_MAX_BUFFER_PCT)
37
+ if { $::env(PL_RESIZER_GATE_CLONING) != 1 } {
38
+ lappend setup_args -skip_gate_cloning
39
+ }
40
+
41
+ set hold_args [list]
42
+ lappend hold_args -verbose
43
+ lappend hold_args -hold
44
+ lappend hold_args -setup_margin $::env(PL_RESIZER_SETUP_SLACK_MARGIN)
45
+ lappend hold_args -hold_margin $::env(PL_RESIZER_HOLD_SLACK_MARGIN)
46
+ lappend hold_args -max_buffer_percent $::env(PL_RESIZER_HOLD_MAX_BUFFER_PCT)
47
+ if { $::env(PL_RESIZER_ALLOW_SETUP_VIOS) == 1 } {
48
+ lappend hold_args -allow_setup_violations
49
+ }
50
+
51
+ if { $::env(PL_RESIZER_FIX_HOLD_FIRST) == 1 } {
52
+ repair_timing {*}$hold_args
53
+ repair_timing {*}$setup_args
54
+ } else {
55
+ repair_timing {*}$setup_args
56
+ repair_timing {*}$hold_args
57
+ }
58
+
59
+ # Legalize
60
+ source $::env(SCRIPTS_DIR)/openroad/common/dpl.tcl
61
+
62
+ unset_dont_touch_objects
63
+
64
+ source $::env(SCRIPTS_DIR)/openroad/common/set_rc.tcl
65
+ estimate_parasitics -placement
66
+
67
+
68
+ write_views
@@ -0,0 +1,70 @@
1
+ # Copyright 2020-2023 Efabless Corporation
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ source $::env(SCRIPTS_DIR)/openroad/common/io.tcl
15
+ source $::env(SCRIPTS_DIR)/openroad/common/resizer.tcl
16
+
17
+ load_rsz_corners
18
+ read_current_odb
19
+
20
+ set_propagated_clock [all_clocks]
21
+
22
+ set_dont_touch_objects
23
+
24
+ # set rc values
25
+ source $::env(SCRIPTS_DIR)/openroad/common/set_rc.tcl
26
+
27
+ # (Re-)GRT and Estimate Parasitics
28
+ # Temporarily always enabled: https://github.com/The-OpenROAD-Project/OpenROAD/issues/5590
29
+ #if { $::env(GRT_RESIZER_RUN_GRT) } {
30
+ source $::env(SCRIPTS_DIR)/openroad/common/grt.tcl
31
+ # }
32
+ estimate_parasitics -global_routing
33
+
34
+ # Resize
35
+ set setup_args [list]
36
+ lappend setup_args -verbose
37
+ lappend setup_args -setup
38
+ lappend setup_args -setup_margin $::env(GRT_RESIZER_SETUP_SLACK_MARGIN)
39
+ lappend setup_args -max_buffer_percent $::env(GRT_RESIZER_SETUP_MAX_BUFFER_PCT)
40
+ if { $::env(GRT_RESIZER_GATE_CLONING) != 1 } {
41
+ lappend setup_args -skip_gate_cloning
42
+ }
43
+
44
+ set hold_args [list]
45
+ lappend hold_args -verbose
46
+ lappend hold_args -hold
47
+ lappend hold_args -setup_margin $::env(GRT_RESIZER_SETUP_SLACK_MARGIN)
48
+ lappend hold_args -hold_margin $::env(GRT_RESIZER_HOLD_SLACK_MARGIN)
49
+ lappend hold_args -max_buffer_percent $::env(GRT_RESIZER_HOLD_MAX_BUFFER_PCT)
50
+ if { $::env(GRT_RESIZER_ALLOW_SETUP_VIOS) == 1 } {
51
+ lappend hold_args -allow_setup_violations
52
+ }
53
+
54
+ if { $::env(GRT_RESIZER_FIX_HOLD_FIRST) == 1 } {
55
+ repair_timing {*}$hold_args
56
+ repair_timing {*}$setup_args
57
+ } else {
58
+ repair_timing {*}$setup_args
59
+ repair_timing {*}$hold_args
60
+ }
61
+
62
+ # Re-DPL and GRT
63
+ source $::env(SCRIPTS_DIR)/openroad/common/dpl.tcl
64
+ unset_dont_touch_objects
65
+ if { $::env(GRT_RESIZER_RUN_GRT) } {
66
+ source $::env(SCRIPTS_DIR)/openroad/common/grt.tcl
67
+ }
68
+
69
+
70
+ write_views
@@ -0,0 +1,53 @@
1
+ # Copyright 2024 Efabless Corporation
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ source $::env(SCRIPTS_DIR)/openroad/common/io.tcl
15
+
16
+ set_cmd_units\
17
+ -time ns\
18
+ -capacitance pF\
19
+ -current mA\
20
+ -voltage V\
21
+ -resistance kOhm\
22
+ -distance um
23
+
24
+ set sta_report_default_digits 6
25
+
26
+ read_timing_info
27
+
28
+ set error_count 0
29
+ foreach {instance_name macro_name} $::env(_check_macro_instances) {
30
+ set instances [get_cells -hierarchical $instance_name]
31
+ set instance_count [llength $instances]
32
+ if { $instance_count < 1 } {
33
+ puts "\[ERROR\] No macro instance $instance_name found."
34
+ incr error_count
35
+ } elseif { $instance_count > 1 } {
36
+ puts "\[ERROR\] Macro instance name $instance_name matches multiple cells."
37
+ incr error_count
38
+ } else {
39
+ # The next line doesn't actually matter because this is Tcl but I'd feel
40
+ # dirty otherwise
41
+ set instance [lindex $instances 0]
42
+
43
+ set master_name [get_property $instance ref_name]
44
+ if { $master_name != $macro_name } {
45
+ puts "\[ERROR\] Instance $instance_name is configured as an instance of macro $macro_name, but is an instance of $master_name."
46
+ incr error_count
47
+ }
48
+ }
49
+ }
50
+
51
+ if { $error_count != 0 } {
52
+ exit -1
53
+ }
@@ -0,0 +1,393 @@
1
+ # Copyright 2020-2023 Efabless Corporation
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # This file supports one defined corner per-process.
16
+ # Any more defined corners will be ignored.
17
+ # Aggregation is left to the LibreLane step.
18
+
19
+
20
+ source $::env(SCRIPTS_DIR)/openroad/common/io.tcl
21
+
22
+ set_cmd_units\
23
+ -time ns\
24
+ -capacitance pF\
25
+ -current mA\
26
+ -voltage V\
27
+ -resistance kOhm\
28
+ -distance um
29
+
30
+ set sta_report_default_digits 6
31
+
32
+ if { [namespace exists ::ord] } {
33
+ read_current_odb
34
+ source $::env(SCRIPTS_DIR)/openroad/common/set_rc.tcl
35
+
36
+ # Internal API- brittle
37
+ if { [grt::have_routes] } {
38
+ estimate_parasitics -global_routing
39
+ } elseif { [rsz::check_corner_wire_cap] } {
40
+ estimate_parasitics -placement
41
+ }
42
+ } else {
43
+ read_timing_info
44
+ }
45
+ read_spefs
46
+
47
+ set corner [lindex [sta::corners] 0]
48
+ sta::set_cmd_corner $corner
49
+
50
+ set clocks [sta::sort_by_name [sta::all_clocks]]
51
+
52
+ puts "%OL_CREATE_REPORT min.rpt"
53
+ puts "\n==========================================================================="
54
+ puts "report_checks -path_delay min (Hold)"
55
+ puts "============================================================================"
56
+ puts "======================= [$corner name] Corner ===================================\n"
57
+ report_checks -sort_by_slack -path_delay min -fields {slew cap input nets fanout} -format full_clock_expanded -group_count 1000 -corner [$corner name]
58
+ puts ""
59
+ puts "%OL_END_REPORT"
60
+
61
+
62
+ puts "%OL_CREATE_REPORT max.rpt"
63
+ puts "\n==========================================================================="
64
+ puts "report_checks -path_delay max (Setup)"
65
+ puts "============================================================================"
66
+ puts "======================= [$corner name] Corner ===================================\n"
67
+ report_checks -sort_by_slack -path_delay max -fields {slew cap input nets fanout} -format full_clock_expanded -group_count 1000 -corner [$corner name]
68
+ puts ""
69
+ puts "%OL_END_REPORT"
70
+
71
+
72
+ puts "%OL_CREATE_REPORT checks.rpt"
73
+ puts "\n==========================================================================="
74
+ puts "report_checks -unconstrained"
75
+ puts "==========================================================================="
76
+ puts "======================= [$corner name] Corner ===================================\n"
77
+ report_checks -unconstrained -fields {slew cap input nets fanout} -format full_clock_expanded -corner [$corner name]
78
+ puts ""
79
+
80
+
81
+ puts "\n==========================================================================="
82
+ puts "report_checks --slack_max -0.01"
83
+ puts "============================================================================"
84
+ puts "======================= [$corner name] Corner ===================================\n"
85
+ report_checks -slack_max -0.01 -fields {slew cap input nets fanout} -format full_clock_expanded -corner [$corner name]
86
+ puts ""
87
+
88
+ puts "\n==========================================================================="
89
+ puts " report_check_types -max_slew -max_cap -max_fanout -violators"
90
+ puts "============================================================================"
91
+ puts "======================= [$corner name] Corner ===================================\n"
92
+ report_check_types -max_slew -max_capacitance -max_fanout -violators -corner [$corner name]
93
+ puts ""
94
+
95
+ puts "\n==========================================================================="
96
+ puts "report_parasitic_annotation -report_unannotated"
97
+ puts "============================================================================"
98
+ report_parasitic_annotation -report_unannotated
99
+
100
+ puts "\n==========================================================================="
101
+ puts "max slew violation count [sta::max_slew_violation_count]"
102
+ write_metric_int "design__max_slew_violation__count__corner:[$corner name]" [sta::max_slew_violation_count]
103
+ puts "max fanout violation count [sta::max_fanout_violation_count]"
104
+ write_metric_int "design__max_fanout_violation__count__corner:[$corner name]" [sta::max_fanout_violation_count]
105
+ puts "max cap violation count [sta::max_capacitance_violation_count]"
106
+ write_metric_int "design__max_cap_violation__count__corner:[$corner name]" [sta::max_capacitance_violation_count]
107
+ puts "============================================================================"
108
+
109
+ puts "\n==========================================================================="
110
+ puts "check_setup -verbose -unconstrained_endpoints -multiple_clock -no_clock -no_input_delay -loops -generated_clocks"
111
+ puts "==========================================================================="
112
+ check_setup -verbose -unconstrained_endpoints -multiple_clock -no_clock -no_input_delay -loops -generated_clocks
113
+ puts "%OL_END_REPORT"
114
+
115
+
116
+
117
+ puts "%OL_CREATE_REPORT power.rpt"
118
+ puts "\n==========================================================================="
119
+ puts " report_power"
120
+ puts "============================================================================"
121
+ puts "======================= [$corner name] Corner ===================================\n"
122
+ report_power -corner [$corner name]
123
+
124
+ set power_result [sta::design_power $corner]
125
+ set totals [lrange $power_result 0 3]
126
+ lassign $totals design_internal design_switching design_leakage design_total
127
+
128
+ write_metric_num "power__internal__total" $design_internal
129
+ write_metric_num "power__switching__total" $design_switching
130
+ write_metric_num "power__leakage__total" $design_leakage
131
+ write_metric_num "power__total" $design_total
132
+
133
+ puts ""
134
+ puts "%OL_END_REPORT"
135
+
136
+
137
+ puts "%OL_CREATE_REPORT skew.min.rpt"
138
+ puts "\n==========================================================================="
139
+ puts "Clock Skew (Hold)"
140
+ puts "============================================================================"
141
+ set skew_corner [worst_clock_skew -hold]
142
+ write_metric_num "clock__skew__worst_hold__corner:[$corner name]" $skew_corner
143
+
144
+ puts "======================= [$corner name] Corner ===================================\n"
145
+ report_clock_skew -corner [$corner name] -hold
146
+
147
+ puts "%OL_END_REPORT"
148
+
149
+ puts "%OL_CREATE_REPORT skew.max.rpt"
150
+ puts "\n==========================================================================="
151
+ puts "Clock Skew (Setup)"
152
+ puts "============================================================================"
153
+ set skew_corner [worst_clock_skew -setup]
154
+ write_metric_num "clock__skew__worst_setup__corner:[$corner name]" $skew_corner
155
+
156
+ puts "======================= [$corner name] Corner ===================================\n"
157
+ report_clock_skew -corner [$corner name] -setup
158
+
159
+ puts "%OL_END_REPORT"
160
+
161
+ puts "%OL_CREATE_REPORT ws.min.rpt"
162
+ puts "\n==========================================================================="
163
+ puts "Worst Slack (Hold)"
164
+ puts "============================================================================"
165
+ set ws [worst_slack -corner [$corner name] -min]
166
+ write_metric_num "timing__hold__ws__corner:[$corner name]" $ws
167
+ puts "[$corner name]: $ws"
168
+ puts "%OL_END_REPORT"
169
+
170
+ puts "%OL_CREATE_REPORT ws.max.rpt"
171
+ puts "\n==========================================================================="
172
+ puts "Worst Slack (Setup)"
173
+ puts "============================================================================"
174
+
175
+ set ws [worst_slack -corner [$corner name] -max]
176
+ write_metric_num "timing__setup__ws__corner:[$corner name]" $ws
177
+ puts "[$corner name]: $ws"
178
+ puts "%OL_END_REPORT"
179
+
180
+ puts "%OL_CREATE_REPORT tns.min.rpt"
181
+ puts "\n==========================================================================="
182
+ puts "Total Negative Slack (Hold)"
183
+ puts "============================================================================"
184
+
185
+ set tns [total_negative_slack -corner [$corner name] -min]
186
+ write_metric_num "timing__hold__tns__corner:[$corner name]" $tns
187
+ puts "[$corner name]: $tns"
188
+ puts "%OL_END_REPORT"
189
+
190
+ puts "%OL_CREATE_REPORT tns.max.rpt"
191
+ puts "\n==========================================================================="
192
+ puts "Total Negative Slack (Setup)"
193
+ puts "============================================================================"
194
+ set tns [total_negative_slack -corner [$corner name] -max]
195
+ write_metric_num "timing__setup__tns__corner:[$corner name]" $tns
196
+ puts "[$corner name]: $tns"
197
+ puts "%OL_END_REPORT"
198
+
199
+ puts "%OL_CREATE_REPORT wns.min.rpt"
200
+ puts "\n==========================================================================="
201
+ puts "Worst Negative Slack (Hold)"
202
+ puts "============================================================================"
203
+
204
+ set ws [worst_slack -corner [$corner name] -min]
205
+ set wns 0
206
+ if { $ws < 0 } {
207
+ set wns $ws
208
+ }
209
+ write_metric_num "timing__hold__wns__corner:[$corner name]" $wns
210
+ puts "[$corner name]: $wns"
211
+ puts "%OL_END_REPORT"
212
+
213
+ puts "%OL_CREATE_REPORT wns.max.rpt"
214
+ puts "\n==========================================================================="
215
+ puts "Worst Negative Slack (Setup)"
216
+ puts "============================================================================"
217
+
218
+ set ws [worst_slack -corner [$corner name] -max]
219
+ set wns 0.0
220
+ if { $ws < 0 } {
221
+ set wns $ws
222
+ }
223
+ write_metric_num "timing__setup__wns__corner:[$corner name]" $wns
224
+ puts "[$corner name]: $wns"
225
+ puts "%OL_END_REPORT"
226
+
227
+ proc check_if_terminal {pin_object} {
228
+ set net [get_nets -of_object $pin_object]
229
+ if { "$net" == "NULL" } {
230
+ return 1
231
+ }
232
+ return 0
233
+ }
234
+
235
+ proc get_path_kind {start_pin end_pin} {
236
+ set from "reg"
237
+ set to "reg"
238
+
239
+ if { [check_if_terminal $start_pin] } {
240
+ set from "in"
241
+ }
242
+ if { [check_if_terminal $end_pin] } {
243
+ set to "out"
244
+ }
245
+ return "$from-$to"
246
+ }
247
+
248
+ puts "%OL_CREATE_REPORT violator_list.rpt"
249
+ puts "\n==========================================================================="
250
+ puts "Violator List"
251
+ puts "============================================================================"
252
+
253
+ set total_hold_vios 0
254
+ set r2r_hold_vios 0
255
+ set total_setup_vios 0
256
+ set r2r_setup_vios 0
257
+
258
+ set max_violator_count 999999999
259
+ if { [info exists ::env(STA_MAX_VIOLATOR_COUNT)] } {
260
+ set max_violator_count $::env(STA_MAX_VIOLATOR_COUNT)
261
+ }
262
+
263
+ set hold_violating_paths [find_timing_paths -unique_paths_to_endpoint -path_delay min -sort_by_slack -group_count $max_violator_count -slack_max 0]
264
+ foreach path $hold_violating_paths {
265
+ set start_pin [get_property $path startpoint]
266
+ set end_pin [get_property $path endpoint]
267
+ set kind "[get_path_kind $start_pin $end_pin]"
268
+ set slack [get_property $path slack]
269
+
270
+ if { $slack >= 0 } {
271
+ continue
272
+ }
273
+
274
+ incr total_hold_vios
275
+ if { "$kind" == "reg-reg" } {
276
+ incr r2r_hold_vios
277
+ }
278
+ puts "\[hold $kind] [get_property $start_pin full_name] -> [get_property $end_pin full_name] : [get_property $path slack]"
279
+ }
280
+
281
+ set worst_r2r_hold_slack 1e30
282
+ set hold_paths [find_timing_paths -unique_paths_to_endpoint -path_delay min -sort_by_slack -group_count $max_violator_count -slack_max $worst_r2r_hold_slack]
283
+ foreach path $hold_paths {
284
+ set start_pin [get_property $path startpoint]
285
+ set end_pin [get_property $path endpoint]
286
+ set kind "[get_path_kind $start_pin $end_pin]"
287
+ set slack [get_property $path slack]
288
+
289
+ if { "$kind" == "reg-reg" } {
290
+ set slack [get_property $path slack]
291
+
292
+ if { $slack < $worst_r2r_hold_slack } {
293
+ set worst_r2r_hold_slack $slack
294
+ }
295
+ }
296
+ }
297
+
298
+ set setup_violating_paths [find_timing_paths -unique_paths_to_endpoint -path_delay max -sort_by_slack -group_count $max_violator_count -slack_max 0]
299
+ foreach path $setup_violating_paths {
300
+ set start_pin [get_property $path startpoint]
301
+ set end_pin [get_property $path endpoint]
302
+ set kind "[get_path_kind $start_pin $end_pin]"
303
+ set slack [get_property $path slack]
304
+
305
+ if { $slack >= 0 } {
306
+ continue
307
+ }
308
+
309
+ incr total_setup_vios
310
+ if { "$kind" == "reg-reg" } {
311
+ incr r2r_setup_vios
312
+ }
313
+ puts "\[setup $kind] [get_property $start_pin full_name] -> [get_property $end_pin full_name] : [get_property $path slack]"
314
+ }
315
+
316
+ set worst_r2r_setup_slack 1e30
317
+ set setup_paths [find_timing_paths -unique_paths_to_endpoint -path_delay max -sort_by_slack -group_count $max_violator_count -slack_max $worst_r2r_setup_slack]
318
+ foreach path $setup_paths {
319
+ set start_pin [get_property $path startpoint]
320
+ set end_pin [get_property $path endpoint]
321
+ set kind "[get_path_kind $start_pin $end_pin]"
322
+ set slack [get_property $path slack]
323
+
324
+ if { "$kind" == "reg-reg" } {
325
+ set slack [get_property $path slack]
326
+ if { $slack < $worst_r2r_setup_slack } {
327
+ set worst_r2r_setup_slack $slack
328
+ }
329
+ }
330
+ }
331
+
332
+ write_metric_int "timing__hold_vio__count__corner:[$corner name]" $total_hold_vios
333
+ write_metric_num "timing__hold_r2r__ws__corner:[$corner name]" $worst_r2r_hold_slack
334
+ write_metric_int "timing__hold_r2r_vio__count__corner:[$corner name]" $r2r_hold_vios
335
+ write_metric_int "timing__setup_vio__count__corner:[$corner name]" $total_setup_vios
336
+ write_metric_num "timing__setup_r2r__ws__corner:[$corner name]" $worst_r2r_setup_slack
337
+ write_metric_int "timing__setup_r2r_vio__count__corner:[$corner name]" $r2r_setup_vios
338
+ puts "%OL_END_REPORT"
339
+
340
+ puts "%OL_CREATE_REPORT unpropagated.rpt"
341
+
342
+ foreach clock [all_clocks] {
343
+ if { ![get_property $clock is_propagated] } {
344
+ puts "[get_property $clock full_name]"
345
+ }
346
+ }
347
+
348
+ puts "%OL_END_REPORT"
349
+
350
+
351
+ puts "%OL_CREATE_REPORT clock.rpt"
352
+
353
+ foreach clock [all_clocks] {
354
+ set source_names ""
355
+ set is_generated "no"
356
+ set is_virtual "no"
357
+ set is_propagated "no"
358
+ foreach source [get_property $clock sources] {
359
+ set source_names "[get_property $source full_name] $source_names"
360
+ }
361
+ if { [get_property $clock is_generated] } {
362
+ set is_generated "yes"
363
+ }
364
+ if { [get_property $clock is_virtual] } {
365
+ set is_virtual "yes"
366
+ }
367
+ if { [get_property $clock is_propagated] } {
368
+ set is_virtual "yes"
369
+ }
370
+ puts "Clock: [get_property $clock name]"
371
+ puts "Sources: $source_names"
372
+ puts "Generated: $is_generated"
373
+ puts "Virtual: $is_virtual"
374
+ puts "Propagated: $is_propagated"
375
+ puts "Period: [get_property $clock period]"
376
+ puts "\n==========================================================================="
377
+ puts "report_clock_properties"
378
+ puts "============================================================================"
379
+ report_clock_properties $clock
380
+ puts "\n==========================================================================="
381
+ puts "report_clock_latency"
382
+ puts "============================================================================"
383
+ report_clock_latency -clock $clock
384
+ puts "\n==========================================================================="
385
+ puts "report_clock_min_period"
386
+ puts "============================================================================"
387
+ report_clock_min_period -clocks [get_property $clock name]
388
+ }
389
+
390
+ puts "%OL_END_REPORT"
391
+
392
+ write_sdfs
393
+ write_libs
@@ -0,0 +1,25 @@
1
+ # Copyright 2020-2022 Efabless Corporation
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ source $::env(SCRIPTS_DIR)/openroad/common/io.tcl
15
+ read_current_odb
16
+
17
+ tapcell\
18
+ -distance $::env(FP_TAPCELL_DIST)\
19
+ -tapcell_master "$::env(WELLTAP_CELL)"\
20
+ -endcap_master "$::env(ENDCAP_CELL)"\
21
+ -halo_width_x $::env(FP_MACRO_HORIZONTAL_HALO)\
22
+ -halo_width_y $::env(FP_MACRO_VERTICAL_HALO)
23
+
24
+
25
+ write_views
@@ -0,0 +1,27 @@
1
+ # Copyright 2022 Efabless Corporation
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ source $::env(SCRIPTS_DIR)/openroad/common/io.tcl
15
+ if { [info exists ::env(CURRENT_ODB)] } {
16
+ read_current_odb
17
+ } elseif { [info exists ::env(CURRENT_DEF)] } {
18
+ read_pnr_libs
19
+ read_lefs
20
+ read_def $::env(CURRENT_DEF)
21
+ } else {
22
+ read_pnr_libs
23
+ read_lefs
24
+ read_current_netlist
25
+ }
26
+
27
+ write_views