forked from SpinalHDL/VexRiscvSoftcoreContest2018
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
66 lines (44 loc) · 2.05 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
ZEPHYR=ext/zephyr
SHELL=/bin/bash
NETLIST_DEPENDENCIES=$(shell find hardware/scala -type f)
.ONESHELL:
clean:
rm -rf ext/zephyr/samples/synchronization/vexriscv_*
rm -rf ext/zephyr/samples/philosophers/vexriscv_*
make -C software/bootloader/up5k clean
make -C software/bootloader/igloo2 clean
software/bootloader/%.bin:
source ${ZEPHYR}/zephyr-env.sh
make -C software/bootloader/$(*D) $(*F).bin
.PHONY: bootloader
bootloader:
source ${ZEPHYR}/zephyr-env.sh
make -C software/bootloader/up5k all
make -C software/bootloader/igloo2 all
${ZEPHYR}/samples/%/zephyr/zephyr.bin:
cd ${ZEPHYR}
source zephyr-env.sh
rm -rf samples/$(*)
mkdir samples/$(*)
cd samples/$(*)
cmake -DBOARD=$(lastword $(subst /, ,$(*))) ..
make -j
.PHONY: software/dhrystone/%/build/dhrystone.bin
software/dhrystone/%/build/dhrystone.bin:
source ${ZEPHYR}/zephyr-env.sh
make -C software/dhrystone/$(*)
hardware/netlist/%.v: ${NETLIST_DEPENDENCIES}
sbt "run-main riscvSoftcoreContest.$(subst hardware/netlist/,,$(subst .v,,$@))"
simUp5kPerf: hardware/netlist/Up5kPerf.v test/up5kPerf/main.cpp
make -C test/up5kPerf clean run ${ARGS}
simUp5kPerfDhrystone: software/dhrystone/up5kPerf/build/dhrystone.bin bootloader hardware/netlist/Up5kPerf.v test/up5kPerf/main.cpp
make -C test/up5kPerf clean run IRAM_BIN=../../software/dhrystone/up5kPerf/build/dhrystone.bin
simUp5kPerfSynchronization: ext/zephyr/samples/synchronization/vexriscv_contest_fast_up5kev/zephyr/zephyr.bin bootloader hardware/netlist/Up5kPerf.v test/up5kPerf/main.cpp
make -C test/up5kPerf clean run IRAM_BIN=../../ext/zephyr/samples/synchronization/vexriscv_contest_fast_up5kev/zephyr/zephyr.bin
progUp5kPerfIcecube2:
iceprog -o 0x00000 hardware/synthesis/up5kDmipsEvaluationBoard/icecube2/icecube2_Implmnt/sbt/outputs/bitmap/Up5kPerfEvaluationBoard_bitmap.bin
progUp5kPerfBootloader:
iceprog -o 0x20000 software/bootloader/up5k/copyFlash.bin
progUp5kPerfDhrystone:
iceprog -o 0x30000 software/dhrystone/up5kPerf/build/dhrystone.bin
progUp5kPerfDhrystoneAll: progUp5kPerfIcecube2 progUp5kPerfBootloader progUp5kPerfDhrystone