This repository is meant to be a starting point for anyone in SoCET that wants to learn how to use OpenLane. The structure and contents of this repository facilitate the use of OpenLane 2 to harden a design. An overview of OpenLane, instructions on how to harden a design, and important Makefile targets are covered in this guide.
OpenLane is a powerful and versatile library that enables the implementation of digital ASIC designs using open-source and commercial EDA tools. OpenLane abstracts how each tool works by allowing the user to configure them. Once you’ve installed OpenLane, running a digital design through the flow requires the following:
- Verified RTL code (i.e., the Verilog/SystemVerilog of your design)
- The flow configuration file (
config.json) - A process design kit (PDK) – usually open-source sky130 PDK or GF180MCU PDK
The config.json file provides all the variables to set the flow; if it doesn’t specify a value for a certain variable, the flow will use default values. The default PDK is the SkyWater/Google 130nm PDK, but any other PDKs can be specified in the config.json. The sky130 PDK automatically downloads when you run the flow for the first time. In the configuration file you can specify the HDL code of your design (in Verilog/SystemVerilog), the clock port, and the desired clock period. More information on OpenLane for beginners can be found here.
-
Install OpenLane 2. Follow instructions on the Nix-based Installation.
-
After OpenLane 2 is installed, clone this repository (
socet_openlane_flow) in your LOCAL computer (don't use asicfab). If you have Windows, use WSL (the OpenLane installation guide tells you how to setup WSL). Update theOPENLANE2_ROOTvariable in the Makefile if youropenlane2root is not in your home directory. -
The sky130 PDK is built and cached using Volare, which is also installed when you install OpenLane. By default, Volare keeps the downloaded PDKs in the
.volarefolder in your home directory, unless you specify otherwise. If you wish to modify your PDK path (i.e., the location of sky130 PDK files), just modify variableVOLARE_ROOT. If not, continue to the next step. -
This repo has a file structure that mimics that of the Caravel User Project template repo from Efabless (for reference, see repo here). Place all your Verilog files in the
verilogdirectory. This directory has 3 folders:dv,gl, andrtl. Folderdvis for all testbench code. Folderglis for the synthesized gate-level netlists (these are produced when you run OpenLane). Folderrtlis for your RTL code (i.e., the Verilog code of your designs). Place all your RTL Verilog files in thertlfolder - create a single subfolder for each top-level design, and feel free to add as many files or sub-folders within this folder. If you wish, you can also add your testbench files in thedvfolder; however, this repo currently doesn't have any Makefile targets that handle RTL and gate-level simulations. -
Within the
openlanedirectory in this repo, create a folder with the name of your design. Inside this folder, create aconfig.jsonfile that will configure the flow. The minimum configuration variables that must be specified of this file areDESIGN_NAME,VERILOG_FILES,CLOCK_PERIOD, andCLOCK_PORT. Take a look at some of the exampleconfig.jsonfiles in this repo to understand what other variables do. You can also refer to the OpenLane 2 website to learn more about of other configuration variables and under which circumstances they can be used. -
After adding your RTL Verilog/SystemVerilog files and the
config.jsonfile to the appropriate directories in this repo, you are now ready to harden (i.e., create the physical layout) of your design. Runmake <design name>to harden your design. For example, if the top-level design name issample_proj, then runmake sample_proj. Make sure this design name matches the name of the folder you added in theopenlanedirectory. Try running some of the example designs before running yours to get an idea of how the flow works what to expect in the terminal output. You'll most likely get errors during synthesis, which are related to errors in your RTL code, so carefully read the reported errors in the terminal and log file to debug these. -
For the design to harden successfully, there must be no DRC violations, no LVS violations, and minimal antenna violations. If you ever get any of these violations, reference the OpenLane docs to fix them.
-
make gdsview_%_klayout- This command will open a view of the GDS file (i.e., the complete physical layout of your design) in KLayout. Replace%with the name of your design. If your design name issample_proj, then you can open the GDS file by runningmake gdsview_sample_proj_klayout. -
make clean- This command will remove therunsdirectory from all the folders in theopenlanedirectory. This folder gets created and stores all the log files and temporary design outputs through every step of the flow for each run. -
More Makefile targets comming soon!