- Update our repo to match updates.
diff --git a/.github/scripts/build/run-set-id.sh b/.github/scripts/build/run-set-id.sh new file mode 100644 index 0000000..b6e9cfb --- /dev/null +++ b/.github/scripts/build/run-set-id.sh
@@ -0,0 +1,38 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2020 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 + +export UPRJ_ROOT=$(pwd) +cd .. +export PDK_ROOT=$(pwd)/pdks +export CARAVEL_ROOT=$(pwd)/caravel +export IMAGE_NAME=efabless/openlane:$OPENLANE_TAG +export USER_ID=00000001 + +cd $UPRJ_ROOT + +# Install full version of caravel +git clone https://github.com/efabless/caravel --branch develop --depth 1 $CARAVEL_ROOT + +LOG_FILE=out.log +docker run -v $UPRJ_ROOT:$UPRJ_ROOT -v $PDK_ROOT:$PDK_ROOT -v $CARAVEL_ROOT:$CARAVEL_ROOT -e UPRJ_ROOT=$UPRJ_ROOT -e PDK_ROOT=$PDK_ROOT -e CARAVEL_ROOT=$CARAVEL_ROOT -u $(id -u $USER):$(id -g $USER) $IMAGE_NAME bash -c "cd $CARAVEL_ROOT; make uncompress; cd $UPRJ_ROOT; export USER_ID=$USER_ID; make set_user_id | tee $LOG_FILE;" + +cnt=$(grep "Done" $LOG_FILE -s | wc -l) + +if [[ $cnt -ne 3 ]]; then + exit 2; +fi + +exit 0 \ No newline at end of file
diff --git a/.github/scripts/build/run-truck.sh b/.github/scripts/build/run-truck.sh new file mode 100644 index 0000000..84f183b --- /dev/null +++ b/.github/scripts/build/run-truck.sh
@@ -0,0 +1,36 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2020 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 + +export UPRJ_ROOT=$(pwd) +cd .. +export PDK_ROOT=$(pwd)/pdks +export CARAVEL_ROOT=$(pwd)/caravel +export IMAGE_NAME=efabless/openlane:$OPENLANE_TAG + +cd $UPRJ_ROOT + +# Install full version of caravel +git clone https://github.com/efabless/caravel --branch develop --depth 1 $CARAVEL_ROOT + +docker run -v $UPRJ_ROOT:$UPRJ_ROOT -v $PDK_ROOT:$PDK_ROOT -v $CARAVEL_ROOT:$CARAVEL_ROOT -e UPRJ_ROOT=$UPRJ_ROOT -e PDK_ROOT=$PDK_ROOT -e CARAVEL_ROOT=$CARAVEL_ROOT -u $(id -u $USER):$(id -g $USER) $IMAGE_NAME bash -c "cd $CARAVEL_ROOT; make uncompress; cd $UPRJ_ROOT; make truck;" + +SHIP_FILE=$UPRJ_ROOT/gds/caravan.gds + +if test -f "$SHIP_FILE"; then + exit 0 +else + exit 2 +fi
diff --git a/.github/scripts/build/run-xor.sh b/.github/scripts/build/run-xor.sh new file mode 100644 index 0000000..e666188 --- /dev/null +++ b/.github/scripts/build/run-xor.sh
@@ -0,0 +1,39 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2020 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 + +export UPRJ_ROOT=$(pwd) +cd .. +export PDK_ROOT=$(pwd)/pdks +export CARAVEL_ROOT=$(pwd)/caravel +export IMAGE_NAME=efabless/openlane:$OPENLANE_TAG + +cd $UPRJ_ROOT + +# Install full version of caravel +git clone https://github.com/efabless/caravel --branch develop --depth 1 $CARAVEL_ROOT + +LOG_FILE=out.log +docker run -v $UPRJ_ROOT:$UPRJ_ROOT -v $PDK_ROOT:$PDK_ROOT -v $CARAVEL_ROOT:$CARAVEL_ROOT -e UPRJ_ROOT=$UPRJ_ROOT -e PDK_ROOT=$PDK_ROOT -e CARAVEL_ROOT=$CARAVEL_ROOT -u $(id -u $USER):$(id -g $USER) $IMAGE_NAME bash -c "cd $UPRJ_ROOT; export USER_ID=$USER_ID; make xor-analog-wrapper | tee $LOG_FILE;" + +cnt=$(grep -oP '(?<=Total XOR differences = )[0-9]+' $LOG_FILE) + +echo "Total XOR differences = $cnt" + +if [[ $cnt -ne 0 ]]; then + exit 2; +fi + +exit 0
diff --git a/.github/scripts/dv/pdkBuild.sh b/.github/scripts/dv/pdkBuild.sh new file mode 100644 index 0000000..9f9ac93 --- /dev/null +++ b/.github/scripts/dv/pdkBuild.sh
@@ -0,0 +1,59 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2020 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +export RUN_ROOT=$(pwd) + + +# By default skip timing since we don't need the libs in any of the CI tests +export SKIP_TIMING=${1:-1} +export IMAGE_NAME=efabless/openlane:$OPENLANE_TAG +docker pull $IMAGE_NAME + +cd $RUN_ROOT/.. +export PDK_ROOT=$(pwd)/pdks +mkdir $PDK_ROOT +echo $PDK_ROOT +echo $RUN_ROOT +cd $RUN_ROOT +make skywater-pdk +make skywater-library +# The following section is for running on the CI. +# If you're running locally you should replace them with: `make skywater-library` +# This is because sometimes while setting up the conda env (skywater's make timing) it fails to fetch something +# Then it exits without retrying. So, here we're retrying, and if something goes wrong it will exit after 5 retries. +# Section Begin +if [ $SKIP_TIMING -eq 0 ]; then + cnt=0 + until make skywater-timing; do + cnt=$((cnt+1)) + if [ $cnt -eq 5 ]; then + exit 2 + fi + rm -rf $PDK_ROOT/skywater-pdk + make skywater-pdk + make skywater-library + done +fi +# Section End + +make open_pdks +docker run -v $RUN_ROOT:/openLANE_flow -v $PDK_ROOT:$PDK_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) $IMAGE_NAME bash -c "make build-pdk" + +rm -rf $PDK_ROOT/open_pdks +rm -rf $PDK_ROOT/skywater-pdk + +echo "done installing" +cd $RUN_ROOT +exit 0 \ No newline at end of file
diff --git a/.github/scripts/dv/run-dv-wrapper.sh b/.github/scripts/dv/run-dv-wrapper.sh new file mode 100644 index 0000000..20bc951 --- /dev/null +++ b/.github/scripts/dv/run-dv-wrapper.sh
@@ -0,0 +1,77 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2020 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 + +# comma seperated test ids +IDS=$1 +# simulation mode : RTL/GL +SIM_MODE=$2 + +DV_TEST_IDS=(${IDS//,/ }) + +export TARGET_PATH=$(pwd) +export CARAVEL_ROOT=$(pwd)/caravel + +if [ ! -d $TARGET_PATH ] +then + echo "Directory /path/to/dir DOES NOT exists." + exit 9999 +fi + +cd .. + +export PDK_ROOT=$(pwd)/pdks +if [ ! -d $PDK_ROOT ] +then + echo "Directory /path/to/dir DOES NOT exists." + exit 9999 +fi + +DV_PATH=$TARGET_PATH/verilog/dv +if [ ! -d $DV_PATH ] +then + echo "Directory /path/to/dir DOES NOT exists." + exit 9999 +fi + +for id in "${DV_TEST_IDS[@]}" +do + docker run -v $TARGET_PATH:$TARGET_PATH -v $PDK_ROOT:$PDK_ROOT \ + -v $CARAVEL_ROOT:$CARAVEL_ROOT \ + -e TARGET_PATH=$TARGET_PATH -e PDK_ROOT=$PDK_ROOT \ + -e CARAVEL_ROOT=$CARAVEL_ROOT \ + -u $(id -u $USER):$(id -g $USER) efabless/dv_setup:latest \ + bash -c "bash $TARGET_PATH/.github/scripts/dv/run-dv.sh $PDK_ROOT $DV_PATH $id $SIM_MODE" + + echo "DONE!" + + VERDICT_FILE=$TARGET_PATH/verilog/dv/$id.out + + if [ -f $VERDICT_FILE ]; then + cnt=$(grep "Pass" $VERDICT_FILE -s | wc -l) + if ! [[ $cnt ]]; then cnt = 0; fi + else + echo "DV check failed due to subscript failure. Please review the logs"; + exit 2; + fi + + echo "Verdict: $cnt" + + if [[ $cnt -ne 1 ]]; then + exit 2; + fi +done + +exit 0;
diff --git a/.github/scripts/dv/run-dv.sh b/.github/scripts/dv/run-dv.sh new file mode 100644 index 0000000..53b7e96 --- /dev/null +++ b/.github/scripts/dv/run-dv.sh
@@ -0,0 +1,40 @@ +PDK_ROOT=$1 +DV_PATH=$2 +DV_TEST_ID=$3 +SIM_MODE=$4 + +cd $DV_PATH + +## get the name of all subdfolders under verilog/dv +ALL_DV_TESTS="$(find * -maxdepth 0 -type d)" +## convert all ALL_DV_TESTS to an array +TESTS_ARR=($ALL_DV_TESTS) +## get length of the TESTS array +len=${#TESTS_ARR[@]} + +## make sure that the test ID is less than the array length +if [ $DV_TEST_ID -ge $len ] +then + echo "Error: Invalid Test ID" + exit 1 +fi + +## get the name corresponding to the test ID +PATTERN=${TESTS_ARR[$DV_TEST_ID]} + +OUT_FILE=$DV_PATH/$DV_TEST_ID.out + +export SIM=$SIM_MODE +echo "Running $PATTERN $SIM.." +logFile=$DV_PATH/$PATTERN.$SIM.dv.out +cd $PATTERN +echo $(pwd) +make 2>&1 | tee $logFile +grep "Monitor" $logFile >> $OUT_FILE +make clean + +echo "Execution Done on $PATTERN !" + +cat $OUT_FILE + +exit 0 \ No newline at end of file
diff --git a/.github/scripts/precheck/precheckBuild.sh b/.github/scripts/precheck/precheckBuild.sh new file mode 100644 index 0000000..7754922 --- /dev/null +++ b/.github/scripts/precheck/precheckBuild.sh
@@ -0,0 +1,36 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2020 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 + +# By default build pdk since we don't need the other script for the main purpose +export SKIP_PDK_BUILD=${1:-0} + +export TARGET_PATH=$(pwd) +git clone https://github.com/efabless/mpw_precheck.git + +docker pull efabless/mpw_precheck:latest + + +if [ $SKIP_PDK_BUILD -eq 0 ]; then + cd $TARGET_PATH/.. + export PDK_ROOT=$(pwd)/precheck_pdks + mkdir $PDK_ROOT + cd $TARGET_PATH/mpw_precheck/dependencies + sh build-pdk.sh + cd $TARGET_DIR + +fi + +exit 0
diff --git a/.github/scripts/precheck/run-precheck-drc.sh b/.github/scripts/precheck/run-precheck-drc.sh new file mode 100644 index 0000000..dd38dc0 --- /dev/null +++ b/.github/scripts/precheck/run-precheck-drc.sh
@@ -0,0 +1,38 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2020 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +export TARGET_PATH=$(pwd) +export CARAVEL_ROOT=$(pwd)/caravel +cd .. +export PDK_ROOT=$(pwd)/precheck_pdks +export PRECHECK_ROOT=$TARGET_PATH/mpw_precheck/ +export OUTPUT_DIRECTORY=$TARGET_PATH/checks +cd $TARGET_PATH/mpw_precheck/ + +docker run -v $PRECHECK_ROOT:$PRECHECK_ROOT -v $TARGET_PATH:$TARGET_PATH -v $CARAVEL_ROOT:$CARAVEL_ROOT -v $PDK_ROOT:$PDK_ROOT -u $(id -u $USER):$(id -g $USER) efabless/mpw_precheck:latest bash -c "cd $PRECHECK_ROOT; python3 mpw_precheck.py magic_drc klayout_offgrid klayout_feol klayout_zeroarea klayout_pin_label_purposes_overlapping_drawing --pdk_root $PDK_ROOT --input_directory $TARGET_PATH --caravel_root $CARAVEL_ROOT --output_directory $OUTPUT_DIRECTORY" +output=$OUTPUT_DIRECTORY/logs/precheck.log + +gzipped_file=$OUTPUT_DIRECTORY/logs/precheck.log.gz + +if [[ -f $gzipped_file ]]; then + gzip -d $gzipped_file +fi + +grep "Violation Message" $output + +cnt=$(grep -c "All Checks Passed" $output) +if ! [[ $cnt ]]; then cnt=0; fi +if [[ $cnt -eq 1 ]]; then exit 0; fi +exit 2 \ No newline at end of file
diff --git a/.github/scripts/precheck/run-precheck.sh b/.github/scripts/precheck/run-precheck.sh new file mode 100644 index 0000000..66d5da6 --- /dev/null +++ b/.github/scripts/precheck/run-precheck.sh
@@ -0,0 +1,38 @@ +#!/bin/bash +# SPDX-FileCopyrightText: 2020 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +export TARGET_PATH=$(pwd) +export CARAVEL_ROOT=$(pwd)/caravel +cd .. +export PDK_ROOT=$(pwd)/precheck_pdks +export PRECHECK_ROOT=$TARGET_PATH/mpw_precheck/ +export OUTPUT_DIRECTORY=$TARGET_PATH/checks +cd $TARGET_PATH/mpw_precheck/ + +docker run -v $PRECHECK_ROOT:$PRECHECK_ROOT -v $TARGET_PATH:$TARGET_PATH -v $PDK_ROOT:$PDK_ROOT -v $CARAVEL_ROOT:$CARAVEL_ROOT -u $(id -u $USER):$(id -g $USER) efabless/mpw_precheck:latest bash -c " cd $PRECHECK_ROOT ; python3 mpw_precheck.py license yaml manifest makefile consistency xor --pdk_root $PDK_ROOT --input_directory $TARGET_PATH --caravel_root $CARAVEL_ROOT --output_directory $OUTPUT_DIRECTORY" +output=$OUTPUT_DIRECTORY/logs/precheck.log + +gzipped_file=$OUTPUT_DIRECTORY/logs/precheck.log.gz + +if [[ -f $gzipped_file ]]; then + gzip -d $gzipped_file +fi + +grep "Violation Message" $output + +cnt=$(grep -c "All Checks Passed" $output) +if ! [[ $cnt ]]; then cnt=0; fi +if [[ $cnt -eq 1 ]]; then exit 0; fi +exit 2
diff --git a/.github/workflows/auto_update_submodule.yml b/.github/workflows/auto_update_submodule.yml new file mode 100644 index 0000000..7219ddf --- /dev/null +++ b/.github/workflows/auto_update_submodule.yml
@@ -0,0 +1,41 @@ + +name: 'Auto-update Submodules' + +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" + +jobs: + sync: + name: 'Auto-update Submodules' + runs-on: ubuntu-latest + + # Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest + defaults: + run: + shell: bash + + steps: + # Checkout the repository to the GitHub Actions runner + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + + # Git config + - name: Git Configurations + run: | + git config --global user.name 'Git bot' + git config --global user.email 'bot@noreply.github.com' + + # Update references + - name: Git Sumbodule Update + run: | + git submodule update --init --recursive + git submodule update --remote --recursive + + - name: Commit update + run: | + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + git commit -am "Auto updated submodule references" && git push || echo "No changes to commit"
diff --git a/.github/workflows/caravan_build.yml b/.github/workflows/caravan_build.yml new file mode 100644 index 0000000..800c030 --- /dev/null +++ b/.github/workflows/caravan_build.yml
@@ -0,0 +1,79 @@ +name: Caravan Build + + +on: + # Runs on Every Push + push: + # Runs on Pull Requests + pull_request: + workflow_dispatch: + +jobs: + make_truck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: 'true' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Install The PDK + run: bash ${GITHUB_WORKSPACE}/.github/scripts/dv/pdkBuild.sh + env: + OPENLANE_TAG: 2021.09.16_03.28.21 + + - name: Run make truck + run: bash ${GITHUB_WORKSPACE}/.github/scripts/build/run-truck.sh + env: + OPENLANE_TAG: 2021.09.16_03.28.21 + + set_user_id: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: 'true' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Install The PDK + run: bash ${GITHUB_WORKSPACE}/.github/scripts/dv/pdkBuild.sh + env: + OPENLANE_TAG: 2021.09.16_03.28.21 + + - name: Run Set User ID + run: bash ${GITHUB_WORKSPACE}/.github/scripts/build/run-set-id.sh + env: + OPENLANE_TAG: 2021.09.16_03.28.21 + + xor_wrapper: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: 'true' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Install The PDK + run: bash ${GITHUB_WORKSPACE}/.github/scripts/dv/pdkBuild.sh + env: + OPENLANE_TAG: 2021.09.16_03.28.21 + + - name: Run XOR Check + run: bash ${GITHUB_WORKSPACE}/.github/scripts/build/run-xor.sh + env: + OPENLANE_TAG: 2021.09.16_03.28.21
diff --git a/.github/workflows/user_project_ci.yml b/.github/workflows/user_project_ci.yml new file mode 100644 index 0000000..a7cb6e8 --- /dev/null +++ b/.github/workflows/user_project_ci.yml
@@ -0,0 +1,100 @@ +name: CI + + +on: + # Runs on Every Push + push: + # Runs on Pull Requests + pull_request: + workflow_dispatch: + +jobs: + precheck: + runs-on: ubuntu-latest + timeout-minutes: 720 + steps: + - uses: actions/checkout@v2 + with: + submodules: 'true' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Install The Precheck + run: sh ${GITHUB_WORKSPACE}/.github/scripts/precheck/precheckBuild.sh + + - name: Run The Precheck + run: bash ${GITHUB_WORKSPACE}/.github/scripts/precheck/run-precheck.sh + + precheck-drc: + timeout-minutes: 720 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: 'true' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Install The Precheck + run: sh ${GITHUB_WORKSPACE}/.github/scripts/precheck/precheckBuild.sh + + - name: Run The Precheck + run: bash ${GITHUB_WORKSPACE}/.github/scripts/precheck/run-precheck-drc.sh + + dv_rtl: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: 'true' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Install The PDK + run: bash ${GITHUB_WORKSPACE}/.github/scripts/dv/pdkBuild.sh + env: + OPENLANE_TAG: 2021.09.16_03.28.21 + + - name: Install The Dockerized DV Setup + run: docker pull efabless/dv_setup:latest + + - name: Run DV tests + # Run test number 0,1,2,3,4 in one job <test-ids> <sim-mode> + run: bash ${GITHUB_WORKSPACE}/.github/scripts/dv/run-dv-wrapper.sh 0 RTL + + dv_gl: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: 'true' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Install The PDK + run: bash ${GITHUB_WORKSPACE}/.github/scripts/dv/pdkBuild.sh + env: + OPENLANE_TAG: 2021.09.16_03.28.21 + + - name: Install The Dockerized DV Setup + run: docker pull efabless/dv_setup:latest + + - name: Run DV tests + # Run test number 0,1,2,3,4 in one job <test-ids> <sim-mode> + run: bash ${GITHUB_WORKSPACE}/.github/scripts/dv/run-dv-wrapper.sh 0 GL \ No newline at end of file
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd35ce4 --- /dev/null +++ b/.gitignore
@@ -0,0 +1,3 @@ +precheck_results +*/tmp +*/*/tmp \ No newline at end of file
diff --git a/README.md b/README.md index 56bc208..6f0ae63 100644 --- a/README.md +++ b/README.md
@@ -14,5 +14,4 @@ ## Analog User Project Documentation - Refer to [README](docs/source/index.rst) for this sample project documentation.
diff --git a/xschem/analog_wrapper_tb.sch b/xschem/analog_wrapper_tb.sch index 70de684..ee08803 100644 --- a/xschem/analog_wrapper_tb.sch +++ b/xschem/analog_wrapper_tb.sch
@@ -37,7 +37,7 @@ N 490 50 490 160 { lab=GND} N 490 160 500 160 { lab=GND} N 300 -50 620 -50 { lab=io_oeb[26:0]} -N 300 -70 480 -70 { lab=io_out[26:0]} +N 470 40 650 40 { lab=io_clamp_high[2:1]} N 520 -150 520 -60 { lab=io_oeb[16:15]} N 610 -150 610 -60 { lab=io_oeb[12:11]} N 850 -0 850 40 { lab=io_analog[4]} @@ -54,24 +54,25 @@ N 290 -130 390 -130 { lab=#net9} N 290 -110 390 -110 { lab=#net10} N 300 -90 400 -90 { lab=#net11} -N 300 -30 400 -30 { lab=#net12} -N 300 -10 400 -10 { lab=#net13} -N 300 70 400 70 { lab=#net14} -N -60 -290 -0 -290 { lab=#net15} -N -60 -270 0 -270 { lab=#net16} -N -60 -250 0 -250 { lab=#net17} -N -60 -230 0 -230 { lab=#net18} -N -60 -210 0 -210 { lab=#net19} -N -60 -210 0 -210 { lab=#net19} -N -60 -190 0 -190 { lab=#net20} -N -60 -190 0 -190 { lab=#net20} -N -60 -170 0 -170 { lab=#net21} -N -60 -150 0 -150 { lab=#net22} -N -60 -130 0 -130 { lab=#net23} -N -60 -110 0 -110 { lab=#net24} -N -60 -90 0 -90 { lab=#net25} -N -60 -70 0 -70 { lab=#net26} -N -60 -50 0 -50 { lab=#net27} +N 300 -10 400 -10 { lab=#net12} +N 300 70 400 70 { lab=#net13} +N -60 -290 -0 -290 { lab=#net14} +N -60 -270 0 -270 { lab=#net15} +N -60 -250 0 -250 { lab=#net16} +N -60 -230 0 -230 { lab=#net17} +N -60 -210 0 -210 { lab=#net18} +N -60 -210 0 -210 { lab=#net18} +N -60 -190 0 -190 { lab=#net19} +N -60 -190 0 -190 { lab=#net19} +N -60 -170 0 -170 { lab=#net20} +N -60 -150 0 -150 { lab=#net21} +N -60 -130 0 -130 { lab=#net22} +N -60 -110 0 -110 { lab=#net23} +N -60 -90 0 -90 { lab=#net24} +N -60 -70 0 -70 { lab=#net25} +N -60 -50 0 -50 { lab=#net26} +N 300 -30 550 -30 { lab=#net27} +N 300 -70 450 -70 {} C {user_analog_project_wrapper.sym} 150 -110 0 0 {name=x1} C {devices/vsource.sym} 590 -220 0 0 {name=V1 value="PWL(0.0 0 400u 0 5.4m 3.3)"} C {devices/vsource.sym} 690 -220 0 0 {name=V2 value="PWL(0.0 0 300u 0 5.3 1.8)"} @@ -94,6 +95,7 @@ only_toplevel=false value=".control tran 10u 20m -plot V(io_out[11]) V(io_out[12]) V(io_out[15]) V(io_out[16]) -+ V(gpio_analog[3]) V(gpio_analog[7]) +plot V(\\"io_out[11]\\") V(\\"io_out[12]\\") V(\\"io_out[15]\\") V(\\"io_out[16]\\") ++ V(\\"gpio_analog[3]\\") V(\\"gpio_analog[7]\\") .endc"} +C {devices/lab_pin.sym} 550 -30 0 0 {name=l10 sig_type=std_logic lab=gpio_analog[17:0]}
diff --git a/xschem/analog_wrapper_tb.spice b/xschem/analog_wrapper_tb.spice index 9c566a4..b32d07c 100644 --- a/xschem/analog_wrapper_tb.spice +++ b/xschem/analog_wrapper_tb.spice
@@ -1,26 +1,26 @@ **.subckt analog_wrapper_tb -x1 net1 net4 GND net5 net2 net6 net7 net8 net15 net16 net17 net18 net19 net20[3] net20[2] net20[1] -+ net20[0] net21[31] net21[30] net21[29] net21[28] net21[27] net21[26] net21[25] net21[24] net21[23] net21[22] -+ net21[21] net21[20] net21[19] net21[18] net21[17] net21[16] net21[15] net21[14] net21[13] net21[12] net21[11] -+ net21[10] net21[9] net21[8] net21[7] net21[6] net21[5] net21[4] net21[3] net21[2] net21[1] net21[0] net22[31] -+ net22[30] net22[29] net22[28] net22[27] net22[26] net22[25] net22[24] net22[23] net22[22] net22[21] net22[20] -+ net22[19] net22[18] net22[17] net22[16] net22[15] net22[14] net22[13] net22[12] net22[11] net22[10] net22[9] -+ net22[8] net22[7] net22[6] net22[5] net22[4] net22[3] net22[2] net22[1] net22[0] net9 net10[31] net10[30] +x1 net1 net4 GND net5 net2 net6 net7 net8 net14 net15 net16 net17 net18 net19[3] net19[2] net19[1] ++ net19[0] net20[31] net20[30] net20[29] net20[28] net20[27] net20[26] net20[25] net20[24] net20[23] net20[22] ++ net20[21] net20[20] net20[19] net20[18] net20[17] net20[16] net20[15] net20[14] net20[13] net20[12] net20[11] ++ net20[10] net20[9] net20[8] net20[7] net20[6] net20[5] net20[4] net20[3] net20[2] net20[1] net20[0] net21[31] ++ net21[30] net21[29] net21[28] net21[27] net21[26] net21[25] net21[24] net21[23] net21[22] net21[21] net21[20] ++ net21[19] net21[18] net21[17] net21[16] net21[15] net21[14] net21[13] net21[12] net21[11] net21[10] net21[9] ++ net21[8] net21[7] net21[6] net21[5] net21[4] net21[3] net21[2] net21[1] net21[0] net9 net10[31] net10[30] + net10[29] net10[28] net10[27] net10[26] net10[25] net10[24] net10[23] net10[22] net10[21] net10[20] net10[19] + net10[18] net10[17] net10[16] net10[15] net10[14] net10[13] net10[12] net10[11] net10[10] net10[9] net10[8] -+ net10[7] net10[6] net10[5] net10[4] net10[3] net10[2] net10[1] net10[0] net23[127] net23[126] net23[125] -+ net23[124] net23[123] net23[122] net23[121] net23[120] net23[119] net23[118] net23[117] net23[116] net23[115] -+ net23[114] net23[113] net23[112] net23[111] net23[110] net23[109] net23[108] net23[107] net23[106] net23[105] -+ net23[104] net23[103] net23[102] net23[101] net23[100] net23[99] net23[98] net23[97] net23[96] net23[95] -+ net23[94] net23[93] net23[92] net23[91] net23[90] net23[89] net23[88] net23[87] net23[86] net23[85] net23[84] -+ net23[83] net23[82] net23[81] net23[80] net23[79] net23[78] net23[77] net23[76] net23[75] net23[74] net23[73] -+ net23[72] net23[71] net23[70] net23[69] net23[68] net23[67] net23[66] net23[65] net23[64] net23[63] net23[62] -+ net23[61] net23[60] net23[59] net23[58] net23[57] net23[56] net23[55] net23[54] net23[53] net23[52] net23[51] -+ net23[50] net23[49] net23[48] net23[47] net23[46] net23[45] net23[44] net23[43] net23[42] net23[41] net23[40] -+ net23[39] net23[38] net23[37] net23[36] net23[35] net23[34] net23[33] net23[32] net23[31] net23[30] net23[29] -+ net23[28] net23[27] net23[26] net23[25] net23[24] net23[23] net23[22] net23[21] net23[20] net23[19] net23[18] -+ net23[17] net23[16] net23[15] net23[14] net23[13] net23[12] net23[11] net23[10] net23[9] net23[8] net23[7] -+ net23[6] net23[5] net23[4] net23[3] net23[2] net23[1] net23[0] net11[127] net11[126] net11[125] net11[124] ++ net10[7] net10[6] net10[5] net10[4] net10[3] net10[2] net10[1] net10[0] net22[127] net22[126] net22[125] ++ net22[124] net22[123] net22[122] net22[121] net22[120] net22[119] net22[118] net22[117] net22[116] net22[115] ++ net22[114] net22[113] net22[112] net22[111] net22[110] net22[109] net22[108] net22[107] net22[106] net22[105] ++ net22[104] net22[103] net22[102] net22[101] net22[100] net22[99] net22[98] net22[97] net22[96] net22[95] ++ net22[94] net22[93] net22[92] net22[91] net22[90] net22[89] net22[88] net22[87] net22[86] net22[85] net22[84] ++ net22[83] net22[82] net22[81] net22[80] net22[79] net22[78] net22[77] net22[76] net22[75] net22[74] net22[73] ++ net22[72] net22[71] net22[70] net22[69] net22[68] net22[67] net22[66] net22[65] net22[64] net22[63] net22[62] ++ net22[61] net22[60] net22[59] net22[58] net22[57] net22[56] net22[55] net22[54] net22[53] net22[52] net22[51] ++ net22[50] net22[49] net22[48] net22[47] net22[46] net22[45] net22[44] net22[43] net22[42] net22[41] net22[40] ++ net22[39] net22[38] net22[37] net22[36] net22[35] net22[34] net22[33] net22[32] net22[31] net22[30] net22[29] ++ net22[28] net22[27] net22[26] net22[25] net22[24] net22[23] net22[22] net22[21] net22[20] net22[19] net22[18] ++ net22[17] net22[16] net22[15] net22[14] net22[13] net22[12] net22[11] net22[10] net22[9] net22[8] net22[7] ++ net22[6] net22[5] net22[4] net22[3] net22[2] net22[1] net22[0] net11[127] net11[126] net11[125] net11[124] + net11[123] net11[122] net11[121] net11[120] net11[119] net11[118] net11[117] net11[116] net11[115] net11[114] + net11[113] net11[112] net11[111] net11[110] net11[109] net11[108] net11[107] net11[106] net11[105] net11[104] + net11[103] net11[102] net11[101] net11[100] net11[99] net11[98] net11[97] net11[96] net11[95] net11[94] @@ -32,34 +32,35 @@ + net11[38] net11[37] net11[36] net11[35] net11[34] net11[33] net11[32] net11[31] net11[30] net11[29] net11[28] + net11[27] net11[26] net11[25] net11[24] net11[23] net11[22] net11[21] net11[20] net11[19] net11[18] net11[17] + net11[16] net11[15] net11[14] net11[13] net11[12] net11[11] net11[10] net11[9] net11[8] net11[7] net11[6] -+ net11[5] net11[4] net11[3] net11[2] net11[1] net11[0] net24[127] net24[126] net24[125] net24[124] net24[123] -+ net24[122] net24[121] net24[120] net24[119] net24[118] net24[117] net24[116] net24[115] net24[114] net24[113] -+ net24[112] net24[111] net24[110] net24[109] net24[108] net24[107] net24[106] net24[105] net24[104] net24[103] -+ net24[102] net24[101] net24[100] net24[99] net24[98] net24[97] net24[96] net24[95] net24[94] net24[93] -+ net24[92] net24[91] net24[90] net24[89] net24[88] net24[87] net24[86] net24[85] net24[84] net24[83] net24[82] -+ net24[81] net24[80] net24[79] net24[78] net24[77] net24[76] net24[75] net24[74] net24[73] net24[72] net24[71] -+ net24[70] net24[69] net24[68] net24[67] net24[66] net24[65] net24[64] net24[63] net24[62] net24[61] net24[60] -+ net24[59] net24[58] net24[57] net24[56] net24[55] net24[54] net24[53] net24[52] net24[51] net24[50] net24[49] -+ net24[48] net24[47] net24[46] net24[45] net24[44] net24[43] net24[42] net24[41] net24[40] net24[39] net24[38] -+ net24[37] net24[36] net24[35] net24[34] net24[33] net24[32] net24[31] net24[30] net24[29] net24[28] net24[27] -+ net24[26] net24[25] net24[24] net24[23] net24[22] net24[21] net24[20] net24[19] net24[18] net24[17] net24[16] -+ net24[15] net24[14] net24[13] net24[12] net24[11] net24[10] net24[9] net24[8] net24[7] net24[6] net24[5] -+ net24[4] net24[3] net24[2] net24[1] net24[0] net25[26] net25[25] net25[24] net25[23] net25[22] net25[21] -+ net25[20] net25[19] net25[18] net25[17] net25[16] net25[15] net25[14] net25[13] net25[12] net25[11] net25[10] -+ net25[9] net25[8] net25[7] net25[6] net25[5] net25[4] net25[3] net25[2] net25[1] net25[0] net26[26] -+ net26[25] net26[24] net26[23] net26[22] net26[21] net26[20] net26[19] net26[18] net26[17] net26[16] net26[15] -+ net26[14] net26[13] net26[12] net26[11] net26[10] net26[9] net26[8] net26[7] net26[6] net26[5] net26[4] -+ net26[3] net26[2] net26[1] net26[0] io_out[26] io_out[25] io_out[24] io_out[23] io_out[22] io_out[21] ++ net11[5] net11[4] net11[3] net11[2] net11[1] net11[0] net23[127] net23[126] net23[125] net23[124] net23[123] ++ net23[122] net23[121] net23[120] net23[119] net23[118] net23[117] net23[116] net23[115] net23[114] net23[113] ++ net23[112] net23[111] net23[110] net23[109] net23[108] net23[107] net23[106] net23[105] net23[104] net23[103] ++ net23[102] net23[101] net23[100] net23[99] net23[98] net23[97] net23[96] net23[95] net23[94] net23[93] ++ net23[92] net23[91] net23[90] net23[89] net23[88] net23[87] net23[86] net23[85] net23[84] net23[83] net23[82] ++ net23[81] net23[80] net23[79] net23[78] net23[77] net23[76] net23[75] net23[74] net23[73] net23[72] net23[71] ++ net23[70] net23[69] net23[68] net23[67] net23[66] net23[65] net23[64] net23[63] net23[62] net23[61] net23[60] ++ net23[59] net23[58] net23[57] net23[56] net23[55] net23[54] net23[53] net23[52] net23[51] net23[50] net23[49] ++ net23[48] net23[47] net23[46] net23[45] net23[44] net23[43] net23[42] net23[41] net23[40] net23[39] net23[38] ++ net23[37] net23[36] net23[35] net23[34] net23[33] net23[32] net23[31] net23[30] net23[29] net23[28] net23[27] ++ net23[26] net23[25] net23[24] net23[23] net23[22] net23[21] net23[20] net23[19] net23[18] net23[17] net23[16] ++ net23[15] net23[14] net23[13] net23[12] net23[11] net23[10] net23[9] net23[8] net23[7] net23[6] net23[5] ++ net23[4] net23[3] net23[2] net23[1] net23[0] net24[26] net24[25] net24[24] net24[23] net24[22] net24[21] ++ net24[20] net24[19] net24[18] net24[17] net24[16] net24[15] net24[14] net24[13] net24[12] net24[11] net24[10] ++ net24[9] net24[8] net24[7] net24[6] net24[5] net24[4] net24[3] net24[2] net24[1] net24[0] net25[26] ++ net25[25] net25[24] net25[23] net25[22] net25[21] net25[20] net25[19] net25[18] net25[17] net25[16] net25[15] ++ net25[14] net25[13] net25[12] net25[11] net25[10] net25[9] net25[8] net25[7] net25[6] net25[5] net25[4] ++ net25[3] net25[2] net25[1] net25[0] io_out[26] io_out[25] io_out[24] io_out[23] io_out[22] io_out[21] + io_out[20] io_out[19] io_out[18] io_out[17] io_out[16] io_out[15] io_out[14] io_out[13] io_out[12] io_out[11] + io_out[10] io_out[9] io_out[8] io_out[7] io_out[6] io_out[5] io_out[4] io_out[3] io_out[2] io_out[1] io_out[0] + io_oeb[26] io_oeb[25] io_oeb[24] io_oeb[23] io_oeb[22] io_oeb[21] io_oeb[20] io_oeb[19] io_oeb[18] io_oeb[17] + io_oeb[16] io_oeb[15] io_oeb[14] io_oeb[13] io_oeb[12] io_oeb[11] io_oeb[10] io_oeb[9] io_oeb[8] io_oeb[7] -+ io_oeb[6] io_oeb[5] io_oeb[4] io_oeb[3] io_oeb[2] io_oeb[1] io_oeb[0] net12[17] net12[16] net12[15] net12[14] -+ net12[13] net12[12] net12[11] net12[10] net12[9] net12[8] net12[7] net12[6] net12[5] net12[4] net12[3] -+ net12[2] net12[1] net12[0] net13[17] net13[16] net13[15] net13[14] net13[13] net13[12] net13[11] net13[10] -+ net13[9] net13[8] net13[7] net13[6] net13[5] net13[4] net13[3] net13[2] net13[1] net13[0] net3[10] net3[9] ++ io_oeb[6] io_oeb[5] io_oeb[4] io_oeb[3] io_oeb[2] io_oeb[1] io_oeb[0] gpio_analog[17] gpio_analog[16] ++ gpio_analog[15] gpio_analog[14] gpio_analog[13] gpio_analog[12] gpio_analog[11] gpio_analog[10] gpio_analog[9] ++ gpio_analog[8] gpio_analog[7] gpio_analog[6] gpio_analog[5] gpio_analog[4] gpio_analog[3] gpio_analog[2] ++ gpio_analog[1] gpio_analog[0] net12[17] net12[16] net12[15] net12[14] net12[13] net12[12] net12[11] net12[10] ++ net12[9] net12[8] net12[7] net12[6] net12[5] net12[4] net12[3] net12[2] net12[1] net12[0] net3[10] net3[9] + net3[8] net3[7] net3[6] net3[5] net3[4] net3[3] net3[2] net3[1] net3[0] io_clamp_high[2] io_clamp_high[1] -+ io_clamp_high[0] GND GND GND net27 net14[2] net14[1] net14[0] user_analog_project_wrapper ++ io_clamp_high[0] GND GND GND net26 net13[2] net13[1] net13[0] user_analog_project_wrapper V1 net1 GND PWL(0.0 0 400u 0 5.4m 3.3) V2 net2 GND PWL(0.0 0 300u 0 5.3 1.8) V3 io_analog[4] GND PWL(0.0 0 100u 0 5m 3.3) @@ -69,7 +70,8 @@ .control tran 10u 20m -plot V(io_out[11]) V(io_out[12]) V(io_out[15]) V(io_out[16]) V(gpio_analog[3]) V(gpio_analog[7]) +plot V("io_out[11]") V("io_out[12]") V("io_out[15]") V("io_out[16]") V("gpio_analog[3]") ++ V("gpio_analog[7]") .endc **** end user architecture code