___ ____ ___ ____ _ ____ ____ ___
/ \ | \ / _]| \ | | / || \ / _]
| || o ) [_ | _ || | | o || _ | / [_
| O || _/ _]| | || |___ | || | || _]
| || | | [_ | | || || _ || | || [_
\___/ |__| |_____||__|__||_____||__|__||__|__||_____|
- Overview
- Prerequisites
- Getting Started - Directory Setup
- Getting Started - OpenLANE Flow Setup
- Getting Started - PDK Setup
- Getting Started - How to Run
- The Flow
- Regression And Design Configurations Exploration
OpenLaneは、OpenRoad、Yosys、Magic、Netgen、Fault、およびデザインの探索と最適化のためのカスタムメソドロジースクリプトを含むいくつかのコンポーネントをベースにした、RTLからGDSIIまでの自動化されたフローです。このフローは、RTLからGDSIIに至るまで、ASICの完全な実装ステップを実行します。この機能は、SkyWaterにファブリケーションのために送られた完成したSoCデザインの例とともに、近日中にリリースされる予定です。
- Docker
実行プロセスを簡単にするために、以下の設定が推奨されています:
openlane_working_dir
├── pdks
├── openlane
So before you start run the following commands:
mkdir openlane_working_dir
cd openlane_working_dir
mkdir pdks
mkdir openlane
Clone & build OpenLANE:
git clone https://github.com/efabless/openlane --branch rc1
cd openlane/docker_build
make merge
cd ..
cd ..
dockerコンテナとそのプロセスの詳細については、 following instructions では、dockerコンテナを使用して必要なツールを構築し、それをOpenLaneフローに統合するプロセスを説明しています。
フローを実行する前に、少なくとも1つのPDKを openlane_working_dir/pdks/ に設定しておく必要があります。
このセクションでは、オープンレーン上での skywater-pdk の設定方法を説明します。説明した手順は、他のPDKのセットアップ方法の際にも参考となるでしょう。
-
Clone and build one skywwater-pdk variant(s) inside the pdks directory:
- To setup one variant only
cd pdks git clone https://github.com/google/skywater-pdk.git cd skywater-pdk git checkout 4e5e318e0cc578090e1ae7d6f2cb1ec99f363120 git submodule update --init libraries/sky130_fd_sc_hd/latest make sky130_fd_sc_hd cd ..
- To setup other variants:
- replace sky130_fd_sc_hd with any of the following list:
- sky130_fd_sc_hs
- sky130_fd_sc_ms
- sky130_fd_sc_ls
- sky130_fd_sc_hdll
- replace sky130_fd_sc_hd with any of the following list:
-
Setup the configurations and tech files:
- To perform physical verification you need to use the magic tool. Therefore, you need to setup the pdk using open-pdks:
git clone https://github.com/efabless/open_pdks.git cd open_pdks git checkout c2fec9fe64146000236dd807165b80b6a8b82b89 make make install-local cd .. cd ..
Note: You may want to change the pdk installation directory or control other options explained here.
Note: If you don't want to use open_pdks and want to create the setup manually (This will only allow you to run the flow up to a routed-def), make sure you provide what is expected here.
-
Point to the (PDK,PDK_VARIANT) pair:
- Open ./openlane_working_dir/openlane/configuration/general.tcl
- set PDK to the name of the folder containing the pdk under PDK_ROOT.
Default: sky130A - set PDK_VARIANT to the name of the library as it exists under libs.tech.
Default: sky130_fd_sc_hd
Refer to this for more details on the structure.
- Provide the setup expected here.
- To perform physical verification you need to use the magic tool setup.
- Point to the (PDK,PDK_VARIANT) pair:
- Go into ./configuration/general.tcl
- set PDK to the name of the folder containing the pdk under PDK_ROOT.
- set PDK_VARIANT to the name of the library as it exists under libs.tech
Refer to this for more details on the structure.
dockerイメージをビルドした後、以下のコマンドを実行してプロジェクトのルートからdockerコンテナを開き、コンテナを終了した後も出力ファイルが持続するようにします。:
docker run -itv $(pwd)/openlane:/openLANE_flow -v $(pwd)/pdks/open_pdks/sky130/pdks:/openLANE_flow/pdks -u $(id -u $USER):$(id -g $USER) openlane:rc1
Note: this will mirror the openlane directory inside the container.
This will mount the docker with the root folder being ./openLANE_flow
containing inside it the working directory specified, as well as the pdks directory in which you installed the pdks as a sub-directory
Then, you can test the flow using one of the provided designs (spm: Serial-Parallel Adder) by running:
./flow.tcl -design spm
To start a batch run (multiple designs at the same time), check this section.
More details on running different designs in the following sections.
The following are arguments that can be passed to flow.tcl
Argument | Description |
---|---|
-design (Required) |
Specifies the design folder. A design folder should contain a config.tcl definig the design parameters. If the folder is not found, ./designs directory is searched |
-config <name> (Optional) |
Specifies the design's configuration file for while running the flow. For example, to run the flow using designs/spm/config2.tcl Use run ./flow.tcl -design spm -config config2.tcl By default config.tcl is used.
|
-tag <name> (Optional) |
Specifies a name for a specific run. If the tag is not specified, a timestamp is generated for identification of that run. Can Specify the configuration file name in case of using -init_design_config
|
-run_path <path> (Optional) |
Specifies a path to save the run in. By default the run is in design_path/ , where the design path is the one passed to -design
|
-save |
A flag to save a runs results like .mag and .lef in the design's folder |
-save_path <path> (Optional) |
Specifies a different path to save the design's result. This options is to be used with the -save flag
|
-init_design_config (Optional) |
Creates a tcl configuration file for a design. -tag <name> can be added to rename the config file to <name>.tcl
|
-overwrite (Optional) |
Flag to overwirte an existing run with the same tag |
-interactive (Optional) |
Flag to run openlane flow in interactive mode |
-file <file_path> (Optional) |
Passes a script of interactive commands in interactive mode |
To add a new design, follow the instructions provided here
This file also includes useful information about the design configuration files. It also includes useful utilities for exploring and updating design configurations for each (PDK,PDK_VARIANT) pair.
OpenLaneの実行フローは複数のステージから構成されています。各ステージは複数のサブステージで構成されます。OpenLaneは対話的に実行(設計者がフローのステップを一つずつ実行する)または、非対話的に実行することができます(デフォルトでは、すべてのフローのステップを順に実行する):
- Synthesis
yosys
- Performs RTL synthesisabc
- Performs technology mappingOpenSTA
- Pefroms static timing analysis on the resulting netlist to generate timing reports
- Floorplan and PDN
init_fp
- Defines the core area for the macro as well as the rows (used for placement) and the tracks (used for routing)ioplacer
- Places the macro input and output portspdn
- Generates the power distribution networktapcell
- Inserts welltap and decap cells in the floorplan
- Placement
RePLace
- Performs global placementResizer
- Performs optional optimizations on the designOpenDP
- Perfroms detailed placement to legalize the globally placed components
- CTS
TritonCTS
- Synthesizes the clock distribution network (the clock tree)
- Routing *
FastRoute
- Performs global routing to generate a guide file for the detailed routerTritonRoute
- Performs detailed routing
- GDSII Generation
magic
- Streams out the final GDSII layout file from the routed def
- Checks
magic
- Performs DRC Checks & Antenna ChecksNetgen
- Performs LVS Checks
OpenLane uses the following tools:
- RTL Synthesis, Technology Mapping, and Formal Verification : yosys + abc
- Static Timing Analysis: OpenSTA
- Floor Planning: init_fp, ioPlacer, pdn and tapcell
- Placement: RePLace (Global), Resizer (Optimizations), and OpenDP (Detailed)
- Clock Tree Synthesis: OpenROAD/TritonCTS
- Fill Insertion: OpenROAD/filler_placement
- Routing: FastRoute (Global) and TritonRoute (Detailed)
- GDSII Streaming out: Magic
- DRC Checks: Magic
- LVS check: Netgen
- Antenna Checks: Magic
After running a design, a directory called runs
is created inside that design folder. Each run is placed under that directory.
A run is either named after -tag
or named with a timestamp of that run.
A run folder contains:
- The run configuration
- Four directories. Inside each, there is a folder per stage of the flow
logs
- Runtime log of each tool. Can be useful in case of a crash.reports
- Reports generated by some of the tools. (i.e. synthesis report, timing report, etc...)results
- Final files created by completing a stage. Can either be.def
or.v
or.gds
.tmp
- Files created by substages.
The resulting directory tree is as follows:
designs/spm
├── config.tcl
├── runs
│ ├── <tag>
│ │ ├── config.tcl
│ │ ├── logs
│ │ │ ├── cts
│ │ │ ├── floorplan
│ │ │ ├── magic
│ │ │ ├── placement
│ │ │ ├── routing
│ │ │ └── synthesis
│ │ ├── reports
│ │ │ ├── cts
│ │ │ ├── floorplan
│ │ │ ├── magic
│ │ │ ├── placement
│ │ │ ├── routing
│ │ │ └── synthesis
│ │ ├── results
│ │ │ ├── cts
│ │ │ ├── floorplan
│ │ │ ├── magic
│ │ │ ├── placement
│ │ │ ├── routing
│ │ │ └── synthesis
│ │ └── tmp
│ │ ├── cts
│ │ ├── floorplan
│ │ ├── magic
│ │ ├── placement
│ │ ├── routing
│ │ └── synthesis
OpenLaneの利用にあたっていくつかの環境変数を定義する必要があります。これらの環境変数は以下の3つのカテゴリに分かれています:
- PDK specific
- Flow specific
- Design specific
-
A PDK should define at least one variant for the PDK. A common configuration file for all PDK variants is located in:
./pdks/<pdk>/common_config.tcl
-
Sometimes the PDK comes with several Standard Cell Libraries or Metal Stacks. Each is considered as a PDK variant. A variant configuration file defines extra variables specific to the variant. It may also override variables in the common PDK configuration file which is located in:
./pdks/<pdk>/<variant>/config.tcl
-
More on configuring a new PDK in this section
-
-
Flow specific variables are related to the flow and are initialized with default values in:
./configuration/
-
Finally, each design should have it's own configuration file with some required variables which are available in this list. A design configuration file may override any of the variables defined in PDK or flow configuration files. This is the global configurations for the design:
./designs/<design>/config.tcl
- More on design configurations in here
A list of all available variables can be found here.
You may run the flow interactively by using the -interactive
option:
./flow.tcl -interactive
A tcl shell will be opened where the openlane package is automatically sourced:
% package require openlane 0.9
Then, you should be able to run the following commands:
- Any tcl command.
prep -design <design> -tag <tag> -config <config> -init_design_config -overwrite
similar to the command line arguments, design is required and the rest is optionalrun_synthesis
run_floorplan
run_placement
run_cts
run_routing
run_magic
run_magic_spice_export
run_magic_drc
run_netgen
run_magic_antenna_check
The above commands can also be written in a file and passed to flow.tcl
:
./flow.tcl -interactive -file <file>
Note 1: Currently, configuration variables have higher priority over the above commands so if RUN_MAGIC
is 0, command run_magic
will have no effect.
Note 2: Currently, all these commands must be run in sequence and none should be omitted.
As mentioned earlier, everytime a new design or a new (PDK,PDK_VARIANT) pair is added, or any update happens in the flow tools, a re-configuration for the designs is needed. The reconfiguration is methodical and so an exploration script was developed to aid the designer in reconfiguring his designs if needed. As explained here that each design has multiple configuration files for each (PDK,PDK_VARIANT) pair.
OpenLane provides run_designs.py
, a script that can do multiple runs in a parallel using different configurations. A run consists of a set of designs and a configuration file that contains the configuration values. It is useful to explore the design implementation using different configurations to figure out the best one(s).
Also, it can be used for testing the flow by running the flow against several designs using their best configurations. For example the following has two runs: spm and xtea using their default configuration files config.tcl.
:
python3 run_designs.py --designs spm xtea des aes256 --tag test --threads 3
For more information on how to run this script, refer to this file
For more information on design configurations, how to update them, and the need for an exploration for each design, refer to this file