Skip to content

Commit

Permalink
Merge pull request #4 from urish/main
Browse files Browse the repository at this point in the history
chore: devcontainer setup
  • Loading branch information
urish authored Sep 20, 2024
2 parents 0dbde29 + 0e9ebb9 commit bc864ed
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ARG VARIANT=ubuntu-22.04
FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT}

ENV DEBIAN_FRONTEND=noninteractive
ENV PDK_ROOT=~/ttsetup/pdk
ENV PDK=sky130A

RUN apt update
RUN apt install -y iverilog python3 python3-pip python3-venv python3-tk python-is-python3 libcairo2 verilator

# Clone tt-support-tools
RUN mkdir -p /ttsetup
RUN git clone -b tt09 https://github.com/TinyTapeout/tt-support-tools /ttsetup/tt-support-tools

COPY test/requirements.txt /ttsetup/test_requirements.txt
COPY .devcontainer/copy_tt_support_tools.sh /ttsetup

RUN pip3 install -r /ttsetup/test_requirements.txt -r /ttsetup/tt-support-tools/requirements.txt

# Install verible (for formatting)
RUN umask 022 && \
curl -L https://github.com/chipsalliance/verible/releases/download/v0.0-3795-gf4d72375/verible-v0.0-3795-gf4d72375-linux-static-x86_64.tar.gz | \
tar zxf - -C /usr/local --strip-components=1 && \
chmod 755 /usr/local/bin

# Install openlane
RUN pip3 install openlane==2.1.5
6 changes: 6 additions & 0 deletions .devcontainer/copy_tt_support_tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/sh

if [ ! -L tt ]; then
cp -R /ttsetup/tt-support-tools tt
cd tt && git pull && cd ..
fi
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.183.0/containers/ubuntu
{
"name": "Tiny Tapeout Dev Container",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "bash"
},
"extensions": ["mshr-h.veriloghdl"]
}
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
"azureDnsAutoDetection": true,
"version": "latest",
"dockerDashComposeVersion": "none"
}
},
"postStartCommand": "/ttsetup/copy_tt_support_tools.sh"
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.DS_Store
.idea
.vscode
*.vcd
runs
tt_submission
Expand Down
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"mshr-h.veriloghdl"
]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"verilog.linting.linter": "verilator",
"verilog.formatting.verilogHDL.formatter": "verible-verilog-format"
}

0 comments on commit bc864ed

Please sign in to comment.