-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
79 lines (65 loc) · 2.35 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# SPDX-FileCopyrightText: 2020 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
ifndef PDK_ROOT
$(error You must set PDK_ROOT to the director containing skywater-pdk, open-pdk and SKY130A.)
endif
SKY_PDK_ROOT:=$(PDK_ROOT)/skywater-pdk
SKY130A:=$(PDK_ROOT)/sky130A
SETUP_DIR:=$(PWD)/setup_scripts
export ADK_ROOT:=$(PWD)
export VIEW_STANDARD_DIR:=$(ADK_ROOT)/skywater-130nm/view-standard
setup:
test -d work || mkdir work
check-pdk:
@if [ ! -d "$(PDK_ROOT)" ]; then \
@echo "PDK Root: "$(PDK_ROOT)" doesn't exists, please export the correct path before running make. "; \
exit 1; \
fi
@if [ ! -d "$(SKY_PDK_ROOT)" ]; then \
@echo "PDK Root: "$(SKY_PDK_ROOT)" doesn't exists, please export the correct path to the folder that contains skywater-pdk and SKY130A before running make. "; \
exit 1; \
fi
@if [ ! -d "$(SKY130A)" ]; then \
@echo "PDK Root: "$(SKY130A)" doesn't exists, please export the correct path to the folder that contains skywater-pdk and SKY130A before running make. "; \
exit 1; \
fi
.PHONY: install
install: check-pdk setup openPDK_import captable_generate db_generate mw_generate
openPDK_import:
cd work && python3 $(SETUP_DIR)/openPDK_import.py
cd work && python3 $(SETUP_DIR)/fix_rtk_lef_1.py
@echo "\n"
cd work && python3 $(SETUP_DIR)/fix_verilog.py
@echo "\n"
captable_generate: check-pdk setup
cd work && python3 $(SETUP_DIR)/generate_captable.py
@echo "\n"
# after captable generation the LEF can be further fixed
cd work && python3 $(SETUP_DIR)/fix_rtk_lef_2.py
@echo "\n"
lib_generate:
cd work && python3 $(SETUP_DIR)/generate_lib.py
@echo "\n"
db_generate: lib_generate
cd work && python3 $(SETUP_DIR)/generate_db.py
@echo "\n"
mw_generate:
cd work && python3 $(SETUP_DIR)/generate_mw.py
@echo "\n"
.PHONY: clean
clean:
@echo "Removing working directory."
rm -rf work