Skip to content

Commit 38f2bbf

Browse files
Merge pull request #563 from efabless/remove_custom_opdks_build
Remove PDK build targets from Makefile. Merging into ci2504-DEV for testing.
2 parents d3709fb + e9201f6 commit 38f2bbf

File tree

3 files changed

+43
-95
lines changed

3 files changed

+43
-95
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/mgmt_core_wrapper/*
22
gds/*.gds
3+
/venv

Diff for: Makefile

+40-95
Original file line numberDiff line numberDiff line change
@@ -1273,90 +1273,47 @@ endif
12731273

12741274

12751275
###########################################################################
1276+
.PHONY: pdk pdk-with-sram
1277+
pdk-with-sram: pdk
1278+
pdk: check-env pdk-with-volare
12761279

12771280
.PHONY: pdk-with-volare
1278-
pdk-with-volare: check-python install-volare
1281+
pdk-with-volare: check-env venv/manifest.txt
12791282
./venv/bin/volare enable ${OPEN_PDKS_COMMIT}
12801283

1281-
check-python:
1282-
ifeq ($(shell which python3),)
1283-
$(error Please install python 3.6+)
1284-
endif
1285-
1286-
.PHONY: install-volare
1287-
install-volare:
1288-
rm -rf ./venv
1289-
$(PYTHON_BIN) -m venv ./venv
1290-
./venv/bin/$(PYTHON_BIN) -m pip install --upgrade --no-cache-dir pip
1291-
./venv/bin/$(PYTHON_BIN) -m pip install --upgrade --no-cache-dir volare
1292-
1293-
1294-
###########################################################################
1295-
pdk-with-sram: pdk
1296-
.PHONY: pdk
1297-
pdk: check-env skywater-pdk open-pdks sky130 gen-sources
1298-
12991284
.PHONY: clean-pdk
13001285
clean-pdk:
13011286
rm -rf $(PDK_ROOT)
13021287

1303-
.PHONY: skywater-pdk
1304-
skywater-pdk:
1305-
if [ -d "$(PDK_ROOT)/skywater-pdk" ]; then\
1306-
echo "Deleting existing $(PDK_ROOT)/skywater-pdk" && \
1307-
rm -rf $(PDK_ROOT)/skywater-pdk && sleep 2;\
1308-
fi
1309-
git clone https://github.com/google/skywater-pdk.git $(PDK_ROOT)/skywater-pdk
1310-
cd $(PDK_ROOT)/skywater-pdk && \
1311-
git checkout main && git pull && \
1312-
git checkout -qf $(SKYWATER_COMMIT) && \
1313-
git submodule update --init libraries/$(STD_CELL_LIBRARY)/latest && \
1314-
git submodule update --init libraries/$(IO_LIBRARY)/latest && \
1315-
git submodule update --init libraries/$(SPECIAL_VOLTAGE_LIBRARY)/latest && \
1316-
git submodule update --init libraries/$(PRIMITIVES_LIBRARY)/latest && \
1317-
$(MAKE) timing
1318-
1319-
### OPEN_PDKS
1320-
.PHONY: open-pdks
1321-
open-pdks:
1322-
if [ -d "$(PDK_ROOT)/open_pdks" ]; then \
1323-
echo "Deleting existing $(PDK_ROOT)/open_pdks" && \
1324-
rm -rf $(PDK_ROOT)/open_pdks && sleep 2; \
1325-
fi
1326-
git clone git://opencircuitdesign.com/open_pdks $(PDK_ROOT)/open_pdks
1327-
cd $(PDK_ROOT)/open_pdks && \
1328-
git checkout master && git pull && \
1329-
git checkout -qf $(OPEN_PDKS_COMMIT)
1330-
1331-
.PHONY: sky130
1332-
sky130:
1333-
if [ -d "$(PDK_ROOT)/$(PDK)" ]; then \
1334-
echo "Deleting existing $(PDK_ROOT)/$(PDK)" && \
1335-
rm -rf $(PDK_ROOT)/$(PDK) && sleep 2;\
1336-
fi
1337-
docker run --rm\
1338-
-v $(PDK_ROOT):$(PDK_ROOT)\
1339-
-u $(shell id -u $(USER)):$(shell id -g $(USER)) \
1340-
-e PDK_ROOT=$(PDK_ROOT)\
1341-
-e GIT_COMMITTER_NAME="caravel"\
1342-
-e GIT_COMMITTER_EMAIL="caravel@caravel.caravel"\
1343-
efabless/openlane-tools:magic-$(PDK_MAGIC_COMMIT)-centos-7\
1344-
sh -c "\
1345-
cd $(PDK_ROOT)/open_pdks && \
1346-
./configure --enable-sky130-pdk=$(PDK_ROOT)/skywater-pdk --enable-sram-sky130 && \
1347-
make && \
1348-
make SHARED_PDKS_PATH=$(PDK_ROOT) install && \
1349-
make clean \
1350-
"
1351-
.PHONY: gen-sources
1352-
gen-sources:
1353-
touch $(PDK_ROOT)/$(PDK)/SOURCES
1354-
printf "skywater-pdk " >> $(PDK_ROOT)/$(PDK)/SOURCES
1355-
cd $(PDK_ROOT)/skywater-pdk && git rev-parse HEAD >> $(PDK_ROOT)/$(PDK)/SOURCES
1356-
printf "open_pdks " >> $(PDK_ROOT)/$(PDK)/SOURCES
1357-
cd $(PDK_ROOT)/open_pdks && git rev-parse HEAD >> $(PDK_ROOT)/$(PDK)/SOURCES
1358-
printf "magic $(PDK_MAGIC_COMMIT)" >> $(PDK_ROOT)/$(PDK)/SOURCES
1288+
# Make README.rst
1289+
README.rst: README.src.rst docs/source/getting-started.rst docs/source/tool-versioning.rst openlane/README.src.rst docs/source/caravel-with-openlane.rst Makefile ./venv/manifest.txt
1290+
rm -f README.rst && \
1291+
./venv/bin/rst_include include README.src.rst - | \
1292+
sed \
1293+
-e's@\.\/\_static@\/docs\/source\/\_static@g' \
1294+
-e's@:doc:`tool-versioning`@`tool-versioning.rst <./docs/source/tool-versioning.rst>`__@g' \
1295+
-e's@.. note::@**NOTE:**@g' \
1296+
-e's@.. warning::@**WARNING:**@g' \
1297+
> README.rst && \
1298+
./venv/bin/rst_include include openlane/README.src.rst - | \
1299+
sed \
1300+
-e's@https://github.com/efabless/caravel/blob/master/verilog@../verilog@g' \
1301+
-e's@:ref:`getting-started`@`README.rst <../README.rst>`__@g' \
1302+
-e's@https://github.com/efabless/caravel/blob/master/openlane/@./@g' \
1303+
-e's@.. note::@**NOTE:**@g' \
1304+
-e's@.. warning::@**WARNING:**@g' \
1305+
> openlane/README.rst
1306+
1307+
venv/manifest.txt: ./requirements.txt
1308+
$(MAKE) check-python
1309+
rm -rf ./venv
1310+
$(PYTHON_BIN) -m venv ./venv
1311+
./venv/bin/python3 -m pip install --upgrade --no-cache-dir pip
1312+
./venv/bin/python3 -m pip install --upgrade --no-cache-dir -r requirements.txt
1313+
./venv/bin/python3 -m pip freeze > $@
13591314

1315+
###########################################################################
1316+
13601317
.RECIPE: manifest
13611318
manifest: mag/ maglef/ verilog/rtl/ Makefile
13621319
touch manifest && \
@@ -1403,26 +1360,14 @@ check-mcw:
14031360
echo "MCW Root: "$(MCW_ROOT)" doesn't exists, please export the correct path before running make. "; \
14041361
exit 1; \
14051362
fi
1406-
1407-
# Make README.rst
1408-
README.rst: README.src.rst docs/source/getting-started.rst docs/source/tool-versioning.rst openlane/README.src.rst docs/source/caravel-with-openlane.rst Makefile
1409-
pip -q install rst_include && \
1410-
rm -f README.rst && \
1411-
rst_include include README.src.rst - | \
1412-
sed \
1413-
-e's@\.\/\_static@\/docs\/source\/\_static@g' \
1414-
-e's@:doc:`tool-versioning`@`tool-versioning.rst <./docs/source/tool-versioning.rst>`__@g' \
1415-
-e's@.. note::@**NOTE:**@g' \
1416-
-e's@.. warning::@**WARNING:**@g' \
1417-
> README.rst && \
1418-
rst_include include openlane/README.src.rst - | \
1419-
sed \
1420-
-e's@https://github.com/efabless/caravel/blob/master/verilog@../verilog@g' \
1421-
-e's@:ref:`getting-started`@`README.rst <../README.rst>`__@g' \
1422-
-e's@https://github.com/efabless/caravel/blob/master/openlane/@./@g' \
1423-
-e's@.. note::@**NOTE:**@g' \
1424-
-e's@.. warning::@**WARNING:**@g' \
1425-
> openlane/README.rst
1363+
1364+
check-python:
1365+
@if ! command -v $(PYTHON_BIN) > /dev/null; then\
1366+
echo "Python 3 binary '$(PYTHON_BIN)' not found.";\
1367+
exit 1;\
1368+
fi
1369+
@$(PYTHON_BIN) -c "import sys; assert sys.version_info >= (3, 6), 'Python version less than 3.6'"
1370+
@echo "Python >=3.8 found."
14261371

14271372
.PHONY: clean-openlane
14281373
clean-openlane:

Diff for: requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
volare
2+
rst_include

0 commit comments

Comments
 (0)