Skip to content

Commit

Permalink
Merge branch 'main' into remove_depency_over_power
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdi authored Oct 23, 2023
2 parents 5e12ca0 + d42e78e commit 610a874
Show file tree
Hide file tree
Showing 28 changed files with 14,864 additions and 10,157 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-update-caravel-lite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
git remote add parent https://github.com/efabless/caravel
git pull parent main
git fetch --all --tags
git filter-repo --path def --path-glob 'signoff/*/openlane-signoff/spef' --path signoff/caravel/caravel.sdc --path signoff/caravan/caravan.sdc --path openlane/user_project_wrapper --path openlane/user_analog_project_wrapper --path openlane/Makefile --path gds/user_project_wrapper_empty.gds.gz --path gds/user_analog_project_wrapper_empty.gds.gz --path mag/user_project_wrapper_empty.mag --path mag/user_analog_project_wrapper_empty.mag --path lef/user_project_wrapper_empty.lef --path lef/user_analog_project_wrapper_empty.lef --path verilog/ --path Makefile --path scripts/ --path LICENSE --path manifest --path spi/lvs/run_lvs.sh --path gds/gds2mag-all.sh --path gds/drc_on_gds.tcl --path gds/antenna_on_gds.tcl --path spi/lvs/caravel.spice --path spi/lvs/caravan.spice --force
git filter-repo --path def --path-glob 'signoff/*/openlane-signoff/spef' --path signoff/caravel/caravel.sdc --path signoff/caravan/caravan.sdc --path openlane/user_project_wrapper --path openlane/user_analog_project_wrapper --path openlane/Makefile --path gds/user_project_wrapper_empty.gds.gz --path gds/user_analog_project_wrapper_empty.gds.gz --path gds/openframe_project_wrapper_empty.gds.gz --path mag/user_project_wrapper_empty.mag --path mag/user_analog_project_wrapper_empty.mag --path lef/user_project_wrapper_empty.lef --path lef/user_analog_project_wrapper_empty.lef --path verilog/ --path Makefile --path scripts/ --path LICENSE --path manifest --path spi/lvs/run_lvs.sh --path gds/gds2mag-all.sh --path gds/drc_on_gds.tcl --path gds/antenna_on_gds.tcl --path spi/lvs/caravel.spice --path spi/lvs/caravan.spice --force
git remote add caravel_lite https://x-access-token:${{ secrets.EFSTAFF_TOKEN }}@github.com/efabless/caravel-lite
git push --force caravel_lite main
git push -f --tags caravel_lite main
27 changes: 27 additions & 0 deletions .github/workflows/block_CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Block PR

on:
pull_request:
branches:
- main

jobs:
changed_files:
runs-on: ubuntu-latest
name: Test changed-files
permissions:
pull-requests: read

steps:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39

- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
if [[ "$file" == *"verilog/rtl/"* || "$file" == *"mag/"* || "$file" == *"gds/"* ]]; then
exit 1
fi
done
69 changes: 58 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,26 @@ SPLIT_FILES := $(shell find . -type f -name "*.$(ARCHIVE_EXT).00.split")
SPLIT_FILES_SOURCES := $(basename $(basename $(basename $(SPLIT_FILES))))

# Needed to uncompress the existing archives
ARCHIVES := $(shell find . -type f -not -path "./signoff/*" -not -path "./mgmt_core_wrapper/signoff/*" -name "*.$(ARCHIVE_EXT)")
ARCHIVES := $(shell find . -type f -not -path "*/signoff/*" -name "*.$(ARCHIVE_EXT)")
ARCHIVE_SOURCES := $(basename $(ARCHIVES))

# Needed to compress and split files/archives that are too large
LARGE_FILES := $(shell find ./gds -type f -name "*.gds")
LARGE_FILES += $(shell find . -type f -size +$(FILE_SIZE_LIMIT_MB)M -not -path "./signoff/*" -not -path "./mgmt_core_wrapper/signoff/*" -not -path "./.git/*" -not -path "./*/.git/*" -not -path "./gds/*" -not -path "./tapeout/outputs/oas/*" -not -path "./openlane/*")
LARGE_FILES += $(shell find . -type f -size +$(FILE_SIZE_LIMIT_MB)M \
-not -path "*/signoff/*" \
-not -path "*/.git/*" \
-not -path "./gds/*" \
-not -path "./tapeout/outputs/oas/*" \
-not -path "*/openlane/*" \
-not -name "*.$(ARCHIVE_EXT)")
LARGE_FILES_GZ := $(addsuffix .$(ARCHIVE_EXT), $(LARGE_FILES))
LARGE_FILES_GZ_SPLIT := $(addsuffix .$(ARCHIVE_EXT).00.split, $(LARGE_FILES))
# consider splitting existing archives
LARGE_FILES_GZ_SPLIT += $(addsuffix .00.split, $(ARCHIVES))

MCW_ROOT?=$(PWD)/mgmt_core_wrapper
MCW ?=LITEX_VEXRISCV
MPW_TAG ?= mpw-9c
MPW_TAG ?= mpw-9e

PYTHON_BIN ?= python3

Expand All @@ -56,12 +62,12 @@ MCW_LITE?=1

ifeq ($(MCW),LITEX_VEXRISCV)
MCW_NAME := mcw-litex-vexriscv
MCW_REPO := https://github.com/efabless/caravel_mgmt_soc_litex
MCW_TAG := $(MPW_TAG)
MCW_REPO ?= https://github.com/efabless/caravel_mgmt_soc_litex
MCW_TAG ?= $(MPW_TAG)
else
MCW_NAME := mcw-pico
MCW_REPO := https://github.com/efabless/caravel_pico
MCW_TAG := $(MPW_TAG)
MCW_REPO ?= https://github.com/efabless/caravel_pico
MCW_TAG ?= $(MPW_TAG)
endif

# Install caravel as submodule, (1): submodule, (0): clone
Expand Down Expand Up @@ -194,6 +200,47 @@ __truck:
@cd $(CARAVEL_ROOT)/mag && PDKPATH=${PDK_ROOT}/$(PDK) MAGTYPE=mag magic -noc -dnull -rcfile ./.magicrc $(UPRJ_ROOT)/mag/mag2gds_caravan.tcl 2>&1 | tee $(UPRJ_ROOT)/signoff/build/make_truck.out
### @rm $(UPRJ_ROOT)/mag/mag2gds_caravan.tcl

.PHONY: openframe
openframe: check-env uncompress uncompress-caravel
ifeq ($(FOREGROUND),1)
@echo "Running make openframe in the foreground..."
$(MAKE) -f $(CARAVEL_ROOT)/Makefile __openframe
@echo "Make openframe completed." 2>&1 | tee -a ./signoff/build/make_openframe.out
else
@echo "Running make openframe in the background..."
nohup $(MAKE) -f $(CARAVEL_ROOT)/Makefile __openframe >/dev/null 2>&1 &
tail -f signoff/build/make_openframe.out
@echo "Make openframe completed." 2>&1 | tee -a ./signoff/build/make_openframe.out
endif

__openframe:
@echo "###############################################"
@echo "Generating Caravel GDS (sources are in the 'gds' directory)"
@sleep 1
#### Runs from the CARAVEL_ROOT mag directory
@echo "\
drc off; \
crashbackups stop; \
addpath hexdigits; \
addpath $(UPRJ_ROOT)/mag; \
load openframe_project_wrapper; \
property LEFview true; \
property GDS_FILE $(UPRJ_ROOT)/gds/openframe_project_wrapper.gds; \
property GDS_START 0; \
load $(UPRJ_ROOT)/mag/user_id_programming; \
load $(UPRJ_ROOT)/mag/user_id_textblock; \
load $(CARAVEL_ROOT)/maglef/simple_por; \
load caravel_openframe -dereference; \
select top cell; \
expand; \
cif *hier write disable; \
cif *array write disable; \
gds write $(UPRJ_ROOT)/gds/caravel_openframe.gds; \
quit -noprompt;" > $(UPRJ_ROOT)/mag/mag2gds_caravel_openframe.tcl
### Runs from CARAVEL_ROOT
@mkdir -p ./signoff/build
@cd $(CARAVEL_ROOT)/mag && PDKPATH=${PDK_ROOT}/$(PDK) MAGTYPE=mag magic -noc -dnull -rcfile ${PDK_ROOT}/$(PDK)/libs.tech/magic/$(PDK).magicrc $(UPRJ_ROOT)/mag/mag2gds_caravel_openframe.tcl 2>&1 | tee $(UPRJ_ROOT)/signoff/build/make_openframe.out

.PHONY: clean
clean:
cd $(CARAVEL_ROOT)/verilog/dv/caravel/mgmt_soc/ && \
Expand Down Expand Up @@ -1173,7 +1220,7 @@ update_caravel:
.PHONY: install_mcw
install_mcw:
if [ -d "$(MCW_ROOT)" ]; then \
echo "Deleting exisiting $(MCW_ROOT)" && \
echo "Deleting existing $(MCW_ROOT)" && \
rm -rf $(MCW_ROOT) && sleep 2;\
fi
ifeq ($(SUBMODULE),1)
Expand Down Expand Up @@ -1250,7 +1297,7 @@ clean-pdk:
.PHONY: skywater-pdk
skywater-pdk:
if [ -d "$(PDK_ROOT)/skywater-pdk" ]; then\
echo "Deleting exisiting $(PDK_ROOT)/skywater-pdk" && \
echo "Deleting existing $(PDK_ROOT)/skywater-pdk" && \
rm -rf $(PDK_ROOT)/skywater-pdk && sleep 2;\
fi
git clone https://github.com/google/skywater-pdk.git $(PDK_ROOT)/skywater-pdk
Expand All @@ -1267,7 +1314,7 @@ skywater-pdk:
.PHONY: open-pdks
open-pdks:
if [ -d "$(PDK_ROOT)/open_pdks" ]; then \
echo "Deleting exisiting $(PDK_ROOT)/open_pdks" && \
echo "Deleting existing $(PDK_ROOT)/open_pdks" && \
rm -rf $(PDK_ROOT)/open_pdks && sleep 2; \
fi
git clone git://opencircuitdesign.com/open_pdks $(PDK_ROOT)/open_pdks
Expand All @@ -1278,7 +1325,7 @@ open-pdks:
.PHONY: sky130
sky130:
if [ -d "$(PDK_ROOT)/$(PDK)" ]; then \
echo "Deleting exisiting $(PDK_ROOT)/$(PDK)" && \
echo "Deleting existing $(PDK_ROOT)/$(PDK)" && \
rm -rf $(PDK_ROOT)/$(PDK) && sleep 2;\
fi
docker run --rm\
Expand Down
Loading

0 comments on commit 610a874

Please sign in to comment.