forked from ben-marshall/uart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (32 loc) · 752 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
40
41
42
43
44
45
SRC_RX = rtl/uart_rx.v test/tb_rx.v
OUT_RX = work/sim-rx.bin
WAV_RX = work/waves-rx.vcd
SRC_TX = rtl/uart_tx.v test/tb_tx.v
OUT_TX = work/sim-tx.bin
WAV_TX = work/waves-tx.vcd
SRC_SYS = rtl/uart_tx.v \
rtl/uart_rx.v \
rtl/impl_top.v \
test/tb.v
OUT_SYS = work/sim-sys.bin
WAV_SYS = work/waves-sys.vcd
LOG_FILE = work/sim.log
all: rx tx sys
rx : $(WAV_RX)
tx : $(WAV_TX)
sys: $(WAV_SYS)
$(OUT_RX) : $(SRC_RX)
iverilog -o $@ $(SRC_RX)
$(WAV_RX) : $(OUT_RX)
vvp -l $(LOG_FILE) $<
$(OUT_TX) : $(SRC_TX)
iverilog -o $@ $(SRC_TX)
$(WAV_TX) : $(OUT_TX)
vvp -l $(LOG_FILE) $<
$(OUT_SYS) : $(SRC_SYS)
iverilog -o $@ $(SRC_SYS)
$(WAV_SYS) : $(OUT_SYS)
vvp -l $(LOG_FILE) $<
clean:
rm -rf ./work
mkdir -p ./work