forked from JakeStevens/RISCVBusiness
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (44 loc) · 2.26 KB
/
Makefile
File metadata and controls
55 lines (44 loc) · 2.26 KB
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
define USAGE
@echo "----------------------------------------------------------------------"
@echo " Build Targets:"
@echo " config: config core with example.yml"
@echo " verilate: Invoke 'FuseSoC run --build' to build Verilator target"
@echo " xcelium: Invoke 'FuseSoC run --build' to build Xcelium target"
@echo " lint: Invoke 'FuseSoC run --build' to run the Verilator lint target"
@echo " clean: Remove build directories"
@echo " veryclean: Remove fusesoc libraries & build directories"
@echo "----------------------------------------------------------------------"
endef
.phony: default clean config verilate xcelium
default:
$(USAGE)
config:
@echo "----------------------"
@echo " Running config_core"
@echo "----------------------"
@python3 scripts/config_core.py example.yml
verilate: config
@fusesoc --cores-root . run --setup --build --build-root rvb_out --target sim --tool verilator socet:riscv:RISCVBusiness --make_options='-j'
@echo "------------------------------------------------------------------"
@echo "Build finished, you can run with 'fusesoc run', or by navigating"
@echo "to the build directory created by FuseSoC and using the Makefile there."
@echo "------------------------------------------------------------------"
no_mem: config
@fusesoc --cores-root . run --setup --build --build-root rvb_out --target no_mc --tool verilator socet:riscv:RISCVBusiness --make_options='-j'
@echo "------------------------------------------------------------------"
@echo "Build finished, you can run with 'fusesoc run', or by navigating"
@echo "to the build directory created by FuseSoC and using the Makefile there."
@echo "------------------------------------------------------------------"
xcelium: config
@fusesoc --cores-root . run --setup --build --build-root rvb_out --target sim --tool xcelium socet:riscv:RISCVBusiness
@echo "Build finished, you can run with 'fusesoc run', or by navigating"
@echo "to the build directory created by FuseSoC and using the Makefile there."
lint: config
@fusesoc --cores-root . run --setup --build --build-root rvb_out --target lint --tool verilator socet:riscv:RISCVBusiness
@echo "Lint finished, no errors found"
clean:
rm -rf build
rm -rf rvb_out
veryclean:
rm -rf fusesoc_libraries
rm fusesoc.conf