OpenCores
URL https://opencores.org/ocsvn/yifive/yifive/trunk

Subversion Repositories yifive

[/] [yifive/] [trunk/] [caravel_yifive/] [openlane/] [Makefile] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 dinesha
# SPDX-FileCopyrightText: 2020 Efabless Corporation
2
#
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
# you may not use this file except in compliance with the License.
5
# You may obtain a copy of the License at
6
#
7
#      http://www.apache.org/licenses/LICENSE-2.0
8
#
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS,
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14
#
15
# SPDX-License-Identifier: Apache-2.0
16
 
17
BLOCKS = $(shell find * -maxdepth 0 -type d)
18
CONFIG = $(foreach block,$(BLOCKS), ./$(block)/config.tcl)
19
CLEAN = $(foreach block,$(BLOCKS), clean-$(block))
20
 
21
OPENLANE_TAG ?= v0.15
22
OPENLANE_IMAGE_NAME ?= efabless/openlane:$(OPENLANE_TAG)
23
OPENLANE_BASIC_COMMAND = "cd /project/openlane && flow.tcl -design ./$* -save_path .. -save -tag $* -overwrite"
24
OPENLANE_INTERACTIVE_COMMAND = "cd /project/openlane && flow.tcl -it -file ./$*/interactive.tcl"
25
 
26
all: $(BLOCKS)
27
 
28
$(CONFIG) :
29
        @echo "Missing $@. Please create a configuration for that design"
30
        @exit 1
31
 
32
$(BLOCKS) : % : ./%/config.tcl FORCE
33
ifeq ($(OPENLANE_ROOT),)
34
        @echo "Please export OPENLANE_ROOT"
35
        @exit 1
36
endif
37
ifeq ($(PDK_ROOT),)
38
        @echo "Please export PDK_ROOT"
39
        @exit 1
40
endif
41
        @echo "###############################################"
42
        @sleep 1
43
 
44
        @if [ -f ./$*/interactive.tcl ]; then\
45
                docker run -it -v $(OPENLANE_ROOT):/openLANE_flow \
46
                -v $(PDK_ROOT):$(PDK_ROOT) \
47
                -v $(PWD)/..:/project \
48
                -e PDK_ROOT=$(PDK_ROOT) \
49
                -u $(shell id -u $(USER)):$(shell id -g $(USER)) \
50
                $(OPENLANE_IMAGE_NAME) sh -c $(OPENLANE_INTERACTIVE_COMMAND);\
51
        else\
52
                docker run -it -v $(OPENLANE_ROOT):/openLANE_flow \
53
                -v $(PDK_ROOT):$(PDK_ROOT) \
54
                -v $(PWD)/..:/project \
55
                -e PDK_ROOT=$(PDK_ROOT) \
56
                -u $(shell id -u $(USER)):$(shell id -g $(USER)) \
57
                $(OPENLANE_IMAGE_NAME) sh -c $(OPENLANE_BASIC_COMMAND);\
58
        fi
59
        mkdir -p ../signoff/$*/
60
        cp $*/runs/$*/OPENLANE_VERSION ../signoff/$*/
61
        cp $*/runs/$*/PDK_SOURCES ../signoff/$*/
62
        cp $*/runs/$*/reports/final_summary_report.csv ../signoff/$*/
63
 
64
.PHONY: openlane
65
openlane:
66
ifeq ($(OPENLANE_ROOT),)
67
        @echo "Please export OPENLANE_ROOT"
68
        @exit 1
69
endif
70
        git clone https://github.com/efabless/openlane.git --branch=$(OPENLANE_TAG) --depth=1 $(OPENLANE_ROOT) && \
71
                cd $(OPENLANE_ROOT) && \
72
                make openlane
73
 
74
FORCE:
75
 
76
clean:
77
        @echo "Use clean_all to clean everything :)"
78
 
79
clean_all: $(CLEAN)
80
 
81
$(CLEAN): clean-% :
82
        rm -rf runs/$*
83
        rm -rf ../gds/$**
84
        rm -rf ../mag/$**
85
        rm -rf ../lef/$**

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.