10. Environment Setup

๐Ÿงช OpenLane2 Non-Destructive Installation Guide


๐ŸŽฏ Purpose

This document describes how to install and use OpenLane2
without breaking or modifying existing OpenLane (v1) environments.

The primary goals are:

OpenLane2 is treated as a separate toolchain,
not a replacement for OpenLane (v1).


๐Ÿงญ Design Principles

This project strictly follows these environment rules:

  1. โŒ Do not modify existing OpenLane (v1) installations
  2. โŒ Do not overwrite system-wide Python packages
  3. โŒ Do not copy PDKs into this repository
  4. โœ… Use Python virtual environments and external references only

Violating any of these rules risks:


๐Ÿ–ฅ Verified Host Environment

This setup has been verified under the following conditions:

Typical directory layout:

$HOME/
 โ”œโ”€ OpenLane/              # Existing OpenLane v1 (unchanged)
 โ”œโ”€ OpenROAD/
 โ”œโ”€ pdks/
 โ”‚   โ””โ”€ sky130A/
 โ””โ”€ openlane2-sram/        # This repository

๐Ÿ Python Virtual Environment (Required)

OpenLane2 must be installed inside a Python virtual environment.

โ–ถ Create virtual environment

cd openlane2-sram
python3 -m venv venv

โ–ถ Activate virtual environment

source venv/bin/activate

After activation, the shell prompt should look like:

(venv) user@host:~/openlane2-sram$

๐Ÿ“ฆ Install OpenLane2 (Isolated)

Important: The virtual environment must be active.

# activate venv (if not already active)
source venv/bin/activate

# upgrade pip
pip install --upgrade pip

# install OpenLane2
pip install openlane

# verify installation
openlane --version

Expected behavior

This confirms proper toolchain isolation and non-destructive coexistence.


๐Ÿงฑ PDK Configuration

๐Ÿ“œ Policy

๐Ÿงฉ Example: sky130

export PDK_ROOT=$HOME/pdks
export PDK=sky130A

Expected directory structure:

$PDK_ROOT/sky130A/

These variables can be defined in:


๐Ÿ” Verification: Non-Destructive Coexistence

โ–ถ Verify OpenLane2

source venv/bin/activate
openlane --version

โ–ถ Verify existing OpenLane (v1)

cd $HOME/OpenLane
./flow.tcl -h

โœ… Both tools must work independently.

If OpenLane (v1) continues to operate normally,
the setup is confirmed to be non-destructive.


๐Ÿšซ What This Setup Explicitly Avoids

This project intentionally avoids:

These choices keep the environment:

Simple ยท Explicit ยท Debuggable


โ™ป๏ธ Reproducibility Notes

This ensures long-term reproducibility.


โžก Next Step

After completing this setup, proceed to:

โžก docs/20_openlane2.md
Baseline OpenLane2 flow without SRAM macros


Last updated: OpenLane2 environment verified and used for final GDS generation โœ