-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxsim.mk
More file actions
64 lines (56 loc) · 1.85 KB
/
xsim.mk
File metadata and controls
64 lines (56 loc) · 1.85 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
56
57
58
59
60
61
62
63
64
include common.mk
ifdef XILINX_VIDADO
VLOG := xvlog
ELAB := xelab
SIM := xsim
XSC := xsc
else
VIVADO_DIR := /tools/Xilinx/Vivado/2023.1/bin
VLOG := $(VIVADO_DIR)/xvlog
ELAB := $(VIVADO_DIR)/xelab
SIM := $(VIVADO_DIR)/xsim
XSC := $(VIVADO_DIR)/xsc
endif
TARGET_A := ./xsim.dir/$(TOP).batch/axsim ./axsim.sh
TARGET_D := ./xsim.dir/$(TOP).debug/xsimk
TARGET_C := ./xsim.dir/work/xsc/dpi.so
.PHONY : run gui
run : $(TARGET_A) $(TARGET_C)
./axsim.sh -testplusarg UVM_TESTNAME=$(TEST_NAME)
mv xsim.log xsim_$(TEST_NAME).log
gui : $(TARGET_D) $(TARGET_C)
$(SIM) $(TOP).debug -testplusarg UVM_TESTNAME=$(TEST_NAME) -gui
.PHONY : build_a build_d build_c
build_a :
make -B $(TARGET_A)
build_d :
make -B $(TARGET_D)
build_c :
make -B $(TARGET_C)
# make -B ./dpi_lib.so
#--------------------------------------------------------------------------
INC_OPT += --include ./In_Agent
INC_OPT += --include ./Out_Agent
INC_OPT += --include ./Env
INC_OPT += --include ./Seq
INC_OPT += --include ./Test
$(TARGET_A) : $(SRC_FILES) $(INC_FILES) $(TARGET_C)
$(VLOG) -incr -L uvm -sv $(SRC_FILES) $(INC_OPT)
$(ELAB) -incr -L uvm $(TOP) -timescale 1ns/1ps -sv_lib dpi -snapshot $(TOP).batch -standalone
$(TARGET_D) : $(SRC_FILES) $(INC_FILES) $(TARGET_C)
$(VLOG) -incr -L uvm -sv $(SRC_FILES) $(INC_OPT)
$(ELAB) -incr -L uvm $(TOP) -timescale 1ns/1ps -sv_lib dpi -snapshot $(TOP).debug -debug all
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
$(TARGET_C) : $(C_FILES)
$(XSC) $^
#./dpi_lib.so : ./C/dpi_get_val.cpp ./C/C_Program.cpp
# $(XSC) -o $@ $^
# g++ -m32 -fPIC -shared -o dpi_lib.so $^
#--------------------------------------------------------------------------
.PHONY: clean
clean :
rm -fr xsim.dir .Xil axsim.sh dpi_lib.so
rm -fr *.pb
rm -rf *.log *.jou *.str
rm -fr *.vcd *.wdb