Skip to content

Commit

Permalink
Integrate Volare for PDK Building and Mangement, Part 2 (#1052)
Browse files Browse the repository at this point in the history
Please excuse the last commit lacking a changelog.

+ PDK installation uses Volare, transparently to the user: all they have to do is type "make", where it will get OpenLane and the PDK
+ CI now uses Volare to either **get** or **build** the PDK (if not found), which speeds up the fastest test set by around 60%.
+ Added rudimentary dependency installation instructions.
+ pyyaml folded into the repo, so users without pip can still run issue surveys
~ Open PDKs updated: Parasitics are now extracted using a rules file based on [spef-extractor](https://github.com/Cloud-V/spef-extractor) as a ***temporary*** measure
~ Issue survey no longer checks for click and pyyaml: a venv is used in those scenarios.
~ OpenLane build no longer uses the host filesystem as an intermediary, instead using a templated dockerfile with an N-stage build for N tools, saving IO operations (40% improvement measured)
~ Old PDK targets renamed to build-pdk-conda, includes SRAM by default
~ Replaced python3 ./env.py issue-survey with `make survey`
- Removed Fault from documentation (until I get the chance to work on it)
  • Loading branch information
donn authored Apr 15, 2022
1 parent 54ec01a commit bb89ac9
Show file tree
Hide file tree
Showing 30 changed files with 6,704 additions and 4,054 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ exclude =
install/,
venv/,
pdks/,
dependencies/flatyaml.py
dependencies/includedyaml
1 change: 1 addition & 0 deletions .github/workflows/openlane_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
run: |
sudo mkdir -p ${{ env.PDK_ROOT }}
sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
go get -u github.com/tcnksm/ghr
python3 -m pip install --upgrade --no-cache-dir volare
export OPDKS_VER="$(python3 ./dependencies/tool.py open_pdks -f commit)"
if [ "${{ secrets.VOLARE_REPO }}" != "" ]; then
Expand Down
32 changes: 16 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ DOCKER_OPTIONS += -e DISPLAY=$(DISPLAY) -v /tmp/.X11-unix:/tmp/.X11-unix -v $(HO
endif
endif

NPROC ?= $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu)
THREADS ?= 1

ifneq (,$(ROUTING_CORES))
Expand Down Expand Up @@ -89,23 +88,33 @@ ENV_COMMAND = $(ENV_START) $(OPENLANE_IMAGE_NAME)
all: get-openlane pdk

.PHONY: openlane
openlane:
$(MAKE) -C docker openlane
openlane: venv/created
@PYTHON_BIN=$(PWD)/venv/bin/$(PYTHON_BIN) $(MAKE) -C docker openlane

pull-openlane:
@echo "Pulling OpenLane image matching your commit..."
docker pull $(OPENLANE_IMAGE_NAME)
@docker pull $(OPENLANE_IMAGE_NAME)

get-openlane:
@docker pull $(OPENLANE_IMAGE_NAME) || $(MAKE) -C docker openlane
@$(MAKE) pull-openlane || $(MAKE) openlane

.PHONY: mount
mount:
cd $(OPENLANE_DIR) && \
$(ENV_START) -ti $(OPENLANE_IMAGE_NAME)

venv/created:
.PHONY: pdk
pdk: venv/created
./venv/bin/$(PYTHON_BIN) -m pip install --upgrade --no-cache-dir volare
./venv/bin/volare enable

.PHONY: survey
survey:
$(PYTHON_BIN) ./env.py issue-survey

venv/created: ./requirements.txt ./dependencies/python/precompile_time.txt ./dependencies/python/run_time.txt
rm -rf ./venv
$(PYTHON_BIN) -m venv ./venv
./venv/bin/$(PYTHON_BIN) -m pip install --upgrade --no-cache-dir pip
./venv/bin/$(PYTHON_BIN) -m pip install --upgrade --no-cache-dir -r ./requirements.txt
touch $@

Expand Down Expand Up @@ -151,15 +160,6 @@ quick_run:
cd $(OPENLANE_DIR) && \
$(ENV_COMMAND) sh -c "./flow.tcl -design $(QUICK_RUN_DESIGN)"

.PHONY: pdk
pdk: venv/created
./venv/bin/$(PYTHON_BIN) -m pip install --upgrade --no-cache-dir volare
./venv/bin/volare enable

.PHONY: survey
survey:
$(PYTHON_BIN) ./env.py issue-survey

.PHONY: clean_all clean_runs clean_results clean_venv
clean_all: clean_runs clean_results clean_venv

Expand Down
Loading

0 comments on commit bb89ac9

Please sign in to comment.