-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
46 lines (34 loc) · 1.76 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
ifeq ("$(UVMC_HOME)","")
$(error ERROR: UVMC_HOME environment variable is not defined)
endif
# definitions only needed for OSCI:
SYSTEMC_HOME=/opt/rede/systemc-2.3.0
SYSC_COPTS=-I$(SYSTEMC_HOME)/include
SYSC_LOPTS=-L$(SYSTEMC_HOME)/lib-linux64 -Wl,-rpath -Wl,$(SYSTEMC_HOME)/lib-linux64 -lsystemc
# definitions needed for OpenCV:
CV_COPTS=`pkg-config --cflags opencv`
CV_LOPTS=`pkg-config --libs opencv`
# definitions only needed for VCS:
VCS_UVMC_SC_OPTS=-tlm2 -cflags "-g -I. -I$(VCS_HOME)/etc/systemc/tlm/include/tlm/tlm_utils -I$(UVMC_HOME)/src/connect/sc" $(UVMC_HOME)/src/connect/sc/uvmc.cpp $(UVM_HOME)/src/dpi/uvm_dpi.cc
VCS_UVMC_SV_OPTS=-q -sverilog -ntb_opts uvm -timescale=1ns/1ps +define+UVM_OBJECT_MUST_HAVE_CONSTRUCTOR +incdir+$(UVM_HOME)/src+$(UVM_HOME)/src/vcs+$(UVMC_HOME)/src/connect/sv +define+UVM_OBJECT_MUST_HAVE_CONSTRUCTOR $(UVM_HOME)/src/uvm_pkg.sv $(UVM_HOME)/src/vcs/*.sv $(UVMC_HOME)/src/connect/sv/uvmc_pkg.sv
VCS_UVMC_OPTS=-q -sysc=deltasync -lca -sysc -debug_pp -timescale=1ns/1ps uvm_custom_install_recording sc_main $(TOP)
VCS_SIMV= +UVM_NO_RELNOTES +UVM_TR_RECORD +UVM_TESTNAME=$(TEST)
# definitions for files
TOP = top
REFMOD = top
TEST= test
GCC ?= g++
vcs:
g++ -c $(CV_COPTS) external.cpp
syscan $(VCS_UVMC_SC_OPTS) $(REFMOD).cpp
vlogan $(VCS_UVMC_SV_OPTS) $(TOP).sv
vcs $(VCS_UVMC_OPTS) $(CV_LOPTS) $(TOP) $(CV_LOPTS) external.o
./simv $(VCS_SIMV) +UVM_VERBOSITY=MEDIUM
clean:
rm -rf a.out *.o # simulation output file
rm -rf INCA_libs irun.log ncsc.log # ius
rm -rf work certe_dump.xml transcript .mgc_simple_ref .mgc_ref_nobuff .mgc_ref_oct # mgc
rm -rf csrc simv simv.daidir ucli.key .vlogansetup.args .vlogansetup.env .vcs_lib_lock simv.vdb AN.DB vc_hdrs.h *.diag *.vpd *tar.gz # vcs
# Wave form
view_waves:
dve -vpd vcdplus.vpd &