From 255cdd1481ef07ac071dcb0fc7a018a9c73a9011 Mon Sep 17 00:00:00 2001 From: Jeff Ng Date: Thu, 10 Sep 2026 20:24:14 +0000 Subject: [PATCH] Enable operator mapping to be tuned Signed-off-by: Jeff Ng --- flow/scripts/resize.tcl | 4 ++-- flow/scripts/synth.tcl | 2 +- flow/scripts/variables.json | 15 ++++++++++----- flow/scripts/variables.yaml | 5 +++++ 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/flow/scripts/resize.tcl b/flow/scripts/resize.tcl index 9a1abba827..64709b9417 100644 --- a/flow/scripts/resize.tcl +++ b/flow/scripts/resize.tcl @@ -18,8 +18,8 @@ if { [env_var_exists_and_non_empty EARLY_SIZING_CAP_RATIO] } { if { [env_var_equals SWAP_ARITH_OPERATORS 1] } { # Enable sanity checker until replace_arith_modules becomes stable set_debug_level ODB replace_design_check_sanity 1 - replace_arith_modules - global_placement -incremental + log_cmd replace_arith_modules + log_cmd global_placement -incremental } repair_design_helper diff --git a/flow/scripts/synth.tcl b/flow/scripts/synth.tcl index 07be4fd0b6..bb2d54ed31 100644 --- a/flow/scripts/synth.tcl +++ b/flow/scripts/synth.tcl @@ -190,7 +190,7 @@ if { [env_var_equals SYNTH_WRAPPED_OPERATORS 1] || [env_var_equals SWAP_ARITH_OPERATORS 1] } { - source $::env(SCRIPTS_DIR)/synth_wrap_operators.tcl + log_cmd source $::env(SCRIPTS_DIR)/synth_wrap_operators.tcl } else { synth -top $::env(DESIGN_NAME) -run fine: -noabc {*}$synth_full_args } diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json index d2725ce668..5ccde89ecd 100644 --- a/flow/scripts/variables.json +++ b/flow/scripts/variables.json @@ -665,7 +665,8 @@ "description": "Feature toggle to enable to run OpenROAD in hierarchical mode, otherwise considered flat. Will eventually be the default and this option will be retired.\n", "stages": [ "All stages" - ] + ], + "tunable": 1 }, "OPT_POST_GRT_WNS": { "default": 1, @@ -1272,7 +1273,8 @@ "description": "Improve timing QoR by swapping ALU and MULT arithmetic operators.\n", "stages": [ "All stages" - ] + ], + "tunable": 1 }, "SYNTH_ARGS": { "description": "Optional synthesis variables for yosys.\n", @@ -1309,14 +1311,16 @@ "description": "Select an alternative language frontend to ingest the design. Available option is \"slang\". If the variable is empty, design is read with the Yosys read_verilog command.\n", "stages": [ "synth" - ] + ], + "tunable": 1 }, "SYNTH_HIERARCHICAL": { "default": 0, "description": "Enable to Synthesis hierarchically, otherwise considered flat synthesis.\n", "stages": [ "synth" - ] + ], + "tunable": 1 }, "SYNTH_HIER_SEPARATOR": { "default": ".", @@ -1436,7 +1440,8 @@ "description": "Synthesize multiple architectural options for each arithmetic operator in the design. These options are available for switching among in later stages of the flow.\n", "stages": [ "All stages" - ] + ], + "tunable": 1 }, "TAPCELL_TCL": { "description": "Path to Endcap and Welltie cells file.\n", diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index 1b6abe4c83..970bd94566 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -181,6 +181,7 @@ SYNTH_HIERARCHICAL: stages: - synth default: 0 + tunable: 1 SYNTH_USE_SYN: description: > If set to 1, run synthesis using the "syn" tool built into OpenROAD @@ -273,6 +274,7 @@ SYNTH_HDL_FRONTEND: command. stages: - synth + tunable: 1 SYNTH_SLANG_ARGS: description: > Additional arguments passed to the slang frontend during synthesis. @@ -468,6 +470,7 @@ SYNTH_WRAPPED_OPERATORS: stages: - All stages default: 0 + tunable: 1 SYNTH_WRAPPED_ADDERS: description: > Specify the adder modules that can be used for synthesis, separated by commas. @@ -486,6 +489,7 @@ SWAP_ARITH_OPERATORS: stages: - All stages default: 0 + tunable: 1 FLOORPLAN_DEF: description: | Use the DEF file to initialize floorplan. Mutually exclusive with FOOTPRINT or DIE_AREA/CORE_AREA or CORE_UTILIZATION. @@ -1589,6 +1593,7 @@ OPENROAD_HIERARCHICAL: otherwise considered flat. Will eventually be the default and this option will be retired. default: 0 + tunable: 1 stages: - All stages NUM_CORES: