Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diode Insertion Overhaul #1686

Merged
merged 44 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0bda67d
Fix logic of extract_antenna_violators.py
kareefardi Mar 20, 2023
bc7a4c7
Fix fetching of antenna violations count for generated reports
kareefardi Mar 20, 2023
cc509fb
multiple:
kareefardi Mar 20, 2023
a24d3f3
format black
kareefardi Mar 20, 2023
d69f29f
Merge branch 'master' into antenna-fixes
kareefardi Mar 20, 2023
98416ce
Merge branch 'master' into antenna-fixes
kareefardi Mar 20, 2023
a0d07f1
get_best fix
kareefardi Mar 20, 2023
260c875
flake8 report.py fixes
kareefardi Mar 20, 2023
f370629
fix antenna_violations reference in get_best
kareefardi Mar 21, 2023
a605c0e
black format
kareefardi Mar 21, 2023
d64355f
default config is config not config.json
kareefardi Mar 21, 2023
c355792
Merge branch 'antenna-fixes' of github.com:kareefardi/OpenLane into a…
kareefardi Mar 21, 2023
ba4609e
update benchmark results for SW_HD based on updated metrics
kareefardi Mar 21, 2023
f01fa7c
handle bad locale
kareefardi Mar 21, 2023
bd95da0
antenna_violations -> pin_antenna_violations
kareefardi Mar 21, 2023
0bdebf2
remove unneeded import
kareefardi Mar 21, 2023
9efe215
fix comments in pr
kareefardi Mar 22, 2023
cca0804
+++
kareefardi Mar 22, 2023
6dc380e
Merge branch 'master' into antenna-fixes
kareefardi Mar 22, 2023
d4aee4c
diodes.py:
kareefardi Mar 22, 2023
bb42f2a
black
kareefardi Mar 22, 2023
486bb51
flake8
kareefardi Mar 22, 2023
df15d95
deprecate DIODE_INSERTION_STRATEGY (1,2,5)
kareefardi Mar 22, 2023
efd0fbd
derp
kareefardi Mar 22, 2023
c008bed
black
kareefardi Mar 22, 2023
b94d3b9
update benchmark results for SW_HD based on updated metrics
kareefardi Mar 22, 2023
9480898
Merge branch 'antenna-fixes' of github.com:kareefardi/OpenLane into a…
kareefardi Mar 22, 2023
1f8324e
update configuration documentation
kareefardi Mar 22, 2023
9b06afe
Merge branch 'antenna-fixes' of github.com:kareefardi/OpenLane into a…
kareefardi Mar 22, 2023
3e394a8
update benchmark results for SW_HD based on updated metrics
kareefardi Mar 22, 2023
8493cc0
throw error on deprecated methods
kareefardi Mar 23, 2023
08741d3
Merge branch 'antenna-fixes' of github.com:kareefardi/OpenLane into a…
kareefardi Mar 23, 2023
58b0dbb
Merge branch 'master' into antenna-fixes
kareefardi Mar 23, 2023
d15b662
Merge branch 'master' into antenna-fixes
kareefardi Mar 23, 2023
20bd4ed
Merge branch 'antenna-fixes' of github.com:kareefardi/OpenLane into a…
kareefardi Mar 23, 2023
614554b
remove DIODE_INSERTION_STRATEGY from base_config
kareefardi Mar 23, 2023
c5edeca
Merge branch 'master' into antenna-fixes
kareefardi Mar 23, 2023
a2a9ba9
print caught errors in steps
kareefardi Mar 23, 2023
29cea4b
handle deprecated DIODE_INSERTION_STRATEGY 0
kareefardi Mar 23, 2023
ce783c0
Fix Typo, Remove Verbose Logging
donn Mar 26, 2023
f65d305
black [skip ci]
donn Mar 26, 2023
6fe4909
docs typo [skip ci]
donn Mar 26, 2023
5b2984f
Fix encoding
donn Mar 26, 2023
2459a89
Fix lint [skip ci]
donn Mar 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions configuration/general.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ set ::env(USE_ARC_ANTENNA_CHECK) 1
set ::env(RUN_SPEF_EXTRACTION) 1
set ::env(RUN_IRDROP_REPORT) 1

# See documentation for the various strategies.
set ::env(DIODE_INSERTION_STRATEGY) {3}

## Signoff
set ::env(RUN_CVC) 1
Expand Down
10 changes: 9 additions & 1 deletion configuration/routing.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ if { ![info exists ::env(ROUTING_CORES)] } {
set ::env(ROUTING_CORES) 2
}

set ::env(RUN_HEURISTIC_DIODE_INSERTION) 0
set ::env(HEURISTIC_ANTENNA_THRESHOLD) 90

# Privbate: Strategy for placement of the diodes. Possible values `source`, `pin`, `balanced` and `random`. Only applicable when `RUN_HEURISTIC_DIODE_INSERTION` is enabled.
set ::env(HEURISTIC_ANTENNA_INSERTION_MODE) "source"

set ::env(DIODE_PADDING) 2
set ::env(DIODE_ON_PORTS) none
set ::env(GRT_REPAIR_ANTENNAS) 1

set ::env(GLOBAL_ROUTER) fastroute
set ::env(DETAILED_ROUTER) tritonroute
Expand Down Expand Up @@ -48,4 +56,4 @@ set ::env(GLB_RESIZER_HOLD_SLACK_MARGIN) 0.05
set ::env(GLB_RESIZER_SETUP_SLACK_MARGIN) 0.025
set ::env(GLB_RESIZER_HOLD_MAX_BUFFER_PERCENT) 50
set ::env(GLB_RESIZER_SETUP_MAX_BUFFER_PERCENT) 50
set ::env(GLB_RESIZER_ALLOW_SETUP_VIOS) 0
set ::env(GLB_RESIZER_ALLOW_SETUP_VIOS) 0
19 changes: 11 additions & 8 deletions docs/source/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ These variables are optional that can be specified in the design configuration f
| `STD_CELL_LIBRARY` | Specifies the standard cell library to be used under the specified PDK. <br> (Default: `sky130_fd_sc_hd` )|
| `STD_CELL_LIBRARY_OPT` | Specifies the standard cell library to be used during resizer optimizations. <br> (Default: `STD_CELL_LIBRARY` )|
| `PDK_ROOT` | Specifies the folder path of the PDK. It searches for a `config.tcl` in `$::env(PDK_ROOT)/$::env(PDK)/libs.tech/openlane/` directory and at least have one standard cell library config defined in `$::env(PDK_ROOT)/$::env(PDK)/libs.tech/openlane/$::env(STD_CELL_LIBRARY)`. |
| `DIODE_PADDING` | Diode cell padding; increases the width of diode cells during placement checks. <br> (Default: `2` microns -- 2 sites)|
| `DIODE_PADDING` | Number of sites to left pad `DIODE_CELL` during detailed placement. <br> (Default: `2` sites)|
| `MERGED_LEF` | Points to `merged.lef`, which is a merger of various LEF files, including the technology lef, cells lef, any custom lefs, and IO lefs. |
| `NO_SYNTH_CELL_LIST` | Specifies the file that contains the don't-use-cell-list to be excluded from the liberty file during synthesis. If it's not defined, this path is searched `$::env(PDK_ROOT)/$::env(PDK)/libs.tech/openlane/$::env(STD_CELL_LIBRARY)/no_synth.cells` and if it's not found, then the original liberty will be used as is. |
| `DRC_EXCLUDE_CELL_LIST` | Specifies the file that contains the don't-use-cell-list to be excluded from the liberty file during synthesis and timing optimizations. If it's not defined, this path is searched `$::env(PDK_ROOT)/$::env(PDK)/libs.tech/openlane/$::env(STD_CELL_LIBRARY)/drc_exclude.cells` and if it's not found, then the original liberty will be used as is. In other words, `DRC_EXCLUDE_CELL_LIST` contain the only excluded cell list in timing optimizations. |
Expand Down Expand Up @@ -218,10 +218,10 @@ These variables worked initially, but they were too sky130 specific and will be
| `GLB_OPTIMIZE_MIRRORING` | Specifies whether or not to run an optimize_mirroring pass whenever detailed placement happens after Routing timing optimization. This pass will mirror the cells whenever possible to optimize the design. 1 = Enabled, 0 = Disabled. <br> (Default: `1`) |
| `GRT_ALLOW_CONGESTION` | Allow congestion in the resulting guides. 0 = false, 1 = true <br> (Default: `0`)
| `GRT_OVERFLOW_ITERS` | The maximum number of iterations waiting for the overflow to reach the desired value. <br> (Default: `50`) |
| `GRT_ANT_ITERS` | The maximum number of iterations for global router repair_antenna. This option is only available in `DIODE_INSERTION_STRATEGY` = `3` or `6`. <br> (Default: `15`) |
| `GRT_ANT_MARGIN` | The margin to over fix antenna violations in global routing as a percentage. This option is only available in `DIODE_INSERTION_STRATEGY` = `3` or `6`. <br> (Default: `10`) |
| `GRT_ANT_ITERS` | The maximum number of iterations for global router repair_antenna. This option is only available when `GRT_REPAIR_ANETNNAS` is enabled. <br> (Default: `15`) |
| `GRT_ANT_MARGIN` | The margin to over fix antenna violations in global routing as a percentage. This option is only available when `GRT_REPAIR_ANETNNAS` is enabled. <br> (Default: `10`) |
| `GRT_ESTIMATE_PARASITICS` | Specifies whether or not to run STA after global routing using OpenROAD's estimate_parasitics -global_routing and generates reports under `logs/routing`. 1 = Enabled, 0 = Disabled. <br> (Default: `1`) |
| `GRT_MAX_DIODE_INS_ITERS` | Controls the maximum number of iterations at which re-running Fastroute for diode insertion stops. Each iteration ARC detects the violations and FastRoute fixes them by inserting diodes, then producing the new DEF. The number of antenna violations is compared with the previous iteration and if they are equal or the number is greater the iterations stop and the DEF from the previous iteration is used in the rest of the flow. If the current antenna violations reach zero, the current def will be used and the iterations will not continue. This option is only available in DIODE_INSERTION_STRATEGY = `3` and `6`. <br> (Default: `1`) |
| `GRT_MAX_DIODE_INS_ITERS` | Controls the maximum number of iterations at which re-running Fastroute for diode insertion stops. Each iteration ARC detects the violations and FastRoute fixes them by inserting diodes, then producing the new DEF. The number of antenna violations is compared with the previous iteration and if they are equal or the number is greater the iterations stop and the DEF from the previous iteration is used in the rest of the flow. If the current antenna violations reach zero, the current def will be used and the iterations will not continue. This option is only available in when `GRT_REPAIR_ANETNNAS` is enabled. <br> (Default: `1`) |
| `GRT_OBS` | Specifies custom obstruction to be added prior to global routing. Comma-delimited ([warning](#on-comma-delimited-variables)) list of layer and coordinates: `layer llx lly urx ury`, where `ll` and `ur` stand for "lower left" and "upper right" respectively.<br> (Example: `li1 0 100 1000 300, met5 0 0 1000 500`) <br> (Default: unset) |
| `GRT_ADJUSTMENT` | Reduction in the routing capacity of the edges between the cells in the global routing graph. Values range from 0 to 1. <br> 1 = most reduction, 0 = least reduction <br> (Default: `0.3`)|
| `GRT_MACRO_EXTENSION` | Sets the number of GCells added to the blockages boundaries from macros. A GCell is typically defined in terms of Mx routing tracks. The default GCell size is 15 M3 pitches. <br> (Default: `0`) |
Expand Down Expand Up @@ -282,6 +282,7 @@ These variables worked initially, but they were too sky130 specific and will be
|-|-|
| `RUN_DRT` | Enables detailed routing. 1 = Enabled, 0 = Disabled <br> (Default: `1`)|
| `RUN_LVS` | Enables running LVS. 1 = Enabled, 0 = Disabled <br> (Default: `1`)|
| `RUN_HEURISTIC_DIODE_INSERTION` | Enables running heuristic antenna insertion script. 1 = Enabled, 0 = Disabled <br> (Default: `1`)|
| `RUN_MAGIC` | Enables running magic and GDSII streaming. 1 = Enabled, 0 = Disabled <br> (Default: `1`)|
| `RUN_MAGIC_DRC` | Enables running magic DRC on GDSII produced by magic. 1 = Enabled, 0 = Disabled <br> (Default: `1`)|
| `RUN_KLAYOUT` | Enables running KLayout and GDSII streaming. 1 = Enabled, 0 = Disabled <br> (Default: `1`)|
Expand All @@ -301,14 +302,16 @@ These variables worked initially, but they were too sky130 specific and will be
| `KLAYOUT_XOR_XML` | If `RUN_KLAYOUT_XOR` is enabled, this will enable producing an XML output from the XOR. 1 = Enabled, 0 = Disabled <br> (Default: `1`)|
| `TAKE_LAYOUT_SCROT` | Enables running KLayout to take a PNG screenshot of the produced layout (currently configured to run on the results of each stage).1 = Enabled, 0 = Disabled <br> (Default: `0`)|
| `KLAYOUT_XOR_THREADS` | Specifies number of threads used in klayout xor check <br> (Default: `1`)|
| `DIODE_INSERTION_STRATEGY` | Specifies the insertion strategy of diodes to be used in the flow. |
| `DIODE_INSERTION_STRATEGY` | **Deprecated** Specifies the insertion strategy of diodes to be used in the flow. |
| | 0: No diode insertion. |
| | 1: Spray diodes. |
| | 2: Insert fake diodes and replace them with real diodes if needed. |
| | 1: **removed** Spray diodes. |
| | 2: **removed** Insert fake diodes and replace them with real diodes if needed. |
| | (**Default**) 3: Use OpenROAD's Antenna Avoidance flow. |
| | 4: Use Sylvain Minaut's custom script for diode insertion. |
| | 5: A combination of strategies 2 and 4. |
| | 5: **removed** A combination of strategies 2 and 4. |
| | 6: A combination of strategies 3 and 4. |
| `DIODE_ON_PORTS` | Insert diodes on ports with the specified polarities. Available options are `none`, `in`, `out` and `both`. <br> (Default: `none`) |
| `HEURISTIC_ANTENNA_THRESHOLD` | Minimum manhattan distance of a net to insert a diode in microns. Only applicable for `RUN_HEURISTIC_DIODE_INSERTION` is enabled. <br> (Default: `90`)
| `USE_ARC_ANTENNA_CHECK` | Specifies whether to use the openroad ARC antenna checker or magic antenna checker. 0=magic antenna checker, 1=ARC OR antenna checker <br> (Default: `1`)
| `TAP_DECAP_INSERTION` | **Deprecated: Use `RUN_TAP_DECAP_INSERTION`** Enables tap and decap cells insertion after floorplanning (if enabled) .1 = Enabled, 0 = Disabled <br> (Default: `1`) |
| `MAGIC_CONVERT_DRC_TO_RDB` | **Removed: Will always run** Specifies whether or not generate a Calibre RDB out of the magic.drc report. Result is saved in `<run_path>/results/magic/`. 1=enabled 0=disabled <br> Default: `1`|
Expand Down
6 changes: 3 additions & 3 deletions docs/source/reference/openlane_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ Most of the following commands' implementation exists in this [file][8]
| Command | Flags | Description |
|---------------|------------------------|-----------------------------------------|
| `ins_fill_cells` | | Runs fill insertion on the processed design using the openroad app. The resulting file is under `/<run_path>/tmp/routing/`. |
| `ins_diode_cells_1` | | Runs diode insertion on the processed design using an opendb custom script following diode insertion strategies 1 and 2. The resulting file is under `/<run_path>/tmp/placement/` . It also generates a the updated netlist using yosys and stores the results under `/<run_path>/results/synthesis` and runs yosys logic verification if enabled. |
| `ins_diode_cells_4` | | Runs diode insertion on the processed design using an opendb custom script following diode insertion strategies 4 and 5. The resulting file is under `/<run_path>/tmp/placement/` . It also generates a the updated netlist using yosys and stores the results under `/<run_path>/results/synthesis` and runs yosys logic verification if enabled. |
| `heal_antenna_violators` | | Replaces the not needed diodes with fake diodes based on the magic antenna report. Therefore, magic antenna check should be run before this step (`run_magic_antenna_check`). <br> Runs on `CURRENT_DEF` and only if `DIODE_INSERTION_STRATEGY` is set to `2`.|
| `ins_diode_cells_1` | | **Deprecated** |
| `heuristic_diode_insertion` | | Runs diode insertion on the processed design using an opendb custom script following diode insertion strategies 4 and 5. The resulting file is under `/<run_path>/tmp/placement/` . It also generates a the updated netlist using yosys and stores the results under `/<run_path>/results/synthesis` and runs yosys logic verification if enabled. |
| `heal_antenna_violators` | | **Deprecated** |


## PDN Generation Commands
Expand Down
17 changes: 2 additions & 15 deletions flow.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,6 @@ proc run_parasitics_sta_step {args} {
}
}

proc run_diode_insertion_2_5_step {args} {
if { ! [ info exists ::env(DIODE_INSERTION_CURRENT_DEF) ] } {
set ::env(DIODE_INSERTION_CURRENT_DEF) $::env(CURRENT_DEF)
} else {
set ::env(CURRENT_DEF) $::env(DIODE_INSERTION_CURRENT_DEF)
}
if { ($::env(DIODE_INSERTION_STRATEGY) == 2) || ($::env(DIODE_INSERTION_STRATEGY) == 5) } {
run_antenna_check
heal_antenna_violators; # modifies the routed DEF
}

}

proc run_irdrop_report_step {args} {
if { $::env(RUN_IRDROP_REPORT) } {
run_irdrop_report
Expand Down Expand Up @@ -191,7 +178,6 @@ proc run_non_interactive_mode {args} {
"cts" "run_cts_step" \
"routing" "run_routing_step" \
"parasitics_sta" "run_parasitics_sta_step" \
"diode_insertion" "run_diode_insertion_2_5_step" \
"irdrop" "run_irdrop_report_step" \
"gds_magic" "run_magic_step" \
"gds_klayout" "run_klayout_step" \
Expand Down Expand Up @@ -225,9 +211,10 @@ proc run_non_interactive_mode {args} {
# For when it fails
set ::env(CURRENT_STEP) $step_name

set step_result [catch [lindex $step_exe 0] [lindex $step_exe 1]];
set step_result [catch [lindex $step_exe 0] [lindex $step_exe 1] err];
if { $step_result } {
set failed 1;
puts_err "Step($::env(CURRENT_INDEX):$step_name) failed with error:\n$err"
set exe 0;
break;
}
Expand Down
Loading