-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (54 loc) · 1.59 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
NOVAS := /eda/tools/snps/verdi/R-2020.12/share/PLI/VCS/LINUX64
EXTRA := -P ${NOVAS}/novas.tab ${NOVAS}/pli.a
VERDI_TOOL := verdi
SIM_TOOL := vcs
SIM_OPTIONS := -full64 -debug_acc+all +v2k -sverilog -timescale=1ns/10ps \
${EXTRA} \
+error+500\
+define+SVA_OFF\
-work DEFAULT\
+vcs+flush+all \
+lint=TFIPC-L \
+define+S50 \
-kdb \
SIM_APP ?= axi4_sram_fsm
SRC_FILE ?=
ifeq ($(SIM_APP), axi4_sram_bpl)
SRC_FILE += ../rtl/addr_gen.sv
SRC_FILE += ../rtl/addr_ctrl.sv
SRC_FILE += ../rtl/mem_ctrl.sv
SRC_FILE += ../rtl/axi4_sram_bpl.sv
SRC_FILE += ../tb/sram_test.sv
SRC_FILE += ../tb/test_top.sv
SRC_FILE += ../tb/axi4_sram_bpl_tb.sv
endif
ifeq ($(SIM_APP), axi4_sram_fsm)
SRC_FILE += ../rtl/addr_gen.sv
SRC_FILE += ../rtl/axi4_sram_fsm.sv
SRC_FILE += ../tb/sram_test.sv
SRC_FILE += ../tb/test_top.sv
SRC_FILE += ../tb/axi4_sram_fsm_tb.sv
endif
SIM_INC ?=
SIM_INC += +incdir+../rtl/
SIM_INC += +incdir+../../common/rtl/
SIM_INC += +incdir+../../common/rtl/tech
SIM_INC += +incdir+../../common/rtl/verif
SIM_INC += +incdir+../../common/rtl/interface
SIM_TOP := $(SIM_APP)_tb
WAVE_CFG ?= # WAVE_ON
RUN_ARGS ?=
RUN_ARGS += +${WAVE_CFG}
RUN_ARGS += +WAVE_NAME=$(SIM_TOP).fsdb
comp:
@mkdir -p build
cd build && (${SIM_TOOL} ${SIM_OPTIONS} -top $(SIM_TOP) -l compile.log $(SRC_FILE) $(SIM_INC))
run: comp
cd build && ./simv -l run.log ${RUN_ARGS}
wave:
${VERDI_TOOL} -ssf build/$(SIM_TOP).fsdb &
clean:
rm -rf build
rm -rf verdiLog
rm -rf novas.*
.PHONY: wave clean