librelane 2.4.0__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 (170) hide show
  1. librelane/__init__.py +38 -0
  2. librelane/__main__.py +479 -0
  3. librelane/__version__.py +43 -0
  4. librelane/common/__init__.py +63 -0
  5. librelane/common/cli.py +75 -0
  6. librelane/common/drc.py +246 -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 +456 -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 +116 -0
  19. librelane/config/__init__.py +32 -0
  20. librelane/config/__main__.py +155 -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 +743 -0
  27. librelane/container.py +285 -0
  28. librelane/env_info.py +320 -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 +327 -0
  45. librelane/flows/cli.py +463 -0
  46. librelane/flows/flow.py +1049 -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/help/__main__.py +39 -0
  52. librelane/logging/__init__.py +40 -0
  53. librelane/logging/logger.py +323 -0
  54. librelane/open_pdks_rev +1 -0
  55. librelane/plugins.py +21 -0
  56. librelane/py.typed +0 -0
  57. librelane/scripts/base.sdc +80 -0
  58. librelane/scripts/klayout/Readme.md +2 -0
  59. librelane/scripts/klayout/open_design.py +63 -0
  60. librelane/scripts/klayout/render.py +121 -0
  61. librelane/scripts/klayout/stream_out.py +176 -0
  62. librelane/scripts/klayout/xml_drc_report_to_json.py +45 -0
  63. librelane/scripts/klayout/xor.drc +120 -0
  64. librelane/scripts/magic/Readme.md +1 -0
  65. librelane/scripts/magic/common/read.tcl +114 -0
  66. librelane/scripts/magic/def/antenna_check.tcl +35 -0
  67. librelane/scripts/magic/def/mag.tcl +19 -0
  68. librelane/scripts/magic/def/mag_gds.tcl +79 -0
  69. librelane/scripts/magic/drc.tcl +78 -0
  70. librelane/scripts/magic/extract_spice.tcl +98 -0
  71. librelane/scripts/magic/gds/drc_batch.tcl +74 -0
  72. librelane/scripts/magic/gds/erase_box.tcl +32 -0
  73. librelane/scripts/magic/gds/extras_mag.tcl +45 -0
  74. librelane/scripts/magic/gds/mag_with_pointers.tcl +31 -0
  75. librelane/scripts/magic/get_bbox.tcl +11 -0
  76. librelane/scripts/magic/lef/extras_maglef.tcl +61 -0
  77. librelane/scripts/magic/lef/maglef.tcl +26 -0
  78. librelane/scripts/magic/lef.tcl +57 -0
  79. librelane/scripts/magic/open.tcl +28 -0
  80. librelane/scripts/magic/wrapper.tcl +21 -0
  81. librelane/scripts/netgen/setup.tcl +28 -0
  82. librelane/scripts/odbpy/apply_def_template.py +49 -0
  83. librelane/scripts/odbpy/cell_frequency.py +107 -0
  84. librelane/scripts/odbpy/check_antenna_properties.py +116 -0
  85. librelane/scripts/odbpy/contextualize.py +109 -0
  86. librelane/scripts/odbpy/defutil.py +573 -0
  87. librelane/scripts/odbpy/diodes.py +373 -0
  88. librelane/scripts/odbpy/disconnected_pins.py +305 -0
  89. librelane/scripts/odbpy/eco_buffer.py +181 -0
  90. librelane/scripts/odbpy/eco_diode.py +139 -0
  91. librelane/scripts/odbpy/filter_unannotated.py +100 -0
  92. librelane/scripts/odbpy/io_place.py +482 -0
  93. librelane/scripts/odbpy/ioplace_parser/__init__.py +23 -0
  94. librelane/scripts/odbpy/ioplace_parser/parse.py +147 -0
  95. librelane/scripts/odbpy/label_macro_pins.py +277 -0
  96. librelane/scripts/odbpy/lefutil.py +97 -0
  97. librelane/scripts/odbpy/placers.py +162 -0
  98. librelane/scripts/odbpy/power_utils.py +397 -0
  99. librelane/scripts/odbpy/random_place.py +57 -0
  100. librelane/scripts/odbpy/reader.py +250 -0
  101. librelane/scripts/odbpy/remove_buffers.py +173 -0
  102. librelane/scripts/odbpy/snap_to_grid.py +57 -0
  103. librelane/scripts/odbpy/wire_lengths.py +93 -0
  104. librelane/scripts/openroad/antenna_check.tcl +20 -0
  105. librelane/scripts/openroad/antenna_repair.tcl +31 -0
  106. librelane/scripts/openroad/basic_mp.tcl +24 -0
  107. librelane/scripts/openroad/buffer_list.tcl +10 -0
  108. librelane/scripts/openroad/common/dpl.tcl +24 -0
  109. librelane/scripts/openroad/common/dpl_cell_pad.tcl +26 -0
  110. librelane/scripts/openroad/common/grt.tcl +32 -0
  111. librelane/scripts/openroad/common/io.tcl +540 -0
  112. librelane/scripts/openroad/common/pdn_cfg.tcl +135 -0
  113. librelane/scripts/openroad/common/resizer.tcl +103 -0
  114. librelane/scripts/openroad/common/set_global_connections.tcl +78 -0
  115. librelane/scripts/openroad/common/set_layer_adjustments.tcl +31 -0
  116. librelane/scripts/openroad/common/set_power_nets.tcl +30 -0
  117. librelane/scripts/openroad/common/set_rc.tcl +75 -0
  118. librelane/scripts/openroad/common/set_routing_layers.tcl +30 -0
  119. librelane/scripts/openroad/cts.tcl +80 -0
  120. librelane/scripts/openroad/cut_rows.tcl +24 -0
  121. librelane/scripts/openroad/dpl.tcl +24 -0
  122. librelane/scripts/openroad/drt.tcl +37 -0
  123. librelane/scripts/openroad/fill.tcl +30 -0
  124. librelane/scripts/openroad/floorplan.tcl +145 -0
  125. librelane/scripts/openroad/gpl.tcl +88 -0
  126. librelane/scripts/openroad/grt.tcl +30 -0
  127. librelane/scripts/openroad/gui.tcl +37 -0
  128. librelane/scripts/openroad/insert_buffer.tcl +127 -0
  129. librelane/scripts/openroad/ioplacer.tcl +67 -0
  130. librelane/scripts/openroad/irdrop.tcl +51 -0
  131. librelane/scripts/openroad/pdn.tcl +52 -0
  132. librelane/scripts/openroad/rcx.tcl +32 -0
  133. librelane/scripts/openroad/repair_design.tcl +70 -0
  134. librelane/scripts/openroad/repair_design_postgrt.tcl +48 -0
  135. librelane/scripts/openroad/rsz_timing_postcts.tcl +68 -0
  136. librelane/scripts/openroad/rsz_timing_postgrt.tcl +70 -0
  137. librelane/scripts/openroad/sta/check_macro_instances.tcl +53 -0
  138. librelane/scripts/openroad/sta/corner.tcl +393 -0
  139. librelane/scripts/openroad/tapcell.tcl +25 -0
  140. librelane/scripts/openroad/write_views.tcl +27 -0
  141. librelane/scripts/pyosys/construct_abc_script.py +177 -0
  142. librelane/scripts/pyosys/json_header.py +84 -0
  143. librelane/scripts/pyosys/synthesize.py +493 -0
  144. librelane/scripts/pyosys/ys_common.py +153 -0
  145. librelane/scripts/tclsh/hello.tcl +1 -0
  146. librelane/state/__init__.py +24 -0
  147. librelane/state/__main__.py +61 -0
  148. librelane/state/design_format.py +195 -0
  149. librelane/state/state.py +359 -0
  150. librelane/steps/__init__.py +61 -0
  151. librelane/steps/__main__.py +510 -0
  152. librelane/steps/checker.py +637 -0
  153. librelane/steps/common_variables.py +340 -0
  154. librelane/steps/cvc_rv.py +169 -0
  155. librelane/steps/klayout.py +509 -0
  156. librelane/steps/magic.py +576 -0
  157. librelane/steps/misc.py +160 -0
  158. librelane/steps/netgen.py +253 -0
  159. librelane/steps/odb.py +1088 -0
  160. librelane/steps/openroad.py +2460 -0
  161. librelane/steps/openroad_alerts.py +102 -0
  162. librelane/steps/pyosys.py +640 -0
  163. librelane/steps/step.py +1571 -0
  164. librelane/steps/tclstep.py +288 -0
  165. librelane/steps/verilator.py +222 -0
  166. librelane/steps/yosys.py +371 -0
  167. librelane-2.4.0.dist-info/METADATA +169 -0
  168. librelane-2.4.0.dist-info/RECORD +170 -0
  169. librelane-2.4.0.dist-info/WHEEL +4 -0
  170. librelane-2.4.0.dist-info/entry_points.txt +9 -0
@@ -0,0 +1,103 @@
1
+ # Copyright 2022-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
+ proc load_rsz_corners {args} {
15
+ set i "0"
16
+ set tc_key "RSZ_CORNER_$i"
17
+ while { [info exists ::env($tc_key)] } {
18
+ set corner_name [lindex $::env($tc_key) 0]
19
+ set corner_libs [lreplace $::env($tc_key) 0 0]
20
+
21
+ set corner($corner_name) $corner_libs
22
+
23
+ incr i
24
+ set tc_key "RSZ_CORNER_$i"
25
+ }
26
+
27
+ if { $i == "0" } {
28
+ puts stderr "\[WARNING\] No resizer-specific timing information read."
29
+ return
30
+ }
31
+
32
+ define_corners {*}[array name corner]
33
+
34
+ foreach corner_name [array name corner] {
35
+ puts "Reading timing models for corner $corner_name…"
36
+
37
+ set corner_models $corner($corner_name)
38
+ foreach model $corner_models {
39
+ puts "Reading timing library for the '$corner_name' corner at '$model'…"
40
+ read_liberty -corner $corner_name $model
41
+ }
42
+
43
+ if { [info exists ::env(EXTRA_LIBS) ] } {
44
+ puts "Reading explicitly-specified extra libs for $corner_name…"
45
+ foreach extra_lib $::env(EXTRA_LIBS) {
46
+ puts "Reading extra timing library for the '$corner_name' corner at '$extra_lib'…"
47
+ read_liberty -corner $corner_name $extra_lib
48
+ }
49
+ }
50
+ }
51
+ }
52
+
53
+ proc set_dont_touch_objects {args} {
54
+ set rx $::env(RSZ_DONT_TOUCH_RX)
55
+ if { $rx != {^$} } {
56
+ set odb_nets [$::block getNets]
57
+ foreach net $odb_nets {
58
+ set net_name [odb::dbNet_getName $net]
59
+ if { [regexp "$rx" $net_name full] } {
60
+ puts "\[INFO\] Net '$net_name' matched don't touch regular expression, setting as don't touch…"
61
+ set_dont_touch "$net_name"
62
+ }
63
+ }
64
+
65
+ set odb_insts [$::block getInsts]
66
+ foreach inst $odb_insts {
67
+ set inst_name [odb::dbInst_getName $inst]
68
+ if { [regexp "$rx" $inst_name full] } {
69
+ puts "\[INFO\] Instance '$inst_name' matched don't touch regular expression, setting as don't touch..."
70
+ set_dont_touch "$inst_name"
71
+ }
72
+ }
73
+ }
74
+
75
+ if { [info exists ::env(RSZ_DONT_TOUCH_LIST)] } {
76
+ set_dont_touch $::env(RSZ_DONT_TOUCH_LIST)
77
+ }
78
+ }
79
+
80
+ proc unset_dont_touch_objects {args} {
81
+ set rx $::env(RSZ_DONT_TOUCH_RX)
82
+ if { $rx != {^$} } {
83
+ set odb_nets [$::block getNets]
84
+ foreach net $odb_nets {
85
+ set net_name [odb::dbNet_getName $net]
86
+ if { [regexp "$rx" $net_name full] } {
87
+ unset_dont_touch "$net_name"
88
+ }
89
+ }
90
+
91
+ set odb_insts [$::block getInsts]
92
+ foreach inst $odb_insts {
93
+ set inst_name [odb::dbInst_getName $inst]
94
+ if { [regexp "$rx" $inst_name full] } {
95
+ unset_dont_touch "$inst_name"
96
+ }
97
+ }
98
+ }
99
+
100
+ if { [info exists ::env(RSZ_DONT_TOUCH_LIST)] } {
101
+ unset_dont_touch $::env(RSZ_DONT_TOUCH_LIST)
102
+ }
103
+ }
@@ -0,0 +1,78 @@
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
+
15
+ # Power nets
16
+ proc set_global_connections {} {
17
+ puts "\[INFO\] Setting global connections..."
18
+ if { [info exists ::env(PDN_ENABLE_GLOBAL_CONNECTIONS) ] } {
19
+ if { $::env(PDN_ENABLE_GLOBAL_CONNECTIONS) == 1 } {
20
+ foreach power_pin $::env(SCL_POWER_PINS) {
21
+ add_global_connection \
22
+ -net $::env(VDD_NET) \
23
+ -inst_pattern .* \
24
+ -pin_pattern $power_pin \
25
+ -power
26
+ }
27
+ foreach ground_pin $::env(SCL_GROUND_PINS) {
28
+ add_global_connection \
29
+ -net $::env(GND_NET) \
30
+ -inst_pattern .* \
31
+ -pin_pattern $ground_pin \
32
+ -ground
33
+ }
34
+ }
35
+ }
36
+ if { $::env(PDN_CONNECT_MACROS_TO_GRID) == 1 &&
37
+ [info exists ::env(PDN_MACRO_CONNECTIONS)]} {
38
+ foreach pdn_hook $::env(PDN_MACRO_CONNECTIONS) {
39
+ set pdn_hook [regexp -all -inline {\S+} $pdn_hook]
40
+ set instance_name [lindex $pdn_hook 0]
41
+ set power_net [lindex $pdn_hook 1]
42
+ set ground_net [lindex $pdn_hook 2]
43
+ set power_pin [lindex $pdn_hook 3]
44
+ set ground_pin [lindex $pdn_hook 4]
45
+
46
+ if { $power_pin == "" || $ground_pin == "" } {
47
+ puts "PDN_MACRO_CONNECTIONS missing power and ground pin names"
48
+ exit -1
49
+ }
50
+
51
+ set matched 0
52
+ foreach cell [[ord::get_db_block] getInsts] {
53
+ if { [regexp "\^$instance_name\$" [$cell getName]] } {
54
+ set matched 1
55
+ puts "$instance_name matched with [$cell getName]"
56
+ }
57
+ }
58
+ if { $matched != 1 } {
59
+ puts "\[ERROR\] No match found for regular expression '$instance_name' defined in PDN_MACRO_CONNECTIONS."
60
+ exit 1
61
+ }
62
+
63
+ add_global_connection \
64
+ -net $power_net \
65
+ -inst_pattern $instance_name \
66
+ -pin_pattern $power_pin \
67
+ -power
68
+
69
+ add_global_connection \
70
+ -net $ground_net \
71
+ -inst_pattern $instance_name \
72
+ -pin_pattern $ground_pin \
73
+ -ground
74
+ }
75
+ }
76
+
77
+ global_connect
78
+ }
@@ -0,0 +1,31 @@
1
+ # Copyright 2021-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
+ set_global_routing_layer_adjustment * $::env(GRT_ADJUSTMENT)
15
+
16
+ set array [split $::env(GRT_LAYER_ADJUSTMENTS) " "]
17
+
18
+ set layer_names [list]
19
+ set layers [$::tech getLayers]
20
+ foreach layer $layers {
21
+ if { [$layer getRoutingLevel] >= 1 } {
22
+ lappend layer_names [$layer getName]
23
+ }
24
+ }
25
+
26
+ set i 0
27
+ foreach adjustment $array {
28
+ set layer_name [lindex $layer_names $i]
29
+ set_global_routing_layer_adjustment $layer_name $adjustment
30
+ incr i
31
+ }
@@ -0,0 +1,30 @@
1
+ # Copyright 2021-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
+ if { [info exists ::env(VDD_NETS)] || [info exists ::env(GND_NETS)] } {
16
+ # they both must exist and be equal in length
17
+ # current assumption: they cannot have a common ground
18
+ if { ! [info exists ::env(VDD_NETS)] || ! [info exists ::env(GND_NETS)] } {
19
+ puts stderr "\[ERROR\] VDD_NETS and GND_NETS must *both* either be defined or undefined"
20
+ exit -1
21
+ }
22
+ set ::env(VDD_NET) [lindex $::env(VDD_NETS) 0]
23
+ set ::env(GND_NET) [lindex $::env(GND_NETS) 0]
24
+
25
+ } else {
26
+ set ::env(VDD_NET) $::env(VDD_PIN)
27
+ set ::env(GND_NET) $::env(GND_PIN)
28
+ set ::env(VDD_NETS) $::env(VDD_PIN)
29
+ set ::env(GND_NETS) $::env(GND_PIN)
30
+ }
@@ -0,0 +1,75 @@
1
+ # Copyright 2021-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
+
15
+ # Resistance/Capacitance Overrides
16
+ # Via resistance
17
+ puts "\[INFO\] Setting RC values…"
18
+ if { [info exist ::env(VIAS_RC)] } {
19
+ set vias_rc [split $::env(VIAS_RC) ","]
20
+ foreach via_rc $vias_rc {
21
+ set layer_name [lindex $via_rc 0]
22
+ set resistance [lindex $via_rc 1]
23
+ set_layer_rc -via $layer_name -resistance $resistance
24
+ }
25
+ }
26
+
27
+ # Metal resistance and capacitence
28
+ if { [info exist ::env(LAYERS_RC)] } {
29
+ set layers_rc [split $::env(LAYERS_RC) ","]
30
+ foreach layer_rc $layers_rc {
31
+ set layer_name [lindex $layer_rc 0]
32
+ set capacitance [lindex $layer_rc 1]
33
+ set resistance [lindex $layer_rc 2]
34
+ set_layer_rc -layer $layer_name -capacitance $capacitance -resistance $resistance
35
+ }
36
+ }
37
+
38
+ set layer_names [list]
39
+ set layers [$::tech getLayers]
40
+ set adding 0
41
+ foreach layer $layers {
42
+ if { [$layer getRoutingLevel] >= 1 } {
43
+ set name [$layer getName]
44
+ if {"$::env(RT_MIN_LAYER)" == "$name"} {
45
+ set adding 1
46
+ }
47
+ if { $adding } {
48
+ lappend layer_names $name
49
+ }
50
+
51
+ if {"$::env(RT_MAX_LAYER)" == "$name"} {
52
+ set adding 0
53
+ }
54
+ }
55
+ }
56
+
57
+ set signal_wire_rc_layers $layer_names
58
+ set clock_wire_rc_layers $layer_names
59
+ if { [info exist ::env(SIGNAL_WIRE_RC_LAYERS)] } {
60
+ set signal_wire_rc_layers $::env(SIGNAL_WIRE_RC_LAYERS)
61
+ }
62
+ if { [info exist ::env(CLOCK_WIRE_RC_LAYERS)] } {
63
+ set clock_wire_rc_layers $::env(CLOCK_WIRE_RC_LAYERS)
64
+ }
65
+ if { [llength $signal_wire_rc_layers] > 1 } {
66
+ set_wire_rc -signal -layers "$signal_wire_rc_layers"
67
+ } else {
68
+ set_wire_rc -signal -layer "$signal_wire_rc_layers"
69
+ }
70
+
71
+ if { [llength $clock_wire_rc_layers] > 1 } {
72
+ set_wire_rc -clock -layers "$clock_wire_rc_layers"
73
+ } else {
74
+ set_wire_rc -clock -layer "$clock_wire_rc_layers"
75
+ }
@@ -0,0 +1,30 @@
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
+
15
+ set signal_min_layer $::env(RT_MIN_LAYER)
16
+ set signal_max_layer $::env(RT_MAX_LAYER)
17
+ set clock_min_layer $::env(RT_MIN_LAYER)
18
+ set clock_max_layer $::env(RT_MAX_LAYER)
19
+
20
+ if { [info exists ::env(RT_CLOCK_MIN_LAYER)]} {
21
+ set clock_min_layer $::env(RT_CLOCK_MIN_LAYER)
22
+ }
23
+ if { [info exists ::env(RT_CLOCK_MAX_LAYER)]} {
24
+ set clock_max_layer $::env(RT_CLOCK_MAX_LAYER)
25
+ }
26
+
27
+ puts "\[INFO\] Setting signal min routing layer to: $signal_min_layer and clock min routing layer to $clock_min_layer. "
28
+ puts "\[INFO\] Setting signal max routing layer to: $signal_max_layer and clock max routing layer to $clock_max_layer. "
29
+
30
+ set_routing_layers -signal [subst $signal_min_layer]-[subst $signal_max_layer] -clock [subst $clock_min_layer]-[subst $clock_max_layer]
@@ -0,0 +1,80 @@
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
+ source $::env(SCRIPTS_DIR)/openroad/common/resizer.tcl
16
+
17
+ load_rsz_corners
18
+ read_current_odb
19
+
20
+ # set rc values
21
+ source $::env(SCRIPTS_DIR)/openroad/common/set_rc.tcl
22
+ estimate_parasitics -placement
23
+
24
+ # Clone clock tree inverters next to register loads
25
+ # so cts does not try to buffer the inverted clocks.
26
+ repair_clock_inverters
27
+
28
+ puts "\[INFO\] Configuring cts characterization…"
29
+ set cts_characterization_args [list]
30
+ if { [info exists ::env(CTS_MAX_CAP)] } {
31
+ lappend cts_characterization_args -max_cap [expr {$::env(CTS_MAX_CAP) * 1e-12}]; # pF -> F
32
+ }
33
+ if { [info exists ::env(CTS_MAX_SLEW)] } {
34
+ lappend cts_characterization_args -max_slew [expr {$::env(CTS_MAX_SLEW) * 1e-9}]; # ns -> S
35
+ }
36
+ configure_cts_characterization {*}$cts_characterization_args
37
+
38
+ puts "\[INFO\] Performing clock tree synthesis…"
39
+ puts "\[INFO\] Looking for the following net(s): $::env(CLOCK_NET)"
40
+ puts "\[INFO\] Running Clock Tree Synthesis…"
41
+
42
+ set arg_list [list]
43
+
44
+ lappend arg_list -buf_list $::env(CTS_CLK_BUFFERS)
45
+ lappend arg_list -root_buf $::env(CTS_ROOT_BUFFER)
46
+ lappend arg_list -sink_clustering_size $::env(CTS_SINK_CLUSTERING_SIZE)
47
+ lappend arg_list -sink_clustering_max_diameter $::env(CTS_SINK_CLUSTERING_MAX_DIAMETER)
48
+ lappend arg_list -sink_clustering_enable
49
+
50
+ if { $::env(CTS_DISTANCE_BETWEEN_BUFFERS) != 0 } {
51
+ lappend arg_list -distance_between_buffers $::env(CTS_DISTANCE_BETWEEN_BUFFERS)
52
+ }
53
+
54
+ if { $::env(CTS_DISABLE_POST_PROCESSING) } {
55
+ lappend arg_list -post_cts_disable
56
+ }
57
+
58
+ clock_tree_synthesis {*}$arg_list
59
+
60
+ set_propagated_clock [all_clocks]
61
+
62
+ estimate_parasitics -placement
63
+ puts "\[INFO\] Repairing long wires on clock nets…"
64
+ # CTS leaves a long wire from the pad to the clock tree root.
65
+ repair_clock_nets -max_wire_length $::env(CTS_CLK_MAX_WIRE_LENGTH)
66
+
67
+ estimate_parasitics -placement
68
+ write_views
69
+
70
+ puts "\[INFO\] Legalizing…"
71
+ source $::env(SCRIPTS_DIR)/openroad/common/dpl.tcl
72
+
73
+ estimate_parasitics -placement
74
+
75
+
76
+ write_views
77
+
78
+ puts "%OL_CREATE_REPORT cts.rpt"
79
+ report_cts
80
+ puts "%OL_END_REPORT"
@@ -0,0 +1,24 @@
1
+ # Copyright 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
+ read_current_odb
16
+
17
+ cut_rows\
18
+ -endcap_master $::env(ENDCAP_CELL)\
19
+ -halo_width_x $::env(FP_MACRO_HORIZONTAL_HALO)\
20
+ -halo_width_y $::env(FP_MACRO_VERTICAL_HALO)
21
+
22
+ write_views
23
+
24
+ report_design_area_metrics
@@ -0,0 +1,24 @@
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
+ source $::env(SCRIPTS_DIR)/openroad/common/dpl.tcl
18
+
19
+ check_placement -verbose
20
+
21
+ write_views
22
+
23
+ report_design_area_metrics
24
+
@@ -0,0 +1,37 @@
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
+ set_thread_count $::env(DRT_THREADS)
18
+
19
+ set min_layer $::env(RT_MIN_LAYER)
20
+ if { [info exists ::env(DRT_MIN_LAYER)] } {
21
+ set min_layer $::env(DRT_MIN_LAYER)
22
+ }
23
+
24
+ set max_layer $::env(RT_MAX_LAYER)
25
+ if { [info exists ::env(DRT_MAX_LAYER)] } {
26
+ set max_layer $::env(DRT_MAX_LAYER)
27
+ }
28
+
29
+ detailed_route\
30
+ -bottom_routing_layer $min_layer\
31
+ -top_routing_layer $max_layer\
32
+ -output_drc $::env(STEP_DIR)/$::env(DESIGN_NAME).drc\
33
+ -droute_end_iter $::env(DRT_OPT_ITERS)\
34
+ -or_seed 42\
35
+ -verbose 1
36
+
37
+ write_views
@@ -0,0 +1,30 @@
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
+ set fill_list [list]
18
+ foreach {pattern} $::env(DECAP_CELL) {
19
+ set stripped [string map {' {}} $pattern]
20
+ lappend fill_list $stripped
21
+ }
22
+ foreach {pattern} $::env(FILL_CELL) {
23
+ set stripped [string map {' {}} $pattern]
24
+ lappend fill_list $stripped
25
+ }
26
+ puts $fill_list
27
+ filler_placement $fill_list
28
+
29
+ write_views
30
+