chip-tutorials

OpenROAD Flow Scripts (ORFS) Walkthrough

Running an example design

This assumes that the smoke test runs and you’ve installed ORFS properly.

The documentation is available at ReadTheDocs.

The general steps of ORFS are shown here: OpenROAD Flow Scripts Methodology Steps

ORFS uses a Makefile to run the flow scripts. Specifically, it goes through the following steps that you see in the output of a successful run:

Log                            Elapsed seconds Peak Memory/MB
1_1_yosys                                    0             42
1_1_yosys_canonicalize                       0             38
2_1_floorplan                                0             97
2_2_floorplan_macro                          0             93
2_3_floorplan_tapcell                        0             93
2_4_floorplan_pdn                            0             95
3_1_place_gp_skip_io                         0             94
3_2_place_iop                                0             94
3_3_place_gp                                 1            194
3_4_place_resized                            0            113
3_5_place_dp                                 0             99
4_1_cts                                      4            120
5_1_grt                                     10            213
5_2_route                                   17           1175
5_3_fillcell                                 0             97
6_1_fill                                     0             95
6_1_merge                                    1            390
6_report                                     0            137
Total                                       33           1175

Running different designs and technologies

While running make ran the default design, you can pass a variable to the Makefile with a configuration file to run other designs. The default runs this:

make DESIGN_CONFIG=./designs/nangate45/gcd/config.mk

You can implement this in the ASAP7 technology by using this config:

make DESIGN_CONFIG=./designs/asap7/gcd/config.mk

The general format is:

make DESIGN_CONFIG=designs/<PLATFORM>/<DESIGN>/config.mk 

where PLATFORM is the technology used (e.g. nangate45, asap7, etc.) and DESIGN is the design name (e.g. gcd).

Viewing the final design

To view the last design in the OpenROAD GUI, you can run:

make DESIGN_CONFIG=./designs/nangate45/gcd/config.mk gui_final

Cleaning up

There are targets to clean individual steps, or the entire flow. The individual steps are:

The entire flow is:

For example, you can clean an entire design with:

make DESIGN_CONFIG=./designs/asap7/gcd/config.mk clean_all

Running individual steps

You can also specify what step to run to run until with make:

make DESIGN_CONFIG=designs/<PLATFORM>/<DESIGN>/config.mk <STEP>

where STEP can be synth, floorplan, place, cts, route or finish. This is useful if you are having a problem with global routing, for example. To debug it, you can repeat cleaning and making like this:

make DESIGN_CONFIG=designs/<PLATFORM>/<DESIGN>/config.mk clean_route
make DESIGN_CONFIG=designs/<PLATFORM>/<DESIGN>/config.mk route

As long as you don’t change any features that affect the design, this is ok. However, if you change a feature that modifies the floorplan, for example, you will need to clean the floorplan and run from that step again.

Interactive TCL usage

If you want to use OpenROAD interactively, you need to first your path by sourcing the environment script. The Makefile is smart enough to not require this, but if you are running openroad directly, you will need to do this. For example,

source env.sh

You can then see that you are using the correct version of OpenROAD by running:

which openroad

which should point to

OpenROAD-flow-scripts/tools/install/OpenROAD/bin/openroad

Then, to get an interactive TCL console:

make DESIGN_CONFIG=designs/<PLATFORM>/<DESIGN>/config.mk bash
source env.sh
openroad <TLC file>

This bash script sets a bunch of environment variables (e.g., SCRIPTS_DIR, LEF_FILES, LIB_FILES, etc.) so that you can use the ORFS scripts in flow/scripts. For example you can very easily read a design after CTS in TCL with:

source $::env(SCRIPTS_DIR)/load.tcl
load_design 4_cts.odb 4_cts.sdc

Because you have specified the config file, it knows which design and technology, so you only have to specify the ODB file and SDC constraints.

Directory structure

The results (output files) are put in results/<PLATFORM>/<DESIGN>/base, where <PLATFORM> is the technology used (e.g. nangate45, asap7, etc.), <DESIGN> is the design name (e.g. gcd). The results directory is created if it does not exist.

The log files are put in logs/<PLATFORM>/<DESIGN>/base. There is one log file per flow step.

The reports (e.g. timing, area, power) are put in reports/<PLATFORM>/<DESIGN>/base. Each step has reports depending on what it does.

Config files

The config files contain parameters for the design, such as the technology, the input files, the constraints, etc. The important parts of a config file are:

# Specifies the technology subdirectory.
export PLATFORM    = nangate45
# Input file list (a single file or a list of files).
export VERILOG_FILES = $(DESIGN_HOME)/src/$(DESIGN_NAME)/gcd.v
# The timing constraint file.
export SDC_FILE      = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NAME)/constraint.sdc
# It picks a floorplan size so that the logic cells use 55\% of the area.
export CORE_UTILIZATION ?= 55

You can see all of the flow variable options documented here: Flow Variables

There are a lot of default variables that get set, but the config file overrides them. The make bash target sources the default settings and your config file for a particular technology and design.

Help

There is an ORFS tutrorial.

OpenROAD has some options for help via the man command like most Unix systems. These manual pages provide detailed information about how to use a particular command or function, along with its syntax and options.

This can be used for a range of commands in different levels as follows:

The OpenROAD documentation is available at ReadTheDocs.

License

Copyright 2025 VLSI-DA (see LICENSE for use)