Skip to content

Commit 39ab9ce

Browse files
authored
Initial commit
0 parents  commit 39ab9ce

File tree

22 files changed

+848
-0
lines changed

22 files changed

+848
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ARG VARIANT=ubuntu-24.04
2+
FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT}
3+
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
ENV PDK_ROOT=/home/vscode/ttsetup/pdk
6+
ENV PDK=sky130A
7+
8+
RUN apt update
9+
RUN apt install -y iverilog gtkwave python3 python3-pip python3-venv python3-tk python-is-python3 libcairo2 verilator libpng-dev libqhull-dev
10+
11+
# Clone tt-support-tools
12+
RUN mkdir -p /ttsetup
13+
RUN git clone https://github.com/TinyTapeout/tt-support-tools /ttsetup/tt-support-tools
14+
15+
COPY test/requirements.txt /ttsetup/test_requirements.txt
16+
COPY .devcontainer/copy_tt_support_tools.sh /ttsetup
17+
18+
RUN python -m venv /ttsetup/venv
19+
RUN /ttsetup/venv/bin/pip install -r /ttsetup/test_requirements.txt -r /ttsetup/tt-support-tools/requirements.txt
20+
21+
# Install verible (for formatting)
22+
RUN umask 022 && \
23+
curl -L https://github.com/chipsalliance/verible/releases/download/v0.0-4023-gc1271a00/verible-v0.0-4023-gc1271a00-linux-static-x86_64.tar.gz | \
24+
tar zxf - -C /usr/local --strip-components=1 && \
25+
chmod 755 /usr/local/bin
26+
27+
# Install LibreLane
28+
RUN /ttsetup/venv/bin/pip install librelane==2.4.2
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#! /bin/sh
2+
3+
if [ ! -L tt ]; then
4+
cp -R /ttsetup/tt-support-tools tt
5+
cd tt && git pull && cd ..
6+
fi

.devcontainer/devcontainer.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.183.0/containers/ubuntu
3+
{
4+
"name": "Tiny Tapeout Dev Container",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"context": ".."
8+
},
9+
"runArgs": [
10+
"--memory=10GB"
11+
],
12+
"customizations": {
13+
"vscode": {
14+
"settings": {
15+
"terminal.integrated.defaultProfile.linux": "bash"
16+
},
17+
"extensions": ["mshr-h.veriloghdl", "surfer-project.surfer"]
18+
}
19+
},
20+
"features": {
21+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
22+
"moby": true,
23+
"azureDnsAutoDetection": true,
24+
"version": "latest",
25+
"dockerDashComposeVersion": "none"
26+
}
27+
},
28+
"postCreateCommand": "echo 'source /ttsetup/venv/bin/activate' >> ~/.bashrc",
29+
"postStartCommand": "/ttsetup/copy_tt_support_tools.sh"
30+
}

.github/workflows/docs.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
docs:
9+
runs-on: ubuntu-24.04
10+
steps:
11+
- name: Checkout repo
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: recursive
15+
16+
- name: Build docs
17+
uses: TinyTapeout/tt-gds-action/docs@ttsky25b

.github/workflows/fpga.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: fpga
2+
3+
on:
4+
push:
5+
# Comment out (or remove) the following line to run the FPGA workflow on every push:
6+
branches: none
7+
workflow_dispatch:
8+
9+
jobs:
10+
fpga:
11+
runs-on: ubuntu-24.04
12+
steps:
13+
- name: checkout repo
14+
uses: actions/checkout@v4
15+
with:
16+
submodules: recursive
17+
18+
- name: FPGA bitstream for TT ASIC Sim (ICE40UP5K)
19+
uses: TinyTapeout/tt-gds-action/fpga/ice40up5k@ttsky25b

.github/workflows/gds.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: gds
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
gds:
9+
runs-on: ubuntu-24.04
10+
steps:
11+
- name: checkout repo
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: recursive
15+
16+
- name: Build GDS
17+
uses: TinyTapeout/tt-gds-action@ttsky25b
18+
with:
19+
pdk: sky130A
20+
21+
precheck:
22+
needs: gds
23+
runs-on: ubuntu-24.04
24+
steps:
25+
- name: Run Tiny Tapeout Precheck
26+
uses: TinyTapeout/tt-gds-action/precheck@ttsky25b
27+
28+
gl_test:
29+
needs: gds
30+
runs-on: ubuntu-24.04
31+
steps:
32+
- name: checkout repo
33+
uses: actions/checkout@v4
34+
with:
35+
submodules: recursive
36+
37+
- name: GL test
38+
uses: TinyTapeout/tt-gds-action/gl_test@ttsky25b
39+
40+
viewer:
41+
needs: gds
42+
runs-on: ubuntu-24.04
43+
permissions:
44+
pages: write # to deploy to Pages
45+
id-token: write # to verify the deployment originates from an appropriate source
46+
steps:
47+
- uses: TinyTapeout/tt-gds-action/viewer@ttsky25b

.github/workflows/test.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: test
2+
on: [push, workflow_dispatch]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-24.04
6+
steps:
7+
- name: Checkout repo
8+
uses: actions/checkout@v4
9+
with:
10+
submodules: recursive
11+
12+
- name: Install iverilog
13+
shell: bash
14+
run: sudo apt-get update && sudo apt-get install -y iverilog
15+
16+
# Set Python up and install cocotb
17+
- name: Setup python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.11'
21+
22+
- name: Install Python packages
23+
shell: bash
24+
run: pip install -r test/requirements.txt
25+
26+
- name: Run tests
27+
run: |
28+
cd test
29+
make clean
30+
make
31+
# make will return success even if the test fails, so check for failure in the results.xml
32+
! grep failure results.xml
33+
34+
- name: Test Summary
35+
uses: test-summary/[email protected]
36+
with:
37+
paths: "test/results.xml"
38+
if: always()
39+
40+
- name: upload vcd
41+
if: success() || failure()
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: test-vcd
45+
path: |
46+
test/tb.vcd
47+
test/results.xml
48+
test/output/*

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.DS_Store
2+
.idea
3+
*.vcd
4+
runs
5+
tt_submission
6+
src/user_config.json
7+
src/config_merged.json
8+
test/sim_build
9+
test/__pycache__/
10+
test/results.xml
11+
test/gate_level_netlist.v

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"mshr-h.veriloghdl",
4+
"surfer-project.surfer"
5+
]
6+
}

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"verilog.linting.linter": "verilator",
3+
"verilog.formatting.verilogHDL.formatter": "verible-verilog-format"
4+
}

0 commit comments

Comments
 (0)