Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/config/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# GitHub Actions Environment variables

Update [openlane.txt](openlane.txt) to configure the current OpenLane 2 tag and SKY130 version that is used by the GitHub actions in this repo.
Update [librelane.txt](librelane.txt) to configure the current LibreLane tag and the PDK version that is used by the GitHub actions in this repo.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
OPENLANE_TAG=2.3.8
LIBRELANE_TAG=3.0.0.dev38
SKY130_PDK_VERSION=6d4d11780c40b20ee63cc98e645307a9bf2b2ab8
48 changes: 22 additions & 26 deletions .github/workflows/gds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,34 +42,28 @@ jobs:
cache: 'pip'
- run: pip install -r tt-multiplexer/py/requirements.txt -r tt/requirements.txt -r verilog/dv/mux/requirements.txt

- name: Load OpenLane environment variables
run: cat .github/config/openlane.txt | tee -a $GITHUB_ENV
- name: Load LibreLane environment variables
run: cat .github/config/librelane.txt | tee -a $GITHUB_ENV

- name: Checkout OpenLane 2 repo
- name: Checkout LibreLane repo
uses: actions/checkout@v4
with:
repository: efabless/openlane2
path: openlane2
ref: ${{ env.OPENLANE_TAG }}

- name: Patch OpenLane 2 repo
working-directory: openlane2
run:
git apply --allow-empty ../patches/openlane2.patch
repository: librelane/librelane
path: librelane
ref: ${{ env.LIBRELANE_TAG }}

- name: Update caravel configuration
run: python ./tt/configure.py --update-shuttle

- uses: cachix/install-nix-action@v26

- uses: cachix/cachix-action@v14
- name: Install Nix and configure FOSSi cache
uses: cachix/install-nix-action@v31
with:
name: ${{ vars.CACHIX_CACHE || 'tinytapeout' }}
extraPullNames: ${{ vars.CACHIX_CACHE_EXTRA || 'openlane' }}
authToken: ${{ secrets.CACHIX_TOKEN }}
extra_nix_config: |
extra-substituters = https://nix-cache.fossi-foundation.org
extra-trusted-public-keys = nix-cache.fossi-foundation.org:3+K59iFwXqKsL7BNu6Guy0v+uTlwsxYQxjspXzqLYQs=

- name: Install Sky130 PDK
uses: TinyTapeout/volare-action@v2
- name: Install SKY130 PDK
uses: TinyTapeout/ciel-action@v1
with:
pdk_name: sky130
pdk_version: ${{ env.SKY130_PDK_VERSION }}
Expand All @@ -84,8 +78,10 @@ jobs:
continue
fi

# Skip projects that were not built with OpenLane2 (e.g. analog and mixed-signal projects)
if [[ "$(jq -r '.openlane_version' $project/commit_id.json)" != "OpenLane2 2"* ]]; then
# Skip projects that were not built with OpenLane2 or LibreLane (e.g. analog and mixed-signal projects)
if [[ "$(jq -r '.openlane_version' $project/commit_id.json)" != "OpenLane2 2"* ]] && \
[[ "$(jq -r '.flow_version' $project/commit_id.json)" != "OpenLane2 2"* ]] && \
[[ "$(jq -r '.flow_version' $project/commit_id.json)" != "LibreLane "* ]]; then
continue
fi

Expand All @@ -94,24 +90,24 @@ jobs:
fi
done

# run OpenLane to build the GDS
# Use LibreLane to build the macros and the final GDS
- name: Harden Chip ROM
run: nix-shell $GITHUB_WORKSPACE/openlane2/shell.nix --run "python -m openlane tt/rom/config.json"
run: nix-shell $GITHUB_WORKSPACE/librelane/shell.nix --run "python -m librelane tt/rom/config.json"

- name: Harden tt_ctrl
working-directory: tt-multiplexer/ol2/tt_ctrl
run: nix-shell $GITHUB_WORKSPACE/openlane2/shell.nix --run "python build.py"
run: nix-shell $GITHUB_WORKSPACE/librelane/shell.nix --run "python build.py"

- name: Harden tt_mux
working-directory: tt-multiplexer/ol2/tt_mux
run: nix-shell $GITHUB_WORKSPACE/openlane2/shell.nix --run "python build.py"
run: nix-shell $GITHUB_WORKSPACE/librelane/shell.nix --run "python build.py"

- name: Copy macros
run: python ./tt/configure.py --copy-macros

- name: Harden tt_top
working-directory: tt-multiplexer/ol2/tt_top
run: nix-shell $GITHUB_WORKSPACE/openlane2/shell.nix --run "python build.py --skip-xor-checks"
run: nix-shell $GITHUB_WORKSPACE/librelane/shell.nix --run "python build.py --skip-xor-checks"

- name: Copy final results
run: python ./tt/configure.py --copy-final-results
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/precheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
with:
submodules: recursive

- name: Load OpenLane environment variables
run: cat .github/config/openlane.txt | tee -a $GITHUB_ENV
- name: Load LibreLane environment variables
run: cat .github/config/librelane.txt | tee -a $GITHUB_ENV

- name: Checkout Precheck Repo
uses: actions/checkout@v4
Expand All @@ -31,7 +31,7 @@ jobs:
path: mpw_precheck

- name: Install Sky130 PDK
uses: TinyTapeout/volare-action@v2
uses: TinyTapeout/ciel-action@v1
with:
pdk_name: sky130
pdk_version: ${{ env.SKY130_PDK_VERSION }}
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
sudo make install

- name: Install Sky130 PDK
uses: TinyTapeout/volare-action@v1
uses: TinyTapeout/ciel-action@v1
with:
pdk_name: sky130
pdk_version: ${{ env.SKY130_PDK_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project_submission.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: pip install -r requirements.txt

- name: Install Sky130 PDK
uses: TinyTapeout/volare-action@v2
uses: TinyTapeout/ciel-action@v1
with:
pdk_name: sky130
pdk_version: ${{ env.PDK_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- run: pip install -r tt/requirements.txt -r tt-multiplexer/py/requirements.txt -r verilog/dv/mux/requirements.txt

- name: Install sky130A PDK
uses: TinyTapeOut/volare-action@v2
uses: TinyTapeout/ciel-action@v1
with:
pdk_version: ${{ env.SKY130_PDK_VERSION }}
pdk_root: ${{ env.PDK_ROOT }}
Expand Down
24 changes: 11 additions & 13 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
# Build Tiny Tapeout with Open Lane 2
# Build Tiny Tapeout with LibreLane

## Environment setup

```bash
export OPENLANE2_ROOT=~/openlane2
export LIBRELANE_ROOT=~/librelane
export SKY130_PDK_VERSION=6d4d11780c40b20ee63cc98e645307a9bf2b2ab8

pip3 install volare
volare enable --pdk sky130 $SKY130_PDK_VERSION
pip3 install ciel
ciel enable --pdk sky130 $SKY130_PDK_VERSION
```

Then install OpenLane 2 with Nix, as explained [here](https://openlane2.readthedocs.io/en/latest/getting_started/nix_installation/index.html), taking care of the following:
Then install LibreLane with Nix, as explained [here](https://librelane.readthedocs.io/en/latest/getting_started/common/nix_installation/installation_linux.html), taking care of the following:

1. Look at the value of `OPENLANE_TAG` in [.github/config/openlane.txt](.github/config/openlane.txt) to find the exact OpenLane 2 commit you need to check out. Installing a different version will likely not work, as OpenLane 2 is still in beta and the API is not very stable.
1. Look at the value of `LIBRELANE_TAG` in [.github/config/librelane.txt](.github/config/librelane.txt) to find the exact LibreLane commit you need to check out. Installing a different version will likely not work, as LibreLane is still in beta and the API is not very stable.

2. Clone OpenLane 2 to ~/openlane2 (or change the value of the `OPENLANE2_ROOT` environment variable).

3. Apply patches to OpenLane 2: `git -C $OPENLANE2_ROOT apply $PWD/patches/openlane2.patch`
2. Clone LibreLane to ~/librelane (or change the value of the `LIBRELANE_ROOT` environment variable).

## Repository setup

Expand All @@ -43,11 +41,11 @@ python tt/configure.py --update-shuttle
## Harden

```bash
nix-shell ${OPENLANE2_ROOT}/shell.nix --run "python -m openlane tt/rom/config.json"
nix-shell ${OPENLANE2_ROOT}/shell.nix --run "cd tt-multiplexer/ol2/tt_ctrl && python build.py"
nix-shell ${OPENLANE2_ROOT}/shell.nix --run "cd tt-multiplexer/ol2/tt_mux && python build.py"
nix-shell ${LIBRELANE_ROOT}/shell.nix --run "python -m librelane tt/rom/config.json"
nix-shell ${LIBRELANE_ROOT}/shell.nix --run "cd tt-multiplexer/ol2/tt_ctrl && python build.py"
nix-shell ${LIBRELANE_ROOT}/shell.nix --run "cd tt-multiplexer/ol2/tt_mux && python build.py"
python tt/configure.py --copy-macros
nix-shell ${OPENLANE2_ROOT}/shell.nix --run "cd tt-multiplexer/ol2/tt_top && python build.py --skip-xor-checks"
nix-shell ${LIBRELANE_ROOT}/shell.nix --run "cd tt-multiplexer/ol2/tt_top && python build.py --skip-xor-checks"
```

Note: We're skipping the XOR checks as they takes a lot of time and require much RAM (~ 64 GB). If you have enough RAM, you can remove the `--skip-xor-checks` flag.
Expand Down
Empty file removed gds/.gitkeep
Empty file.
Empty file removed lef/.gitkeep
Empty file.
13 changes: 0 additions & 13 deletions patches/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions patches/openlane2.patch

This file was deleted.

Loading