-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
46 lines (32 loc) · 1.15 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
RISCV_DV_COMMIT ?= 3da32bbf6080d3bf252a7f71c5e3a32ea4924e49
AZADI_COMMIT ?= c4b32375365bf18e352f6ee6c102ca19785f5f42
REGR := regr
REGR-DIR := $(dir $(DV_AZADI)/$(REGR)/)
gen-regr := $(REGR-DIR)
all: simulate
.PHONY: all
$(gen-regr): %:
mkdir -p $@
setup: env verify
env: google_riscv-dv azadi-new
$(DV_AZADI)/google_riscv-dv:
git clone https://github.com/google/riscv-dv.git $(DV_AZADI)/google_riscv-dv
google_riscv-dv: check-env $(DV_AZADI)/google_riscv-dv
cd $(DV_AZADI)/google_riscv-dv && \
git checkout master && git pull && \
git checkout -qf $(RISCV_DV_COMMIT)
$(DV_AZADI)/azadi-new:
git clone https://github.com/merledu/azadi-new.git $(DV_AZADI)/azadi-new
azadi-new: check-env $(DV_AZADI)/azadi-new
cd $(DV_AZADI)/azadi-new && \
git checkout main && git pull && \
git checkout -qf $(AZADI_COMMIT)
verify: $(gen-regr)
cd $(DV_AZADI)/regr && \
make -f $(DV_AZADI)/azadi-verify/env/core/vendor/core_ibex/Makefile TEST=riscv_arithmetic_basic_test ITERATIONS=1
simulate:
make -f $(DV_AZADI)/azadi-verify/env/core/vendor/core_ibex/Makefile
check-env:
ifndef DV_AZADI
$(error DV_AZADI is undefined, please export it before running make)
endif