/
Makefile
54 lines (42 loc) · 932 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
46
47
48
49
50
51
52
#testbench
incdir = ../tb
#vcs compile output
tb_name ?= top_tb
#wave related
wave_type := fsdb
wave_path := ./
wave_name := conv
#log save path
log_path := ./log/
#include cmd
INC_CMD = +incdir=$(incdir)
#define .vpd file name
VPD_NAME = +vpdfile+$(tb_name).vpd
#define vcs command
VCS = vcs -full64 \
-debug_all \
-notice \
-Mupdate \
-sverilog \
$(novas_args) \
$(INC_CMD) \
-o $(tb_name) \
-l $(log_path)vcs.log
#define sim command
SIM = ./$(tb_name)\
$(VPD_NAME) \
-l $(log_path)sim.log \
#make command
all:clean vcs sim wave
vcs:
$(VCS) -f ./file.f
sim:
$(SIM) +WAVE_PATH=$(wave_path) +WAVE_TYPE=$(wave_type)
wave:
verdi -sv -f ./file.f -ssf $(wave_path)$(wave_name).fsdb &
clean:
@rm -rf ./csrc *.daidir *.log *.vpd *.vdb simv* *.key *race.out*
@rm -rf *.args vc_hdrs.h glbl.v
@rm -rf novas.conf novas.rc .vlogansetup.args verdiLog
@rm -rf AN.DB DVEfiles
@rm -rf urgReport $(tb_name)