diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md
index 8d32a9d6ad..b3445b729a 100644
--- a/docs/user/FlowVariables.md
+++ b/docs/user/FlowVariables.md
@@ -92,6 +92,7 @@ configuration file.
| --- | --- | --- |
| ABC_AREA| Strategies for Yosys ABC synthesis: Area/Speed. Default ABC_SPEED.| 0|
| ABC_DRIVER_CELL| Default driver cell used during ABC synthesis.| |
+| ABC_LIBERTY_ARGS| Extra arguments for ABC's read_lib, passed with Yosys's abc -liberty_args. Without -S/-G, ABC's mapping library gives every cell a delay of 1, so mapping minimizes gate count, not delay. "-a -G 250" derives a delay for each cell from the liberty tables (all cells, gain 250). Ignored when SYNTH_WRAPPED_OPERATORS or SWAP_ARITH_OPERATORS is set: abc_new has no such option.| |
| ABC_LOAD_IN_FF| During synthesis set_load value used.| |
| ABC_SCRIPT| Replaces the ABC script synthesis runs, so that a design can vendor and change it. Ignored when SYNTH_WRAPPED_OPERATORS or SWAP_ARITH_OPERATORS is set: abc_new then maps each arithmetic operator with its own script.| |
| ABSTRACT_SOURCE| Which .odb file to use to create abstract| |
@@ -343,6 +344,7 @@ configuration file.
- [ABC_AREA](#ABC_AREA)
- [ABC_DRIVER_CELL](#ABC_DRIVER_CELL)
+- [ABC_LIBERTY_ARGS](#ABC_LIBERTY_ARGS)
- [ABC_LOAD_IN_FF](#ABC_LOAD_IN_FF)
- [ABC_SCRIPT](#ABC_SCRIPT)
- [ADDER_MAP_FILE](#ADDER_MAP_FILE)
diff --git a/flow/scripts/synth.tcl b/flow/scripts/synth.tcl
index aa4d3afb6c..1d2c38b7bf 100644
--- a/flow/scripts/synth.tcl
+++ b/flow/scripts/synth.tcl
@@ -282,6 +282,9 @@ if {
![env_var_equals SYNTH_WRAPPED_OPERATORS 1] &&
![env_var_equals SWAP_ARITH_OPERATORS 1]
} {
+ if { [env_var_exists_and_non_empty ABC_LIBERTY_ARGS] } {
+ lappend abc_args -liberty_args $::env(ABC_LIBERTY_ARGS)
+ }
log_cmd abc {*}$abc_args
} else {
# Not dead code: abc_new mistakes the "-script" in /OpenROAD-flow-scripts/...
diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json
index 2810d1ec80..ef57d1f296 100644
--- a/flow/scripts/variables.json
+++ b/flow/scripts/variables.json
@@ -12,6 +12,12 @@
"synth"
]
},
+ "ABC_LIBERTY_ARGS": {
+ "description": "Extra arguments for ABC's read_lib, passed with Yosys's\nabc -liberty_args. Without -S/-G, ABC's mapping library gives every\ncell a delay of 1, so mapping minimizes gate count, not delay.\n\"-a -G 250\" derives a delay for each cell from the liberty tables\n(all cells, gain 250). Ignored when SYNTH_WRAPPED_OPERATORS or\nSWAP_ARITH_OPERATORS is set: abc_new has no such option.\n",
+ "stages": [
+ "synth"
+ ]
+ },
"ABC_LOAD_IN_FF": {
"description": "During synthesis set_load value used.\n",
"stages": [
diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml
index 4d71623a35..fee9f79244 100644
--- a/flow/scripts/variables.yaml
+++ b/flow/scripts/variables.yaml
@@ -1070,6 +1070,16 @@ ABC_AREA:
stages:
- synth
default: 0
+ABC_LIBERTY_ARGS:
+ description: |
+ Extra arguments for ABC's read_lib, passed with Yosys's
+ abc -liberty_args. Without -S/-G, ABC's mapping library gives every
+ cell a delay of 1, so mapping minimizes gate count, not delay.
+ "-a -G 250" derives a delay for each cell from the liberty tables
+ (all cells, gain 250). Ignored when SYNTH_WRAPPED_OPERATORS or
+ SWAP_ARITH_OPERATORS is set: abc_new has no such option.
+ stages:
+ - synth
ABC_SCRIPT:
description: |
Replaces the ABC script synthesis runs, so that a design can vendor and