-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (39 loc) · 1.11 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
BUILD_DIR = build
# dirs
PROG_DIR = prog
GENTESTVEC_DIR = sim/gentestvec
TESTBENCH_DIR = sim/testbenches
RTL_DIR = rtl
# tools
MAKE = make
all: simulate
# generate rom
rom:
$(MAKE) -C $(PROG_DIR) BUILD_DIR=../$(BUILD_DIR) all
# print objdump of rom
objdump:
$(MAKE) -C $(PROG_DIR) BUILD_DIR=../$(BUILD_DIR) objdump
# print size information of rom
size:
$(MAKE) -C $(PROG_DIR) BUILD_DIR=../$(BUILD_DIR) size
# generate testvec files
testvec:
$(MAKE) -C $(GENTESTVEC_DIR) BUILD_DIR=../../$(BUILD_DIR) all
# run testbenches (simulate)
simulate: rom testvec
$(MAKE) -C $(TESTBENCH_DIR) BUILD_DIR=../../$(BUILD_DIR) all
# display waveform of cpu testbench
wave: rom testvec
$(MAKE) -C $(TESTBENCH_DIR) BUILD_DIR=../../$(BUILD_DIR) wave
# generate bitstream
bitstream: rom
$(MAKE) -C $(RTL_DIR) BUILD_DIR=../$(BUILD_DIR) all
# upload bitstream
upload: rom
$(MAKE) -C $(RTL_DIR) BUILD_DIR=../$(BUILD_DIR) upload
# flash bitstream
flash: rom
$(MAKE) -C $(RTL_DIR) BUILD_DIR=../$(BUILD_DIR) flash
clean:
rm -rf $(BUILD_DIR)
.PHONY: all clean rom rom_objdump rom_size testvec simulate wave bitstream upload flash