Environment Variables for the OpenROAD Flow Scripts#
Environment variables are used in the OpenROAD flow to define various
platform, design and tool specific variables to allow finer control and
user overrides at various flow stages. These are defined in the
config.mk
file located in the platform and design specific directories.
Platform#
These variables must be defined in the platform specific config file
located in the OpenROAD-flow-scripts directory of
./flow/platforms/<PLATFORM>/config.mk
Note: The variable PLATFORM_DIR
is set by default based on the PLATFORM
variable. For OpenROAD Flow Scripts we have the following public platforms:
sky130hd
sky130hs
nangate45
asap7
Platform Specific Environment Variables#
The table below lists the complete set of variables used in each of the public platforms supported by the OpenROAD flow.
Note:
= indicates default definition assigned by the tool
?= indicates that the variable value may be reassigned with design
config.mk
Design Specific Configuration Variables#
Required Variables#
Required variables must be defined in the design configuration
file for each design located in the OpenROAD-flow-scripts directory of
./flow/designs/<PLATFORM>/<DESIGN_NAME>/config.mk
Optional Variables#
These are optional variables that may be over-ridden/appended with
default value from the platform config.mk
by defining in the design
configuration file.
Automatically generated tables from flow/scripts/variables.yaml#
Variables in alphabetic order#
Variable |
Description |
Default |
Deprecated |
---|---|---|---|
Strategies for Yosys ABC synthesis: Area/Speed. Default ABC_SPEED. |
0 |
||
Clock period to be used by STA during synthesis. Default value read from |
|||
Default driver cell used during ABC synthesis. |
|||
During synthesis set_load value used. |
|||
Which .odb file to use to create abstract |
|||
List of adders treated as a black box by Yosys. |
|||
Additional files to be added to |
|||
Hardened macro GDS files listed here. |
|||
Hardened macro LEF view files listed here. The LEF information of the macros is immutable and used throughout all stages. Stored in the .odb file. |
|||
Hardened macro library files listed here. The library information is immutable and used throughout all stages. Not stored in the .odb file. |
|||
Blocks used as hard macros in a hierarchical flow. Do note that you have to specify block-specific inputs file in the directory mentioned by Makefile. |
|||
Specifies a capacitance margin when fixing max capacitance violations. This option allows you to overfix. |
|||
Insert additional Circuit Description Language ( |
|||
Cell padding on both sides in site widths to ease routability in detail placement. |
0 |
||
Cell padding on both sides in site widths to ease routability during global placement. |
0 |
||
List of cells for gating clock treated as a black box by Yosys. |
|||
The core area specified as a list of lower-left and upper-right corners in microns (X1 Y1 X2 Y2). |
|||
The core aspect ratio (height / width). This value is ignored if |
|||
The margin between the core area and die area, specified in microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: |
|||
The core utilization percentage (0-100). |
|||
PVT corner library selection. Only available for ASAP7 and GF180 PDKs. |
|||
Override |
|||
Distance (in microns) between buffers. |
|||
Maximum diameter (in microns) of sink cluster. |
20 |
||
Maximum number of sinks per cluster. |
50 |
||
Creates ODB/SDC files prior to clock net and setup/hold repair. |
|||
The name of the top-level module of the design. |
|||
DESIGN_NICKNAME just changes the directory name that ORFS outputs to be DESIGN_NICKNAME instead of DESIGN_NAME in case DESIGN_NAME is unwieldy or conflicts with a different design. |
|||
If set, then calls report_metrics prior to repair operations in the CTS and global route stages |
0 |
||
Add additional arguments for debugging purposes during detail route. |
|||
Maximum number of iterations. |
64 |
||
Technology mapping liberty files for flip-flops. |
|||
The die area specified as a list of lower-left and upper-right corners in microns (X1 Y1 X2 Y2). |
|||
Dont use cells eases pin access in detailed routing. |
|||
Set liberty files as |
|||
Specifies how far an instance can be moved when optimizing. |
5 1 |
||
Enable detail placement with improve_placement feature. |
1 |
||
Enable running equivalence checks to verify logical correctness of repair_timing. |
0 |
||
Specifies a Tcl script with commands to run before FastRoute. |
|||
Fill cells are used to fill empty sites. If not set or empty, fill cell insertion is skipped. |
|||
JSON rule file for metal fill during chip finishing. |
|||
Use the DEF file to initialize floorplan. |
|||
Flow variant to use, used in the flow variant directory name. |
base |
||
Regular expression of module names of macros that have no .gds file |
|||
Path to platform GDS files. |
|||
For instance Bazel needs artifacts (.odb and .rpt files) on a failure to allow the user to save hours on re-running the failed step locally, but when working with a Makefile flow, it is more natural to fail the step and leave the user to manually inspect the logs and artifacts directly via the file system. Set to 1 to change the behavior to generate artifacts upon failure to e.g. do a global route. The exit code will still be non-zero on all other failures that aren’t covered by the “useful to inspect the artifacts on failure” use-case. Example: just like detailed routing, a global route that fails with congestion, is not a build failure(as in exit code non-zero), it is a successful(as in zero exit code) global route that produce reports detailing the problem. Detailed route will not proceed, if there is global routing congestion This allows build systems, such as bazel, to create artifacts for global and detailed route, even if the operation had problems, without having know about the semantics between global and detailed route. Considering that global and detailed route can run for a long time and use a lot of memory, this allows inspecting results on a laptop for a build that ran on a server. |
0 |
||
Use additional tuning parameters during global placement other than default args defined in global_place.tcl. |
|||
Replaces default arguments for global route. |
-congestion_iterations 30 -congestion_report_iter_step 5 -verbose |
||
Used for IR Drop calculation. |
|||
Specifies whether the placer should use routability driven placement. |
1 |
||
Specifies whether the placer should use timing driven placement. |
1 |
||
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 |
||
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 |
||
File path to the IO constraints .tcl file. |
|||
The metal layer on which to place the I/O pins horizontally (top and bottom of the die). |
|||
The metal layer on which to place the I/O pins vertically (sides of the die). |
|||
Default metal layer to report IR drop. |
|||
A mapping from LEF/DEF to GDS using the KLayout tool. |
|||
List of latches treated as a black box by Yosys. |
|||
A Liberty file of the standard cell library with PVT characterization, input and output characteristics, timing and power definitions for each cell. |
|||
Distance beyond the edges of a macro that will also be covered by the blockage generated for that macro. Note that the default macro blockage halo comes from the largest of the specified MACRO_PLACE_HALO x or y values. This variable overrides that calculation. |
|||
Sets the number of GCells added to the blockages boundaries from macros. |
|||
Specifies the path of a file on how to place certain macros manually using read_macro_placement. |
|||
Specifies the path of a TCL file on how to place certain macros manually. |
|||
Horizontal/vertical halo around macros (microns). Used by automatic macro placement. |
|||
Horizontal distance between the edge of the macro and the beginning of the rows created by tapcell. Only available for ASAP7 PDK and GF180/uart-blocks design. |
|||
Vertical distance between the edge of the macro and the beginning of the rows created by tapcell. Only available for ASAP7 PDK and GF180/uart-blocks design. |
|||
The wrapper file that replaces existing macros with their wrapped version. |
|||
Tcl file that defines add routing tracks to a floorplan. |
|||
Enforce sizing operations to only swap cells that have the same layout boundary. |
0 |
||
The highest metal layer name to be used in routing. |
|||
Used to insert a buffer cell to pass through wires. Used in synthesis. |
|||
The lowest metal layer name to be used in routing. |
|||
File path which has a set of power grid policies used by pdn to be applied to the design, such as layers to use, stripe width and spacing to generate the actual metal straps. |
|||
The desired placement density of cells. It reflects how spread the cells would be on the core area. 1.0 = closely dense. 0.0 = widely spread. |
|||
Check the lower boundary of the PLACE_DENSITY and add PLACE_DENSITY_LB_ADDON if it exists. |
|||
Arguments to place_pins |
|||
Placement site for core cells defined in the technology LEF file. |
|||
Specifies process design kit or technology node to be used. |
|||
Specifies a Tcl script with commands to run after CTS is completed. |
|||
Technology node or process in use. |
|||
Used for IR Drop calculation. |
|||
RC Extraction rules file path. |
|||
Specifies how many percent of paths with positive slacks can be slowed for power savings [0-100]. |
0 |
||
Remove abc buffers from the netlist. If timing repair in floorplanning is taking too long, use a SETUP/HOLD_SLACK_MARGIN to terminate timing repair early instead of using REMOVE_ABC_BUFFERS or set SKIP_LAST_GASP=1. |
yes |
||
String patterns directly passed to write_verilog -remove_cells <> for equivalence checks. |
|||
Remove power grid vias which generate DRC violations after detailed routing. |
|||
Report clock skew as part of reporting metrics, starting at CTS, before which there is no clock skew. This metric can be quite time-consuming, so it can be useful to disable. |
1 |
||
Enable re-synthesis for area reclaim. |
0 |
||
Enable re-synthesis for timing optimization. |
0 |
||
Adjusts routing layer capacities to manage congestion and improve detailed routing. High values ease detailed routing but risk excessive detours and long global routing times, while low values reduce global routing failure but can complicate detailed routing. The global routing running time normally reduces dramatically (entirely design specific, but going from hours to minutes has been observed) when the value is low (such as 0.10). Sometimes, global routing will succeed with lower values and fail with higher values. Exploring results with different values can help shed light on the problem. Start with a too low value, such as 0.10, and bisect to value that works by doing multiple global routing runs. As a last resort, |
0.5 |
||
Weight for the area of the current floorplan. |
0.1 |
||
Overrides all other RTL macro placer arguments. |
|||
Weight for the boundary or how far the hard macro clusters are from boundaries. |
50.0 |
||
Specifies the target dead space percentage, which influences the utilization of a cluster. |
0.05 |
||
Defines the lower left X coordinate for the global fence bounding box in microns. |
0.0 |
||
Defines the lower left Y coordinate for the global fence bounding box in microns. |
0.0 |
||
Defines the upper right X coordinate for the global fence bounding box in microns. |
100000000.0 |
||
Defines the upper right Y coordinate for the global fence bounding box in microns. |
100000000.0 |
||
Maximum number of standard cells in a cluster. If unset, rtl_macro_placer will calculate a value based on the design attributes. |
|||
Maximum depth of the physical hierarchy tree. |
2 |
||
Maximum number of macros in a cluster. If unset, rtl_macro_placer will calculate a value based on the design attributes. |
|||
Specifies the minimum aspect ratio (height/width). |
0.33 |
||
Minimum number of standard cells in a cluster. If unset, rtl_macro_placer will calculate a value based on the design attributes. |
|||
Minimum number of macros in a cluster. If unset, rtl_macro_placer will calculate a value based on the design attributes. |
|||
Weight for the notch, or the existence of dead space that cannot be used for placement and routing. |
10.0 |
||
Weight for violating the fixed outline constraint, meaning that all clusters should be placed within the shape of their parent cluster. |
100.0 |
||
Path to the directory where reports are saved. |
|||
Minimum number of connections between two clusters to be identified as connected. |
50 |
||
Weight for half-perimiter wirelength. |
100.0 |
||
Stem of the log file name, the log file will be named |
run |
||
Path to script to run from |
|||
Path to technology standard cell LEF file. |
|||
The path to design constraint (SDC) file. |
|||
Load design and remove all internal logic before doing synthesis. This is useful when creating a mock .lef abstract that has a smaller area than the amount of logic would allow. bazel-orfs uses this to mock SRAMs, for instance. |
|||
Seal macro to place around the design. |
|||
Specifies a time margin for the slack when fixing setup violations. This option allows you to overfix or underfix(negative value, terminate retiming before 0 or positive slack). See HOLD_SLACK_MARGIN for more details. |
0 |
||
Metal & Via RC definition file path. |
|||
Skipping CTS repair, which can take a long time, can be useful in architectural exploration or when getting CI up and running. |
|||
Do not use gate cloning transform to fix timing violations (default: use gate cloning). |
|||
Skip incremental repair in global route. |
0 |
||
Do not use last gasp optimization to fix timing violations (default: use gate last gasp). |
|||
Do not use pin swapping as a transform to fix timing violations (default: use pin swapping). |
|||
If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds. |
|||
Specifies a slew margin when fixing max slew violations. This option allows you to overfix. |
|||
Optional synthesis variables for yosys. |
-flatten |
||
List of cells treated as a black box by Yosys. With Bazel, this can be used to run synthesis in parallel for the large modules of the design. |
|||
Load design and remove all internal logic before doing synthesis. This is useful when creating a mock .lef abstract that has a smaller area than the amount of logic would allow. bazel-orfs uses this to mock SRAMs, for instance. |
|||
Enable to Synthesis hierarchically, otherwise considered flat synthesis. |
0 |
||
Mark modules to keep from getting removed in flattening. |
|||
Maximum number of bits for memory synthesis. |
4096 |
||
For hierarchical synthesis, we keep modules of larger area than given by this variable and flatten smaller modules. The area unit used is the size of a basic nand2 gate from the platform’s standard cell library. The default value is platform specific. |
0 |
||
Skips synthesis and uses the supplied netlist files. If the netlist files contains duplicate modules, which can happen when using hierarchical synthesis on indvidual netlist files and combining here, subsequent modules are silently ignored and only the first module is used. |
|||
Synthesize multiple architectural options for each arithmetic operator in the design. These options are available for switching among in later stages of the flow. |
|||
Path to Endcap and Welltie cells file. |
|||
Name of the cell to use in tap cell insertion. |
|||
A technology LEF file of the PDK that includes all relevant information regarding metal layers, vias, and spacing requirements. |
|||
Tie high cells used in Yosys synthesis to replace a logical 1 in the Netlist. |
|||
Tie low cells used in Yosys synthesis to replace a logical 0 in the Netlist. |
|||
Default TNS_END_PERCENT value for post CTS timing repair. Try fixing all violating endpoints by default (reduce to 5% for runtime). Specifies how many percent of violating paths to fix [0-100]. Worst path will always be fixed. |
100 |
||
Whether to perform metal density filling. |
0 |
||
The path to the design Verilog files or JSON files providing a description of modules (check |
|||
Specifies the include directories for the Verilog input files. |
|||
Apply toplevel params (if exist). |
|||
Flags to pass to yosys. |
-v 3 |