-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
100 lines (81 loc) · 2.03 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
# USB=true is only for the special dspio (and similar boards)
# with the FTDI chip for download
USB=false
# Altera FPGA configuration cable
#BLASTER_TYPE=ByteBlasterMV
BLASTER_TYPE=USB-Blaster
ifeq ($(WINDIR),)
USBRUNNER=./USBRunner
S=:
else
USBRUNNER=USBRunner.exe
S=\;
endif
# The VHDL project for Quartus
QPROJ=tile_test_alt
# start from scratch including checkout of Leros
all: get_leros build_all
get_leros:
git clone git://github.com/schoeberl/leros.git
# build everything, Leros is already in place
build_all: tools compile assemble
make s4nocusb
make config
update_leros:
cd leros && git pull
tools:
cd leros && make tools
cd noc && make tools
compile:
# cd leros/LerosMuviumSDK && makeTest.bat
# cd leros && make java_app -e JAPP=TestNoc
cd leros && make java_app -e TARGET_SRC=../noc/src JAPP=Noc_test
assemble:
# cd leros && make rom -e APP=../asm/muvium
cd leros && make rom -e APP=../../noc/src/Noc_test
build:
cd leros && make rom -e APP=io
# cd leros && make java_app -e JAPP=Test
# cd leros && make rom -e APP=muvium
sim:
cd noc && make base
cd noc && make sim
# configure the FPGA
config:
ifeq ($(USB),true)
make config_usb
else
ifeq ($(XFPGA),true)
make config_xilinx
else
make config_altblaster
endif
endif
directories:
-mkdir rbf
s4nocusb: directories
@echo $(QPROJ)
for target in $(QPROJ); do \
make qsyn -e QBT=$$target || exit; \
cd noc/quartus/$$target && quartus_cpf -c $(QPROJ).sof ../../../rbf/$$target.rbf; \
done
#
# Quartus build process
# called by jopser, jopusb,...
#
qsyn:
echo $(QBT)
echo "building $(QBT)"
-rm -rf noc/quartus/$(QBT)/db
-rm -f noc/quartus/$(QBT)/$(QPROJ).sof
-rm -f jbc/$(QBT).jbc
-rm -f rbf/$(QBT).rbf
quartus_map noc/quartus/$(QBT)/$(QPROJ)
quartus_fit noc/quartus/$(QBT)/$(QPROJ)
quartus_asm noc/quartus/$(QBT)/$(QPROJ)
quartus_sta noc/quartus/$(QBT)/$(QPROJ)
config_altblaster:
cd noc/quartus/$(QPROJ) && quartus_pgm -c $(BLASTER_TYPE) -m JTAG tile_test_alt.cdf
# this is only for a very special board, the dspio
config_usb:
cd rbf && ../$(USBRUNNER) $(QPROJ).rbf