forked from OpenXiangShan/XiangShan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
136 lines (103 loc) · 3.85 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#***************************************************************************************
# Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences
# Copyright (c) 2020-2021 Peng Cheng Laboratory
#
# XiangShan is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
#
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
#
# See the Mulan PSL v2 for more details.
#***************************************************************************************
ARCH = ARCH=riscv64-xs
NANOS_HOME ?= $(AM_HOME)/../nanos-lite
SINGLETEST = ALL=min3
B ?= 0
E ?= 0
V ?= OFF
#V ?= OFF
EMU_ARGS = B=$(B) E=$(E) V=$(V)
# ------------------------------------------------------------------
# bulid CPU and run dummy test
# ------------------------------------------------------------------
cache:
$(MAKE) -C $(AM_HOME)/tests/cachetest $(ARCH) ALL=loader $(EMU_ARGS) run
#2>&1 | tee > loader.log
#2>&1 | tee > loader.log
cpu:
$(MAKE) -C $(AM_HOME)/tests/cputest $(ARCH) ALL=dummy $(EMU_ARGS) run 2>&1
# ------------------------------------------------------------------
# run different test sets
# ------------------------------------------------------------------
cputest:
bash cputest.sh
# bputest:
# $(MAKE) -C $(AM_HOME)/tests/bputest $(ARCH) run 2>&1 | tee > bpu.log
# cat bpu.log | grep different
bputest:
$(MAKE) -C $(AM_HOME)/tests/bputest $(ARCH) run 2 > bpu.log
cat bpu.log | grep Mbp
amtest:
$(MAKE) -C $(AM_HOME)/tests/cputest $(ARCH) $(SINGLETEST) run 2 > test.log
cat test.log | grep different
cat test.log | grep ISU > isu.log
microbench:
$(MAKE) -C $(AM_HOME)/apps/microbench $(ARCH) $(EMU_ARGS) mainargs=test run
#2>&1 | tee > microbench.log
#2 > microbench.log
cat microbench.log | grep IPC
microbench_train:
$(MAKE) -C $(AM_HOME)/apps/microbench $(ARCH) $(EMU_ARGS) mainargs=train run 2 > microbench.log
cat microbench.log | grep IPC
coremark:
$(MAKE) -C $(AM_HOME)/apps/coremark $(ARCH) $(EMU_ARGS) mainargs=test run
#2 > coremark.log
cat coremark.log | grep IPC
dhrystone:
$(MAKE) -C $(AM_HOME)/apps/dhrystone $(ARCH) $(EMU_ARGS) mainargs=test run 2 > dhrystone.log
cat dhrystone.log | grep IPC
xj:
$(MAKE) -C $(NANOS_HOME) $(ARCH) $(EMU_ARGS) run
xjnemu:
$(MAKE) -C $(NANOS_HOME) ARCH=riscv64-nemu run
rttos:
$(MAKE) -C $(RTTOS_HOME)/bsp/riscv64-noop run
rttos-debug:
$(MAKE) -C $(RTTOS_HOME)/bsp/riscv64-noop run 2>&1 | tee > rttos.log
freertos:
$(MAKE) -C $(FREERTOS_HOME)/Demo/riscv64-noop noop_run
xv6:
$(MAKE) -C $(XV6_HOME) noop
xv6-debug:
$(MAKE) -C $(XV6_HOME) noop 2>&1 | tee > xv6.log
linux:
$(MAKE) -C $(BBL_LINUX_HOME) $(EMU_ARGS) noop
# ------------------------------------------------------------------
# get disassembled test src
# ------------------------------------------------------------------
disassemble-rttos:
cp $(RTTOS_HOME)/bsp/riscv64-noop/build/code.txt ./d-rttos.log
disassemble-freertos:
cp $(FREERTOS_HOME)/Demo/riscv64-noop/build/FreeRTOS-simple.elf.txt ./d-freertos.log
disassemble-xv6:
cp $(XV6_HOME)/build/code.txt ./d-xv6.log
SUITE = cache.L2CacheTest
unit-test:
cd .. && mill XiangShan.test.testOnly -o -s $(SUITE)
tlc-test:
cd .. && mill XiangShan.test.testOnly -o -s cache.TLCTest.TLCCacheTest
l1-test:
cd .. && mill XiangShan.test.testOnly -o -s cache.L1DTest.L1DCacheTest
int-divider-test:
cd .. && mill XiangShan.test.testOnly -o -s futest.IntDividerTest
unit-test-all:
cd .. && mill XiangShan.test.test -P$(P)
# ------------------------------------------------------------------
# chore
# ------------------------------------------------------------------
clean:
$(MAKE) -C .. clean