Skip to content

feat: support for specifying shuttle_id when invoking the workflow #13

feat: support for specifying shuttle_id when invoking the workflow

feat: support for specifying shuttle_id when invoking the workflow #13

Workflow file for this run

name: dump_rom
on:
push:
workflow_dispatch:
inputs:
shuttle_id:
description: 'Shuttle ID'
required: false
jobs:
dump_rom:
runs-on: ubuntu-latest
env:
PDK_ROOT: '${{ github.workspace }}/pdk'
PDK_VERSION: 'bdc9412b3e468c102d01b7cf6337be06ec6e9c9a'
KLAYOUT_VERSION: '0.28.17'
MAGIC_VERSION: '8.3.460'
NGSPICE_VERSION: '42'
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Sky130 PDK
uses: TinyTapeout/volare-action@v2
with:
pdk_name: sky130
pdk_version: ${{ env.PDK_VERSION }}
pdk_root: ${{ env.PDK_ROOT }}
- name: Install magic
run: |
sudo apt-get install -y m4 python3 libx11-dev tcl-dev tk-dev libcairo2-dev mesa-common-dev libglu1-mesa-dev
git clone -b $MAGIC_VERSION https://github.com/RTimothyEdwards/magic magic
cd magic
./configure
make -j4
sudo make install
- name: Install ngspice
run: |
sudo apt-get install -y build-essential libxaw7-dev libreadline-dev autoconf automake libtool flex bison
git clone -b ngspice-$NGSPICE_VERSION git://git.code.sf.net/p/ngspice/ngspice ngspice
cd ngspice
./autogen.sh
mkdir release
cd release
../configure --with-x --enable-xspice --disable-debug --enable-cider --with-readline=yes --enable-openmp --enable-osdi
make -j4
sudo make install
- name: Install klayout
run: |
curl -o /tmp/klayout.deb https://www.klayout.org/downloads/Ubuntu-22/klayout_$KLAYOUT_VERSION-1_amd64.deb
sudo apt-get install -y /tmp/klayout.deb
- name: Download shuttle OAS file
if: ${{ github.event.inputs.shuttle_id }}
run: |
echo "Fetching shuttle info: ${{ github.event.inputs.shuttle_id }}"
OAS_URL=$(
curl https://index.tinytapeout.com/ \
| jq -r '.shuttles[] | select(.id == "${{ github.event.inputs.shuttle_id }}") | .gds_url')
if [ -z "$OAS_URL" ]; then
echo "Shuttle not found: ${{ github.event.inputs.shuttle_id }}"
exit 1
fi
echo "Downloading OAS file: $OAS_URL"
curl -L -o $GITHUB_WORKSPACE/tt_final.oas $OAS_URL
echo GDS_FILE=$GITHUB_WORKSPACE/tt_final.oas >> $GITHUB_ENV
- name: Extract the ROM from the GDS
if: ${{ env.GDS_FILE }}
run: make extract
- name: Simulate & dump rom
run: make
- name: Dump ROM as hex
run: |
echo "## ROM Dump" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
hd -v rom.bin | tee -a $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY