From f421affe03d87e125d66e7a3296e9028faed3a07 Mon Sep 17 00:00:00 2001 From: Daniel Van Blerkom Date: Sat, 24 Oct 2026 19:55:50 -0400 Subject: [PATCH 1/2] synth: ABC_LIBERTY_ARGS, extra arguments for ABC's read_lib Co-Authored-By: Claude Opus 5.5 Signed-off-by: Daniel Van Blerkom --- docs/user/FlowVariables.md | 2 ++ flow/scripts/synth.tcl | 3 +++ flow/scripts/variables.json | 6 ++++++ flow/scripts/variables.yaml | 10 ++++++++++ 4 files changed, 21 insertions(+) diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index 8d32a9d6ad..e4efc4e922 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 minimises 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..294c15707e 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 minimises 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..ab74945902 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 minimises 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 From c372b41a3df19488ffa17fd7b3948da9b0751c39 Mon Sep 17 00:00:00 2001 From: Daniel Van Blerkom Date: Mon, 26 Oct 2026 23:00:59 -0400 Subject: [PATCH 2/2] synth: ABC_LIBERTY_ARGS: American spelling in the description Co-Authored-By: Claude Opus 5.5 Signed-off-by: Daniel Van Blerkom --- docs/user/FlowVariables.md | 2 +- flow/scripts/variables.json | 2 +- flow/scripts/variables.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index e4efc4e922..b3445b729a 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -92,7 +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 minimises 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_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| | diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json index 294c15707e..ef57d1f296 100644 --- a/flow/scripts/variables.json +++ b/flow/scripts/variables.json @@ -13,7 +13,7 @@ ] }, "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 minimises 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", + "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" ] diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index ab74945902..fee9f79244 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -1074,7 +1074,7 @@ 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 minimises gate count, not delay. + 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.