-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (33 loc) · 856 Bytes
/
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
DIR = $(CURDIR)
SRCS = $(wildcard $(DIR)/src/*.v)
TEST_SRCS = $(wildcard $(DIR)/test/*.v)
TEST = $(basename $(shell basename $(TEST_SRCS)))
GUI ?= 0
.PHONY: $(TEST) clean project
# Icarus verilog workflow
$(TEST):
ln -s $(wildcard $(DIR)/test/*.mem) .
iverilog -vo [email protected] $(DIR)/test/[email protected] $(SRCS)
vvp -N [email protected]
# Xilinx simulator workflow
# $(TEST):
# xvlog $(SRCS) $(TEST_SRCS)
# xelab $@ -debug typical -s sim -R
# ifeq ($(GUI),1)
# xsim sim -gui -wdb simulate_xsim.wdb
# endif
project:
vivado -source scripts/create_vivado_project.tcl
clean:
rm -rf *.jou *.log xsim.* xelab.* xvlog.* sim.wdb
rm -rf xsim.dir
rm -rf .Xil
rm -rf build
rm -rf *.o
rm -rf *.zip
rm -rf *.str
find -type l -delete
dbg:
@echo SRCS: $(SRCS) | sed 's/ \+/\n /g'
@echo TEST: $(TEST) | sed 's/ \+/\n /g'
@echo TEST_SYM_MEM: $(TEST_SYM_MEM) | sed 's/ \+/\n /g'