This repository aims to combine the setups of
- IIC-OSIC-TOOLS, a Docker container that includes a collection of open source integrated circuit design softwares and open source process design kits
- laygo2_workspace_sky130; LAYGO2 is a layout generator that works with the layout tool Magic, and this workspace specifically works with the process design kit SKY130
It includes scripts to
- streamline creating the IIC-OSIC-TOOLS Docker image and container, with the ability to select a version of the image that works with LAYGO2
- adjust laygo2_workspace_sky130 to be compatible with IIC-OSIC-TOOLS
Inspired by this laygo2_docker repo.
Feel free to skip any steps if you already have some of these installed. Make sure your computer has at least ~20 GB of free space (for the IIC-OSIC-TOOLS Docker image)!
- Install Git for Windows from here. Keep the default settings for installation.
WSL 2 allows you to run a Linux environment within a Windows machine.
-
Open the Control Panel and navigate to Programs -> Programs and Features.
-
Select "Turn Windows features on or off" in the left panel, check "Windows Subsystem for Linux", and click "OK".
-
Open the Windows Powershell as an administrator.
-
Run the following commands:
wsl.exe --update
wsl.exe --install -d Ubuntu
Other Linux distributions (other than Ubuntu) can be chosen here.
-
In the Ubuntu window that opens, enter a username and password.
Docker Desktop is the desktop app for Docker and makes it easy to run containers.
- Install Docker Desktop for Windows from here. Keep the default settings for installation.
- Open the "Docker Desktop" app to start the Docker engine.
X11 allows the Docker container to display the graphical interfaces for its apps on your current desktop.
-
Install VcXsrv from here. Keep the default settings for installation.
-
Open the "XLaunch" app.
-
Click “Next” through all the pages, keeping the default settings EXCEPT check the “Disable Access Control” option. Before clicking “Finish”, click “Save Configuration”. Navigate to
C:\Users\[your_username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
then click “Save”. (The
AppData
folder may be hidden.) This allows XLaunch to automatically run with your chosen settings when you start your computer.
- Open the Command Prompt.
- Run
git config --global core.autocrlf input
to configure Git to ensure line endings in files you clone are correct for Linux. - Change the working directory to where you want to place the repo, and run
git clone https://github.com/HMC-ACE/HMC-OSIC-TOOLS.git
to clone this repo. - Change the working directory to the newly created repo, and run
git submodule update --init --recursive --remote
to clone the IIC-OSIC-TOOLS and laygo2_workspace_sky130 submodules. - Change the working directory to the repo's
Setup Scripts
folder. - Run
.\setup_windows_iic.bat
to create the Docker container and run it.- If needed, edit the
DOCKER_TAG
variable inside the script to point to another version.2023.06
is the latest version that we found works with LAYGO2 (Last Updated: 11/14/23). - If you have never downloaded the IIC-OSIC-TOOLS Docker image or the selected version of it before, this step might take a while.
- To re-run a Docker container that was closed, open the "Docker Desktop" app and click on the play button next to the container you created.
- If needed, edit the
- Run
.\setup_windows_laygo2.bat
to set up laygo2_workspace_sky130 to work with IIC-OSIC-TOOLS.
This setup should work mostly the same as the IIC-OSIC-TOOLS and laygo2_workspace_sky130 repos; Refer to their documentations for more information. The only differences are the following:
-
When working inside the Docker container, its directory
/foss/designs
will be linked to the directory of this repo on your computer rather than the default%USERPROFILE%\eda\designs
used by IIC-OSIC-TOOLS. -
When running the Python code for LAYGO2, use the new
compile_tch.sh
script that was added to thelaygo_workspace_sky130
folder, like so:./compile_tcl.sh laygo2_example/logic/inv.py
This script helps set up the correct Python path (vs. just using
ipython
thenrun laygo2_example/logic/inv.py
).