This document explains how to harden your Tiny Tapeout projects locally, to speed up iteration times. The whole process should take roughly 10 minutes.
It uses the factory-test project as an example.
You need Python 3.11 or newer installed on your system. You can test which python version you have by running:
python3 --version
Note: On some systems, the python binary is called python
and not python3
.
We assume your project was cloned to ~/factory-test
. If you don’t have a project yet, and want to follow these instructions to prepare your local setup, you can clone the factory-test
repo by running the following command:
git clone https://github.com/TinyTapeout/tt10-factory-test ~/factory-test
Clone the tt-support-tools repo (tt10
branch) inside the tt
directory of your project:
cd ~/factory-test
git clone -b tt10 https://github.com/TinyTapeout/tt-support-tools tt
Create a dedicated directory for the virtual Python environment and initialize it:
mkdir ~/ttsetup
python3 -m venv ~/ttsetup/venv
source ~/ttsetup/venv/bin/activate
Then install the dependencies:
pip install -r ~/factory-test/tt/requirements.txt
Set up PDK_ROOT
to the path of the directory that will contain the PDK. PDK
and OPENLANE
specify, respecively, the version of the PDK and the version of OpenLane 2 you will use:
export PDK_ROOT=~/ttsetup/pdk
export PDK=sky130A
export OPENLANE2_TAG=2.1.9
Note: the values of these values may change in the future - you can consult the tt-gds-action yaml for the latest values (look for the step named “Set up environment variables”)
pip install openlane==$OPENLANE2_TAG
Congratulations, you are ready to harden your project!
First, generate the openlane configuration file:
cd ~/factory-test
./tt/tt_tool.py --create-user-config --openlane2
Then run the following command to harden the project locally. Notice that this command requires you to have Docker (or a compatible container engine) installed and running.
./tt/tt_tool.py --harden --openlane2
It’s also recommended to run the following command, checking for any synthesis / clock warnings:
./tt/tt_tool.py --print-warnings --openlane2
Once you set your environment, you can reharden at any time. Before running tt_tool.py
, make sure to set the environment variables (as explained in step 1 above), and reactivate the Python virtual environment by running the following command:
source ~/ttsetup/venv/bin/activate
If you make changes to your project configuration (e.g. increase the number of tiles), you’ll need to update the openlane configuration file by running the following command in your project’s directory:
./tt/tt_tool.py --create-user-config --openlane2
To reharden, run:
./tt/tt_tool.py --harden --openlane2
cd test
pip install -r requirements.txt
make -B
cd test
pip install -r requirements.txt
TOP_MODULE=$(cd .. && ./tt/tt_tool.py --print-top-module)
cp ../runs/wokwi/final/pnl/$TOP_MODULE.pnl.v gate_level_netlist.v
make -B GATES=yes
Make sure you have the librsvg2-bin
and pngquant
packages installed:
sudo apt install librsvg2-bin pngquant
then you can use tt_tool
to generate a render of the GDS as follows:
./tt/tt_tool.py --create-png --openlane2
The resulting optimised PNG file is called gds_render.png
(but note that other gds_render*
intermediate files are also left behind).
For larger designs (or when close to maximum utilisation), routing can take a long time. If you have multiple CPU cores, you can try adding the following line to your config.json
:
"ROUTING_CORES": 8,
to speed things up (replace 8 with the number of CPU cores in your system). Note you should not commit this change to git.