From 4c087e96685035dac087c366339e3562143f82ab Mon Sep 17 00:00:00 2001 From: Disha Agrawal <122633438+agarwaldisha7616@users.noreply.github.com> Date: Mon, 23 Mar 2026 12:03:23 +0530 Subject: [PATCH 1/3] Create WindowsDocker.md Signed-off-by: Disha Agrawal <122633438+agarwaldisha7616@users.noreply.github.com> --- docs/user/WindowsDocker.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/user/WindowsDocker.md diff --git a/docs/user/WindowsDocker.md b/docs/user/WindowsDocker.md new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/docs/user/WindowsDocker.md @@ -0,0 +1 @@ + From bd44d44e95807fc130ceaff126a002a6d8bcadc9 Mon Sep 17 00:00:00 2001 From: Disha Agrawal <122633438+agarwaldisha7616@users.noreply.github.com> Date: Mon, 23 Mar 2026 12:53:00 +0530 Subject: [PATCH 2/3] Update WindowsDocker.md Signed-off-by: Disha Agrawal <122633438+agarwaldisha7616@users.noreply.github.com> --- docs/user/WindowsDocker.md | 148 +++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/docs/user/WindowsDocker.md b/docs/user/WindowsDocker.md index 8b13789179..e258701285 100644 --- a/docs/user/WindowsDocker.md +++ b/docs/user/WindowsDocker.md @@ -1 +1,149 @@ +# Build OpenROAD on Windows Using Docker +## Prerequisites + +* Windows 10 (version 2004+) or Windows 11 +* Docker Desktop (WSL2 backend enabled) +* At least 16GB RAM (8GB minimum usable) +* At least 50GB free disk space + + + +## Step 1 — Install and Configure Docker Desktop + +1. Install Docker Desktop with WSL 2 backend enabled +2. Configure resources: + + * Memory: ≥ 8GB + * CPUs: ≥ 4 +3. Enable WSL Integration for Ubuntu-22.04 + +Verify installation: + +``` +docker run hello-world +``` + + +## Step 2 — Avoid Timezone Prompt + +Run before any apt-get: + +``` +export DEBIAN_FRONTEND=noninteractive +export TZ=UTC + +apt-get update +apt-get install -y tzdata +``` + + +## Step 3 — Install Correct Yosys Version + +``` +wget https://github.com/YosysHQ/oss-cad-suite-build/releases/latest/download/oss-cad-suite-linux-x64.tgz + +tar -xzf oss-cad-suite-linux-x64.tgz + +echo 'export PATH="$(pwd)/oss-cad-suite/bin:$PATH"' >> ~/.bashrc +source ~/.bashrc + +yosys --version +``` + + + +## Step 4 — Fix Line Endings (CRLF Issue) + +Run before cloning: + +``` +git config --global core.autocrlf false +git config --global core.eol lf + +git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts +``` + + + +## Step 5 — Copy Files into Docker + +Option A: + +``` +docker ps +docker cp C:\path\to\file :/tmp/ +``` + +Option B (recommended): + +``` +docker run -it -v //c/Users/YourName/OpenROAD-flow-scripts:/OpenROAD-flow-scripts ubuntu:22.04 +``` + +## Step 6 — Persist Environment + +Save PATH: + +``` +echo 'export PATH="$(pwd)/oss-cad-suite/bin:$PATH"' >> ~/.bashrc +source ~/.bashrc +``` + +Save container: + +``` +docker commit openroad-windows:latest +docker run -it openroad-windows:latest +``` + +--- + +## Step 7 — Run Example Design + +``` +cd /OpenROAD-flow-scripts/flow +make DESIGN_CONFIG=./designs/nangate45/gcd/config.mk +``` + + + +## Common Issues + +Yosys too old: +Use OSS CAD Suite (Step 3) + +apt-get stuck: + +``` +export DEBIAN_FRONTEND=noninteractive +``` + +GUI not working: + +``` +docker run -it -e DISPLAY=:0.0 openroad/orfs +``` + +Slow performance: +Use WSL path: +\\wsl$\Ubuntu\ + +Disk space fix: + +``` +wsl --export Ubuntu-22.04 D:\ubuntu_backup.tar +wsl --import Ubuntu-22.04 D:\WSL\Ubuntu D:\ubuntu_backup.tar +``` + +CRLF issue: + +``` +git config --global core.autocrlf false +``` + + + +## Optional: WSL2 Native Build + +See: BuildWithWSL.md in repository From 4b877b2c5b8396ae92b461d55df9ec6f09ece62f Mon Sep 17 00:00:00 2001 From: Disha Agrawal <122633438+agarwaldisha7616@users.noreply.github.com> Date: Mon, 23 Mar 2026 14:51:30 +0530 Subject: [PATCH 3/3] Enhance Windows Docker setup guide for OpenROAD Updated the guide to include additional details on installation steps and common issues when building OpenROAD on Windows using Docker. Signed-off-by: Disha Agrawal <122633438+agarwaldisha7616@users.noreply.github.com> --- docs/user/WindowsDocker.md | 196 +++++++++++++++++++++---------------- 1 file changed, 114 insertions(+), 82 deletions(-) diff --git a/docs/user/WindowsDocker.md b/docs/user/WindowsDocker.md index e258701285..1ce1dcc9a5 100644 --- a/docs/user/WindowsDocker.md +++ b/docs/user/WindowsDocker.md @@ -1,35 +1,44 @@ # Build OpenROAD on Windows Using Docker -## Prerequisites - -* Windows 10 (version 2004+) or Windows 11 -* Docker Desktop (WSL2 backend enabled) -* At least 16GB RAM (8GB minimum usable) -* At least 50GB free disk space +This guide walks you through installing and running OpenROAD on Windows using Docker Desktop with an Ubuntu 22.04 container. +## Prerequisites +- Windows 10 (version 2004+) or Windows 11 +- [Docker Desktop](https://www.docker.com/products/docker-desktop/) (WSL2 backend enabled) +- At least 16GB RAM (8GB minimum usable) +- At least 50GB free disk space ## Step 1 — Install and Configure Docker Desktop -1. Install Docker Desktop with WSL 2 backend enabled -2. Configure resources: - +1. Download and install [Docker Desktop for Windows] (https://www.docker.com/products/docker-desktop/) +2. During setup, enable **WSL 2 backend** +3. After installation, open Docker Desktop -> Settings -> Resources: * Memory: ≥ 8GB * CPUs: ≥ 4 -3. Enable WSL Integration for Ubuntu-22.04 +4. Go to the Settings -> Resources -> WSL Integration -> Enable for Ubuntu-22.04 + +Verify installation (run in PowerShell): +``` +docker run -rm hello-world +``` -Verify installation: +## Step 2 — Start an Ubuntu 22.04 Container -``` -docker run hello-world +Run in **PowerShell**: +```bash +docker run -it ubuntu:22.04 ``` +This opens an interactive Ubuntu terminal inside Docker. -## Step 2 — Avoid Timezone Prompt +> **Note:** All following commands run **inside this Docker container** +> unless stated otherwise. -Run before any apt-get: +## Step 3 — Avoid Timezone Prompt -``` +Before running any `apt-get` command, set this to avoid interactive prompts: +```bash export DEBIAN_FRONTEND=noninteractive export TZ=UTC @@ -37,113 +46,136 @@ apt-get update apt-get install -y tzdata ``` +## Step 4 — Download and Install OpenROAD Binary -## Step 3 — Install Correct Yosys Version - -``` -wget https://github.com/YosysHQ/oss-cad-suite-build/releases/latest/download/oss-cad-suite-linux-x64.tgz +Download the prebuilt `.deb` file for Ubuntu 22.04 from [Precision Innovations releases](https://vaultlink.precisioninno.com/). -tar -xzf oss-cad-suite-linux-x64.tgz +Copy it from Windows into the running container (run in **PowerShell**): +```powershell +# First get your container ID +docker ps -echo 'export PATH="$(pwd)/oss-cad-suite/bin:$PATH"' >> ~/.bashrc -source ~/.bashrc +# Copy the file into the container +docker cp "C:\Users\\Downloads\openroad__amd64-ubuntu-22.04.deb" :/root/ +``` -yosys --version +Install it inside the container: +```bash +cd /root +apt-get install -y ./openroad__amd64-ubuntu-22.04.deb.deb ``` +Verify: +```bash +openroad -version +``` +## Step 5 — Install Correct Yosys Version -## Step 4 — Fix Line Endings (CRLF Issue) +The default apt version of Yosys is too old (0.9). ORFS requires Yosys >= 0.58. +Install OSS CAD Suite which includes a compatible version: +```bash +apt-get install -y wget +cd /root -Run before cloning: +wget https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2025-03-01/oss-cad-suite-linux-x64-20250301.tgz +tar -xzf oss-cad-suite-linux-x64-20250301.tgz +source /root/oss-cad-suite/environment +yosys --version ``` -git config --global core.autocrlf false -git config --global core.eol lf -git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts +To make yosys available permanently across sessions: +```bash +echo 'source /root/oss-cad-suite/environment' >> ~/.bashrc +source ~/.bashrc ``` +> **Important:** Always use a pinned version of OSS CAD Suite. +> ORFS does not guarantee compatibility with `latest`. +## Step 6 — Fix Line Endings (CRLF Issue) -## Step 5 — Copy Files into Docker - -Option A: - -``` -docker ps -docker cp C:\path\to\file :/tmp/ +Run in **PowerShell** before cloning: +```powershell +git config --global core.autocrlf false +git config --global core.eol lf ``` -Option B (recommended): +## Step 7 - Clone OpenROAD Flow Scripts +Run inside the container: +```bash +apt-get install -y git +git clone https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git +cd OpenROAD-flow-scripts ``` -docker run -it -v //c/Users/YourName/OpenROAD-flow-scripts:/OpenROAD-flow-scripts ubuntu:22.04 + +Checkout the version matching your OpenROAD binary: +```bash +git checkout 26Q1 ``` -## Step 6 — Persist Environment +> **Important:** Always match the ORFS version tag with your OpenROAD binary. +> Mismatched versions cause errors like: +> `invalid command name "sta::endpoint_count"` -Save PATH: +## Step 8 - Set Environment Variables -``` -echo 'export PATH="$(pwd)/oss-cad-suite/bin:$PATH"' >> ~/.bashrc -source ~/.bashrc +Run inside the container for every new session: +```bash +source /root/oss-cad-suite/environment +export OPENROAD_EXE=$(command -v openroad) +export YOSYS_EXE=$(command -v yosys) ``` -Save container: +> **Note:** These variables reset every time you start a new container session. +> Use `docker commit` (Step 10) or add them to `~/.bashrc` to make permanent. -``` -docker commit openroad-windows:latest -docker run -it openroad-windows:latest +## Step 9 — Install Remaining Dependencies +```bash +apt-get install -y make time python3-pip +pip3 install pyyaml ``` ---- - -## Step 7 — Run Example Design - -``` +## Step 10 — Run Example Design +```bash cd /OpenROAD-flow-scripts/flow make DESIGN_CONFIG=./designs/nangate45/gcd/config.mk ``` +This runs the full RTL-to-GDSII flow on the `nangate45/gcd` example. +It will take 10-20 minutes. Output files will be in: +- `flow/logs/nangate45/gcd/base/` — log files for each stage +- `flow/reports/nangate45/gcd/base/` — timing and design reports +- `flow/results/nangate45/gcd/base/` — result files including `6_final.*` -## Common Issues - -Yosys too old: -Use OSS CAD Suite (Step 3) - -apt-get stuck: - -``` -export DEBIAN_FRONTEND=noninteractive -``` - -GUI not working: - -``` -docker run -it -e DISPLAY=:0.0 openroad/orfs -``` - -Slow performance: -Use WSL path: -\\wsl$\Ubuntu\ - -Disk space fix: +## Step 11 — Persist Your Container (Optional) +To save your setup so you don't repeat installation next time +(run in **powershell**): +```powershell +docker commit openroad-windows:latest ``` -wsl --export Ubuntu-22.04 D:\ubuntu_backup.tar -wsl --import Ubuntu-22.04 D:\WSL\Ubuntu D:\ubuntu_backup.tar -``` - -CRLF issue: -``` -git config --global core.autocrlf false +Next time, start directly with: +```powershell +docker run -it openroad-windows:latest ``` +## Common Issues +- Yosys version too old: Use OSS CAD Suite (Step 5) +- `apt-get` timezone prompt: Set `DEBIAN_FRONTEND=noninteractive` (Step 3) +- Environment variables lost: Re-run Step 8 every new session or add to `~/.bashrc` +- Version mismatch errors: Run `git checkout 26Q1` after cloning (Step 7) +- Slow Docker performance: Use WSL path `\\wsl$\Ubuntu\` instead of `C:\` +- Disk space full on C: drive: Move WSL to another drive using `wsl --export / wsl --import` +- GUI not working: Use `docker run -it -e DISPLAY=:0.0 openroad/orfs` +- CRLF line ending errors: Run `git config --global core.autocrlf false` (Step 6) ## Optional: WSL2 Native Build -See: BuildWithWSL.md in repository +For better performance, you can install OpenROAD natively on WSL2 +without Docker. See: [BuildWithWSL.md](BuildWithWSL.md)