diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index 656004c3a6..2195b2761b 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -163,6 +163,7 @@ configuration file. | 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| +| GRT_SEED| Global route seed| | | 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| | HOLD_SLACK_MARGIN| Specifies a time margin for the slack when fixing hold violations. This option allows you to overfix or underfix (negative value, terminate retiming before 0 or positive slack). floorplan.tcl uses min of HOLD_SLACK_MARGIN and 0 (default hold slack margin). This avoids overrepair in floorplan for hold by default, but allows skipping hold repair using a negative HOLD_SLACK_MARGIN. Exiting timing repair early is useful in exploration where the .sdc has a fixed clock period at the design's target clock period and where HOLD/SETUP_SLACK_MARGIN is used to avoid overrepair (extremely long running times) when exploring different parameter settings. When an ideal clock is used, that is before CTS, a clock insertion delay of 0 is used in timing paths. This creates a mismatch between macros that have a .lib file from after CTS, when the clock is propagated. To mitigate this, OpenSTA will use subtract the clock insertion delay of macros when calculating timing with ideal clock. Provided that min_clock_tree_path and max_clock_tree_path are in the .lib file, which is the case for macros built with OpenROAD. This is less accurate than if OpenROAD had created a placeholder clock tree for timing estimation purposes prior to CTS. There will inevitably be inaccuracies in the timing calculation prior to CTS. Use a slack margin that is low enough, even negative, to avoid overrepair. Inaccuracies in the timing prior to CTS can also lead to underrepair, but there no obvious and simple way to avoid underrapir in these cases. Overrepair can lead to excessive runtimes in repair or too much buffering being added, which can present itself as congestion of hold cells or buffer cells. Another use of SETUP/HOLD_SLACK_MARGIN is design parameter exploration when trying to find the minimum clock period for a design. The SDC_FILE for a design can be quite complicated and instead of modifying the clock period in the SDC_FILE, which can be non-trivial, the clock period can be fixed at the target frequency and the SETUP/HOLD_SLACK_MARGIN can be swept to find a plausible current minimum clock period.| 0| | IO_CONSTRAINTS| File path to the IO constraints .tcl file. Also used for manual placement.| | @@ -534,6 +535,7 @@ configuration file. - [ENABLE_RESISTANCE_AWARE](#ENABLE_RESISTANCE_AWARE) - [GLOBAL_ROUTE_ARGS](#GLOBAL_ROUTE_ARGS) - [GLOBAL_ROUTE_USE_CUGR](#GLOBAL_ROUTE_USE_CUGR) +- [GRT_SEED](#GRT_SEED) - [HOLD_SLACK_MARGIN](#HOLD_SLACK_MARGIN) - [MAX_REPAIR_ANTENNAS_ITER_GRT](#MAX_REPAIR_ANTENNAS_ITER_GRT) - [MAX_ROUTING_LAYER](#MAX_ROUTING_LAYER) diff --git a/flow/scripts/global_route.tcl b/flow/scripts/global_route.tcl index 2fde876679..f71d11723c 100644 --- a/flow/scripts/global_route.tcl +++ b/flow/scripts/global_route.tcl @@ -14,7 +14,15 @@ proc global_route_helper { } { set use_cugr "" append_env_var use_cugr GLOBAL_ROUTE_USE_CUGR -use_cugr 0 + proc set_grt_seed { } { + set seed_arg [env_var_or_empty GRT_SEED] + if { $seed_arg ne "" } { + log_cmd set_global_routing_random -seed $seed_arg + } + } + proc do_global_route { res_aware use_cugr } { + set_grt_seed # CUGR runs a full 3D maze pass per iteration; use a tighter default. set cong_iters "-congestion_iterations 30" if { $use_cugr ne "" } { diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json index 27ac98e231..32b31dfa6f 100644 --- a/flow/scripts/variables.json +++ b/flow/scripts/variables.json @@ -433,6 +433,14 @@ "place" ] }, + "GRT_SEED": { + "description": "Global route seed\n", + "stages": [ + "grt" + ], + "tunable": 1, + "type": "int" + }, "GUI_TIMING": { "default": 1, "description": "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.\n" diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index 5d5c03e9b8..5801cb7454 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -1610,3 +1610,10 @@ OPT_POST_GRT_WNS: VT swap and wire rerouting only to minimize placement and routing disturbance stages: - grt +GRT_SEED: + description: > + Global route seed + stages: + - grt + tunable: 1 + type: int