Skip to content

Commit

Permalink
Merge branch 'main' into refac_CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Patarimi authored Jul 26, 2023
2 parents 69829d1 + 14e8c0f commit 2ac680c
Show file tree
Hide file tree
Showing 183 changed files with 4,963,622 additions and 4,408,359 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/user_project_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
export OUTPUT=$OUTPUT_DIRECTORY/logs/precheck.log
export PDKPATH=$PDK_ROOT/sky130A
git clone --depth=1 -b mpw-7d https://github.com/efabless/mpw_precheck.git
git clone --depth=1 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 lvs"
Expand Down
34 changes: 29 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ export PDK?=sky130A
#export PDK?=gf180mcuC
export PDKPATH?=$(PDK_ROOT)/$(PDK)

export OPENLANE_ROOT?=$(PWD)/dependencies/openlane_src
export PDK_ROOT?=$(PWD)/dependencies/pdks

export DISABLE_LVS?=0



ifeq ($(PDK),sky130A)
SKYWATER_COMMIT=f70d8ca46961ff92719d8870a18a076370b85f6c
export OPEN_PDKS_COMMIT?=e6f9c8876da77220403014b116761b0b2d79aab4
export OPENLANE_TAG?=2023.02.23
export OPEN_PDKS_COMMIT?=78b7bc32ddb4b6f14f76883c2e2dc5b5de9d1cbc
export OPENLANE_TAG?=2023.07.19
MPW_TAG ?= mpw-9d

ifeq ($(CARAVEL_LITE),1)
Expand All @@ -52,8 +55,8 @@ endif

ifeq ($(PDK),sky130B)
SKYWATER_COMMIT=f70d8ca46961ff92719d8870a18a076370b85f6c
export OPEN_PDKS_COMMIT?=e6f9c8876da77220403014b116761b0b2d79aab4
export OPENLANE_TAG?=2023.02.23
export OPEN_PDKS_COMMIT?=78b7bc32ddb4b6f14f76883c2e2dc5b5de9d1cbc
export OPENLANE_TAG?=2023.07.19
MPW_TAG ?= mpw-9d

ifeq ($(CARAVEL_LITE),1)
Expand Down Expand Up @@ -100,7 +103,7 @@ simenv:
docker pull efabless/dv:latest

.PHONY: setup
setup: install check-env install_mcw openlane pdk-with-volare setup-timing-scripts
setup: check_dependencies install check-env install_mcw openlane pdk-with-volare setup-timing-scripts setup-cocotb

# Openlane
blocks=$(shell cd openlane && find * -maxdepth 0 -type d)
Expand Down Expand Up @@ -287,6 +290,12 @@ help:
cd $(CARAVEL_ROOT) && $(MAKE) help
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'

.PHONY: check_dependencies
check_dependencies:
@if [ ! -d "$(PWD)/dependencies" ]; then \
mkdir $(PWD)/dependencies; \
fi


export CUP_ROOT=$(shell pwd)
export TIMING_ROOT?=$(shell pwd)/dependencies/timing-scripts
Expand All @@ -302,6 +311,21 @@ setup-timing-scripts: $(TIMING_ROOT)
@( cd $(TIMING_ROOT) && git pull )
@#( cd $(TIMING_ROOT) && git fetch && git checkout $(MPW_TAG); )

.PHONY: setup-cocotb
setup-cocotb:
@pip install caravel-cocotb==1.0.0
@(python3 $(PROJECT_ROOT)/verilog/dv/setup-cocotb.py $(CARAVEL_ROOT) $(MCW_ROOT) $(PDK_ROOT) $(PDK) $(PROJECT_ROOT))
@docker pull efabless/dv:latest
@docker pull efabless/dv:cocotb

.PHONY: cocotb-verify-rtl
cocotb-verify-rtl:
@(cd $(PROJECT_ROOT)/verilog/dv/cocotb && caravel_cocotb -tl counter_tests/counter_tests.yaml -v )

.PHONY: cocotb-verify-gl
cocotb-verify-gl:
@(cd $(PROJECT_ROOT)/verilog/dv/cocotb && caravel_cocotb -tl counter_tests/counter_tests_gl.yaml -v -verbosity quiet)

./verilog/gl/user_project_wrapper.v:
$(error you don't have $@)

Expand Down
Loading

0 comments on commit 2ac680c

Please sign in to comment.