forked from ucb-bar/riscv-torture
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
75 lines (57 loc) · 1.94 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
# Convenience Makefile
SBT ?= java -Xmx1G -Xss8M -XX:MaxPermSize=128M -jar sbt-launch.jar
RTL_CONFIG := DefaultConfig
C_SIM := ../emulator/emulator-rocketchip-$(RTL_CONFIG)
R_SIM := ../vsim/simv-rocketchip-$(RTL_CONFIG)
TEST := output/test.S
OPTIONS := $(empty)
SUITE := output
CONFIG := config/default.config
COMMIT := none
empty :=
space := $(empty) $(empty)
cfgopt := $(space)-f$(space)
gitopt := $(space)-g$(space)
CFG := $(subst $(space),$(cfgopt),$(CONFIG))
GITCMT := $(subst $(space),$(gitopt),$(COMMIT))
.phony: gen ctest rtest itest igentest cgentest rgentest \
cnight rnight crnight csuite rsuite \
gen:
$(SBT) 'generator/run $(OPTIONS)'
csuite:
for i in `ls $(SUITE) | grep .S` ; do echo $$i ; \
result=`make ctest TEST=$(SUITE)/$$i OPTIONS="-s false" | grep 'Simulation failed\|signatures match'` ; \
echo $$result ; done
rm $(SUITE)/tes*[!.S]
rsuite:
for i in `ls $(SUITE) | grep .S` ; do echo $$i ; \
result=`make rtest TEST=$(SUITE)/$$i OPTIONS="-s false" | grep 'Simulation failed\|signatures match'` ; \
echo $$result ; done
rm $(SUITE)/tes*[!.S]
crsuite:
for i in `ls $(SUITE) | grep .S` ; do echo $$i ; \
result=`make crtest TEST=$(SUITE)/$$i OPTIONS="-s false" | grep 'Simulation failed\|signatures match'` ; \
echo $$result ; done
rm $(SUITE)/tes*[!.S]
igentest:
$(SBT) 'testrun/run'
cgentest:
$(SBT) 'testrun/run -c $(C_SIM) $(OPTIONS)'
rgentest:
$(SBT) 'testrun/run -r $(R_SIM) $(OPTIONS)'
crgentest:
$(SBT) 'testrun/run -c $(C_SIM) -r $(R_SIM) $(OPTIONS)'
itest:
$(SBT) 'testrun/run -a $(TEST) $(OPTIONS)'
ctest:
$(SBT) 'testrun/run -c $(C_SIM) -a $(TEST) $(OPTIONS)'
rtest:
$(SBT) 'testrun/run -r $(R_SIM) -a $(TEST) $(OPTIONS)'
crtest:
$(SBT) 'testrun/run -c $(C_SIM) -r $(R_SIM) -a $(TEST) $(OPTIONS)'
cnight:
$(SBT) 'overnight/run -c $(C_SIM) -g $(COMMIT) $(OPTIONS)'
rnight:
$(SBT) 'overnight/run -r $(R_SIM) -g $(COMMIT) $(OPTIONS)'
crnight:
$(SBT) 'overnight/run -c $(C_SIM) -r $(R_SIM) -g $(COMMIT) $(OPTIONS)'