Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "added PDK variable" #34

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 1 addition & 46 deletions .github/workflows/user_project_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

jobs:
mpw_precheck_sky130A:
mpw_precheck:
timeout-minutes: 720
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -53,48 +53,3 @@ jobs:
path: |
/home/runner/work/caravel_user_project/caravel_user_project/mpw_precheck_result/logs/*

mpw_precheck_sky130B:
timeout-minutes: 720
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Export PDK ROOT
run: |
echo "PDK_ROOT=/home/runner/work/pdk" >> $GITHUB_ENV

- name: Export PDKPATH
run: echo "PDKPATH=/home/runner/work/pdk/sky130B" >> $GITHUB_ENV

- name: Download PDK
run: |
MPW_TAG=main CARAVEL_LITE=0 make install
make pdk-with-volare

- name: Run MPW-Precheck
run: |
export INPUT_DIRECTORY=$(pwd)
export PRECHECK_ROOT=$INPUT_DIRECTORY/mpw_precheck
export OUTPUT_DIRECTORY=$INPUT_DIRECTORY/mpw_precheck_result
export OUTPUT=$OUTPUT_DIRECTORY/logs/precheck.log
git clone --depth=1 -b mpw-7a https://github.com/efabless/mpw_precheck.git
docker run -v "$PRECHECK_ROOT":"$PRECHECK_ROOT" -v "$INPUT_DIRECTORY":"$INPUT_DIRECTORY" -v "${{ env.PDK_ROOT }}":"${{ env.PDK_ROOT }}" -e INPUT_DIRECTORY="$INPUT_DIRECTORY" -e PDK_ROOT="${{ env.PDK_ROOT }}" -e PDKPATH="${{ env.PDKPATH }}" -u $(id -u "$USER"):$(id -g "$USER") efabless/mpw_precheck:latest bash -c "cd $PRECHECK_ROOT; python3 mpw_precheck.py --input_directory $INPUT_DIRECTORY --pdk_path ${{ env.PDKPATH }} --output_directory $OUTPUT_DIRECTORY license makefile consistency xor magic_drc klayout_beol klayout_feol klayout_met_min_ca_density klayout_offgrid klayout_pin_label_purposes_overlapping_drawing klayout_zeroarea"
cnt=$(grep -c "All Checks Passed" "$OUTPUT")
if ! [[ $cnt ]]; then cnt=0; fi
if [[ $cnt -eq 1 ]]; then exit 0; fi
exit 2

- name: upload failure logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: error
path: |
/home/runner/work/caravel_user_project/caravel_user_project/mpw_precheck_result/logs/*

7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ CARAVEL_ROOT?=$(PWD)/caravel
PRECHECK_ROOT?=${HOME}/mpw_precheck
SIM ?= RTL

export OPEN_PDKS_COMMIT?=41c0908b47130d5675ff8484255b43f66463a7d6
export PDK?=sky130B
export PDKPATH?=$(PDK_ROOT)/$(PDK)
export OPEN_PDKS_COMMIT?=7519dfb04400f224f140749cda44ee7de6f5e095
export PDKPATH?=$(PDK_ROOT)/sky130A
# Install lite version of caravel, (1): caravel-lite, (0): caravel
CARAVEL_LITE?=1

MPW_TAG ?= mpw-7a
MPW_TAG ?= mpw-6c

ifeq ($(CARAVEL_LITE),1)
CARAVEL_NAME := caravel-lite
Expand Down
2 changes: 1 addition & 1 deletion mag/example_por.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1620310959
<< nwell >>
Expand Down
2 changes: 1 addition & 1 deletion mag/sky130_fd_pr__cap_mim_m3_1_WRT4AW.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1606502073
<< metal3 >>
Expand Down
2 changes: 1 addition & 1 deletion mag/sky130_fd_pr__cap_mim_m3_2_W5U4AW.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1606502073
<< metal4 >>
Expand Down
2 changes: 1 addition & 1 deletion mag/sky130_fd_pr__nfet_g5v0d10v5_PKVMTM.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
timestamp 1606063140
<< pwell >>
rect -154 -229 154 229
Expand Down
2 changes: 1 addition & 1 deletion mag/sky130_fd_pr__nfet_g5v0d10v5_TGFUGS.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1606063140
<< pwell >>
Expand Down
2 changes: 1 addition & 1 deletion mag/sky130_fd_pr__nfet_g5v0d10v5_ZK8HQC.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
timestamp 1605994897
<< pwell >>
rect -154 -229 154 229
Expand Down
2 changes: 1 addition & 1 deletion mag/sky130_fd_pr__pfet_g5v0d10v5_3YBPVB.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1606063140
<< nwell >>
Expand Down
2 changes: 1 addition & 1 deletion mag/sky130_fd_pr__pfet_g5v0d10v5_YEUEBV.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1606063140
<< nwell >>
Expand Down
2 changes: 1 addition & 1 deletion mag/sky130_fd_pr__pfet_g5v0d10v5_YUHPBG.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1606063140
<< error_p >>
Expand Down
2 changes: 1 addition & 1 deletion mag/sky130_fd_pr__pfet_g5v0d10v5_YUHPXE.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1606063140
<< error_p >>
Expand Down
2 changes: 1 addition & 1 deletion mag/sky130_fd_pr__pfet_g5v0d10v5_ZEUEFZ.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1606063140
<< nwell >>
Expand Down
2 changes: 1 addition & 1 deletion mag/sky130_fd_pr__res_xhigh_po_0p69_S5N9F3.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1606074388
<< pwell >>
Expand Down
2 changes: 1 addition & 1 deletion mag/user_analog_proj_example.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1639841760
<< error_p >>
Expand Down
2 changes: 1 addition & 1 deletion mag/user_analog_project_wrapper.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
magscale 1 2
timestamp 1639841760
<< mvpsubdiff >>
Expand Down
2 changes: 1 addition & 1 deletion mag/user_analog_project_wrapper_empty.mag
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
magic
tech $PDK
tech sky130A
timestamp 1632839657
<< checkpaint >>
rect -680 351370 292680 352680
Expand Down
2 changes: 1 addition & 1 deletion netgen/run_lvs_por.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# includes used by the testbench simulation are picked up. Otherwise, the LVS
# itself compares just the simple_por subcircuit from the testbench.
#--------------------------------------------------------------------------------
netgen -batch lvs "example_por.spice example_por" "../xschem/example_por_tb.spice example_por" $PDK_ROOT/$PDK/libs.tech/netgen/$PDK\_setup.tcl comp.out
netgen -batch lvs "example_por.spice example_por" "../xschem/example_por_tb.spice example_por" /usr/share/pdk/sky130A/libs.tech/netgen/sky130A_setup.tcl comp.out
2 changes: 1 addition & 1 deletion netgen/run_lvs_wrapper_verilog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
# top-level verilog module.
#
#--------------------------------------------------------------------------------
netgen -batch lvs "user_analog_project_wrapper.spice user_analog_project_wrapper" "../verilog/rtl/user_analog_project_wrapper.v user_analog_project_wrapper" $PDK_ROOT/$PDK/libs.tech/netgen/$PDK\_setup.tcl comp.out
netgen -batch lvs "user_analog_project_wrapper.spice user_analog_project_wrapper" "../verilog/rtl/user_analog_project_wrapper.v user_analog_project_wrapper" /usr/share/pdk/sky130A/libs.tech/netgen/sky130A_setup.tcl comp.out
2 changes: 1 addition & 1 deletion netgen/run_lvs_wrapper_xschem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
# top-level xschem subcircuit from the wrapper testbench.
#
#--------------------------------------------------------------------------------
netgen -batch lvs "user_analog_project_wrapper.spice user_analog_project_wrapper" "../xschem/analog_wrapper_tb.spice user_analog_project_wrapper" $PDK_ROOT/$PDK/libs.tech/netgen/$PDK\_setup.tcl comp.out
netgen -batch lvs "user_analog_project_wrapper.spice user_analog_project_wrapper" "../xschem/analog_wrapper_tb.spice user_analog_project_wrapper" /usr/share/pdk/sky130A/libs.tech/netgen/sky130A_setup.tcl comp.out
6 changes: 2 additions & 4 deletions verilog/dv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ make -j$(nproc)
First, you will need to export a number of environment variables:

```bash
export PDK=sky130B
export PDK_PATH=<pdk-location>/$PDK
export PDK_PATH=<pdk-location/sky130A>
export CARAVEL_ROOT=<caravel_root>
export UPRJ_ROOT=<user_project_root>
```
Expand All @@ -106,8 +105,7 @@ You will need to export these environment variables:

```bash
export GCC_PATH=<gcc-installation-path>
export PDK=sky130B
export PDK_PATH=<pdk-location>/$PDK
export PDK_PATH=<pdk-location/sky130A>
```

Then, follow the instruction at [Both](#both) to run RTL/GL simulation.
Expand Down
8 changes: 4 additions & 4 deletions verilog/dv/mprj_por/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# SPDX-License-Identifier: Apache-2.0

## PDK
PDK_PATH = $(PDK_ROOT)/$(PDK)
PDK_PATH = $(PDK_ROOT)/sky130A

## Caravel Pointers
CARAVEL_ROOT ?= ../../../caravel
Expand Down Expand Up @@ -77,14 +77,14 @@ check-env:
ifndef PDK_ROOT
$(error PDK_ROOT is undefined, please export it before running make)
endif
ifeq (,$(wildcard $(PDK_ROOT)/$(PDK)))
$(error $(PDK_ROOT)/$(PDK) not found, please install pdk before running make)
ifeq (,$(wildcard $(PDK_ROOT)/sky130A))
$(error $(PDK_ROOT)/sky130A not found, please install pdk before running make)
endif
ifeq (,$(wildcard $(GCC_PATH)/$(GCC_PREFIX)-gcc ))
$(error $(GCC_PATH)/$(GCC_PREFIX)-gcc is not found, please export GCC_PATH and GCC_PREFIX before running make)
endif
# check for efabless style installation
ifeq (,$(wildcard $(PDK_ROOT)/$(PDK)/libs.ref/*/verilog))
ifeq (,$(wildcard $(PDK_ROOT)/sky130A/libs.ref/*/verilog))
SIM_DEFINES := ${SIM_DEFINES} -DEF_STYLE
endif

Expand Down