Skip to content

Dual ported RAM fix #457

Dual ported RAM fix

Dual ported RAM fix #457

Workflow file for this run

on:
workflow_dispatch:
push:
pull_request:
name: CI
jobs:
lint_models:
name: Lint All Models
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get IcarusVerilog
run: |
sudo apt-get install -y iverilog
- name: Verify
run: |
cd verification
for SIZE in $(cat ./.github/workflows/sizes.txt); do
export PATTERN=tb_RAM$SIZE
/bin/bash -c "make lint"
done
lint_python:
name: Lint Python Code
runs-on: ubuntu-22.04
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Lint
run: make lint
verify_models:
name: Verify (${{ matrix.count }}x${{ matrix.width }}_${{ matrix.variant }})
runs-on: ubuntu-22.04
needs: [lint_models]
strategy:
matrix:
include:
- { count: "8", width: "32", variant: "DEFAULT" }
- { count: "32", width: "32", variant: "DEFAULT" }
- { count: "128", width: "32", variant: "DEFAULT" }
- { count: "256", width: "32", variant: "DEFAULT" }
- { count: "512", width: "32", variant: "DEFAULT" }
- { count: "1024", width: "32", variant: "DEFAULT" }
- { count: "2048", width: "32", variant: "DEFAULT" }
- { count: "8", width: "32", variant: "1RW1R" }
- { count: "32", width: "32", variant: "1RW1R" }
- { count: "128", width: "32", variant: "1RW1R" }
- { count: "256", width: "32", variant: "1RW1R" }
- { count: "512", width: "32", variant: "1RW1R" }
- { count: "1024", width: "32", variant: "1RW1R" }
- { count: "2048", width: "32", variant: "1RW1R" }
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get IcarusVerilog
run: |
sudo apt-get install -y iverilog
- name: Run Verification
run: |
variant_postfix=
if [ "${{ matrix.variant }}" != "DEFAULT" ]; then
variant_postfix="_${{ matrix.variant }}"
fi
export PATTERN=tb_RAM${{ matrix.count }}x${{ matrix.width }}$variant_postfix
cd verification/
/bin/bash -c "! make | grep -c FATAL"
harden:
name: Harden (${{ matrix.count }}x${{ matrix.width }}_${{ matrix.variant }})
runs-on: ubuntu-22.04
needs: [lint_models, lint_python]
strategy:
fail-fast: false
matrix:
include:
- { count: "32", width: "8", variant: "DEFAULT" }
- { count: "32", width: "8", variant: "1RW1R" }
- { count: "32", width: "16", variant: "DEFAULT" }
- { count: "32", width: "16", variant: "1RW1R" }
- { count: "32", width: "32", variant: "DEFAULT" }
# - { count: "32", width: "32", variant: "1RW1R" } # Timeout
- { count: "32", width: "32", variant: "2R1W" }
- { count: "128", width: "32", variant: "DEFAULT" }
- { count: "256", width: "8", variant: "DEFAULT" }
- { count: "256", width: "8", variant: "1RW1R" }
- { count: "256", width: "16", variant: "DEFAULT" }
# - { count: "256", width: "16", variant: "1RW1R" } # Timeout
- { count: "256", width: "32", variant: "DEFAULT" }
# - { count: "256", width: "32", variant: "1RW1R" } # Timeout
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-23.05
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
name: openlane
- name: Run
run: |
building_blocks=ram
if [ "${{ matrix.variant }}" == "2R1W" ]; then
building_blocks=rf
fi
nix-shell --pure --run "\
./dffram.py ${{ matrix.count }}x${{ matrix.width }}\
-p sky130A\
-s sky130_fd_sc_hd\
-v ${{ matrix.variant }}\
-b $building_blocks\
"
echo "PRODUCTS_PATH=$(echo products/*)" >> $GITHUB_ENV
# - name: Upload Build Folder [TEMP]
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: BUILD_${{ matrix.count }}x${{ matrix.width }}_${{ matrix.variant }}
# path: ./build
- name: Upload Final Views
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.count }}x${{ matrix.width }}_${{ matrix.variant }}
path: ${{ env.PRODUCTS_PATH }}
publish:
name: Publish Release
if: always()
needs: [harden, verify_models]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Export Repo URL
shell: bash
run: echo "REPO_URL=https://github.com/${{ github.repository }}.git" >> $GITHUB_ENV
- name: Export Branch Name
shell: bash
run: echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Generate Tag
run: |
echo "NEW_TAG=NO_NEW_TAG" >> $GITHUB_ENV
if [ "${{ github.event_name }}" != "pull_request" ] && [ "${{ env.BRANCH_NAME }}" = "main" ]; then
python3 ./.github/scripts/generate_tag.py
fi
- name: Download All Artifacts
uses: actions/download-artifact@v3
with:
path: ./artifacts
- name: Create Release
if: env.NEW_TAG != 'NO_NEW_TAG'
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go install github.com/tcnksm/ghr@latest
shopt -s nullglob
for artifact in ./artifacts/*; do
echo "Uploading $artifact to release…"
gzipped=./$(basename $artifact).tgz
tar -czvf $gzipped $artifact
ghr\
-owner AUCOHL\
-repository DFFRAM\
-commitish main\
-token ${{ secrets.GITHUB_TOKEN }}\
-replace\
$NEW_TAG\
$gzipped
echo "Done with $artifact."
done