From 3497c3a1d63a621de8f27e67bc74eebc5c4532f0 Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Mon, 29 Jun 2026 17:00:59 +0000 Subject: [PATCH 1/4] Add GPL_RANDOM_SEED flow variable. Pass -random_seed to gpl in both skip_io (3_1) and regular (3_3). Signed-off-by: Matt Liberty --- flow/scripts/global_place.tcl | 2 ++ flow/scripts/global_place_skip_io.tcl | 6 +++++- flow/scripts/variables.yaml | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/flow/scripts/global_place.tcl b/flow/scripts/global_place.tcl index 95c135e54a..5822ef47c2 100644 --- a/flow/scripts/global_place.tcl +++ b/flow/scripts/global_place.tcl @@ -26,6 +26,8 @@ set global_placement_args {} # Parameters for routability mode in global placement append_env_var global_placement_args GPL_ROUTABILITY_DRIVEN -routability_driven 0 +append_env_var global_placement_args GPL_RANDOM_SEED -random_seed 1 + # Parameters for timing driven mode in global placement if { $::env(GPL_TIMING_DRIVEN) } { lappend global_placement_args {-timing_driven} diff --git a/flow/scripts/global_place_skip_io.tcl b/flow/scripts/global_place_skip_io.tcl index 7f8f1d0e82..38c58917d4 100644 --- a/flow/scripts/global_place_skip_io.tcl +++ b/flow/scripts/global_place_skip_io.tcl @@ -8,10 +8,14 @@ if { [env_var_exists_and_non_empty FLOORPLAN_DEF] } { } elseif { [all_pins_placed] } { puts "All pins are placed. Skipping global placement without IOs" } else { + set global_placement_args {} + append_env_var global_placement_args GPL_RANDOM_SEED -random_seed 1 + log_cmd global_placement -skip_io -density [place_density_with_lb_addon] \ -pad_left $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT) \ -pad_right $::env(CELL_PAD_IN_SITES_GLOBAL_PLACEMENT) \ - {*}[env_var_or_empty GLOBAL_PLACEMENT_ARGS] + {*}[env_var_or_empty GLOBAL_PLACEMENT_ARGS] \ + {*}$global_placement_args } source_step_tcl POST GLOBAL_PLACE_SKIP_IO diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index 5110b25df5..c5f1104a55 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -643,6 +643,11 @@ USE_NEGOTIATION: description: | Enable using negotiation legalizer for detailed placement. default: 0 +GPL_RANDOM_SEED: + description: | + Specifies a random seed for global placement. Useful for pertubation studies. + stages: + - place GPL_TIMING_DRIVEN: description: | Specifies whether the placer should use timing driven placement. From 8fcaf0995c7fc8917eeac944afcaf1b3950ccd6e Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Wed, 1 Jul 2026 13:55:35 +0000 Subject: [PATCH 2/4] Apply random seed to asap7/swerv_wrapper and nangate45/ariane133 Signed-off-by: Matt Liberty --- docs/user/FlowVariables.md | 2 ++ flow/designs/asap7/swerv_wrapper/config.mk | 1 + flow/designs/nangate45/ariane133/config.mk | 2 ++ flow/scripts/variables.json | 6 ++++++ tools/OpenROAD | 2 +- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index 9bd08318bc..ffaf79a8bf 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -160,6 +160,7 @@ configuration file. | GLOBAL_ROUTE_USE_CUGR| Passed as -use_cugr to global_route. Uses CUGR as the global routing solver instead of the default FastRoute solver. NOTE: CUGR is not ready for production.| 0| | GND_NETS_VOLTAGES| Used for IR Drop calculation.| | | GPL_KEEP_OVERFLOW| Passed as -keep_resize_below_overflow to global_placement. Only used when GPL_TIMING_DRIVEN is enabled.| | +| GPL_RANDOM_SEED| Specifies a random seed for global placement. Useful for pertubation studies.| | | GPL_ROUTABILITY_DRIVEN| Specifies whether the placer should use routability driven placement.| 1| | GPL_TIMING_DRIVEN| Specifies whether the placer should use timing driven placement.| 1| | GUI_TIMING| Load timing information when opening GUI. For large designs, this can be quite time consuming. Useful to disable when investigating non-timing aspects like floorplan, placement, routing, etc.| 1| @@ -472,6 +473,7 @@ configuration file. - [FLOORPLAN_DEF](#FLOORPLAN_DEF) - [GLOBAL_PLACEMENT_ARGS](#GLOBAL_PLACEMENT_ARGS) - [GPL_KEEP_OVERFLOW](#GPL_KEEP_OVERFLOW) +- [GPL_RANDOM_SEED](#GPL_RANDOM_SEED) - [GPL_ROUTABILITY_DRIVEN](#GPL_ROUTABILITY_DRIVEN) - [GPL_TIMING_DRIVEN](#GPL_TIMING_DRIVEN) - [IO_PLACER_H](#IO_PLACER_H) diff --git a/flow/designs/asap7/swerv_wrapper/config.mk b/flow/designs/asap7/swerv_wrapper/config.mk index 97410ab479..b638e11f0b 100644 --- a/flow/designs/asap7/swerv_wrapper/config.mk +++ b/flow/designs/asap7/swerv_wrapper/config.mk @@ -61,3 +61,4 @@ export ROUTING_LAYER_ADJUSTMENT = 0.2 export SWAP_ARITH_OPERATORS = 1 export OPENROAD_HIERARCHICAL = 1 +export GPL_RANDOM_SEED = 2 diff --git a/flow/designs/nangate45/ariane133/config.mk b/flow/designs/nangate45/ariane133/config.mk index 4042fef704..741acedfd3 100644 --- a/flow/designs/nangate45/ariane133/config.mk +++ b/flow/designs/nangate45/ariane133/config.mk @@ -27,3 +27,5 @@ export RTLMP_MAX_MACRO = 30 export RTLMP_MIN_MACRO = 10 export RTLMP_MAX_INST = 80000 export RTLMP_MIN_INST = 8000 + +export GPL_RANDOM_SEED = 3 diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json index 815de49e82..7c27309e63 100644 --- a/flow/scripts/variables.json +++ b/flow/scripts/variables.json @@ -413,6 +413,12 @@ "place" ] }, + "GPL_RANDOM_SEED": { + "description": "Specifies a random seed for global placement. Useful for pertubation studies.\n", + "stages": [ + "place" + ] + }, "GPL_ROUTABILITY_DRIVEN": { "default": 1, "description": "Specifies whether the placer should use routability driven placement.\n", diff --git a/tools/OpenROAD b/tools/OpenROAD index 7304ba78ad..5c5380c49a 160000 --- a/tools/OpenROAD +++ b/tools/OpenROAD @@ -1 +1 @@ -Subproject commit 7304ba78ade7cb9f78466c6d0231432d72dadd3b +Subproject commit 5c5380c49a63466536b20ddf5c7e4e151ff40daa From f7bc306ebdd2309b994d76ea9999084e4b6b228e Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Wed, 1 Jul 2026 18:36:41 +0000 Subject: [PATCH 3/4] designs/nangate45/ariane133/rules-base.json updates: | Metric | Old | New | Type | | ------ | --- | --- | ---- | | synth__canonical_netlist__hash | 7af2e5d516717525c8e4b86fbe5c8c0fc7e3e6b0 | 608c7e7060b1b403c0e893101b0bd83a23b7f306 | Failing | | synth__netlist__hash | 0925e491023b71ddf98d5a9d92664c9607d38b85 | 624023bd257848127135daf0c0d20528d8fb9315 | Failing | | cts__timing__setup__ws | -0.579 | -0.574 | Tighten | | cts__timing__setup__tns | -929.0 | -743.0 | Tighten | | globalroute__timing__setup__tns | -755.0 | -880.0 | Failing | | finish__timing__setup__tns | -801.0 | -964.0 | Failing | Signed-off-by: Matt Liberty --- flow/designs/nangate45/ariane133/rules-base.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flow/designs/nangate45/ariane133/rules-base.json b/flow/designs/nangate45/ariane133/rules-base.json index 3975f0282f..2a9ee15a69 100644 --- a/flow/designs/nangate45/ariane133/rules-base.json +++ b/flow/designs/nangate45/ariane133/rules-base.json @@ -1,11 +1,11 @@ { "synth__canonical_netlist__hash": { - "value": "7af2e5d516717525c8e4b86fbe5c8c0fc7e3e6b0", + "value": "608c7e7060b1b403c0e893101b0bd83a23b7f306", "compare": "==", "level": "warning" }, "synth__netlist__hash": { - "value": "0925e491023b71ddf98d5a9d92664c9607d38b85", + "value": "624023bd257848127135daf0c0d20528d8fb9315", "compare": "==", "level": "warning" }, @@ -38,11 +38,11 @@ "compare": "<=" }, "cts__timing__setup__ws": { - "value": -0.579, + "value": -0.574, "compare": ">=" }, "cts__timing__setup__tns": { - "value": -929.0, + "value": -743.0, "compare": ">=" }, "cts__timing__hold__ws": { @@ -62,7 +62,7 @@ "compare": ">=" }, "globalroute__timing__setup__tns": { - "value": -755.0, + "value": -880.0, "compare": ">=" }, "globalroute__timing__hold__ws": { @@ -94,7 +94,7 @@ "compare": ">=" }, "finish__timing__setup__tns": { - "value": -801.0, + "value": -964.0, "compare": ">=" }, "finish__timing__hold__ws": { From a0c3048a7e44fbd0f57d116f2edea0902ca32d6d Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Wed, 1 Jul 2026 18:37:52 +0000 Subject: [PATCH 4/4] fix typo Signed-off-by: Matt Liberty --- 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 ffaf79a8bf..ab5dc406d4 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -160,7 +160,7 @@ configuration file. | GLOBAL_ROUTE_USE_CUGR| Passed as -use_cugr to global_route. Uses CUGR as the global routing solver instead of the default FastRoute solver. NOTE: CUGR is not ready for production.| 0| | GND_NETS_VOLTAGES| Used for IR Drop calculation.| | | GPL_KEEP_OVERFLOW| Passed as -keep_resize_below_overflow to global_placement. Only used when GPL_TIMING_DRIVEN is enabled.| | -| GPL_RANDOM_SEED| Specifies a random seed for global placement. Useful for pertubation studies.| | +| GPL_RANDOM_SEED| Specifies a random seed for global placement. Useful for perturbation studies.| | | GPL_ROUTABILITY_DRIVEN| Specifies whether the placer should use routability driven placement.| 1| | GPL_TIMING_DRIVEN| Specifies whether the placer should use timing driven placement.| 1| | GUI_TIMING| Load timing information when opening GUI. For large designs, this can be quite time consuming. Useful to disable when investigating non-timing aspects like floorplan, placement, routing, etc.| 1| diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json index 7c27309e63..6f45eaa945 100644 --- a/flow/scripts/variables.json +++ b/flow/scripts/variables.json @@ -414,7 +414,7 @@ ] }, "GPL_RANDOM_SEED": { - "description": "Specifies a random seed for global placement. Useful for pertubation studies.\n", + "description": "Specifies a random seed for global placement. Useful for perturbation studies.\n", "stages": [ "place" ] diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index c5f1104a55..e40baa4593 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -645,7 +645,7 @@ USE_NEGOTIATION: default: 0 GPL_RANDOM_SEED: description: | - Specifies a random seed for global placement. Useful for pertubation studies. + Specifies a random seed for global placement. Useful for perturbation studies. stages: - place GPL_TIMING_DRIVEN: